toyon 0.17.0 → 0.19.0

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 (223) hide show
  1. package/dist/CHANGELOG.md +77 -0
  2. package/dist/bridge.js +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/daemon.js +2279 -1016
  5. package/dist/shell/assets/{Editor-BMBnZV2V.js → Editor-B-1lrUVF.js} +131 -131
  6. package/dist/shell/assets/Editor-B-1lrUVF.js.br +0 -0
  7. package/dist/shell/assets/Editor-B-1lrUVF.js.gz +0 -0
  8. package/dist/shell/assets/Editor-CB2SckMT.css.br +0 -0
  9. package/dist/shell/assets/Editor-CB2SckMT.css.gz +0 -0
  10. package/dist/shell/assets/XTerm-6GBZ9nXN.css.br +0 -0
  11. package/dist/shell/assets/XTerm-6GBZ9nXN.css.gz +0 -0
  12. package/dist/shell/assets/{XTerm-xxm4nCyN.js → XTerm-CZl-vWEO.js} +1 -1
  13. package/dist/shell/assets/XTerm-CZl-vWEO.js.br +0 -0
  14. package/dist/shell/assets/XTerm-CZl-vWEO.js.gz +0 -0
  15. package/dist/shell/assets/abap-DLDM7-KI.js.br +0 -0
  16. package/dist/shell/assets/abap-DLDM7-KI.js.gz +0 -0
  17. package/dist/shell/assets/apex-DNDY2TF8.js.br +0 -0
  18. package/dist/shell/assets/apex-DNDY2TF8.js.gz +0 -0
  19. package/dist/shell/assets/bat-BwHxbl9M.js.br +0 -0
  20. package/dist/shell/assets/bat-BwHxbl9M.js.gz +0 -0
  21. package/dist/shell/assets/bicep-CFznDFnq.js.br +0 -0
  22. package/dist/shell/assets/bicep-CFznDFnq.js.gz +0 -0
  23. package/dist/shell/assets/cameligo-Bf6VGUru.js.br +0 -0
  24. package/dist/shell/assets/cameligo-Bf6VGUru.js.gz +0 -0
  25. package/dist/shell/assets/clojure-Dnu-v4kV.js.br +0 -0
  26. package/dist/shell/assets/clojure-Dnu-v4kV.js.gz +0 -0
  27. package/dist/shell/assets/coffee-Bd8akH9Z.js.br +0 -0
  28. package/dist/shell/assets/coffee-Bd8akH9Z.js.gz +0 -0
  29. package/dist/shell/assets/cpp-BbWJElDN.js.br +0 -0
  30. package/dist/shell/assets/cpp-BbWJElDN.js.gz +0 -0
  31. package/dist/shell/assets/csharp-Co3qMtFm.js.br +0 -0
  32. package/dist/shell/assets/csharp-Co3qMtFm.js.gz +0 -0
  33. package/dist/shell/assets/csp-D-4FJmMZ.js.br +0 -0
  34. package/dist/shell/assets/csp-D-4FJmMZ.js.gz +0 -0
  35. package/dist/shell/assets/css-DdJfP1eB.js.br +0 -0
  36. package/dist/shell/assets/css-DdJfP1eB.js.gz +0 -0
  37. package/dist/shell/assets/css.worker-CqwWTjeG.js.br +0 -0
  38. package/dist/shell/assets/css.worker-CqwWTjeG.js.gz +0 -0
  39. package/dist/shell/assets/{cssMode-DRRmIKjD.js → cssMode-BpigOakf.js} +1 -1
  40. package/dist/shell/assets/cssMode-BpigOakf.js.br +0 -0
  41. package/dist/shell/assets/cssMode-BpigOakf.js.gz +0 -0
  42. package/dist/shell/assets/cypher-cTPe9QuQ.js.br +0 -0
  43. package/dist/shell/assets/cypher-cTPe9QuQ.js.gz +0 -0
  44. package/dist/shell/assets/dart-BOtBlQCF.js.br +0 -0
  45. package/dist/shell/assets/dart-BOtBlQCF.js.gz +0 -0
  46. package/dist/shell/assets/dockerfile-BG73LgW2.js.br +0 -0
  47. package/dist/shell/assets/dockerfile-BG73LgW2.js.gz +0 -0
  48. package/dist/shell/assets/ecl-BEgZUVRK.js.br +0 -0
  49. package/dist/shell/assets/ecl-BEgZUVRK.js.gz +0 -0
  50. package/dist/shell/assets/editor.worker-DCKwvLbM.js.br +0 -0
  51. package/dist/shell/assets/editor.worker-DCKwvLbM.js.gz +0 -0
  52. package/dist/shell/assets/elixir-BkW5O-1t.js.br +0 -0
  53. package/dist/shell/assets/elixir-BkW5O-1t.js.gz +0 -0
  54. package/dist/shell/assets/flow9-BeJ5waoc.js.br +0 -0
  55. package/dist/shell/assets/flow9-BeJ5waoc.js.gz +0 -0
  56. package/dist/shell/assets/{freemarker2-BWXbPnFF.js → freemarker2-vvh2KLdJ.js} +1 -1
  57. package/dist/shell/assets/freemarker2-vvh2KLdJ.js.br +0 -0
  58. package/dist/shell/assets/freemarker2-vvh2KLdJ.js.gz +0 -0
  59. package/dist/shell/assets/fsharp-PahG7c26.js.br +0 -0
  60. package/dist/shell/assets/fsharp-PahG7c26.js.gz +0 -0
  61. package/dist/shell/assets/go-acbASCJo.js.br +0 -0
  62. package/dist/shell/assets/go-acbASCJo.js.gz +0 -0
  63. package/dist/shell/assets/{grammar-BlgE3B1J.js → grammar-DBMSnNcB.js} +1 -1
  64. package/dist/shell/assets/grammar-DBMSnNcB.js.br +0 -0
  65. package/dist/shell/assets/grammar-DBMSnNcB.js.gz +0 -0
  66. package/dist/shell/assets/graphql-BxJiqAUM.js.br +0 -0
  67. package/dist/shell/assets/graphql-BxJiqAUM.js.gz +0 -0
  68. package/dist/shell/assets/{handlebars-swdzvdWB.js → handlebars-ExFAR1bz.js} +1 -1
  69. package/dist/shell/assets/handlebars-ExFAR1bz.js.br +0 -0
  70. package/dist/shell/assets/handlebars-ExFAR1bz.js.gz +0 -0
  71. package/dist/shell/assets/hcl-DtV1sZF8.js.br +0 -0
  72. package/dist/shell/assets/hcl-DtV1sZF8.js.gz +0 -0
  73. package/dist/shell/assets/{html-GPVhANjL.js → html-DpIWoe_L.js} +1 -1
  74. package/dist/shell/assets/html-DpIWoe_L.js.br +0 -0
  75. package/dist/shell/assets/html-DpIWoe_L.js.gz +0 -0
  76. package/dist/shell/assets/html.worker-DhJ4VZMp.js.br +0 -0
  77. package/dist/shell/assets/html.worker-DhJ4VZMp.js.gz +0 -0
  78. package/dist/shell/assets/{htmlMode-BTtuR8kD.js → htmlMode-vCEOKCM-.js} +1 -1
  79. package/dist/shell/assets/htmlMode-vCEOKCM-.js.br +0 -0
  80. package/dist/shell/assets/htmlMode-vCEOKCM-.js.gz +0 -0
  81. package/dist/shell/assets/index-CHbNBHbD.css +1 -0
  82. package/dist/shell/assets/index-CHbNBHbD.css.br +0 -0
  83. package/dist/shell/assets/index-CHbNBHbD.css.gz +0 -0
  84. package/dist/shell/assets/index-D5GN5OOv.js +276 -0
  85. package/dist/shell/assets/index-D5GN5OOv.js.br +0 -0
  86. package/dist/shell/assets/index-D5GN5OOv.js.gz +0 -0
  87. package/dist/shell/assets/java-CXBNlu9o.js.br +0 -0
  88. package/dist/shell/assets/java-CXBNlu9o.js.gz +0 -0
  89. package/dist/shell/assets/{javascript-CFXn2iKE.js → javascript-CF6f9y1O.js} +1 -1
  90. package/dist/shell/assets/json.worker-BF9eV5mS.js.br +0 -0
  91. package/dist/shell/assets/json.worker-BF9eV5mS.js.gz +0 -0
  92. package/dist/shell/assets/{jsonMode-wmrRCrSu.js → jsonMode-CZzpDv9U.js} +1 -1
  93. package/dist/shell/assets/jsonMode-CZzpDv9U.js.br +0 -0
  94. package/dist/shell/assets/jsonMode-CZzpDv9U.js.gz +0 -0
  95. package/dist/shell/assets/julia-cl7-CwDS.js.br +0 -0
  96. package/dist/shell/assets/julia-cl7-CwDS.js.gz +0 -0
  97. package/dist/shell/assets/kotlin-s7OhZKlX.js.br +0 -0
  98. package/dist/shell/assets/kotlin-s7OhZKlX.js.gz +0 -0
  99. package/dist/shell/assets/less-9HpZscsL.js.br +0 -0
  100. package/dist/shell/assets/less-9HpZscsL.js.gz +0 -0
  101. package/dist/shell/assets/lexon-OrD6JF1K.js.br +0 -0
  102. package/dist/shell/assets/lexon-OrD6JF1K.js.gz +0 -0
  103. package/dist/shell/assets/{liquid-Bz7Svg4V.js → liquid-5T0ZgJhW.js} +1 -1
  104. package/dist/shell/assets/liquid-5T0ZgJhW.js.br +0 -0
  105. package/dist/shell/assets/liquid-5T0ZgJhW.js.gz +0 -0
  106. package/dist/shell/assets/{lspLanguageFeatures-BDP4BowE.js → lspLanguageFeatures-DrkNrp6u.js} +1 -1
  107. package/dist/shell/assets/lspLanguageFeatures-DrkNrp6u.js.br +0 -0
  108. package/dist/shell/assets/lspLanguageFeatures-DrkNrp6u.js.gz +0 -0
  109. package/dist/shell/assets/lua-Cyyb5UIc.js.br +0 -0
  110. package/dist/shell/assets/lua-Cyyb5UIc.js.gz +0 -0
  111. package/dist/shell/assets/m3-B8OfTtLu.js.br +0 -0
  112. package/dist/shell/assets/m3-B8OfTtLu.js.gz +0 -0
  113. package/dist/shell/assets/markdown-BFxVWTOG.js.br +0 -0
  114. package/dist/shell/assets/markdown-BFxVWTOG.js.gz +0 -0
  115. package/dist/shell/assets/{mdx-CzERTPdi.js → mdx-DnLcCYKb.js} +1 -1
  116. package/dist/shell/assets/mdx-DnLcCYKb.js.br +0 -0
  117. package/dist/shell/assets/mdx-DnLcCYKb.js.gz +0 -0
  118. package/dist/shell/assets/mips-CiqrrVzr.js.br +0 -0
  119. package/dist/shell/assets/mips-CiqrrVzr.js.gz +0 -0
  120. package/dist/shell/assets/msdax-DmeGPVcC.js.br +0 -0
  121. package/dist/shell/assets/msdax-DmeGPVcC.js.gz +0 -0
  122. package/dist/shell/assets/mysql-C_tMU-Nz.js.br +0 -0
  123. package/dist/shell/assets/mysql-C_tMU-Nz.js.gz +0 -0
  124. package/dist/shell/assets/objective-c-BDtDVThU.js.br +0 -0
  125. package/dist/shell/assets/objective-c-BDtDVThU.js.gz +0 -0
  126. package/dist/shell/assets/pascal-vHIfCaH5.js.br +0 -0
  127. package/dist/shell/assets/pascal-vHIfCaH5.js.gz +0 -0
  128. package/dist/shell/assets/pascaligo-DtZ0uQbO.js.br +0 -0
  129. package/dist/shell/assets/pascaligo-DtZ0uQbO.js.gz +0 -0
  130. package/dist/shell/assets/perl-Ub6l9XKa.js.br +0 -0
  131. package/dist/shell/assets/perl-Ub6l9XKa.js.gz +0 -0
  132. package/dist/shell/assets/pgsql-BlNEE0v7.js.br +0 -0
  133. package/dist/shell/assets/pgsql-BlNEE0v7.js.gz +0 -0
  134. package/dist/shell/assets/php-BBUBE1dy.js.br +0 -0
  135. package/dist/shell/assets/php-BBUBE1dy.js.gz +0 -0
  136. package/dist/shell/assets/pla-DSh2-awV.js.br +0 -0
  137. package/dist/shell/assets/pla-DSh2-awV.js.gz +0 -0
  138. package/dist/shell/assets/postiats-CocnycG-.js.br +0 -0
  139. package/dist/shell/assets/postiats-CocnycG-.js.gz +0 -0
  140. package/dist/shell/assets/powerquery-tScXyioY.js.br +0 -0
  141. package/dist/shell/assets/powerquery-tScXyioY.js.gz +0 -0
  142. package/dist/shell/assets/powershell-COWaemsV.js.br +0 -0
  143. package/dist/shell/assets/powershell-COWaemsV.js.gz +0 -0
  144. package/dist/shell/assets/protobuf-Brw8urJB.js.br +0 -0
  145. package/dist/shell/assets/protobuf-Brw8urJB.js.gz +0 -0
  146. package/dist/shell/assets/pug-8SOpv6rk.js.br +0 -0
  147. package/dist/shell/assets/pug-8SOpv6rk.js.gz +0 -0
  148. package/dist/shell/assets/{python-3OsSAVmo.js → python-Di4WuyJe.js} +1 -1
  149. package/dist/shell/assets/python-Di4WuyJe.js.br +0 -0
  150. package/dist/shell/assets/python-Di4WuyJe.js.gz +0 -0
  151. package/dist/shell/assets/qsharp-Bw9ernYp.js.br +0 -0
  152. package/dist/shell/assets/qsharp-Bw9ernYp.js.gz +0 -0
  153. package/dist/shell/assets/r-j7ic8hl3.js.br +0 -0
  154. package/dist/shell/assets/r-j7ic8hl3.js.gz +0 -0
  155. package/dist/shell/assets/{razor-BKY4SJuy.js → razor-NpEB1IHs.js} +1 -1
  156. package/dist/shell/assets/razor-NpEB1IHs.js.br +0 -0
  157. package/dist/shell/assets/razor-NpEB1IHs.js.gz +0 -0
  158. package/dist/shell/assets/redis-Bu5POkcn.js.br +0 -0
  159. package/dist/shell/assets/redis-Bu5POkcn.js.gz +0 -0
  160. package/dist/shell/assets/redshift-Bs9aos_-.js.br +0 -0
  161. package/dist/shell/assets/redshift-Bs9aos_-.js.gz +0 -0
  162. package/dist/shell/assets/restructuredtext-CqXO7rUv.js.br +0 -0
  163. package/dist/shell/assets/restructuredtext-CqXO7rUv.js.gz +0 -0
  164. package/dist/shell/assets/ruby-zBfavPgS.js.br +0 -0
  165. package/dist/shell/assets/ruby-zBfavPgS.js.gz +0 -0
  166. package/dist/shell/assets/rust-BzKRNQWT.js.br +0 -0
  167. package/dist/shell/assets/rust-BzKRNQWT.js.gz +0 -0
  168. package/dist/shell/assets/sb-BBc9UKZt.js.br +0 -0
  169. package/dist/shell/assets/sb-BBc9UKZt.js.gz +0 -0
  170. package/dist/shell/assets/scala-D9hQfWCl.js.br +0 -0
  171. package/dist/shell/assets/scala-D9hQfWCl.js.gz +0 -0
  172. package/dist/shell/assets/scheme-BPhDTwHR.js.br +0 -0
  173. package/dist/shell/assets/scheme-BPhDTwHR.js.gz +0 -0
  174. package/dist/shell/assets/scss-CBJaRo0y.js.br +0 -0
  175. package/dist/shell/assets/scss-CBJaRo0y.js.gz +0 -0
  176. package/dist/shell/assets/shell-DiJ1NA_G.js.br +0 -0
  177. package/dist/shell/assets/shell-DiJ1NA_G.js.gz +0 -0
  178. package/dist/shell/assets/solidity-Db0IVjzk.js.br +0 -0
  179. package/dist/shell/assets/solidity-Db0IVjzk.js.gz +0 -0
  180. package/dist/shell/assets/sophia-CnS9iZB_.js.br +0 -0
  181. package/dist/shell/assets/sophia-CnS9iZB_.js.gz +0 -0
  182. package/dist/shell/assets/sparql-CJmd_6j2.js.br +0 -0
  183. package/dist/shell/assets/sparql-CJmd_6j2.js.gz +0 -0
  184. package/dist/shell/assets/sql-ClhHkBeG.js.br +0 -0
  185. package/dist/shell/assets/sql-ClhHkBeG.js.gz +0 -0
  186. package/dist/shell/assets/st-CHwy0fLd.js.br +0 -0
  187. package/dist/shell/assets/st-CHwy0fLd.js.gz +0 -0
  188. package/dist/shell/assets/swift-Bqt4WxQ4.js.br +0 -0
  189. package/dist/shell/assets/swift-Bqt4WxQ4.js.gz +0 -0
  190. package/dist/shell/assets/systemverilog-Bs9z6M-B.js.br +0 -0
  191. package/dist/shell/assets/systemverilog-Bs9z6M-B.js.gz +0 -0
  192. package/dist/shell/assets/tcl-Dm6ycUr_.js.br +0 -0
  193. package/dist/shell/assets/tcl-Dm6ycUr_.js.gz +0 -0
  194. package/dist/shell/assets/ts.worker-DTZAwq0V.js.br +0 -0
  195. package/dist/shell/assets/ts.worker-DTZAwq0V.js.gz +0 -0
  196. package/dist/shell/assets/{tsMode-BESW693Z.js → tsMode-BylSuxTF.js} +1 -1
  197. package/dist/shell/assets/tsMode-BylSuxTF.js.br +0 -0
  198. package/dist/shell/assets/tsMode-BylSuxTF.js.gz +0 -0
  199. package/dist/shell/assets/twig-Csy3S7wG.js.br +0 -0
  200. package/dist/shell/assets/twig-Csy3S7wG.js.gz +0 -0
  201. package/dist/shell/assets/typespec-Btyra-wh.js.br +0 -0
  202. package/dist/shell/assets/typespec-Btyra-wh.js.gz +0 -0
  203. package/dist/shell/assets/vb-Db0cS2oM.js.br +0 -0
  204. package/dist/shell/assets/vb-Db0cS2oM.js.gz +0 -0
  205. package/dist/shell/assets/wasm-inlined-CG6Dc4jp.js.br +0 -0
  206. package/dist/shell/assets/wasm-inlined-CG6Dc4jp.js.gz +0 -0
  207. package/dist/shell/assets/wgsl-BTesnYfV.js.br +0 -0
  208. package/dist/shell/assets/wgsl-BTesnYfV.js.gz +0 -0
  209. package/dist/shell/assets/{xml-SaTEQQ9V.js → xml-BYRl5HAh.js} +1 -1
  210. package/dist/shell/assets/xml-BYRl5HAh.js.br +0 -0
  211. package/dist/shell/assets/xml-BYRl5HAh.js.gz +0 -0
  212. package/dist/shell/assets/{yaml-gHi84-nk.js → yaml-DeSD0TUR.js} +1 -1
  213. package/dist/shell/assets/yaml-DeSD0TUR.js.br +0 -0
  214. package/dist/shell/assets/yaml-DeSD0TUR.js.gz +0 -0
  215. package/dist/shell/icon-192.png +0 -0
  216. package/dist/shell/icon-512.png +0 -0
  217. package/dist/shell/icon-maskable-512.png +0 -0
  218. package/dist/shell/index.html +101 -17
  219. package/dist/shell/manifest.json +32 -1
  220. package/dist/shell/sw.js +117 -22
  221. package/package.json +2 -2
  222. package/dist/shell/assets/index-9aG0ri4Y.css +0 -1
  223. package/dist/shell/assets/index-miqqiN7Z.js +0 -269
@@ -1 +1 @@
1
- import{c as h,e as l,l as n,S as d,a as f,Q as w,D as _,b as k,L as m,R as y,O as v,d as L,F as A,f as P,C as S,I as b,g as x}from"./Editor-BMBnZV2V.js";import{A as J,h as K,K as Q,i as q}from"./Editor-BMBnZV2V.js";import"./index-miqqiN7Z.js";import"./grammar-BlgE3B1J.js";class W{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=h({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-DTZAwq0V.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(l.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}let a,p;function T(r){p=u(r,"typescript")}function F(r){a=u(r,"javascript")}function R(){return new Promise((r,e)=>{if(!a)return e("JavaScript not registered!");r(a)})}function O(){return new Promise((r,e)=>{if(!p)return e("TypeScript not registered!");r(p)})}function u(r,e){const t=[],c=new W(e,r),i=(...s)=>c.getLanguageServiceWorker(...s),o=new m(i);function g(){const{modeConfiguration:s}=r;C(t),s.completionItems&&t.push(n.registerCompletionItemProvider(e,new d(i))),s.signatureHelp&&t.push(n.registerSignatureHelpProvider(e,new f(i))),s.hovers&&t.push(n.registerHoverProvider(e,new w(i))),s.documentHighlights&&t.push(n.registerDocumentHighlightProvider(e,new _(i))),s.definitions&&t.push(n.registerDefinitionProvider(e,new k(o,i))),s.references&&t.push(n.registerReferenceProvider(e,new y(o,i))),s.documentSymbols&&t.push(n.registerDocumentSymbolProvider(e,new v(i))),s.rename&&t.push(n.registerRenameProvider(e,new L(o,i))),s.documentRangeFormattingEdits&&t.push(n.registerDocumentRangeFormattingEditProvider(e,new A(i))),s.onTypeFormattingEdits&&t.push(n.registerOnTypeFormattingEditProvider(e,new P(i))),s.codeActions&&t.push(n.registerCodeActionProvider(e,new S(i))),s.inlayHints&&t.push(n.registerInlayHintsProvider(e,new b(i))),s.diagnostics&&t.push(new x(o,r,e,i))}return g(),i}function C(r){for(;r.length;)r.pop().dispose()}export{J as Adapter,S as CodeActionAdaptor,k as DefinitionAdapter,x as DiagnosticsAdapter,_ as DocumentHighlightAdapter,A as FormatAdapter,K as FormatHelper,P as FormatOnTypeAdapter,b as InlayHintsAdapter,Q as Kind,m as LibFiles,v as OutlineAdapter,w as QuickInfoAdapter,y as ReferenceAdapter,L as RenameAdapter,f as SignatureHelpAdapter,d as SuggestAdapter,W as WorkerManager,q as flattenDiagnosticMessageText,R as getJavaScriptWorker,O as getTypeScriptWorker,F as setupJavaScript,T as setupTypeScript};
1
+ import{c as h,e as l,l as n,S as d,a as f,Q as w,D as _,b as k,L as m,R as y,O as v,d as L,F as A,f as P,C as S,I as b,g as x}from"./Editor-B-1lrUVF.js";import{A as J,h as K,K as Q,i as q}from"./Editor-B-1lrUVF.js";import"./index-D5GN5OOv.js";import"./grammar-DBMSnNcB.js";class W{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=h({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-DTZAwq0V.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(l.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}let a,p;function T(r){p=u(r,"typescript")}function F(r){a=u(r,"javascript")}function R(){return new Promise((r,e)=>{if(!a)return e("JavaScript not registered!");r(a)})}function O(){return new Promise((r,e)=>{if(!p)return e("TypeScript not registered!");r(p)})}function u(r,e){const t=[],c=new W(e,r),i=(...s)=>c.getLanguageServiceWorker(...s),o=new m(i);function g(){const{modeConfiguration:s}=r;C(t),s.completionItems&&t.push(n.registerCompletionItemProvider(e,new d(i))),s.signatureHelp&&t.push(n.registerSignatureHelpProvider(e,new f(i))),s.hovers&&t.push(n.registerHoverProvider(e,new w(i))),s.documentHighlights&&t.push(n.registerDocumentHighlightProvider(e,new _(i))),s.definitions&&t.push(n.registerDefinitionProvider(e,new k(o,i))),s.references&&t.push(n.registerReferenceProvider(e,new y(o,i))),s.documentSymbols&&t.push(n.registerDocumentSymbolProvider(e,new v(i))),s.rename&&t.push(n.registerRenameProvider(e,new L(o,i))),s.documentRangeFormattingEdits&&t.push(n.registerDocumentRangeFormattingEditProvider(e,new A(i))),s.onTypeFormattingEdits&&t.push(n.registerOnTypeFormattingEditProvider(e,new P(i))),s.codeActions&&t.push(n.registerCodeActionProvider(e,new S(i))),s.inlayHints&&t.push(n.registerInlayHintsProvider(e,new b(i))),s.diagnostics&&t.push(new x(o,r,e,i))}return g(),i}function C(r){for(;r.length;)r.pop().dispose()}export{J as Adapter,S as CodeActionAdaptor,k as DefinitionAdapter,x as DiagnosticsAdapter,_ as DocumentHighlightAdapter,A as FormatAdapter,K as FormatHelper,P as FormatOnTypeAdapter,b as InlayHintsAdapter,Q as Kind,m as LibFiles,v as OutlineAdapter,w as QuickInfoAdapter,y as ReferenceAdapter,L as RenameAdapter,f as SignatureHelpAdapter,d as SuggestAdapter,W as WorkerManager,q as flattenDiagnosticMessageText,R as getJavaScriptWorker,O as getTypeScriptWorker,F as setupJavaScript,T as setupTypeScript};
@@ -1 +1 @@
1
- import{l as e}from"./Editor-BMBnZV2V.js";import"./index-miqqiN7Z.js";import"./grammar-BlgE3B1J.js";const i={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{i as conf,a as language};
1
+ import{l as e}from"./Editor-B-1lrUVF.js";import"./index-D5GN5OOv.js";import"./grammar-DBMSnNcB.js";const i={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{i as conf,a as language};
@@ -1 +1 @@
1
- import{l as e}from"./Editor-BMBnZV2V.js";import"./index-miqqiN7Z.js";import"./grammar-BlgE3B1J.js";const r={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},l={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{r as conf,l as language};
1
+ import{l as e}from"./Editor-B-1lrUVF.js";import"./index-D5GN5OOv.js";import"./grammar-DBMSnNcB.js";const r={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},l={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{r as conf,l as language};
Binary file
Binary file
Binary file
@@ -9,21 +9,100 @@
9
9
  name="viewport"
10
10
  content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"
11
11
  />
12
- <!-- what a phone or an installed window paints above the page: the dark theme's ground, the
13
- same literal as the manifest's. A phone's installed app paints its status bar from these
14
- two (Firefox on Android from the manifest alone) and not from the value the theme sets
15
- later, so the literal is the phone's answer, the screen's ground, and a desk window gets
16
- the bar's ground from theme.ts at load. -->
17
- <meta name="theme-color" content="#32302d" />
12
+ <!-- what a phone or an installed window paints above the page, before the bundle sets it for
13
+ the screen (theme.ts): the ground of the phone's list, which a fresh tab opens on, the
14
+ same literal as the manifest's, and the dark theme's bar ground for a desk window's
15
+ caption area. Some installed apps read only this and the manifest (Firefox on Android),
16
+ so the literal is the list's answer and not the dark theme's canvas. -->
17
+ <meta name="theme-color" content="#3d3835" />
18
18
  <link rel="manifest" href="/manifest.json" />
19
19
  <link rel="icon" href="/icon.svg" type="image/svg+xml" />
20
20
  <title>Toyon</title>
21
- <!-- The canvas: the rule names the token, so it follows every theme applied later, and the
22
- literal is the dark theme's, for a first visit. -->
21
+ <!-- The canvas, for a first visit when the script under it cannot paint: the rule names the
22
+ token, so it follows every theme applied later, and the literal is the dark theme's. In the
23
+ base layer, where the bundle's own canvas rule lives (base.css): unlayered it would beat
24
+ the one that follows the screen's ground, and the html's canvas would stay surface0 under
25
+ a list standing on surface1. -->
23
26
  <style>
24
- html {
25
- background: var(--surface0, #32302d);
26
- color-scheme: dark;
27
+ @layer tokens, base, surfaces;
28
+ @layer base {
29
+ html {
30
+ background: var(--surface0, #32302d);
31
+ color-scheme: dark;
32
+ }
33
+ /* The wait for the bundle, marked: the four cells the in-progress mark draws
34
+ (ui/spinner.css), drawn again here because the bundle that owns them is what is being
35
+ waited for. Centred, where a phone's splash icon just was, in the cached theme's quiet
36
+ ink. Shown only once the wait is worth marking: a warm load is done inside the delay and
37
+ never flashes it. The bundle takes it down once a screen stands (main.tsx). */
38
+ #boot {
39
+ position: fixed;
40
+ inset: 0;
41
+ display: grid;
42
+ place-items: center;
43
+ pointer-events: none;
44
+ color: var(--boot-ink, #9e927e);
45
+ opacity: 0;
46
+ animation: boot-show 0s 400ms forwards;
47
+ }
48
+ #boot > span {
49
+ position: relative;
50
+ width: 13px;
51
+ height: 13px;
52
+ }
53
+ #boot > span > span {
54
+ position: absolute;
55
+ width: 5px;
56
+ height: 5px;
57
+ background: currentColor;
58
+ opacity: 0.25;
59
+ animation: boot-squares 0.48s steps(1) infinite;
60
+ }
61
+ #boot > span > span:nth-child(1) {
62
+ left: 1px;
63
+ top: 1px;
64
+ animation-delay: -0.12s;
65
+ }
66
+ #boot > span > span:nth-child(2) {
67
+ left: 7px;
68
+ top: 1px;
69
+ animation-delay: 0s;
70
+ }
71
+ #boot > span > span:nth-child(3) {
72
+ left: 7px;
73
+ top: 7px;
74
+ animation-delay: -0.36s;
75
+ }
76
+ #boot > span > span:nth-child(4) {
77
+ left: 1px;
78
+ top: 7px;
79
+ animation-delay: -0.24s;
80
+ }
81
+ @keyframes boot-show {
82
+ to {
83
+ opacity: 1;
84
+ }
85
+ }
86
+ @keyframes boot-squares {
87
+ 0% {
88
+ opacity: 1;
89
+ }
90
+ 25% {
91
+ opacity: 0.5;
92
+ }
93
+ 50%,
94
+ 75% {
95
+ opacity: 0.25;
96
+ }
97
+ }
98
+ @media (prefers-reduced-motion: reduce) {
99
+ #boot > span > span {
100
+ animation: none;
101
+ }
102
+ #boot > span > span:first-child {
103
+ opacity: 1;
104
+ }
105
+ }
27
106
  }
28
107
  </style>
29
108
  <script>
@@ -41,18 +120,17 @@
41
120
  const phone = matchMedia("(max-width: 640px), ((hover: none) and (max-width: 1000px))").matches;
42
121
  const key = sessionStorage.getItem("toyon-ground") || (phone ? "surface1" : "surface0");
43
122
  document.documentElement.style.background = colors[key] || colors.surface0;
123
+ document.documentElement.style.setProperty("--boot-ink", colors.text1 || "#9e927e");
44
124
  if (t?.kind) document.documentElement.style.colorScheme = t.kind;
45
125
  } catch {}
46
126
  </script>
47
- <script type="module" crossorigin src="/assets/index-miqqiN7Z.js"></script>
48
- <link rel="stylesheet" crossorigin href="/assets/index-9aG0ri4Y.css">
49
- </head>
50
- <body>
51
- <div id="root"></div>
52
127
  <script>
53
128
  // The daemon's hello, asked for while the bundle is still loading: the page's own code
54
129
  // starts hundreds of milliseconds after this line on a cold cache, and it should start
55
- // knowing the project rather than painting a placeholder and correcting it. The token is
130
+ // knowing the project rather than painting a placeholder and correcting it. In the head,
131
+ // above the stylesheet and module tags Vite appends here: a classic script placed after a
132
+ // stylesheet link waits for that stylesheet before it runs, and on a cold link that is the
133
+ // whole stylesheet's download before the first byte of this request leaves. The token is
56
134
  // where ws.ts will look for it: the fragment on a fresh link, storage on every load after.
57
135
  // Nothing here is trusted beyond the first paint; the socket's own hello replaces it. A
58
136
  // device with no token at all gets null, and the bundle asks to be let in.
@@ -68,5 +146,11 @@
68
146
  }
69
147
  })();
70
148
  </script>
149
+ <script type="module" crossorigin src="/assets/index-D5GN5OOv.js"></script>
150
+ <link rel="stylesheet" crossorigin href="/assets/index-CHbNBHbD.css">
151
+ </head>
152
+ <body>
153
+ <div id="root"></div>
154
+ <div id="boot" aria-hidden="true"><span><span></span><span></span><span></span><span></span></span></div>
71
155
  </body>
72
156
  </html>
@@ -9,13 +9,44 @@
9
9
  "window-controls-overlay"
10
10
  ],
11
11
  "background_color": "#3d3835",
12
- "theme_color": "#32302d",
12
+ "theme_color": "#3d3835",
13
+ "share_target": {
14
+ "action": "/share",
15
+ "method": "POST",
16
+ "enctype": "multipart/form-data",
17
+ "params": {
18
+ "files": [
19
+ {
20
+ "name": "files",
21
+ "accept": ["*/*"]
22
+ }
23
+ ]
24
+ }
25
+ },
13
26
  "icons": [
14
27
  {
15
28
  "src": "/icon.svg",
16
29
  "sizes": "any",
17
30
  "type": "image/svg+xml",
18
31
  "purpose": "any"
32
+ },
33
+ {
34
+ "src": "/icon-192.png",
35
+ "sizes": "192x192",
36
+ "type": "image/png",
37
+ "purpose": "any"
38
+ },
39
+ {
40
+ "src": "/icon-512.png",
41
+ "sizes": "512x512",
42
+ "type": "image/png",
43
+ "purpose": "any"
44
+ },
45
+ {
46
+ "src": "/icon-maskable-512.png",
47
+ "sizes": "512x512",
48
+ "type": "image/png",
49
+ "purpose": "maskable"
19
50
  }
20
51
  ]
21
52
  }
package/dist/shell/sw.js CHANGED
@@ -1,33 +1,128 @@
1
- // The daemon is local, so nothing the shell loads is cached: a cached index.html would boot an
2
- // asset graph the daemon no longer has. The one thing kept is the page for when nothing answers at
3
- // all. The shortcut Chromium makes for the installed app opens this origin directly and has no way
4
- // to start a daemon, so without this the browser's own "refused to connect" page is what a person
5
- // sees, and it never says Toyon or what to do. The worker steps in for a navigation alone, and only
6
- // one that fails at the network: a daemon that answers, with whatever status, is left to answer.
7
- const CACHE = "toyon-offline";
1
+ // What the worker keeps, and when it answers. A daemon that answers, with whatever status, is
2
+ // always left to answer: the worker steps in only for a request that fails at the network.
3
+ //
4
+ // On a loopback origin the daemon is local and nothing of the shell is cached: a cached index.html
5
+ // would boot an asset graph the daemon no longer has, and the one thing kept is the page for when
6
+ // nothing answers at all. The shortcut Chromium makes for the installed app opens this origin
7
+ // directly and has no way to start a daemon, so without this the browser's own "refused to
8
+ // connect" page is what a person sees, and it never says Toyon or what to do.
9
+ //
10
+ // On any other origin (a phone over the tailnet, a cloud box) nothing here can start a daemon,
11
+ // and the shell itself is what to show: it opens on what it last knew of the machine (state/
12
+ // recall.ts) and says how old that is. So off loopback the worker keeps the last shell this
13
+ // origin served, the index with the asset graph it names, replaced whole when the index changes,
14
+ // and serves it for a navigation the network fails. Chunks the index never names (the editor, the
15
+ // terminal, loaded on first use) are kept as they are first fetched, so a page served from here
16
+ // can still reach them.
17
+ const OFFLINE = "toyon-offline";
8
18
  const PAGE = "/offline.html";
19
+ const SHELL = "toyon-shell";
20
+ /** the index, under one key: the shell is one page, whatever path was navigated to */
21
+ const INDEX = "/";
22
+
23
+ // the daemon's own test for a loopback name (isLoopbackHost in the shared package), which a worker
24
+ // cannot import
25
+ const loopback = (h) => h === "localhost" || h.endsWith(".localhost") || h === "127.0.0.1" || h === "[::1]";
26
+ const here = loopback(self.location.hostname);
27
+
28
+ // Files shared into the installed app from a phone's share sheet (the manifest's share_target)
29
+ // arrive as a form POST to this path, which the worker takes in: the files go into a cache of
30
+ // their own and the browser is sent on to the shell, which reads them out (app/share.ts) and
31
+ // attaches them. The daemon answers the same POST with the same redirect, for a browser whose
32
+ // worker is not yet in charge; the files are lost then, the shell says nothing, and the next
33
+ // share works.
34
+ const SHARE = "/share";
35
+ const SHARED = "toyon-shared";
36
+ const SHARED_NAME = "x-toyon-name";
37
+
38
+ async function takeShare(request) {
39
+ const data = await request.formData();
40
+ const cache = await caches.open(SHARED);
41
+ let n = 0;
42
+ for (const file of data.getAll("files")) {
43
+ if (!(file instanceof File)) continue;
44
+ // a header holds bytes alone; the shell decodes the name on the way out
45
+ const headers = { "content-type": file.type || "application/octet-stream", [SHARED_NAME]: encodeURIComponent(file.name) };
46
+ await cache.put(`${SHARE}/${n++}`, new Response(file, { headers }));
47
+ }
48
+ return Response.redirect("/", 303);
49
+ }
9
50
 
10
51
  // the copy shown is the one the daemon served last, not the one this worker installed with: a
11
52
  // change to the page reaches the cache on the next navigation that gets through
12
- const refresh = () => caches.open(CACHE).then((cache) => cache.add(PAGE));
53
+ const refresh = () => caches.open(OFFLINE).then((cache) => cache.add(PAGE));
54
+
55
+ /** the same-origin assets an index names, in order: its scripts, its styles and its preloads */
56
+ const assetsOf = (html) => [...html.matchAll(/(?:src|href)="(\/assets\/[^"]+)"/g)].map((m) => m[1]);
57
+
58
+ /** The shell the daemon just served, kept when its index is not the one the cache holds.
59
+ * The graph goes in before the index that names it, so a shell served from here never names a
60
+ * chunk it lacks; what the old build had and this one does not goes, lazy chunks included, since
61
+ * the cache is one build and a chunk still in use comes back on its first fetch. */
62
+ async function keepShell(res) {
63
+ const html = await res.text();
64
+ const assets = assetsOf(html);
65
+ if (assets.length === 0) return;
66
+ const cache = await caches.open(SHELL);
67
+ // the index itself is what is compared: a build that changed only the page's inline script
68
+ // names the same assets and is still a new build
69
+ const kept = await cache.match(INDEX);
70
+ if (kept && (await kept.text()) === html) return;
71
+ await cache.addAll(assets);
72
+ await cache.put(INDEX, new Response(html, { headers: { "content-type": "text/html; charset=utf-8" } }));
73
+ for (const req of await cache.keys()) {
74
+ const path = new URL(req.url).pathname;
75
+ if (path.startsWith("/assets/") && !assets.includes(path)) await cache.delete(req);
76
+ }
77
+ }
78
+
79
+ /** a navigation: the daemon's answer, or when the network fails, the kept shell off loopback and
80
+ * the not-running page otherwise. The not-running page itself is never answered with the shell,
81
+ * since a page that asks for it is one the shell sent there. */
82
+ async function navigate(e) {
83
+ try {
84
+ const res = await fetch(e.request);
85
+ // a daemon serving the shell again is the moment to pick up its page and its build; a
86
+ // failure here is nothing the navigation needs
87
+ e.waitUntil(Promise.all([refresh(), here ? null : keepShell(res.clone())]).catch(() => {}));
88
+ return res;
89
+ } catch {
90
+ if (!here && new URL(e.request.url).pathname !== PAGE) {
91
+ const shell = await (await caches.open(SHELL)).match(INDEX);
92
+ if (shell) return shell;
93
+ }
94
+ return (await caches.match(PAGE)) ?? Response.error();
95
+ }
96
+ }
97
+
98
+ /** an asset off loopback: the network's copy, kept as it passes; the kept one when the network
99
+ * fails, which is how a page served from the kept index finds the chunks it imports later */
100
+ async function asset(request) {
101
+ try {
102
+ const res = await fetch(request);
103
+ if (res.ok) {
104
+ const copy = res.clone();
105
+ caches.open(SHELL).then((cache) => cache.put(request, copy)).catch(() => {});
106
+ }
107
+ return res;
108
+ } catch {
109
+ return (await (await caches.open(SHELL)).match(request)) ?? Response.error();
110
+ }
111
+ }
13
112
 
14
113
  self.addEventListener("install", (e) => {
15
114
  e.waitUntil(refresh().then(() => self.skipWaiting()));
16
115
  });
17
116
  self.addEventListener("activate", (e) => e.waitUntil(self.clients.claim()));
18
117
  self.addEventListener("fetch", (e) => {
19
- if (e.request.mode !== "navigate") return;
20
- e.respondWith(
21
- (async () => {
22
- try {
23
- const res = await fetch(e.request);
24
- // a daemon serving the shell again is the moment to pick up its page; a failure here is
25
- // nothing the navigation needs
26
- e.waitUntil(refresh().catch(() => {}));
27
- return res;
28
- } catch {
29
- return (await caches.match(PAGE)) ?? Response.error();
30
- }
31
- })(),
32
- );
118
+ const url = new URL(e.request.url);
119
+ if (e.request.mode === "navigate") {
120
+ if (e.request.method === "POST" && url.pathname === SHARE) {
121
+ e.respondWith(takeShare(e.request));
122
+ return;
123
+ }
124
+ e.respondWith(navigate(e));
125
+ return;
126
+ }
127
+ if (!here && url.origin === self.location.origin && url.pathname.startsWith("/assets/")) e.respondWith(asset(e.request));
33
128
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toyon",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "description": "Toyon is where coding agents work on your web app while you check each change by using it. Every chat gets its own running copy with a live preview.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  "prepublishOnly": "bun ../../scripts/pack.ts"
41
41
  },
42
42
  "dependencies": {
43
- "bun": "1.4.2",
43
+ "bun": "1.4.4",
44
44
  "bun-pty": "0.4.10"
45
45
  },
46
46
  "devDependencies": {