tosijs-ui 1.7.0 → 1.7.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/babylon-3d.d.ts +1 -1
  3. package/dist/babylon-3d.js +1 -1
  4. package/dist/code-editor-cm.js +5 -1
  5. package/dist/code-editor.d.ts +1 -1
  6. package/dist/code-editor.js +1 -1
  7. package/dist/data-table.d.ts +3 -1
  8. package/dist/data-table.js +97 -5
  9. package/dist/doc-browser.js +6 -1
  10. package/dist/doc-system/doc-system-styles.js +11 -0
  11. package/dist/doc-system/site/dev-server.d.ts +11 -0
  12. package/dist/doc-system/site/dev-server.js +26 -3
  13. package/dist/doc-system/site/generate-site.d.ts +18 -0
  14. package/dist/doc-system/site/generate-site.js +42 -10
  15. package/dist/doc-system/site/site-config.d.ts +10 -3
  16. package/dist/hydrate/{ajs-language-h1x0ydap.js → ajs-language-qm5w38ae.js} +3 -3
  17. package/dist/hydrate/{ajs-language-h1x0ydap.js.map → ajs-language-qm5w38ae.js.map} +1 -1
  18. package/dist/hydrate/{code-editor-cm-2hgj9002.js → code-editor-cm-95n31m4f.js} +8 -8
  19. package/dist/hydrate/{code-editor-cm-2hgj9002.js.map → code-editor-cm-95n31m4f.js.map} +3 -3
  20. package/dist/hydrate/hydrate.js +78 -78
  21. package/dist/hydrate/hydrate.js.map +20 -19
  22. package/dist/hydrate/{index-nsmyq9mv.js → index-0ps8jzdn.js} +3 -3
  23. package/dist/hydrate/{index-nsmyq9mv.js.map → index-0ps8jzdn.js.map} +1 -1
  24. package/dist/hydrate/{index-iife-64z9yngn.js → index-iife-415dypjp.js} +3 -3
  25. package/dist/hydrate/{index-iife-64z9yngn.js.map → index-iife-415dypjp.js.map} +1 -1
  26. package/dist/hydrate/index-iife-kwhe0yt8.js +27 -0
  27. package/dist/hydrate/{index-iife-5wzyvyzm.js.map → index-iife-kwhe0yt8.js.map} +2 -2
  28. package/dist/hydrate/{index-iife-x2h4f6fc.js → index-iife-ype8sch3.js} +3 -3
  29. package/dist/hydrate/{index-iife-x2h4f6fc.js.map → index-iife-ype8sch3.js.map} +1 -1
  30. package/dist/hydrate/{tjs-import-resolver-akt3k27z.js → tjs-import-resolver-s4z0w296.js} +2 -2
  31. package/dist/iife.js +70 -70
  32. package/dist/iife.js.map +21 -20
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/live-example/component.d.ts +8 -1
  36. package/dist/live-example/component.js +8 -0
  37. package/dist/live-example/styles.d.ts +8 -1
  38. package/dist/live-example/styles.js +17 -1
  39. package/dist/live-theme.js +98 -0
  40. package/dist/side-nav.d.ts +1 -1
  41. package/dist/side-nav.js +4 -4
  42. package/dist/size-break.d.ts +1 -1
  43. package/dist/size-break.js +3 -3
  44. package/dist/tab-selector.d.ts +11 -2
  45. package/dist/tab-selector.js +19 -6
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/dist/value-renderer.d.ts +26 -0
  48. package/dist/value-renderer.js +209 -0
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/llms.txt +3 -3
  52. package/package.json +1 -1
  53. package/dist/bp-loader.d.ts +0 -1
  54. package/dist/bp-loader.js +0 -26
  55. package/dist/hydrate/index-iife-5wzyvyzm.js +0 -27
  56. /package/dist/hydrate/{tjs-import-resolver-akt3k27z.js.map → tjs-import-resolver-s4z0w296.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{Aa as q,Da as R,Na as _,ea as E,s as b,ta as S,w as A,y as N,z as L}from"./index-iife-5wzyvyzm.js";import{Oa as C,Pa as d,Qa as l}from"./index-iife-x2h4f6fc.js";import"./index-iife-64z9yngn.js";var c=["function","return","if","else","while","for","of","in","try","catch","finally","let","const","true","false","null","undefined"],x=["new","class","extends","super","this","implements","interface","abstract","static","private","protected","public","async","await","yield","import","export","require","module","var","throw","switch","case","default","with","delete","void","typeof","instanceof","debugger","eval","type","enum","namespace","declare","readonly","as","is","keyof","infer","never","unknown"],n=["Date","Set","Map","Array","Object","String","Number","Boolean","RegExp","Error","JSON","Math","Schema"],i=["=","+=","-=","*=","/=","%=","==","===","!=","!==","<",">","<=",">=","+","-","*","/","%","**","&&","||","??","!","&","|","^","~","<<",">>",">>>","?",":",".","?.","?.(","?.[","..."],Rz=new Set(x),hz=new Set(c),fz=new RegExp(`\\b(${x.join("|")})\\b`,"g"),o=["test","mock","unsafe","async","await","throw","import","export","class","extends","super","this","new","static","typeof","instanceof","delete"],uz=[...c,...o],e=x.filter((z)=>!["async","await","throw","import","export","class","extends","super","this","new","static","typeof","instanceof","delete"].includes(z)),Bz=[...n,"expect","assert"],gz=[...i,"->"];function zz(z){try{return C(z,{ecmaVersion:"latest"})}catch{try{return d(z,{ecmaVersion:"latest"})}catch{return null}}}function G(z,Z,X){if(!z)return;switch(z.type){case"Identifier":Z(z.name,X);return;case"ObjectPattern":for(let Q of z.properties)if(Q.type==="RestElement")G(Q.argument,Z);else{let $=Q.key&&(Q.key.name??Q.key.value);G(Q.value,Z,typeof $==="string"?$:void 0)}return;case"ArrayPattern":for(let Q of z.elements)G(Q,Z);return;case"AssignmentPattern":G(z.left,Z,X);return;case"RestElement":G(z.argument,Z);return}}var g=(z,Z)=>typeof z.start==="number"&&typeof z.end==="number"&&z.start<=Z&&Z<=z.end;function Qz(z,Z=z.length){let X=zz(z);if(!X)return[];let Q=new Map,$=(V)=>Q.set(V.name,V);return l(X,(V)=>{switch(V.type){case"VariableDeclaration":{if(V.start>=Z)return;for(let M of V.declarations){let U=M.init&&typeof M.init.start==="number"?z.slice(M.init.start,M.init.end):void 0;G(M.id,(W,H)=>$({name:W,kind:"variable",origin:{via:H!=null?"destructure":"init",expr:U,member:H}}))}return}case"FunctionDeclaration":{if(V.id&&V.start<Z)$({name:V.id.name,kind:"function",origin:{via:"function"}});if(g(V,Z))for(let M of V.params)G(M,(U)=>$({name:U,kind:"parameter",origin:{via:"param"}}));return}case"FunctionExpression":case"ArrowFunctionExpression":{if(g(V,Z))for(let M of V.params)G(M,(U)=>$({name:U,kind:"parameter",origin:{via:"param"}}));return}case"ImportDeclaration":{let M=String(V.source?.value??"");for(let U of V.specifiers)$({name:U.local.name,kind:"import",origin:{via:"import",module:M}});return}}}),[...Q.values()]}var Zz=new Set(x),$z=new Set(e),qz=A.mark({class:"cm-ajs-forbidden"}),Xz=A.mark({class:"cm-tjs-special"});function h(z){let Z=[],X=z.length,Q=0;while(Q<X){let $=z[Q],V=z[Q+1];if($==="/"&&V==="/"){let M=Q;Q+=2;while(Q<X&&z[Q]!==`
1
+ import{Ba as q,Ea as R,Oa as _,fa as E,s as b,ua as S,w as A,y as N,z as L}from"./index-iife-kwhe0yt8.js";import{Pa as C,Qa as d,Ra as l}from"./index-iife-ype8sch3.js";import"./index-iife-415dypjp.js";var c=["function","return","if","else","while","for","of","in","try","catch","finally","let","const","true","false","null","undefined"],x=["new","class","extends","super","this","implements","interface","abstract","static","private","protected","public","async","await","yield","import","export","require","module","var","throw","switch","case","default","with","delete","void","typeof","instanceof","debugger","eval","type","enum","namespace","declare","readonly","as","is","keyof","infer","never","unknown"],n=["Date","Set","Map","Array","Object","String","Number","Boolean","RegExp","Error","JSON","Math","Schema"],i=["=","+=","-=","*=","/=","%=","==","===","!=","!==","<",">","<=",">=","+","-","*","/","%","**","&&","||","??","!","&","|","^","~","<<",">>",">>>","?",":",".","?.","?.(","?.[","..."],Rz=new Set(x),hz=new Set(c),fz=new RegExp(`\\b(${x.join("|")})\\b`,"g"),o=["test","mock","unsafe","async","await","throw","import","export","class","extends","super","this","new","static","typeof","instanceof","delete"],uz=[...c,...o],e=x.filter((z)=>!["async","await","throw","import","export","class","extends","super","this","new","static","typeof","instanceof","delete"].includes(z)),Bz=[...n,"expect","assert"],gz=[...i,"->"];function zz(z){try{return C(z,{ecmaVersion:"latest"})}catch{try{return d(z,{ecmaVersion:"latest"})}catch{return null}}}function G(z,Z,X){if(!z)return;switch(z.type){case"Identifier":Z(z.name,X);return;case"ObjectPattern":for(let Q of z.properties)if(Q.type==="RestElement")G(Q.argument,Z);else{let $=Q.key&&(Q.key.name??Q.key.value);G(Q.value,Z,typeof $==="string"?$:void 0)}return;case"ArrayPattern":for(let Q of z.elements)G(Q,Z);return;case"AssignmentPattern":G(z.left,Z,X);return;case"RestElement":G(z.argument,Z);return}}var g=(z,Z)=>typeof z.start==="number"&&typeof z.end==="number"&&z.start<=Z&&Z<=z.end;function Qz(z,Z=z.length){let X=zz(z);if(!X)return[];let Q=new Map,$=(V)=>Q.set(V.name,V);return l(X,(V)=>{switch(V.type){case"VariableDeclaration":{if(V.start>=Z)return;for(let M of V.declarations){let U=M.init&&typeof M.init.start==="number"?z.slice(M.init.start,M.init.end):void 0;G(M.id,(W,H)=>$({name:W,kind:"variable",origin:{via:H!=null?"destructure":"init",expr:U,member:H}}))}return}case"FunctionDeclaration":{if(V.id&&V.start<Z)$({name:V.id.name,kind:"function",origin:{via:"function"}});if(g(V,Z))for(let M of V.params)G(M,(U)=>$({name:U,kind:"parameter",origin:{via:"param"}}));return}case"FunctionExpression":case"ArrowFunctionExpression":{if(g(V,Z))for(let M of V.params)G(M,(U)=>$({name:U,kind:"parameter",origin:{via:"param"}}));return}case"ImportDeclaration":{let M=String(V.source?.value??"");for(let U of V.specifiers)$({name:U.local.name,kind:"import",origin:{via:"import",module:M}});return}}}),[...Q.values()]}var Zz=new Set(x),$z=new Set(e),qz=A.mark({class:"cm-ajs-forbidden"}),Xz=A.mark({class:"cm-tjs-special"});function h(z){let Z=[],X=z.length,Q=0;while(Q<X){let $=z[Q],V=z[Q+1];if($==="/"&&V==="/"){let M=Q;Q+=2;while(Q<X&&z[Q]!==`
2
2
  `)Q++;Z.push([M,Q]);continue}if($==="/"&&V==="*"){let M=Q;Q+=2;while(Q<X-1&&!(z[Q]==="*"&&z[Q+1]==="/"))Q++;Q+=2,Z.push([M,Q]);continue}if($==="`"){let M=Q;Q++;while(Q<X){if(z[Q]==="\\"){Q+=2;continue}if(z[Q]==="`"){Z.push([M,Q+1]),Q++;break}if(z[Q]==="$"&&z[Q+1]==="{"){Z.push([M,Q]),Q+=2;let U=1;while(Q<X&&U>0){if(z[Q]==="{")U++;else if(z[Q]==="}")U--;if(U>0)Q++}Q++,M=Q;continue}Q++}continue}if($==='"'||$==="'"){let M=$,U=Q;Q++;while(Q<X){if(z[Q]==="\\"){Q+=2;continue}if(z[Q]===M){Q++;break}if(z[Q]===`
3
3
  `)break;Q++}Z.push([U,Q]);continue}Q++}return Z}function f(z,Z){for(let[X,Q]of Z){if(z>=X&&z<Q)return!0;if(X>z)break}return!1}function r(z){let Z=new RegExp(`\\b(${[...z].join("|")})\\b`,"g");return N.fromClass(class{decorations;constructor(X){this.decorations=this.buildDecorations(X)}update(X){if(X.docChanged||X.viewportChanged)this.decorations=this.buildDecorations(X.view)}buildDecorations(X){let Q=new b,$=X.state.doc.toString(),V=h($),M=new RegExp(Z.source,"g"),U;while((U=M.exec($))!==null)if(!f(U.index,V))Q.add(U.index,U.index+U[0].length,qz);return Q.finish()}},{decorations:(X)=>X.decorations})}var m=r(Zz),Vz=r($z),u=N.fromClass(class{decorations;constructor(z){this.decorations=this.buildDecorations(z)}update(z){if(z.docChanged||z.viewportChanged)this.decorations=this.buildDecorations(z.view)}buildDecorations(z){let Z=new b,X=z.state.doc.toString(),Q=h(X),$=/\btry\s*\{/g,V;while((V=$.exec(X))!==null){if(f(V.index,Q))continue;let M=V.index+V[0].length-1,U=1,W=M+1;while(W<X.length&&U>0){let K=X[W];if(K==="{")U++;else if(K==="}")U--;W++}if(U!==0)continue;if(!X.slice(W).match(/^\s*(catch|finally)\b/)){let K=V.index+3;Z.add(V.index,K,Xz)}}return Z.finish()}},{decorations:(z)=>z.decorations}),B=L.theme({".cm-ajs-forbidden":{color:"#dc2626",textDecoration:"wavy underline #dc2626",backgroundColor:"rgba(220, 38, 38, 0.1)"},".cm-tjs-special":{color:"#7c3aed",fontWeight:"bold",backgroundColor:"rgba(124, 58, 237, 0.1)"}}),Oz=S.define([]);function Uz(z){if(z.type==="method"){let Z=z.detail!=="()";return q(`${z.label}(${Z?"${1}":""})`,{label:z.label,type:"method",detail:z.detail})}return{label:z.label,type:"property",detail:z.detail}}var Jz=[{label:"function",type:"keyword",detail:"Declare a function"},{label:"const",type:"keyword",detail:"Declare a constant"},{label:"let",type:"keyword",detail:"Declare a variable"},{label:"if",type:"keyword",detail:"Conditional statement"},{label:"else",type:"keyword",detail:"Else branch"},{label:"while",type:"keyword",detail:"While loop"},{label:"for",type:"keyword",detail:"For loop"},{label:"return",type:"keyword",detail:"Return from function"},{label:"try",type:"keyword",detail:"Try block"},{label:"catch",type:"keyword",detail:"Catch block"},{label:"import",type:"keyword",detail:"Import module"},{label:"export",type:"keyword",detail:"Export declaration"},q("test('${description}') {\n\t${}\n}",{label:"test",type:"keyword",detail:"Inline test block"}),q(`mock {
4
4
  \${}
@@ -7,5 +7,5 @@ import{Aa as q,Da as R,Na as _,ea as E,s as b,ta as S,w as A,y as N,z as L}from"
7
7
  }`,{label:"unsafe",type:"keyword",detail:"Skip type validation"})],O=[{label:"''",type:"type",detail:"String type"},{label:"0",type:"type",detail:"Number type"},{label:"true",type:"type",detail:"Boolean type"},{label:"null",type:"type",detail:"Null type"},{label:"undefined",type:"type",detail:"Undefined type"},{label:"['']",type:"type",detail:"Array of strings"},{label:"[0]",type:"type",detail:"Array of numbers"},{label:"{}",type:"type",detail:"Object type"},{label:"any",type:"type",detail:"Any type"}],Mz=[q("isError(${value})",{label:"isError",type:"function",detail:"(value: any) -> boolean",info:"Check if a value is a TJS error"}),q("error('${message}')",{label:"error",type:"function",detail:"(message: string) -> TJSError",info:"Create a TJS error object"}),q("typeOf(${value})",{label:"typeOf",type:"function",detail:"(value: any) -> string",info:"Get type name (fixed typeof)"}),q("expect(${actual})",{label:"expect",type:"function",detail:"(actual: any) -> Matchers",info:"Test assertion"})],Hz=[{label:"console",type:"variable",detail:"Console object",info:"Logging and debugging"},{label:"Math",type:"variable",detail:"Math object",info:"Mathematical functions and constants"},{label:"JSON",type:"variable",detail:"JSON object",info:"JSON parse and stringify"},{label:"Array",type:"class",detail:"Array constructor",info:"Create arrays"},{label:"Object",type:"class",detail:"Object constructor",info:"Object utilities"},{label:"String",type:"class",detail:"String constructor",info:"String utilities"},{label:"Number",type:"class",detail:"Number constructor",info:"Number utilities"},{label:"Boolean",type:"class",detail:"Boolean constructor"},{label:"Date",type:"class",detail:"Date constructor",info:"Date and time"},{label:"RegExp",type:"class",detail:"RegExp constructor",info:"Regular expressions"},{label:"Map",type:"class",detail:"Map constructor",info:"Key-value collection"},{label:"Set",type:"class",detail:"Set constructor",info:"Unique value collection"},{label:"WeakMap",type:"class",detail:"WeakMap constructor"},{label:"WeakSet",type:"class",detail:"WeakSet constructor"},{label:"Symbol",type:"class",detail:"Symbol constructor"},{label:"BigInt",type:"class",detail:"BigInt constructor"},{label:"Error",type:"class",detail:"Error constructor"},{label:"TypeError",type:"class",detail:"TypeError constructor"},{label:"RangeError",type:"class",detail:"RangeError constructor"},{label:"SyntaxError",type:"class",detail:"SyntaxError constructor"},{label:"ReferenceError",type:"class",detail:"ReferenceError constructor"},{label:"ArrayBuffer",type:"class",detail:"ArrayBuffer constructor"},{label:"Uint8Array",type:"class",detail:"Uint8Array constructor"},{label:"Int8Array",type:"class",detail:"Int8Array constructor"},{label:"Uint16Array",type:"class",detail:"Uint16Array constructor"},{label:"Int16Array",type:"class",detail:"Int16Array constructor"},{label:"Uint32Array",type:"class",detail:"Uint32Array constructor"},{label:"Int32Array",type:"class",detail:"Int32Array constructor"},{label:"Float32Array",type:"class",detail:"Float32Array constructor"},{label:"Float64Array",type:"class",detail:"Float64Array constructor"},{label:"Promise",type:"class",detail:"Promise constructor"},{label:"parseInt",type:"function",detail:"(string, radix?) -> number"},{label:"parseFloat",type:"function",detail:"(string) -> number"},{label:"isNaN",type:"function",detail:"(value) -> boolean"},{label:"isFinite",type:"function",detail:"(value) -> boolean"},{label:"encodeURI",type:"function",detail:"(uri) -> string"},{label:"decodeURI",type:"function",detail:"(encodedURI) -> string"},{label:"encodeURIComponent",type:"function",detail:"(component) -> string"},{label:"decodeURIComponent",type:"function",detail:"(encoded) -> string"},{label:"undefined",type:"keyword",detail:"Undefined value"},{label:"null",type:"keyword",detail:"Null value"},{label:"NaN",type:"keyword",detail:"Not a Number"},{label:"Infinity",type:"keyword",detail:"Positive infinity"},{label:"globalThis",type:"variable",detail:"Global object"}],Kz=[q("toBe(${expected})",{label:"toBe",type:"method",detail:"(expected: any)",info:"Strict equality (===)"}),q("toEqual(${expected})",{label:"toEqual",type:"method",detail:"(expected: any)",info:"Deep equality"}),q("toContain(${item})",{label:"toContain",type:"method",detail:"(item: any)",info:"Array/string contains"}),{label:"toThrow",type:"method",detail:"()",info:"Throws an error"},{label:"toBeTruthy",type:"method",detail:"()",info:"Is truthy"},{label:"toBeFalsy",type:"method",detail:"()",info:"Is falsy"},{label:"toBeNull",type:"method",detail:"()",info:"Is null"},{label:"toBeUndefined",type:"method",detail:"()",info:"Is undefined"}];function Wz(z){let Z=[],X=/function\s+(\w+)\s*\(([^)]*)\)/g,Q;while((Q=X.exec(z))!==null){let[,$,V]=Q;Z.push(q(`${$}(${V?"${1}":""})`,{label:$,type:"function",detail:`(${V})`}))}return Z}function Yz(z,Z){let X=[],Q=z.slice(0,Z),$=/(?:const|let)\s+(\w+)\s*=/g,V;while((V=$.exec(Q))!==null)X.push({label:V[1],type:"variable"});return X}function Fz(z,Z){let X=Qz(z,Z);if(X.length===0)return[...Wz(z),...Yz(z,Z)];return X.map((Q)=>{let $=Q.origin?.member&&Q.origin.expr?`∈ ${Q.origin.expr}`:Q.kind==="import"&&Q.origin?.module?`import '${Q.origin.module}'`:Q.kind==="parameter"?"parameter":void 0;if(Q.kind==="function")return q(`${Q.name}($1)`,{label:Q.name,type:"function",detail:$});return{label:Q.name,type:"variable",detail:$}})}var T={console:[q("log(${1:message})",{label:"log",type:"method",detail:"(...args: any[]) -> void",info:"Log to console"}),q("error(${1:message})",{label:"error",type:"method",detail:"(...args: any[]) -> void",info:"Log error"}),q("warn(${1:message})",{label:"warn",type:"method",detail:"(...args: any[]) -> void",info:"Log warning"}),q("info(${1:message})",{label:"info",type:"method",detail:"(...args: any[]) -> void",info:"Log info"}),q("debug(${1:message})",{label:"debug",type:"method",detail:"(...args: any[]) -> void",info:"Log debug"}),q("table(${1:data})",{label:"table",type:"method",detail:"(data: any) -> void",info:"Display as table"}),q("time('${1:label}')",{label:"time",type:"method",detail:"(label: string) -> void",info:"Start timer"}),q("timeEnd('${1:label}')",{label:"timeEnd",type:"method",detail:"(label: string) -> void",info:"End timer"}),q("group('${1:label}')",{label:"group",type:"method",detail:"(label?: string) -> void",info:"Start group"}),{label:"groupEnd",type:"method",detail:"() -> void",info:"End group"},{label:"clear",type:"method",detail:"() -> void",info:"Clear console"}],Math:[q("floor(${1:x})",{label:"floor",type:"method",detail:"(x: number) -> number",info:"Round down"}),q("ceil(${1:x})",{label:"ceil",type:"method",detail:"(x: number) -> number",info:"Round up"}),q("round(${1:x})",{label:"round",type:"method",detail:"(x: number) -> number",info:"Round to nearest"}),q("trunc(${1:x})",{label:"trunc",type:"method",detail:"(x: number) -> number",info:"Remove decimals"}),q("abs(${1:x})",{label:"abs",type:"method",detail:"(x: number) -> number",info:"Absolute value"}),q("sign(${1:x})",{label:"sign",type:"method",detail:"(x: number) -> number",info:"Sign of number (-1, 0, 1)"}),q("min(${1:a}, ${2:b})",{label:"min",type:"method",detail:"(...values: number[]) -> number",info:"Minimum value"}),q("max(${1:a}, ${2:b})",{label:"max",type:"method",detail:"(...values: number[]) -> number",info:"Maximum value"}),q("clamp(${1:x}, ${2:min}, ${3:max})",{label:"clamp",type:"method",detail:"(x, min, max) -> number",info:"Clamp to range (ES2024)"}),q("pow(${1:base}, ${2:exp})",{label:"pow",type:"method",detail:"(base, exp) -> number",info:"Power"}),q("sqrt(${1:x})",{label:"sqrt",type:"method",detail:"(x: number) -> number",info:"Square root"}),q("cbrt(${1:x})",{label:"cbrt",type:"method",detail:"(x: number) -> number",info:"Cube root"}),q("hypot(${1:a}, ${2:b})",{label:"hypot",type:"method",detail:"(...values: number[]) -> number",info:"Hypotenuse"}),q("log(${1:x})",{label:"log",type:"method",detail:"(x: number) -> number",info:"Natural log"}),q("log10(${1:x})",{label:"log10",type:"method",detail:"(x: number) -> number",info:"Base 10 log"}),q("log2(${1:x})",{label:"log2",type:"method",detail:"(x: number) -> number",info:"Base 2 log"}),q("exp(${1:x})",{label:"exp",type:"method",detail:"(x: number) -> number",info:"e^x"}),q("sin(${1:x})",{label:"sin",type:"method",detail:"(radians: number) -> number"}),q("cos(${1:x})",{label:"cos",type:"method",detail:"(radians: number) -> number"}),q("tan(${1:x})",{label:"tan",type:"method",detail:"(radians: number) -> number"}),q("atan2(${1:y}, ${2:x})",{label:"atan2",type:"method",detail:"(y, x) -> number",info:"Angle in radians"}),{label:"random",type:"method",detail:"() -> number",info:"Random 0-1"},{label:"PI",type:"property",detail:"number",info:"3.14159..."},{label:"E",type:"property",detail:"number",info:"2.71828..."}],JSON:[q("parse(${1:text})",{label:"parse",type:"method",detail:"(text: string) -> any",info:"Parse JSON string"}),q("stringify(${1:value})",{label:"stringify",type:"method",detail:"(value: any, replacer?, space?) -> string",info:"Convert to JSON"})],Object:[q("keys(${1:obj})",{label:"keys",type:"method",detail:"(obj: object) -> string[]",info:"Get property names"}),q("values(${1:obj})",{label:"values",type:"method",detail:"(obj: object) -> any[]",info:"Get property values"}),q("entries(${1:obj})",{label:"entries",type:"method",detail:"(obj: object) -> [string, any][]",info:"Get key-value pairs"}),q("fromEntries(${1:entries})",{label:"fromEntries",type:"method",detail:"(entries: [string, any][]) -> object",info:"Create from entries"}),q("assign(${1:target}, ${2:source})",{label:"assign",type:"method",detail:"(target, ...sources) -> object",info:"Copy properties"}),q("hasOwn(${1:obj}, ${2:prop})",{label:"hasOwn",type:"method",detail:"(obj, prop: string) -> boolean",info:"Has own property"}),q("freeze(${1:obj})",{label:"freeze",type:"method",detail:"(obj: T) -> T",info:"Make immutable"})],Array:[q("isArray(${1:value})",{label:"isArray",type:"method",detail:"(value: any) -> boolean",info:"Check if array"}),q("from(${1:iterable})",{label:"from",type:"method",detail:"(iterable, mapFn?) -> any[]",info:"Create from iterable"}),q("of(${1:items})",{label:"of",type:"method",detail:"(...items) -> any[]",info:"Create from arguments"})],String:[q("fromCharCode(${1:code})",{label:"fromCharCode",type:"method",detail:"(...codes: number[]) -> string"}),q("fromCodePoint(${1:code})",{label:"fromCodePoint",type:"method",detail:"(...codes: number[]) -> string"})],Number:[q("isFinite(${1:value})",{label:"isFinite",type:"method",detail:"(value: any) -> boolean"}),q("isInteger(${1:value})",{label:"isInteger",type:"method",detail:"(value: any) -> boolean"}),q("isNaN(${1:value})",{label:"isNaN",type:"method",detail:"(value: any) -> boolean"}),q("parseFloat(${1:string})",{label:"parseFloat",type:"method",detail:"(string: string) -> number"}),q("parseInt(${1:string})",{label:"parseInt",type:"method",detail:"(string: string, radix?) -> number"}),{label:"MAX_SAFE_INTEGER",type:"property",detail:"number",info:"2^53 - 1"},{label:"MIN_SAFE_INTEGER",type:"property",detail:"number",info:"-(2^53 - 1)"},{label:"EPSILON",type:"property",detail:"number",info:"Smallest difference"}],Date:[{label:"now",type:"method",detail:"() -> number",info:"Current timestamp"},q("parse(${1:dateString})",{label:"parse",type:"method",detail:"(dateString: string) -> number"}),q("UTC(${1:year}, ${2:month})",{label:"UTC",type:"method",detail:"(year, month, ...) -> number"})],Promise:[q("resolve(${1:value})",{label:"resolve",type:"method",detail:"(value: T) -> Promise<T>"}),q("reject(${1:reason})",{label:"reject",type:"method",detail:"(reason: any) -> Promise<never>"}),q("all(${1:promises})",{label:"all",type:"method",detail:"(promises: Promise[]) -> Promise<any[]>",info:"Wait for all"}),q("allSettled(${1:promises})",{label:"allSettled",type:"method",detail:"(promises: Promise[]) -> Promise<Result[]>",info:"Wait for all to settle"}),q("race(${1:promises})",{label:"race",type:"method",detail:"(promises: Promise[]) -> Promise<any>",info:"First to resolve/reject"}),q("any(${1:promises})",{label:"any",type:"method",detail:"(promises: Promise[]) -> Promise<any>",info:"First to resolve"})]},J={console,Math,JSON,Object,Array,String,Number,Boolean,Date,RegExp,Map,Set,WeakMap,WeakSet,Promise,Reflect,Proxy,Symbol,Error,TypeError,RangeError,SyntaxError,ReferenceError,ArrayBuffer,Uint8Array,Int8Array,Uint16Array,Int16Array,Uint32Array,Int32Array,Float32Array,Float64Array,Intl};if(typeof globalThis<"u"){if(typeof crypto<"u")J.crypto=crypto;if(typeof navigator<"u")J.navigator=navigator;if(typeof localStorage<"u")J.localStorage=localStorage;if(typeof sessionStorage<"u")J.sessionStorage=sessionStorage;if(typeof fetch<"u")J.fetch=fetch;if(typeof URL<"u")J.URL=URL;if(typeof URLSearchParams<"u")J.URLSearchParams=URLSearchParams;if(typeof Headers<"u")J.Headers=Headers;if(typeof Request<"u")J.Request=Request;if(typeof Response<"u")J.Response=Response;if(typeof FormData<"u")J.FormData=FormData;if(typeof Blob<"u")J.Blob=Blob;if(typeof File<"u")J.File=File;if(typeof FileReader<"u")J.FileReader=FileReader;if(typeof AbortController<"u")J.AbortController=AbortController;if(typeof TextEncoder<"u")J.TextEncoder=TextEncoder;if(typeof TextDecoder<"u")J.TextDecoder=TextDecoder;if(typeof Element<"u")J.Element=Element;if(typeof HTMLElement<"u")J.HTMLElement=HTMLElement;if(typeof Document<"u")J.Document=Document;if(typeof Node<"u")J.Node=Node;if(typeof Event<"u")J.Event=Event;if(typeof CustomEvent<"u")J.CustomEvent=CustomEvent;if(typeof MutationObserver<"u")J.MutationObserver=MutationObserver;if(typeof ResizeObserver<"u")J.ResizeObserver=ResizeObserver;if(typeof IntersectionObserver<"u")J.IntersectionObserver=IntersectionObserver;if(typeof CanvasRenderingContext2D<"u")J.CanvasRenderingContext2D=CanvasRenderingContext2D;if(typeof ImageData<"u")J.ImageData=ImageData;if(typeof AudioContext<"u")J.AudioContext=AudioContext;if(typeof performance<"u")J.performance=performance;if(typeof PerformanceObserver<"u")J.PerformanceObserver=PerformanceObserver;if(typeof document<"u")J.document=document;if(typeof window<"u")J.window=window}function j(z){if(!z||typeof z!=="object"&&typeof z!=="function")return[];let Z=[],X=new Set;try{let $=Object.keys(z);if($.length>0)for(let V of $){if(V==="constructor"||V.startsWith("_")||X.has(V))continue;X.add(V);try{let U=typeof z[V];if(U==="function")Z.push(q(`${V}(\${1})`,{label:V,type:"method",detail:"(...)"}));else Z.push({label:V,type:"property",detail:U})}catch{}}}catch{}let Q=z;while(Q&&Q!==Object.prototype&&Q!==Function.prototype){let $=Object.getOwnPropertyNames(Q);for(let V of $){if(V==="constructor"||V.startsWith("_")||X.has(V))continue;X.add(V);try{let M=Object.getOwnPropertyDescriptor(Q,V),U=M?.value??(M?.get?"[getter]":void 0),W=typeof U;if(W==="function"){let K=U.length,F=K>0?Array.from({length:K},(Y,y)=>`arg${y+1}`).join(", "):"";Z.push(q(`${V}(${K>0?"${1}":""})`,{label:V,type:"method",detail:`(${F})`,boost:V.startsWith("to")?-1:0}))}else Z.push({label:V,type:"property",detail:W})}catch{}}Q=Object.getPrototypeOf(Q)}return Z}function wz(z){if(T[z])return T[z];let Z=J[z];if(!Z)return[];return j(Z)}function kz(z,Z){if(Z&&z in Z)return j(Z[z]);let X={div:"HTMLDivElement",span:"HTMLSpanElement",input:"HTMLInputElement",button:"HTMLButtonElement",form:"HTMLFormElement",img:"HTMLImageElement",link:"HTMLLinkElement",anchor:"HTMLAnchorElement",table:"HTMLTableElement",canvas:"HTMLCanvasElement",video:"HTMLVideoElement",audio:"HTMLAudioElement",select:"HTMLSelectElement",textarea:"HTMLTextAreaElement"},Q=z.toLowerCase(),$=X[Q];if($&&typeof globalThis<"u"){let V=globalThis[$];if(V?.prototype)return j(V.prototype)}return[]}function Gz(z,Z){let Q=z.slice(0,Z).match(/([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*$/);return Q?Q[1].replace(/\s+/g,""):null}function Dz(z,Z){if(!Z)return;let X=z.split("."),Q=Z[X[0]];for(let $=1;$<X.length&&Q!=null;$++)try{Q=Q[X[$]]}catch{return}return Q}function yz(z,Z){let X=Dz(z,Z);if(X!=null&&(typeof X==="object"||typeof X==="function"))return j(X);if(!z.includes("."))return kz(z,Z);return[]}function vz(z,Z){if(Z.example!==void 0&&Z.example!==null){let $=Z.example;if(typeof $==="string")return`'${$}'`;if(typeof $==="number"||typeof $==="boolean")return String($);if(Array.isArray($))return JSON.stringify($);if(typeof $==="object")return JSON.stringify($);return String($)}let X=Z.type?.examples||Z.examples;if(Array.isArray(X)&&X.length>0){let $=X[0];if(typeof $==="string")return`'${$}'`;if(typeof $==="number"||typeof $==="boolean")return String($);if(Array.isArray($))return JSON.stringify($);if(typeof $==="object")return JSON.stringify($);return String($)}if(Z.default!==void 0&&Z.default!==null){let $=Z.default;if(typeof $==="string")return`'${$}'`;if(typeof $==="number"||typeof $==="boolean")return String($);if(Array.isArray($))return JSON.stringify($);if(typeof $==="object")return JSON.stringify($);return String($)}switch(Z.type?.kind||Z.type?.type||"any"){case"string":return`'${z}'`;case"number":return"0";case"boolean":return"true";case"null":return"null";case"array":return"[]";case"object":return"{}";default:return z}}function a(z={}){return async(Z)=>{try{let X=Z.matchBefore(/[\w$]*/);if(!X)return null;let Q=Z.state.doc.toString(),$=Z.pos,V=h(Q);if(f($,V))return null;let M=Z.state.doc.lineAt($).from,U=Q.slice(M,X.from),W=Q.slice(Math.max(0,X.from-1),X.from);if(X.from===X.to&&!Z.explicit&&W!==".")return null;let H=[];if(W==="."){let K=Q.slice(Math.max(0,X.from-50),X.from);if(/expect\s*\([^)]*\)\s*\.$/.test(K))H=Kz;else{let F=Gz(Q,X.from-1);if(F){if(!F.includes("."))H=wz(F);if(H.length===0){let Y=z.getLiveBindings?.();H=yz(F,Y)}if(H.length===0&&z.getMembers){let Y=await z.getMembers(F);if(Y&&Y.length)H=Y.map(Uz)}}}}else if(/:\s*$/.test(U))H=O;else if(/->\s*$/.test(U))H=O;else{H=[...Jz,...Mz,...Hz,...Fz(Q,$)];let K=z.getMetadata?.();if(K)for(let[F,Y]of Object.entries(K)){let y=Y.params?Object.entries(Y.params):[],s=y.map(([D,w])=>{let k=w.type?.kind||w.type?.type||"any";return!w.required?`${D}?: ${k}`:`${D}: ${k}`}).join(", "),p=y.map(([D,w],k)=>{let v=vz(D,w);return`\${${k+1}:${v}}`}).join(", "),t=Y.returns?.type||Y.returns?.kind||"void",I=Y.description||"";for(let[D,w]of y){let k=w.type?.examples||w.examples;if(Array.isArray(k)&&k.length>0){let v=k.map((P)=>typeof P==="string"?`'${P}'`:String(P)).join(", ");I+=`${I?`
8
8
  `:""}${D}: e.g. ${v}`}}H.push(q(`${F}(${p})`,{label:F,type:"function",detail:`(${s}) -> ${t}`,info:I||void 0,boost:2}))}}if(H.length===0)return null;return{from:X.from,options:H,validFor:/^[\w$]*$/}}catch(X){return console.warn("TJS autocomplete error:",X),null}}}function Tz(z={}){return[_({jsx:z.jsx,typescript:z.typescript}),m,u,B,R({override:[a(z.autocomplete||{})],activateOnTyping:!0})]}function Lz(z={}){return[_({jsx:z.jsx,typescript:z.typescript}),Vz,u,B,R({override:[a(z.autocomplete||{})],activateOnTyping:!0})]}function Ez(z={}){let Z=_({jsx:z.jsx,typescript:z.typescript});return new E(Z.language,[m,u,B])}export{Lz as tjsEditorExtension,a as tjsCompletionSource,Ez as ajsLanguage,Tz as ajsEditorExtension,Tz as ajs,Zz as FORBIDDEN_KEYWORDS};
9
9
 
10
- //# debugId=72BAC055A22C0D4764756E2164756E21
11
- //# sourceMappingURL=ajs-language-h1x0ydap.js.map
10
+ //# debugId=B9390059453A3BF664756E2164756E21
11
+ //# sourceMappingURL=ajs-language-qm5w38ae.js.map
@@ -5,6 +5,6 @@
5
5
  "// editors/codemirror/ajs-language.ts\nimport { javascript } from \"@codemirror/lang-javascript\";\nimport {\n HighlightStyle,\n LanguageSupport\n} from \"@codemirror/language\";\nimport {\n EditorView,\n Decoration,\n ViewPlugin\n} from \"@codemirror/view\";\nimport { RangeSetBuilder } from \"@codemirror/state\";\nimport {\n autocompletion,\n snippetCompletion\n} from \"@codemirror/autocomplete\";\n\n// editors/ajs-syntax.ts\nvar KEYWORDS = [\n \"function\",\n \"return\",\n \"if\",\n \"else\",\n \"while\",\n \"for\",\n \"of\",\n \"in\",\n \"try\",\n \"catch\",\n \"finally\",\n \"let\",\n \"const\",\n \"true\",\n \"false\",\n \"null\",\n \"undefined\"\n];\nvar FORBIDDEN_KEYWORDS = [\n // Object-oriented constructs\n \"new\",\n \"class\",\n \"extends\",\n \"super\",\n \"this\",\n \"implements\",\n \"interface\",\n \"abstract\",\n \"static\",\n \"private\",\n \"protected\",\n \"public\",\n // Async constructs (not needed - runtime handles async)\n \"async\",\n \"await\",\n \"yield\",\n // Module system (not supported)\n \"import\",\n \"export\",\n \"require\",\n \"module\",\n // Other unsupported\n \"var\",\n // use let/const\n \"throw\",\n // use Error() for monadic error flow\n \"switch\",\n // use if/else chains\n \"case\",\n \"default\",\n // (as switch keyword)\n \"with\",\n \"delete\",\n \"void\",\n \"typeof\",\n // use type-by-example instead\n \"instanceof\",\n \"debugger\",\n \"eval\",\n // TypeScript-specific (not supported)\n \"type\",\n \"enum\",\n \"namespace\",\n \"declare\",\n \"readonly\",\n \"as\",\n \"is\",\n \"keyof\",\n \"infer\",\n \"never\",\n \"unknown\"\n];\nvar TYPE_CONSTRUCTORS = [\n \"Date\",\n \"Set\",\n \"Map\",\n \"Array\",\n \"Object\",\n \"String\",\n \"Number\",\n \"Boolean\",\n \"RegExp\",\n \"Error\",\n \"JSON\",\n \"Math\",\n \"Schema\"\n // AsyncJS-specific\n];\nvar OPERATORS = [\n // Assignment\n \"=\",\n \"+=\",\n \"-=\",\n \"*=\",\n \"/=\",\n \"%=\",\n // Comparison\n \"==\",\n \"===\",\n \"!=\",\n \"!==\",\n \"<\",\n \">\",\n \"<=\",\n \">=\",\n // Arithmetic\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"**\",\n // Logical\n \"&&\",\n \"||\",\n \"??\",\n \"!\",\n // Bitwise (limited support)\n \"&\",\n \"|\",\n \"^\",\n \"~\",\n \"<<\",\n \">>\",\n \">>>\",\n // Other\n \"?\",\n \":\",\n \".\",\n \"?.\",\n \"?.(\",\n \"?.[\",\n \"...\"\n];\nvar FORBIDDEN_SET = new Set(FORBIDDEN_KEYWORDS);\nvar KEYWORDS_SET = new Set(KEYWORDS);\nvar FORBIDDEN_PATTERN = new RegExp(\n `\\\\b(${FORBIDDEN_KEYWORDS.join(\"|\")})\\\\b`,\n \"g\"\n);\n\n// editors/tjs-syntax.ts\nvar TJS_KEYWORDS = [\n \"test\",\n // inline tests\n \"mock\",\n // test setup blocks\n \"unsafe\",\n // exception-catching blocks\n \"async\",\n // TJS allows async (unlike sandboxed AJS)\n \"await\",\n \"throw\",\n \"import\",\n \"export\",\n // Class support\n \"class\",\n \"extends\",\n \"super\",\n \"this\",\n \"new\",\n \"static\",\n // JS operators\n \"typeof\",\n \"instanceof\",\n \"delete\"\n];\nvar KEYWORDS2 = [...KEYWORDS, ...TJS_KEYWORDS];\nvar FORBIDDEN_KEYWORDS2 = FORBIDDEN_KEYWORDS.filter(\n (k) => ![\n \"async\",\n \"await\",\n \"throw\",\n \"import\",\n \"export\",\n // Class support (TjsClass mode)\n \"class\",\n \"extends\",\n \"super\",\n \"this\",\n \"new\",\n \"static\",\n // Valid JS operators\n \"typeof\",\n \"instanceof\",\n \"delete\"\n ].includes(k)\n);\nvar TYPE_CONSTRUCTORS2 = [\n ...TYPE_CONSTRUCTORS,\n \"expect\",\n // test assertions\n \"assert\"\n // simple assertions\n];\nvar OPERATORS2 = [...OPERATORS, \"->\"];\n\n// editors/scope-symbols.ts\nimport * as acorn from \"acorn\";\nimport * as acornLoose from \"acorn-loose\";\nimport * as walk from \"acorn-walk\";\nfunction parse3(source) {\n try {\n return acorn.parse(source, { ecmaVersion: \"latest\" });\n } catch {\n try {\n return acornLoose.parse(source, { ecmaVersion: \"latest\" });\n } catch {\n return null;\n }\n }\n}\nfunction collectPattern(pat, onName, member) {\n if (!pat) return;\n switch (pat.type) {\n case \"Identifier\":\n onName(pat.name, member);\n return;\n case \"ObjectPattern\":\n for (const p of pat.properties) {\n if (p.type === \"RestElement\") {\n collectPattern(p.argument, onName);\n } else {\n const key = p.key && (p.key.name ?? p.key.value);\n collectPattern(\n p.value,\n onName,\n typeof key === \"string\" ? key : void 0\n );\n }\n }\n return;\n case \"ArrayPattern\":\n for (const el of pat.elements) collectPattern(el, onName);\n return;\n case \"AssignmentPattern\":\n collectPattern(pat.left, onName, member);\n return;\n case \"RestElement\":\n collectPattern(pat.argument, onName);\n return;\n }\n}\nvar inRange = (node, position) => typeof node.start === \"number\" && typeof node.end === \"number\" && node.start <= position && position <= node.end;\nfunction collectScopeSymbols(source, position = source.length) {\n const ast = parse3(source);\n if (!ast) return [];\n const byName = /* @__PURE__ */ new Map();\n const add = (s) => byName.set(s.name, s);\n walk.full(ast, (node) => {\n switch (node.type) {\n case \"VariableDeclaration\": {\n if (node.start >= position) return;\n for (const decl of node.declarations) {\n const initText = decl.init && typeof decl.init.start === \"number\" ? source.slice(decl.init.start, decl.init.end) : void 0;\n collectPattern(\n decl.id,\n (name, member) => add({\n name,\n kind: \"variable\",\n origin: {\n via: member != null ? \"destructure\" : \"init\",\n expr: initText,\n member\n }\n })\n );\n }\n return;\n }\n case \"FunctionDeclaration\": {\n if (node.id && node.start < position)\n add({\n name: node.id.name,\n kind: \"function\",\n origin: { via: \"function\" }\n });\n if (inRange(node, position))\n for (const p of node.params)\n collectPattern(\n p,\n (name) => add({ name, kind: \"parameter\", origin: { via: \"param\" } })\n );\n return;\n }\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\": {\n if (inRange(node, position))\n for (const p of node.params)\n collectPattern(\n p,\n (name) => add({ name, kind: \"parameter\", origin: { via: \"param\" } })\n );\n return;\n }\n case \"ImportDeclaration\": {\n const module = String(node.source?.value ?? \"\");\n for (const spec of node.specifiers) {\n add({\n name: spec.local.name,\n kind: \"import\",\n origin: { via: \"import\", module }\n });\n }\n return;\n }\n }\n });\n return [...byName.values()];\n}\n\n// editors/codemirror/ajs-language.ts\nvar FORBIDDEN_KEYWORDS3 = new Set(FORBIDDEN_KEYWORDS);\nvar TJS_FORBIDDEN_KEYWORDS = new Set(FORBIDDEN_KEYWORDS2);\nvar forbiddenMark = Decoration.mark({\n class: \"cm-ajs-forbidden\"\n});\nvar tjsSpecialMark = Decoration.mark({\n class: \"cm-tjs-special\"\n});\nfunction findSkipRegions(doc) {\n const regions = [];\n const len = doc.length;\n let i = 0;\n while (i < len) {\n const ch = doc[i];\n const next = doc[i + 1];\n if (ch === \"/\" && next === \"/\") {\n const start = i;\n i += 2;\n while (i < len && doc[i] !== \"\\n\") i++;\n regions.push([start, i]);\n continue;\n }\n if (ch === \"/\" && next === \"*\") {\n const start = i;\n i += 2;\n while (i < len - 1 && !(doc[i] === \"*\" && doc[i + 1] === \"/\")) i++;\n i += 2;\n regions.push([start, i]);\n continue;\n }\n if (ch === \"`\") {\n let stringStart = i;\n i++;\n while (i < len) {\n if (doc[i] === \"\\\\\") {\n i += 2;\n continue;\n }\n if (doc[i] === \"`\") {\n regions.push([stringStart, i + 1]);\n i++;\n break;\n }\n if (doc[i] === \"$\" && doc[i + 1] === \"{\") {\n regions.push([stringStart, i]);\n i += 2;\n let braceDepth = 1;\n while (i < len && braceDepth > 0) {\n if (doc[i] === \"{\") braceDepth++;\n else if (doc[i] === \"}\") braceDepth--;\n if (braceDepth > 0) i++;\n }\n i++;\n stringStart = i;\n continue;\n }\n i++;\n }\n continue;\n }\n if (ch === '\"' || ch === \"'\") {\n const quote = ch;\n const start = i;\n i++;\n while (i < len) {\n if (doc[i] === \"\\\\\") {\n i += 2;\n continue;\n }\n if (doc[i] === quote) {\n i++;\n break;\n }\n if (doc[i] === \"\\n\") break;\n i++;\n }\n regions.push([start, i]);\n continue;\n }\n i++;\n }\n return regions;\n}\nfunction isInSkipRegion(pos, regions) {\n for (const [start, end] of regions) {\n if (pos >= start && pos < end) return true;\n if (start > pos) break;\n }\n return false;\n}\nfunction createForbiddenHighlighter(forbiddenSet) {\n const pattern = new RegExp(`\\\\b(${[...forbiddenSet].join(\"|\")})\\\\b`, \"g\");\n return ViewPlugin.fromClass(\n class {\n decorations;\n constructor(view) {\n this.decorations = this.buildDecorations(view);\n }\n update(update) {\n if (update.docChanged || update.viewportChanged) {\n this.decorations = this.buildDecorations(update.view);\n }\n }\n buildDecorations(view) {\n const builder = new RangeSetBuilder();\n const doc = view.state.doc.toString();\n const skipRegions = findSkipRegions(doc);\n const regex = new RegExp(pattern.source, \"g\");\n let match;\n while ((match = regex.exec(doc)) !== null) {\n if (!isInSkipRegion(match.index, skipRegions)) {\n builder.add(\n match.index,\n match.index + match[0].length,\n forbiddenMark\n );\n }\n }\n return builder.finish();\n }\n },\n {\n decorations: (v) => v.decorations\n }\n );\n}\nvar forbiddenHighlighter = createForbiddenHighlighter(FORBIDDEN_KEYWORDS3);\nvar tjsForbiddenHighlighter = createForbiddenHighlighter(\n TJS_FORBIDDEN_KEYWORDS\n);\nvar tryWithoutCatchHighlighter = ViewPlugin.fromClass(\n class {\n decorations;\n constructor(view) {\n this.decorations = this.buildDecorations(view);\n }\n update(update) {\n if (update.docChanged || update.viewportChanged) {\n this.decorations = this.buildDecorations(update.view);\n }\n }\n buildDecorations(view) {\n const builder = new RangeSetBuilder();\n const doc = view.state.doc.toString();\n const skipRegions = findSkipRegions(doc);\n const tryPattern = /\\btry\\s*\\{/g;\n let match;\n while ((match = tryPattern.exec(doc)) !== null) {\n if (isInSkipRegion(match.index, skipRegions)) continue;\n const braceStart = match.index + match[0].length - 1;\n let depth = 1;\n let j = braceStart + 1;\n while (j < doc.length && depth > 0) {\n const char = doc[j];\n if (char === \"{\") depth++;\n else if (char === \"}\") depth--;\n j++;\n }\n if (depth !== 0) continue;\n const afterTry = doc.slice(j).match(/^\\s*(catch|finally)\\b/);\n if (!afterTry) {\n const tryKeywordEnd = match.index + 3;\n builder.add(match.index, tryKeywordEnd, tjsSpecialMark);\n }\n }\n return builder.finish();\n }\n },\n {\n decorations: (v) => v.decorations\n }\n);\nvar ajsTheme = EditorView.theme({\n \".cm-ajs-forbidden\": {\n color: \"#dc2626\",\n textDecoration: \"wavy underline #dc2626\",\n backgroundColor: \"rgba(220, 38, 38, 0.1)\"\n },\n \".cm-tjs-special\": {\n color: \"#7c3aed\",\n fontWeight: \"bold\",\n backgroundColor: \"rgba(124, 58, 237, 0.1)\"\n }\n});\nvar ajsHighlightStyle = HighlightStyle.define([\n // Standard highlighting is inherited from JavaScript\n // Add any AsyncJS-specific overrides here\n]);\nfunction memberToCompletion(m) {\n if (m.type === \"method\") {\n const hasArgs = m.detail !== \"()\";\n return snippetCompletion(`${m.label}(${hasArgs ? \"${1}\" : \"\"})`, {\n label: m.label,\n type: \"method\",\n detail: m.detail\n });\n }\n return { label: m.label, type: \"property\", detail: m.detail };\n}\nvar TJS_COMPLETIONS = [\n { label: \"function\", type: \"keyword\", detail: \"Declare a function\" },\n { label: \"const\", type: \"keyword\", detail: \"Declare a constant\" },\n { label: \"let\", type: \"keyword\", detail: \"Declare a variable\" },\n { label: \"if\", type: \"keyword\", detail: \"Conditional statement\" },\n { label: \"else\", type: \"keyword\", detail: \"Else branch\" },\n { label: \"while\", type: \"keyword\", detail: \"While loop\" },\n { label: \"for\", type: \"keyword\", detail: \"For loop\" },\n { label: \"return\", type: \"keyword\", detail: \"Return from function\" },\n { label: \"try\", type: \"keyword\", detail: \"Try block\" },\n { label: \"catch\", type: \"keyword\", detail: \"Catch block\" },\n { label: \"import\", type: \"keyword\", detail: \"Import module\" },\n { label: \"export\", type: \"keyword\", detail: \"Export declaration\" },\n snippetCompletion(\"test('${description}') {\\n\t${}\\n}\", {\n label: \"test\",\n type: \"keyword\",\n detail: \"Inline test block\"\n }),\n snippetCompletion(\"mock {\\n\t${}\\n}\", {\n label: \"mock\",\n type: \"keyword\",\n detail: \"Mock setup block\"\n }),\n snippetCompletion(\"unsafe {\\n\t${}\\n}\", {\n label: \"unsafe\",\n type: \"keyword\",\n detail: \"Skip type validation\"\n })\n];\nvar TJS_TYPES = [\n { label: \"''\", type: \"type\", detail: \"String type\" },\n { label: \"0\", type: \"type\", detail: \"Number type\" },\n { label: \"true\", type: \"type\", detail: \"Boolean type\" },\n { label: \"null\", type: \"type\", detail: \"Null type\" },\n { label: \"undefined\", type: \"type\", detail: \"Undefined type\" },\n { label: \"['']\", type: \"type\", detail: \"Array of strings\" },\n { label: \"[0]\", type: \"type\", detail: \"Array of numbers\" },\n { label: \"{}\", type: \"type\", detail: \"Object type\" },\n { label: \"any\", type: \"type\", detail: \"Any type\" }\n];\nvar RUNTIME_COMPLETIONS = [\n snippetCompletion(\"isError(${value})\", {\n label: \"isError\",\n type: \"function\",\n detail: \"(value: any) -> boolean\",\n info: \"Check if a value is a TJS error\"\n }),\n snippetCompletion(\"error('${message}')\", {\n label: \"error\",\n type: \"function\",\n detail: \"(message: string) -> TJSError\",\n info: \"Create a TJS error object\"\n }),\n snippetCompletion(\"typeOf(${value})\", {\n label: \"typeOf\",\n type: \"function\",\n detail: \"(value: any) -> string\",\n info: \"Get type name (fixed typeof)\"\n }),\n snippetCompletion(\"expect(${actual})\", {\n label: \"expect\",\n type: \"function\",\n detail: \"(actual: any) -> Matchers\",\n info: \"Test assertion\"\n })\n];\nvar GLOBAL_COMPLETIONS = [\n // Console\n {\n label: \"console\",\n type: \"variable\",\n detail: \"Console object\",\n info: \"Logging and debugging\"\n },\n // Math\n {\n label: \"Math\",\n type: \"variable\",\n detail: \"Math object\",\n info: \"Mathematical functions and constants\"\n },\n // JSON\n {\n label: \"JSON\",\n type: \"variable\",\n detail: \"JSON object\",\n info: \"JSON parse and stringify\"\n },\n // Constructors / types\n {\n label: \"Array\",\n type: \"class\",\n detail: \"Array constructor\",\n info: \"Create arrays\"\n },\n {\n label: \"Object\",\n type: \"class\",\n detail: \"Object constructor\",\n info: \"Object utilities\"\n },\n {\n label: \"String\",\n type: \"class\",\n detail: \"String constructor\",\n info: \"String utilities\"\n },\n {\n label: \"Number\",\n type: \"class\",\n detail: \"Number constructor\",\n info: \"Number utilities\"\n },\n { label: \"Boolean\", type: \"class\", detail: \"Boolean constructor\" },\n {\n label: \"Date\",\n type: \"class\",\n detail: \"Date constructor\",\n info: \"Date and time\"\n },\n {\n label: \"RegExp\",\n type: \"class\",\n detail: \"RegExp constructor\",\n info: \"Regular expressions\"\n },\n {\n label: \"Map\",\n type: \"class\",\n detail: \"Map constructor\",\n info: \"Key-value collection\"\n },\n {\n label: \"Set\",\n type: \"class\",\n detail: \"Set constructor\",\n info: \"Unique value collection\"\n },\n { label: \"WeakMap\", type: \"class\", detail: \"WeakMap constructor\" },\n { label: \"WeakSet\", type: \"class\", detail: \"WeakSet constructor\" },\n { label: \"Symbol\", type: \"class\", detail: \"Symbol constructor\" },\n { label: \"BigInt\", type: \"class\", detail: \"BigInt constructor\" },\n // Error types\n { label: \"Error\", type: \"class\", detail: \"Error constructor\" },\n { label: \"TypeError\", type: \"class\", detail: \"TypeError constructor\" },\n { label: \"RangeError\", type: \"class\", detail: \"RangeError constructor\" },\n { label: \"SyntaxError\", type: \"class\", detail: \"SyntaxError constructor\" },\n {\n label: \"ReferenceError\",\n type: \"class\",\n detail: \"ReferenceError constructor\"\n },\n // Typed arrays\n { label: \"ArrayBuffer\", type: \"class\", detail: \"ArrayBuffer constructor\" },\n { label: \"Uint8Array\", type: \"class\", detail: \"Uint8Array constructor\" },\n { label: \"Int8Array\", type: \"class\", detail: \"Int8Array constructor\" },\n { label: \"Uint16Array\", type: \"class\", detail: \"Uint16Array constructor\" },\n { label: \"Int16Array\", type: \"class\", detail: \"Int16Array constructor\" },\n { label: \"Uint32Array\", type: \"class\", detail: \"Uint32Array constructor\" },\n { label: \"Int32Array\", type: \"class\", detail: \"Int32Array constructor\" },\n { label: \"Float32Array\", type: \"class\", detail: \"Float32Array constructor\" },\n { label: \"Float64Array\", type: \"class\", detail: \"Float64Array constructor\" },\n // Promises (though async/await is forbidden, Promise itself may be useful)\n { label: \"Promise\", type: \"class\", detail: \"Promise constructor\" },\n // Global functions\n { label: \"parseInt\", type: \"function\", detail: \"(string, radix?) -> number\" },\n { label: \"parseFloat\", type: \"function\", detail: \"(string) -> number\" },\n { label: \"isNaN\", type: \"function\", detail: \"(value) -> boolean\" },\n { label: \"isFinite\", type: \"function\", detail: \"(value) -> boolean\" },\n { label: \"encodeURI\", type: \"function\", detail: \"(uri) -> string\" },\n { label: \"decodeURI\", type: \"function\", detail: \"(encodedURI) -> string\" },\n {\n label: \"encodeURIComponent\",\n type: \"function\",\n detail: \"(component) -> string\"\n },\n {\n label: \"decodeURIComponent\",\n type: \"function\",\n detail: \"(encoded) -> string\"\n },\n // Global values\n { label: \"undefined\", type: \"keyword\", detail: \"Undefined value\" },\n { label: \"null\", type: \"keyword\", detail: \"Null value\" },\n { label: \"NaN\", type: \"keyword\", detail: \"Not a Number\" },\n { label: \"Infinity\", type: \"keyword\", detail: \"Positive infinity\" },\n { label: \"globalThis\", type: \"variable\", detail: \"Global object\" }\n];\nvar EXPECT_MATCHERS = [\n snippetCompletion(\"toBe(${expected})\", {\n label: \"toBe\",\n type: \"method\",\n detail: \"(expected: any)\",\n info: \"Strict equality (===)\"\n }),\n snippetCompletion(\"toEqual(${expected})\", {\n label: \"toEqual\",\n type: \"method\",\n detail: \"(expected: any)\",\n info: \"Deep equality\"\n }),\n snippetCompletion(\"toContain(${item})\", {\n label: \"toContain\",\n type: \"method\",\n detail: \"(item: any)\",\n info: \"Array/string contains\"\n }),\n { label: \"toThrow\", type: \"method\", detail: \"()\", info: \"Throws an error\" },\n { label: \"toBeTruthy\", type: \"method\", detail: \"()\", info: \"Is truthy\" },\n { label: \"toBeFalsy\", type: \"method\", detail: \"()\", info: \"Is falsy\" },\n { label: \"toBeNull\", type: \"method\", detail: \"()\", info: \"Is null\" },\n {\n label: \"toBeUndefined\",\n type: \"method\",\n detail: \"()\",\n info: \"Is undefined\"\n }\n];\nfunction extractFunctions(source) {\n const completions = [];\n const funcRegex = /function\\s+(\\w+)\\s*\\(([^)]*)\\)/g;\n let match;\n while ((match = funcRegex.exec(source)) !== null) {\n const [, name, params] = match;\n completions.push(\n snippetCompletion(`${name}(${params ? \"${1}\" : \"\"})`, {\n label: name,\n type: \"function\",\n detail: `(${params})`\n })\n );\n }\n return completions;\n}\nfunction extractVariables(source, position) {\n const completions = [];\n const before = source.slice(0, position);\n const varRegex = /(?:const|let)\\s+(\\w+)\\s*=/g;\n let match;\n while ((match = varRegex.exec(before)) !== null) {\n completions.push({\n label: match[1],\n type: \"variable\"\n });\n }\n return completions;\n}\nfunction completionsFromScope(source, position) {\n const symbols = collectScopeSymbols(source, position);\n if (symbols.length === 0) {\n return [...extractFunctions(source), ...extractVariables(source, position)];\n }\n return symbols.map((s) => {\n const detail = s.origin?.member && s.origin.expr ? `\\u2208 ${s.origin.expr}` : s.kind === \"import\" && s.origin?.module ? `import '${s.origin.module}'` : s.kind === \"parameter\" ? \"parameter\" : void 0;\n if (s.kind === \"function\") {\n return snippetCompletion(`${s.name}($1)`, {\n label: s.name,\n type: \"function\",\n detail\n });\n }\n return { label: s.name, type: \"variable\", detail };\n });\n}\nvar CURATED_PROPERTIES = {\n console: [\n snippetCompletion(\"log(${1:message})\", {\n label: \"log\",\n type: \"method\",\n detail: \"(...args: any[]) -> void\",\n info: \"Log to console\"\n }),\n snippetCompletion(\"error(${1:message})\", {\n label: \"error\",\n type: \"method\",\n detail: \"(...args: any[]) -> void\",\n info: \"Log error\"\n }),\n snippetCompletion(\"warn(${1:message})\", {\n label: \"warn\",\n type: \"method\",\n detail: \"(...args: any[]) -> void\",\n info: \"Log warning\"\n }),\n snippetCompletion(\"info(${1:message})\", {\n label: \"info\",\n type: \"method\",\n detail: \"(...args: any[]) -> void\",\n info: \"Log info\"\n }),\n snippetCompletion(\"debug(${1:message})\", {\n label: \"debug\",\n type: \"method\",\n detail: \"(...args: any[]) -> void\",\n info: \"Log debug\"\n }),\n snippetCompletion(\"table(${1:data})\", {\n label: \"table\",\n type: \"method\",\n detail: \"(data: any) -> void\",\n info: \"Display as table\"\n }),\n snippetCompletion(\"time('${1:label}')\", {\n label: \"time\",\n type: \"method\",\n detail: \"(label: string) -> void\",\n info: \"Start timer\"\n }),\n snippetCompletion(\"timeEnd('${1:label}')\", {\n label: \"timeEnd\",\n type: \"method\",\n detail: \"(label: string) -> void\",\n info: \"End timer\"\n }),\n snippetCompletion(\"group('${1:label}')\", {\n label: \"group\",\n type: \"method\",\n detail: \"(label?: string) -> void\",\n info: \"Start group\"\n }),\n {\n label: \"groupEnd\",\n type: \"method\",\n detail: \"() -> void\",\n info: \"End group\"\n },\n {\n label: \"clear\",\n type: \"method\",\n detail: \"() -> void\",\n info: \"Clear console\"\n }\n ],\n Math: [\n // Common operations\n snippetCompletion(\"floor(${1:x})\", {\n label: \"floor\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Round down\"\n }),\n snippetCompletion(\"ceil(${1:x})\", {\n label: \"ceil\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Round up\"\n }),\n snippetCompletion(\"round(${1:x})\", {\n label: \"round\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Round to nearest\"\n }),\n snippetCompletion(\"trunc(${1:x})\", {\n label: \"trunc\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Remove decimals\"\n }),\n snippetCompletion(\"abs(${1:x})\", {\n label: \"abs\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Absolute value\"\n }),\n snippetCompletion(\"sign(${1:x})\", {\n label: \"sign\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Sign of number (-1, 0, 1)\"\n }),\n // Min/max\n snippetCompletion(\"min(${1:a}, ${2:b})\", {\n label: \"min\",\n type: \"method\",\n detail: \"(...values: number[]) -> number\",\n info: \"Minimum value\"\n }),\n snippetCompletion(\"max(${1:a}, ${2:b})\", {\n label: \"max\",\n type: \"method\",\n detail: \"(...values: number[]) -> number\",\n info: \"Maximum value\"\n }),\n snippetCompletion(\"clamp(${1:x}, ${2:min}, ${3:max})\", {\n label: \"clamp\",\n type: \"method\",\n detail: \"(x, min, max) -> number\",\n info: \"Clamp to range (ES2024)\"\n }),\n // Powers and roots\n snippetCompletion(\"pow(${1:base}, ${2:exp})\", {\n label: \"pow\",\n type: \"method\",\n detail: \"(base, exp) -> number\",\n info: \"Power\"\n }),\n snippetCompletion(\"sqrt(${1:x})\", {\n label: \"sqrt\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Square root\"\n }),\n snippetCompletion(\"cbrt(${1:x})\", {\n label: \"cbrt\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Cube root\"\n }),\n snippetCompletion(\"hypot(${1:a}, ${2:b})\", {\n label: \"hypot\",\n type: \"method\",\n detail: \"(...values: number[]) -> number\",\n info: \"Hypotenuse\"\n }),\n // Logarithms\n snippetCompletion(\"log(${1:x})\", {\n label: \"log\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Natural log\"\n }),\n snippetCompletion(\"log10(${1:x})\", {\n label: \"log10\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Base 10 log\"\n }),\n snippetCompletion(\"log2(${1:x})\", {\n label: \"log2\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"Base 2 log\"\n }),\n snippetCompletion(\"exp(${1:x})\", {\n label: \"exp\",\n type: \"method\",\n detail: \"(x: number) -> number\",\n info: \"e^x\"\n }),\n // Trig\n snippetCompletion(\"sin(${1:x})\", {\n label: \"sin\",\n type: \"method\",\n detail: \"(radians: number) -> number\"\n }),\n snippetCompletion(\"cos(${1:x})\", {\n label: \"cos\",\n type: \"method\",\n detail: \"(radians: number) -> number\"\n }),\n snippetCompletion(\"tan(${1:x})\", {\n label: \"tan\",\n type: \"method\",\n detail: \"(radians: number) -> number\"\n }),\n snippetCompletion(\"atan2(${1:y}, ${2:x})\", {\n label: \"atan2\",\n type: \"method\",\n detail: \"(y, x) -> number\",\n info: \"Angle in radians\"\n }),\n // Random\n {\n label: \"random\",\n type: \"method\",\n detail: \"() -> number\",\n info: \"Random 0-1\"\n },\n // Constants\n { label: \"PI\", type: \"property\", detail: \"number\", info: \"3.14159...\" },\n { label: \"E\", type: \"property\", detail: \"number\", info: \"2.71828...\" }\n ],\n JSON: [\n snippetCompletion(\"parse(${1:text})\", {\n label: \"parse\",\n type: \"method\",\n detail: \"(text: string) -> any\",\n info: \"Parse JSON string\"\n }),\n snippetCompletion(\"stringify(${1:value})\", {\n label: \"stringify\",\n type: \"method\",\n detail: \"(value: any, replacer?, space?) -> string\",\n info: \"Convert to JSON\"\n })\n ],\n Object: [\n snippetCompletion(\"keys(${1:obj})\", {\n label: \"keys\",\n type: \"method\",\n detail: \"(obj: object) -> string[]\",\n info: \"Get property names\"\n }),\n snippetCompletion(\"values(${1:obj})\", {\n label: \"values\",\n type: \"method\",\n detail: \"(obj: object) -> any[]\",\n info: \"Get property values\"\n }),\n snippetCompletion(\"entries(${1:obj})\", {\n label: \"entries\",\n type: \"method\",\n detail: \"(obj: object) -> [string, any][]\",\n info: \"Get key-value pairs\"\n }),\n snippetCompletion(\"fromEntries(${1:entries})\", {\n label: \"fromEntries\",\n type: \"method\",\n detail: \"(entries: [string, any][]) -> object\",\n info: \"Create from entries\"\n }),\n snippetCompletion(\"assign(${1:target}, ${2:source})\", {\n label: \"assign\",\n type: \"method\",\n detail: \"(target, ...sources) -> object\",\n info: \"Copy properties\"\n }),\n snippetCompletion(\"hasOwn(${1:obj}, ${2:prop})\", {\n label: \"hasOwn\",\n type: \"method\",\n detail: \"(obj, prop: string) -> boolean\",\n info: \"Has own property\"\n }),\n snippetCompletion(\"freeze(${1:obj})\", {\n label: \"freeze\",\n type: \"method\",\n detail: \"(obj: T) -> T\",\n info: \"Make immutable\"\n })\n ],\n Array: [\n snippetCompletion(\"isArray(${1:value})\", {\n label: \"isArray\",\n type: \"method\",\n detail: \"(value: any) -> boolean\",\n info: \"Check if array\"\n }),\n snippetCompletion(\"from(${1:iterable})\", {\n label: \"from\",\n type: \"method\",\n detail: \"(iterable, mapFn?) -> any[]\",\n info: \"Create from iterable\"\n }),\n snippetCompletion(\"of(${1:items})\", {\n label: \"of\",\n type: \"method\",\n detail: \"(...items) -> any[]\",\n info: \"Create from arguments\"\n })\n ],\n String: [\n snippetCompletion(\"fromCharCode(${1:code})\", {\n label: \"fromCharCode\",\n type: \"method\",\n detail: \"(...codes: number[]) -> string\"\n }),\n snippetCompletion(\"fromCodePoint(${1:code})\", {\n label: \"fromCodePoint\",\n type: \"method\",\n detail: \"(...codes: number[]) -> string\"\n })\n ],\n Number: [\n snippetCompletion(\"isFinite(${1:value})\", {\n label: \"isFinite\",\n type: \"method\",\n detail: \"(value: any) -> boolean\"\n }),\n snippetCompletion(\"isInteger(${1:value})\", {\n label: \"isInteger\",\n type: \"method\",\n detail: \"(value: any) -> boolean\"\n }),\n snippetCompletion(\"isNaN(${1:value})\", {\n label: \"isNaN\",\n type: \"method\",\n detail: \"(value: any) -> boolean\"\n }),\n snippetCompletion(\"parseFloat(${1:string})\", {\n label: \"parseFloat\",\n type: \"method\",\n detail: \"(string: string) -> number\"\n }),\n snippetCompletion(\"parseInt(${1:string})\", {\n label: \"parseInt\",\n type: \"method\",\n detail: \"(string: string, radix?) -> number\"\n }),\n {\n label: \"MAX_SAFE_INTEGER\",\n type: \"property\",\n detail: \"number\",\n info: \"2^53 - 1\"\n },\n {\n label: \"MIN_SAFE_INTEGER\",\n type: \"property\",\n detail: \"number\",\n info: \"-(2^53 - 1)\"\n },\n {\n label: \"EPSILON\",\n type: \"property\",\n detail: \"number\",\n info: \"Smallest difference\"\n }\n ],\n Date: [\n {\n label: \"now\",\n type: \"method\",\n detail: \"() -> number\",\n info: \"Current timestamp\"\n },\n snippetCompletion(\"parse(${1:dateString})\", {\n label: \"parse\",\n type: \"method\",\n detail: \"(dateString: string) -> number\"\n }),\n snippetCompletion(\"UTC(${1:year}, ${2:month})\", {\n label: \"UTC\",\n type: \"method\",\n detail: \"(year, month, ...) -> number\"\n })\n ],\n Promise: [\n snippetCompletion(\"resolve(${1:value})\", {\n label: \"resolve\",\n type: \"method\",\n detail: \"(value: T) -> Promise<T>\"\n }),\n snippetCompletion(\"reject(${1:reason})\", {\n label: \"reject\",\n type: \"method\",\n detail: \"(reason: any) -> Promise<never>\"\n }),\n snippetCompletion(\"all(${1:promises})\", {\n label: \"all\",\n type: \"method\",\n detail: \"(promises: Promise[]) -> Promise<any[]>\",\n info: \"Wait for all\"\n }),\n snippetCompletion(\"allSettled(${1:promises})\", {\n label: \"allSettled\",\n type: \"method\",\n detail: \"(promises: Promise[]) -> Promise<Result[]>\",\n info: \"Wait for all to settle\"\n }),\n snippetCompletion(\"race(${1:promises})\", {\n label: \"race\",\n type: \"method\",\n detail: \"(promises: Promise[]) -> Promise<any>\",\n info: \"First to resolve/reject\"\n }),\n snippetCompletion(\"any(${1:promises})\", {\n label: \"any\",\n type: \"method\",\n detail: \"(promises: Promise[]) -> Promise<any>\",\n info: \"First to resolve\"\n })\n ]\n};\nvar INTROSPECTABLE_GLOBALS = {\n // Core JS globals (always available)\n console,\n Math,\n JSON,\n Object,\n Array,\n String,\n Number,\n Boolean,\n Date,\n RegExp,\n Map,\n Set,\n WeakMap,\n WeakSet,\n Promise,\n Reflect,\n Proxy,\n Symbol,\n Error,\n TypeError,\n RangeError,\n SyntaxError,\n ReferenceError,\n ArrayBuffer,\n Uint8Array,\n Int8Array,\n Uint16Array,\n Int16Array,\n Uint32Array,\n Int32Array,\n Float32Array,\n Float64Array,\n Intl\n};\nif (typeof globalThis !== \"undefined\") {\n if (typeof crypto !== \"undefined\") INTROSPECTABLE_GLOBALS.crypto = crypto;\n if (typeof navigator !== \"undefined\")\n INTROSPECTABLE_GLOBALS.navigator = navigator;\n if (typeof localStorage !== \"undefined\")\n INTROSPECTABLE_GLOBALS.localStorage = localStorage;\n if (typeof sessionStorage !== \"undefined\")\n INTROSPECTABLE_GLOBALS.sessionStorage = sessionStorage;\n if (typeof fetch !== \"undefined\") INTROSPECTABLE_GLOBALS.fetch = fetch;\n if (typeof URL !== \"undefined\") INTROSPECTABLE_GLOBALS.URL = URL;\n if (typeof URLSearchParams !== \"undefined\")\n INTROSPECTABLE_GLOBALS.URLSearchParams = URLSearchParams;\n if (typeof Headers !== \"undefined\") INTROSPECTABLE_GLOBALS.Headers = Headers;\n if (typeof Request !== \"undefined\") INTROSPECTABLE_GLOBALS.Request = Request;\n if (typeof Response !== \"undefined\")\n INTROSPECTABLE_GLOBALS.Response = Response;\n if (typeof FormData !== \"undefined\")\n INTROSPECTABLE_GLOBALS.FormData = FormData;\n if (typeof Blob !== \"undefined\") INTROSPECTABLE_GLOBALS.Blob = Blob;\n if (typeof File !== \"undefined\") INTROSPECTABLE_GLOBALS.File = File;\n if (typeof FileReader !== \"undefined\")\n INTROSPECTABLE_GLOBALS.FileReader = FileReader;\n if (typeof AbortController !== \"undefined\")\n INTROSPECTABLE_GLOBALS.AbortController = AbortController;\n if (typeof TextEncoder !== \"undefined\")\n INTROSPECTABLE_GLOBALS.TextEncoder = TextEncoder;\n if (typeof TextDecoder !== \"undefined\")\n INTROSPECTABLE_GLOBALS.TextDecoder = TextDecoder;\n if (typeof Element !== \"undefined\") INTROSPECTABLE_GLOBALS.Element = Element;\n if (typeof HTMLElement !== \"undefined\")\n INTROSPECTABLE_GLOBALS.HTMLElement = HTMLElement;\n if (typeof Document !== \"undefined\")\n INTROSPECTABLE_GLOBALS.Document = Document;\n if (typeof Node !== \"undefined\") INTROSPECTABLE_GLOBALS.Node = Node;\n if (typeof Event !== \"undefined\") INTROSPECTABLE_GLOBALS.Event = Event;\n if (typeof CustomEvent !== \"undefined\")\n INTROSPECTABLE_GLOBALS.CustomEvent = CustomEvent;\n if (typeof MutationObserver !== \"undefined\")\n INTROSPECTABLE_GLOBALS.MutationObserver = MutationObserver;\n if (typeof ResizeObserver !== \"undefined\")\n INTROSPECTABLE_GLOBALS.ResizeObserver = ResizeObserver;\n if (typeof IntersectionObserver !== \"undefined\")\n INTROSPECTABLE_GLOBALS.IntersectionObserver = IntersectionObserver;\n if (typeof CanvasRenderingContext2D !== \"undefined\")\n INTROSPECTABLE_GLOBALS.CanvasRenderingContext2D = CanvasRenderingContext2D;\n if (typeof ImageData !== \"undefined\")\n INTROSPECTABLE_GLOBALS.ImageData = ImageData;\n if (typeof AudioContext !== \"undefined\")\n INTROSPECTABLE_GLOBALS.AudioContext = AudioContext;\n if (typeof performance !== \"undefined\")\n INTROSPECTABLE_GLOBALS.performance = performance;\n if (typeof PerformanceObserver !== \"undefined\")\n INTROSPECTABLE_GLOBALS.PerformanceObserver = PerformanceObserver;\n if (typeof document !== \"undefined\")\n INTROSPECTABLE_GLOBALS.document = document;\n if (typeof window !== \"undefined\") INTROSPECTABLE_GLOBALS.window = window;\n}\nfunction introspectObject(obj) {\n if (!obj || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return [];\n }\n const completions = [];\n const seen = /* @__PURE__ */ new Set();\n try {\n const objectKeys = Object.keys(obj);\n if (objectKeys.length > 0) {\n for (const key of objectKeys) {\n if (key === \"constructor\" || key.startsWith(\"_\") || seen.has(key))\n continue;\n seen.add(key);\n try {\n const value = obj[key];\n const valueType = typeof value;\n if (valueType === \"function\") {\n completions.push(\n snippetCompletion(`${key}(\\${1})`, {\n label: key,\n type: \"method\",\n detail: \"(...)\"\n })\n );\n } else {\n completions.push({\n label: key,\n type: \"property\",\n detail: valueType\n });\n }\n } catch {\n }\n }\n }\n } catch {\n }\n let current = obj;\n while (current && current !== Object.prototype && current !== Function.prototype) {\n const keys = Object.getOwnPropertyNames(current);\n for (const key of keys) {\n if (key === \"constructor\" || key.startsWith(\"_\") || seen.has(key)) {\n continue;\n }\n seen.add(key);\n try {\n const descriptor = Object.getOwnPropertyDescriptor(current, key);\n const value = descriptor?.value ?? (descriptor?.get ? \"[getter]\" : void 0);\n const valueType = typeof value;\n if (valueType === \"function\") {\n const fn = value;\n const paramCount = fn.length;\n const params = paramCount > 0 ? Array.from(\n { length: paramCount },\n (_, i) => `arg${i + 1}`\n ).join(\", \") : \"\";\n completions.push(\n snippetCompletion(`${key}(${paramCount > 0 ? \"${1}\" : \"\"})`, {\n label: key,\n type: \"method\",\n detail: `(${params})`,\n boost: key.startsWith(\"to\") ? -1 : 0\n // Demote toString, etc.\n })\n );\n } else {\n completions.push({\n label: key,\n type: \"property\",\n detail: valueType\n });\n }\n } catch {\n }\n }\n current = Object.getPrototypeOf(current);\n }\n return completions;\n}\nfunction getPropertyCompletions(objName) {\n if (CURATED_PROPERTIES[objName]) {\n return CURATED_PROPERTIES[objName];\n }\n const obj = INTROSPECTABLE_GLOBALS[objName];\n if (!obj) return [];\n return introspectObject(obj);\n}\nfunction getCompletionsFromLiveBinding(name, liveBindings) {\n if (liveBindings && name in liveBindings) {\n return introspectObject(liveBindings[name]);\n }\n const elementTypeMap = {\n // Common variable names that are likely specific element types\n div: \"HTMLDivElement\",\n span: \"HTMLSpanElement\",\n input: \"HTMLInputElement\",\n button: \"HTMLButtonElement\",\n form: \"HTMLFormElement\",\n img: \"HTMLImageElement\",\n link: \"HTMLLinkElement\",\n anchor: \"HTMLAnchorElement\",\n table: \"HTMLTableElement\",\n canvas: \"HTMLCanvasElement\",\n video: \"HTMLVideoElement\",\n audio: \"HTMLAudioElement\",\n select: \"HTMLSelectElement\",\n textarea: \"HTMLTextAreaElement\"\n // iframe, etc.\n };\n const lowerName = name.toLowerCase();\n const elementType = elementTypeMap[lowerName];\n if (elementType && typeof globalThis !== \"undefined\") {\n const ElementClass = globalThis[elementType];\n if (ElementClass?.prototype) {\n return introspectObject(ElementClass.prototype);\n }\n }\n return [];\n}\nfunction getPathBeforeDot(source, dotPos) {\n const before = source.slice(0, dotPos);\n const match = before.match(\n /([A-Za-z_$][\\w$]*(?:\\s*\\.\\s*[A-Za-z_$][\\w$]*)*)\\s*$/\n );\n return match ? match[1].replace(/\\s+/g, \"\") : null;\n}\nfunction resolvePath(path, bindings) {\n if (!bindings) return void 0;\n const parts = path.split(\".\");\n let value = bindings[parts[0]];\n for (let i = 1; i < parts.length && value != null; i++) {\n try {\n value = value[parts[i]];\n } catch {\n return void 0;\n }\n }\n return value;\n}\nfunction getCompletionsFromPath(path, liveBindings) {\n const value = resolvePath(path, liveBindings);\n if (value != null && (typeof value === \"object\" || typeof value === \"function\")) {\n return introspectObject(value);\n }\n if (!path.includes(\".\")) {\n return getCompletionsFromLiveBinding(path, liveBindings);\n }\n return [];\n}\nfunction getPlaceholderForParam(name, info) {\n if (info.example !== void 0 && info.example !== null) {\n const ex = info.example;\n if (typeof ex === \"string\") return `'${ex}'`;\n if (typeof ex === \"number\" || typeof ex === \"boolean\") return String(ex);\n if (Array.isArray(ex)) return JSON.stringify(ex);\n if (typeof ex === \"object\") return JSON.stringify(ex);\n return String(ex);\n }\n const examples = info.type?.examples || info.examples;\n if (Array.isArray(examples) && examples.length > 0) {\n const ex = examples[0];\n if (typeof ex === \"string\") return `'${ex}'`;\n if (typeof ex === \"number\" || typeof ex === \"boolean\") return String(ex);\n if (Array.isArray(ex)) return JSON.stringify(ex);\n if (typeof ex === \"object\") return JSON.stringify(ex);\n return String(ex);\n }\n if (info.default !== void 0 && info.default !== null) {\n const def = info.default;\n if (typeof def === \"string\") return `'${def}'`;\n if (typeof def === \"number\" || typeof def === \"boolean\") return String(def);\n if (Array.isArray(def)) return JSON.stringify(def);\n if (typeof def === \"object\") return JSON.stringify(def);\n return String(def);\n }\n const kind = info.type?.kind || info.type?.type || \"any\";\n switch (kind) {\n case \"string\":\n return `'${name}'`;\n case \"number\":\n return \"0\";\n case \"boolean\":\n return \"true\";\n case \"null\":\n return \"null\";\n case \"array\":\n return \"[]\";\n case \"object\":\n return \"{}\";\n default:\n return name;\n }\n}\nfunction tjsCompletionSource(config = {}) {\n return async (context) => {\n try {\n const word = context.matchBefore(/[\\w$]*/);\n if (!word) return null;\n const source = context.state.doc.toString();\n const pos = context.pos;\n const skipRegions = findSkipRegions(source);\n if (isInSkipRegion(pos, skipRegions)) {\n return null;\n }\n const lineStart = context.state.doc.lineAt(pos).from;\n const lineBefore = source.slice(lineStart, word.from);\n const charBefore = source.slice(Math.max(0, word.from - 1), word.from);\n if (word.from === word.to && !context.explicit && charBefore !== \".\") {\n return null;\n }\n let options = [];\n if (charBefore === \".\") {\n const before = source.slice(Math.max(0, word.from - 50), word.from);\n if (/expect\\s*\\([^)]*\\)\\s*\\.$/.test(before)) {\n options = EXPECT_MATCHERS;\n } else {\n const path = getPathBeforeDot(source, word.from - 1);\n if (path) {\n if (!path.includes(\".\")) {\n options = getPropertyCompletions(path);\n }\n if (options.length === 0) {\n const liveBindings = config.getLiveBindings?.();\n options = getCompletionsFromPath(path, liveBindings);\n }\n if (options.length === 0 && config.getMembers) {\n const members = await config.getMembers(path);\n if (members && members.length) {\n options = members.map(memberToCompletion);\n }\n }\n }\n }\n } else if (/:\\s*$/.test(lineBefore)) {\n options = TJS_TYPES;\n } else if (/->\\s*$/.test(lineBefore)) {\n options = TJS_TYPES;\n } else {\n options = [\n ...TJS_COMPLETIONS,\n ...RUNTIME_COMPLETIONS,\n ...GLOBAL_COMPLETIONS,\n ...completionsFromScope(source, pos)\n ];\n const metadata = config.getMetadata?.();\n if (metadata) {\n for (const [name, meta] of Object.entries(metadata)) {\n const paramEntries = meta.params ? Object.entries(meta.params) : [];\n const paramList = paramEntries.map(([pName, pInfo]) => {\n const pType = pInfo.type?.kind || pInfo.type?.type || \"any\";\n const optional = !pInfo.required;\n return optional ? `${pName}?: ${pType}` : `${pName}: ${pType}`;\n }).join(\", \");\n const snippetParams = paramEntries.map(([pName, pInfo], i) => {\n const placeholder = getPlaceholderForParam(pName, pInfo);\n return `\\${${i + 1}:${placeholder}}`;\n }).join(\", \");\n const returnType = meta.returns?.type || meta.returns?.kind || \"void\";\n let infoText = meta.description || \"\";\n for (const [pName, pInfo] of paramEntries) {\n const pExamples = pInfo.type?.examples || pInfo.examples;\n if (Array.isArray(pExamples) && pExamples.length > 0) {\n const formatted = pExamples.map(\n (ex) => typeof ex === \"string\" ? `'${ex}'` : String(ex)\n ).join(\", \");\n infoText += `${infoText ? \"\\n\" : \"\"}${pName}: e.g. ${formatted}`;\n }\n }\n options.push(\n snippetCompletion(`${name}(${snippetParams})`, {\n label: name,\n type: \"function\",\n detail: `(${paramList}) -> ${returnType}`,\n info: infoText || void 0,\n boost: 2\n // Boost user-defined functions above globals\n })\n );\n }\n }\n }\n if (options.length === 0) return null;\n return {\n from: word.from,\n options,\n validFor: /^[\\w$]*$/\n };\n } catch (e) {\n console.warn(\"TJS autocomplete error:\", e);\n return null;\n }\n };\n}\nfunction ajsEditorExtension(config = {}) {\n return [\n javascript({ jsx: config.jsx, typescript: config.typescript }),\n // Syntax highlighting comes from customSetup (defaultHighlightStyle with fallback)\n // or from the active theme (e.g. oneDark)\n forbiddenHighlighter,\n tryWithoutCatchHighlighter,\n ajsTheme,\n autocompletion({\n override: [tjsCompletionSource(config.autocomplete || {})],\n activateOnTyping: true\n })\n ];\n}\nfunction tjsEditorExtension(config = {}) {\n return [\n javascript({ jsx: config.jsx, typescript: config.typescript }),\n // Syntax highlighting comes from customSetup (defaultHighlightStyle with fallback)\n // or from the active theme (e.g. oneDark)\n tjsForbiddenHighlighter,\n // Use TJS forbidden list (more permissive)\n tryWithoutCatchHighlighter,\n ajsTheme,\n autocompletion({\n override: [tjsCompletionSource(config.autocomplete || {})],\n activateOnTyping: true\n })\n ];\n}\nfunction ajsLanguage(config = {}) {\n const jsLang = javascript({ jsx: config.jsx, typescript: config.typescript });\n return new LanguageSupport(jsLang.language, [\n forbiddenHighlighter,\n tryWithoutCatchHighlighter,\n ajsTheme\n ]);\n}\nexport {\n FORBIDDEN_KEYWORDS3 as FORBIDDEN_KEYWORDS,\n ajsEditorExtension as ajs,\n ajsEditorExtension,\n ajsLanguage,\n tjsCompletionSource,\n tjsEditorExtension\n};\n"
6
6
  ],
7
7
  "mappings": "2MAkBA,GAAI,CAAW,CACb,WACA,SACA,KACA,OACA,QACA,MACA,KACA,KACA,MACA,QACA,UACA,MACA,QACA,OACA,QACA,OACA,WACF,EACI,EAAqB,CAEvB,MACA,QACA,UACA,QACA,OACA,aACA,YACA,WACA,SACA,UACA,YACA,SAEA,QACA,QACA,QAEA,SACA,SACA,UACA,SAEA,MAEA,QAEA,SAEA,OACA,UAEA,OACA,SACA,OACA,SAEA,aACA,WACA,OAEA,OACA,OACA,YACA,UACA,WACA,KACA,KACA,QACA,QACA,QACA,SACF,EACI,EAAoB,CACtB,OACA,MACA,MACA,QACA,SACA,SACA,SACA,UACA,SACA,QACA,OACA,OACA,QAEF,EACI,EAAY,CAEd,IACA,KACA,KACA,KACA,KACA,KAEA,KACA,MACA,KACA,MACA,IACA,IACA,KACA,KAEA,IACA,IACA,IACA,IACA,IACA,KAEA,KACA,KACA,KACA,IAEA,IACA,IACA,IACA,IACA,KACA,KACA,MAEA,IACA,IACA,IACA,KACA,MACA,MACA,KACF,EACI,GAAgB,IAAI,IAAI,CAAkB,EAC1C,GAAe,IAAI,IAAI,CAAQ,EAC/B,GAAoB,IAAI,OAC1B,OAAO,EAAmB,KAAK,GAAG,QAClC,GACF,EAGI,EAAe,CACjB,OAEA,OAEA,SAEA,QAEA,QACA,QACA,SACA,SAEA,QACA,UACA,QACA,OACA,MACA,SAEA,SACA,aACA,QACF,EACI,GAAY,CAAC,GAAG,EAAU,GAAG,CAAY,EACzC,EAAsB,EAAmB,OAC3C,CAAC,IAAM,CAAC,CACN,QACA,QACA,QACA,SACA,SAEA,QACA,UACA,QACA,OACA,MACA,SAEA,SACA,aACA,QACF,EAAE,SAAS,CAAC,CACd,EACI,GAAqB,CACvB,GAAG,EACH,SAEA,QAEF,EACI,GAAa,CAAC,GAAG,EAAW,IAAI,EAMpC,SAAS,EAAM,CAAC,EAAQ,CACtB,GAAI,CACF,O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