@pen.dev/cli 0.2.8

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 (94) hide show
  1. package/LICENSE +66 -0
  2. package/README.md +369 -0
  3. package/SKILL.md +175 -0
  4. package/dist/all-Bd-ariyL.mjs +2 -0
  5. package/dist/anthropic-messages-D9L1s6pn.mjs +40 -0
  6. package/dist/anthropic-messages-OUY8OJj7.mjs +40 -0
  7. package/dist/azure-openai-responses-DJKVhgL-.mjs +2 -0
  8. package/dist/azure-openai-responses-DSoXDHyP.mjs +2 -0
  9. package/dist/browserAll-CGZu5S9C.mjs +2 -0
  10. package/dist/completionchunk-BaC49qbM.mjs +28 -0
  11. package/dist/completionchunk-c1fsGiUK.mjs +2 -0
  12. package/dist/diagnostics-hlO-DFfk.mjs +2 -0
  13. package/dist/dist-BMO4tFTj.mjs +1576 -0
  14. package/dist/dist-BupqiQep.mjs +10 -0
  15. package/dist/dist-CCiXmKIu.mjs +10 -0
  16. package/dist/dist-Dq7S86ex.mjs +4 -0
  17. package/dist/emscripten-module.browser-F76W5DM6-3XbeCXXF.mjs +5147 -0
  18. package/dist/emscripten-module.browser-XIKQQPVU-JPkxo8p_.mjs +2160 -0
  19. package/dist/error-body-D-jnPxbB.mjs +2 -0
  20. package/dist/esm-D7vjDQPJ.mjs +2 -0
  21. package/dist/esm-DZA7B0U9.mjs +25 -0
  22. package/dist/ffi-D6Fxg1d3.mjs +2 -0
  23. package/dist/ffi-u92ceo2s.mjs +2 -0
  24. package/dist/from-BRY6g9CG.mjs +15 -0
  25. package/dist/from-Bra_AO5N.mjs +15 -0
  26. package/dist/github-copilot-headers-ByQsj8SR.mjs +2 -0
  27. package/dist/github-copilot-headers-C4gA1Pjv.mjs +2 -0
  28. package/dist/google-generative-ai-BqfOLKon.mjs +2 -0
  29. package/dist/google-generative-ai-CZCmY9Gg.mjs +2 -0
  30. package/dist/google-shared-TkwodIGJ.mjs +318 -0
  31. package/dist/google-shared-YCDndJGN.mjs +318 -0
  32. package/dist/google-vertex-COsje8-Z.mjs +2 -0
  33. package/dist/google-vertex-Cz5Ddo09.mjs +2 -0
  34. package/dist/hash-BFdQp5Bn.mjs +2 -0
  35. package/dist/hash-DFXd8wf4.mjs +2 -0
  36. package/dist/headers-BkXFKypW.mjs +2 -0
  37. package/dist/headers-DtjIrAKV.mjs +2 -0
  38. package/dist/html-DwPxy9Y2.mjs +26 -0
  39. package/dist/index.mjs +8 -0
  40. package/dist/init-BaeOBiNV.mjs +2 -0
  41. package/dist/json-parse-BEWPMC87.mjs +4 -0
  42. package/dist/json-parse-qcO5FIDw.mjs +4 -0
  43. package/dist/mistral-conversations-DIR6EyvH.mjs +8 -0
  44. package/dist/mistral-conversations-JED5QLUZ.mjs +10 -0
  45. package/dist/models-CtsqYGxn.mjs +2 -0
  46. package/dist/models-DVeZ-5Ql.mjs +2 -0
  47. package/dist/module-ES6BEMUI-DGywGVC7.mjs +2 -0
  48. package/dist/module-asyncify-2EFITU5U-BU2CORSO.mjs +2 -0
  49. package/dist/multipart-parser-4wzMiNnD.mjs +3 -0
  50. package/dist/multipart-parser-CYJPmLQW.mjs +3 -0
  51. package/dist/node_modules/@highagency/pencil-wasm/enums.gen.d.ts +247 -0
  52. package/dist/node_modules/@highagency/pencil-wasm/package.json +26 -0
  53. package/dist/node_modules/@highagency/pencil-wasm/pencil.d.ts +769 -0
  54. package/dist/node_modules/@highagency/pencil-wasm/pencil.js +1 -0
  55. package/dist/node_modules/@highagency/pencil-wasm/pencil.wasm +0 -0
  56. package/dist/openai-CJ1JzbCY.mjs +17 -0
  57. package/dist/openai-Cv91uXJB.mjs +17 -0
  58. package/dist/openai-codex-responses-Cq8yFwfN.mjs +8 -0
  59. package/dist/openai-codex-responses-CzFfnGCe.mjs +8 -0
  60. package/dist/openai-completions-DT4sdoVc.mjs +6 -0
  61. package/dist/openai-completions-iO6yRDuR.mjs +6 -0
  62. package/dist/openai-prompt-cache-CjAED4AP.mjs +2 -0
  63. package/dist/openai-prompt-cache-tVxLccHG.mjs +2 -0
  64. package/dist/openai-responses-Cr3SvtkS.mjs +2 -0
  65. package/dist/openai-responses-Dtr2Vk2j.mjs +2 -0
  66. package/dist/openai-responses-shared-BLDoTd9K.mjs +13 -0
  67. package/dist/openai-responses-shared-C4PQs_0V.mjs +11 -0
  68. package/dist/openrouter-images-Dk-x2ke6.mjs +2 -0
  69. package/dist/openrouter-images-NEnwWNeg.mjs +2 -0
  70. package/dist/otel-BIqiVgiM.mjs +4 -0
  71. package/dist/otel-BbTSxAZp.mjs +4 -0
  72. package/dist/out/data/halo.lib.pen +4728 -0
  73. package/dist/out/data/lunaris.lib.pen +5980 -0
  74. package/dist/out/data/nitro.lib.pen +4923 -0
  75. package/dist/out/data/shadcn.lib.pen +5596 -0
  76. package/dist/out/mcp-server-darwin-arm64 +0 -0
  77. package/dist/out/mcp-server-darwin-x64 +0 -0
  78. package/dist/out/mcp-server-linux-arm64 +0 -0
  79. package/dist/out/mcp-server-linux-x64 +0 -0
  80. package/dist/out/mcp-server-windows-arm64.exe +0 -0
  81. package/dist/out/mcp-server-windows-x64.exe +0 -0
  82. package/dist/photon_rs-D_fXqzJa.mjs +2 -0
  83. package/dist/provider-env-D0o9FEJi.mjs +2 -0
  84. package/dist/provider-env-DTh1Xe-B.mjs +2 -0
  85. package/dist/sanitize-unicode-B5GgPEiu.mjs +2 -0
  86. package/dist/sanitize-unicode-DVHYNBlY.mjs +2 -0
  87. package/dist/src-Bk9f60_P.mjs +4 -0
  88. package/dist/src-CbkJodKR.mjs +4 -0
  89. package/dist/standalone-BGhJUGyg.mjs +30 -0
  90. package/dist/transform-messages-DSEUXL48.mjs +2 -0
  91. package/dist/transform-messages-j96k5V_T.mjs +2 -0
  92. package/dist/validate-response-CezyBuEO.mjs +3 -0
  93. package/dist/webworkerAll-Dy6-Qx-T.mjs +2 -0
  94. package/package.json +69 -0
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var e=class{queue=[];waiting=[];done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(e,t){this.isComplete=e,this.extractResult=t,this.finalResultPromise=new Promise(e=>{this.resolveFinalResult=e})}push(e){if(this.done)return;this.isComplete(e)&&(this.done=!0,this.resolveFinalResult(this.extractResult(e)));let t=this.waiting.shift();t?t({value:e,done:!1}):this.queue.push(e)}end(e){for(this.done=!0,e!==void 0&&this.resolveFinalResult(e);this.waiting.length>0;)this.waiting.shift()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){for(;;)if(this.queue.length>0)yield this.queue.shift();else if(this.done)return;else{let e=await new Promise(e=>this.waiting.push(e));if(e.done)return;yield e.value}}result(){return this.finalResultPromise}},t=class extends e{constructor(){super(e=>e.type===`done`||e.type===`error`,e=>{if(e.type===`done`)return e.message;if(e.type===`error`)return e.error;throw Error(`Unexpected event type for final result`)})}};function n(e,t){return{role:`assistant`,content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}function r(e,t){(async()=>{for await(let n of t)e.push(n);e.end()})()}function i(e,i){let a=new t;return i().then(e=>{r(a,e)}).catch(t=>{let r=n(e,t);a.push({type:`error`,reason:`error`,error:r}),a.end(r)}),a}function a(e){return{stream:(t,n,r)=>i(t,async()=>(await e()).stream(t,n,r)),streamSimple:(t,n,r)=>i(t,async()=>(await e()).streamSimple(t,n,r))}}var o=function(e,t){return typeof e==`string`&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,i,a){return n?t?`.jsx`:`.js`:r&&(!i||!a)?e:r+i+`.`+a.toLowerCase()+`js`}):e};const s=e=>import(o(e));function c(){return globalThis.process?.env}function l(){return{async env(e){let t=c()?.[e];return typeof t==`string`&&t.trim().length>0?t:void 0},async fileExists(e){try{let t=await s(`node:fs/promises`),n=e;return n.startsWith(`~`)&&(n=(await s(`node:os`)).homedir()+n.slice(1)),await t.access(n),!0}catch{return!1}}}}var u=class{credentials=new Map;chains=new Map;enqueue(e,t){let n=this.chains.get(e)??Promise.resolve(),r=(async()=>(await n.catch(()=>{}),t()))();return this.chains.set(e,r.catch(()=>{})),r}async read(e){return this.credentials.get(e)}modify(e,t){return this.enqueue(e,async()=>{let n=this.credentials.get(e),r=await t(n);return r!==void 0&&this.credentials.set(e,r),r??n})}delete(e){return this.enqueue(e,async()=>{this.credentials.delete(e)})}},d=class extends Error{code;constructor(e,t,n){super(t,n),this.name=`ModelsError`,this.code=e}};async function f(e,t,n,r,i){let a=i?.env?p(r,i.env):r;if(i?.apiKey!==void 0&&e.auth.apiKey)return h(a,e.auth.apiKey,t,{type:`api_key`,key:i.apiKey,env:i.env});let o=await g(n,e.id);if(o){if(o.type===`oauth`&&e.auth.oauth)return m(n,e.id,e.auth.oauth,o);if(o.type===`api_key`&&e.auth.apiKey){let n=i?.env?{...o,env:{...o.env,...i.env}}:o;return h(a,e.auth.apiKey,t,n)}return}return e.auth.apiKey?h(a,e.auth.apiKey,t,void 0):void 0}function p(e,t){return{env:async n=>t[n]||await e.env(n),fileExists:t=>e.fileExists(t)}}async function m(e,t,n,r){let i=r;if(Date.now()>=i.expires){let r;try{r=await e.modify(t,async e=>{if(e?.type===`oauth`&&!(Date.now()<e.expires))try{return await n.refresh(e)}catch(e){throw new d(`oauth`,`OAuth refresh failed for ${t}`,{cause:e})}})}catch(e){throw e instanceof d?e:new d(`auth`,`Credential store modify failed for ${t}`,{cause:e})}if(r?.type!==`oauth`)return;i=r}try{return{auth:await n.toAuth(i),source:`OAuth`}}catch(e){throw new d(`oauth`,`OAuth auth derivation failed for ${t}`,{cause:e})}}async function h(e,t,n,r){try{return await t.resolve({model:n,ctx:e,credential:r})}catch(e){throw new d(`auth`,`API key auth failed for provider ${n.provider}`,{cause:e})}}async function g(e,t){try{return await e.read(t)}catch(e){throw new d(`auth`,`Credential store read failed for ${t}`,{cause:e})}}var _=class{providers=new Map;credentials;authContext;constructor(e){this.credentials=e?.credentials??new u,this.authContext=e?.authContext??l()}setProvider(e){this.providers.set(e.id,e)}deleteProvider(e){this.providers.delete(e)}clearProviders(){this.providers.clear()}getProviders(){return Array.from(this.providers.values())}getProvider(e){return this.providers.get(e)}getModels(e){if(e!==void 0){let t=this.providers.get(e);if(!t)return[];try{return t.getModels()}catch{return[]}}let t=[];for(let e of this.providers.values())try{t.push(...e.getModels())}catch{}return t}getModel(e,t){return this.getModels(e).find(e=>e.id===t)}async refresh(e){if(e!==void 0){let t=this.providers.get(e);if(!t?.refreshModels)return;try{await t.refreshModels()}catch(t){throw t instanceof d?t:new d(`model_source`,`Model refresh failed for ${e}`,{cause:t})}return}await Promise.allSettled(Array.from(this.providers.values(),async e=>e.refreshModels?.()))}async getAuth(e){let t=this.providers.get(e.provider);if(t)return f(t,e,this.credentials,this.authContext)}requireProvider(e){let t=this.providers.get(e.provider);if(!t)throw new d(`provider`,`Unknown provider: ${e.provider}`);return t}async applyAuth(e,t){let n=await f(this.requireProvider(e),e,this.credentials,this.authContext,{apiKey:t?.apiKey,env:t?.env}),r=n?.auth;if(!r)return{requestModel:e,requestOptions:t};let i=r.baseUrl?{...e,baseUrl:r.baseUrl}:e,a=t?.apiKey??r.apiKey,o=r.headers||t?.headers?{...r.headers,...t?.headers}:void 0,s=n.env||t?.env?{...n.env??{},...t?.env??{}}:void 0;return{requestModel:i,requestOptions:{...t,apiKey:a,headers:o,env:s}}}stream(e,t,n){return i(e,async()=>{let r=this.requireProvider(e),{requestModel:i,requestOptions:a}=await this.applyAuth(e,n);return r.stream(i,t,a)})}async complete(e,t,n){return this.stream(e,t,n).result()}streamSimple(e,t,n){return i(e,async()=>{let r=this.requireProvider(e),{requestModel:i,requestOptions:a}=await this.applyAuth(e,n);return r.streamSimple(i,t,a)})}async completeSimple(e,t,n){return this.streamSimple(e,t,n).result()}};function v(e){return new _(e)}function y(e){let t=e.models,n,r=e.refreshModels,a=typeof e.api.stream==`function`?e.api:void 0,o=a?void 0:e.api,s=e=>a??o?.[e.api],c=(t,n)=>{let r=s(t);return r?n(r):i(t,async()=>{throw new d(`stream`,`Provider ${e.id} has no API implementation for "${t.api}"`)})};return{id:e.id,name:e.name??e.id,baseUrl:e.baseUrl,headers:e.headers,auth:e.auth,getModels:()=>t,refreshModels:r?()=>(n??=(async()=>{try{t=await r()}finally{n=void 0}})(),n):void 0,stream:(e,t,n)=>c(e,r=>r.stream(e,t,n)),streamSimple:(e,t,n)=>c(e,r=>r.streamSimple(e,t,n))}}function b(e,t){let n=t.cacheWrite1h??0,r=t.cacheWrite-n;return t.cost.input=e.cost.input/1e6*t.input,t.cost.output=e.cost.output/1e6*t.output,t.cost.cacheRead=e.cost.cacheRead/1e6*t.cacheRead,t.cost.cacheWrite=(e.cost.cacheWrite*r+e.cost.input*2*n)/1e6,t.cost.total=t.cost.input+t.cost.output+t.cost.cacheRead+t.cost.cacheWrite,t.cost}const x=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function S(e){return e.reasoning?x.filter(t=>{let n=e.thinkingLevelMap?.[t];return n===null?!1:t===`xhigh`?n!==void 0:!0}):[`off`]}function C(e,t){let n=S(e);if(n.includes(t))return t;let r=x.indexOf(t);if(r===-1)return n[0]??`off`;for(let e=r;e<x.length;e++){let t=x[e];if(n.includes(t))return t}for(let e=r-1;e>=0;e--){let t=x[e];if(n.includes(t))return t}return n[0]??`off`}export{d as a,l as c,y as i,a as l,C as n,f as o,v as r,u as s,b as t,t as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var e=class{queue=[];waiting=[];done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(e,t){this.isComplete=e,this.extractResult=t,this.finalResultPromise=new Promise(e=>{this.resolveFinalResult=e})}push(e){if(this.done)return;this.isComplete(e)&&(this.done=!0,this.resolveFinalResult(this.extractResult(e)));let t=this.waiting.shift();t?t({value:e,done:!1}):this.queue.push(e)}end(e){for(this.done=!0,e!==void 0&&this.resolveFinalResult(e);this.waiting.length>0;)this.waiting.shift()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){for(;;)if(this.queue.length>0)yield this.queue.shift();else if(this.done)return;else{let e=await new Promise(e=>this.waiting.push(e));if(e.done)return;yield e.value}}result(){return this.finalResultPromise}},t=class extends e{constructor(){super(e=>e.type===`done`||e.type===`error`,e=>{if(e.type===`done`)return e.message;if(e.type===`error`)return e.error;throw Error(`Unexpected event type for final result`)})}};function n(){return new t}function r(e,t){return{role:`assistant`,content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`error`,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}function i(e,t){(async()=>{for await(let n of t)e.push(n);e.end()})()}function a(e,n){let a=new t;return n().then(e=>{i(a,e)}).catch(t=>{let n=r(e,t);a.push({type:`error`,reason:`error`,error:n}),a.end(n)}),a}function o(e){return{stream:(t,n,r)=>a(t,async()=>(await e()).stream(t,n,r)),streamSimple:(t,n,r)=>a(t,async()=>(await e()).streamSimple(t,n,r))}}var s=function(e,t){return typeof e==`string`&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,i,a){return n?t?`.jsx`:`.js`:r&&(!i||!a)?e:r+i+`.`+a.toLowerCase()+`js`}):e};const c=e=>import(s(e));function l(){return globalThis.process?.env}function u(){return{async env(e){let t=l()?.[e];return typeof t==`string`&&t.trim().length>0?t:void 0},async fileExists(e){try{let t=await c(`node:fs/promises`),n=e;return n.startsWith(`~`)&&(n=(await c(`node:os`)).homedir()+n.slice(1)),await t.access(n),!0}catch{return!1}}}}var d=class{credentials=new Map;chains=new Map;enqueue(e,t){let n=this.chains.get(e)??Promise.resolve(),r=(async()=>(await n.catch(()=>{}),t()))();return this.chains.set(e,r.catch(()=>{})),r}async read(e){return this.credentials.get(e)}modify(e,t){return this.enqueue(e,async()=>{let n=this.credentials.get(e),r=await t(n);return r!==void 0&&this.credentials.set(e,r),r??n})}delete(e){return this.enqueue(e,async()=>{this.credentials.delete(e)})}},f=class extends Error{code;constructor(e,t,n){super(t,n),this.name=`ModelsError`,this.code=e}};async function p(e,t,n,r,i){let a=i?.env?m(r,i.env):r;if(i?.apiKey!==void 0&&e.auth.apiKey)return g(a,e.auth.apiKey,t,{type:`api_key`,key:i.apiKey,env:i.env});let o=await _(n,e.id);if(o){if(o.type===`oauth`&&e.auth.oauth)return h(n,e.id,e.auth.oauth,o);if(o.type===`api_key`&&e.auth.apiKey){let n=i?.env?{...o,env:{...o.env,...i.env}}:o;return g(a,e.auth.apiKey,t,n)}return}return e.auth.apiKey?g(a,e.auth.apiKey,t,void 0):void 0}function m(e,t){return{env:async n=>t[n]||await e.env(n),fileExists:t=>e.fileExists(t)}}async function h(e,t,n,r){let i=r;if(Date.now()>=i.expires){let r;try{r=await e.modify(t,async e=>{if(e?.type===`oauth`&&!(Date.now()<e.expires))try{return await n.refresh(e)}catch(e){throw new f(`oauth`,`OAuth refresh failed for ${t}`,{cause:e})}})}catch(e){throw e instanceof f?e:new f(`auth`,`Credential store modify failed for ${t}`,{cause:e})}if(r?.type!==`oauth`)return;i=r}try{return{auth:await n.toAuth(i),source:`OAuth`}}catch(e){throw new f(`oauth`,`OAuth auth derivation failed for ${t}`,{cause:e})}}async function g(e,t,n,r){try{return await t.resolve({model:n,ctx:e,credential:r})}catch(e){throw new f(`auth`,`API key auth failed for provider ${n.provider}`,{cause:e})}}async function _(e,t){try{return await e.read(t)}catch(e){throw new f(`auth`,`Credential store read failed for ${t}`,{cause:e})}}var v=class{providers=new Map;credentials;authContext;constructor(e){this.credentials=e?.credentials??new d,this.authContext=e?.authContext??u()}setProvider(e){this.providers.set(e.id,e)}deleteProvider(e){this.providers.delete(e)}clearProviders(){this.providers.clear()}getProviders(){return Array.from(this.providers.values())}getProvider(e){return this.providers.get(e)}getModels(e){if(e!==void 0){let t=this.providers.get(e);if(!t)return[];try{return t.getModels()}catch{return[]}}let t=[];for(let e of this.providers.values())try{t.push(...e.getModels())}catch{}return t}getModel(e,t){return this.getModels(e).find(e=>e.id===t)}async refresh(e){if(e!==void 0){let t=this.providers.get(e);if(!t?.refreshModels)return;try{await t.refreshModels()}catch(t){throw t instanceof f?t:new f(`model_source`,`Model refresh failed for ${e}`,{cause:t})}return}await Promise.allSettled(Array.from(this.providers.values(),async e=>e.refreshModels?.()))}async getAuth(e){let t=this.providers.get(e.provider);if(t)return p(t,e,this.credentials,this.authContext)}requireProvider(e){let t=this.providers.get(e.provider);if(!t)throw new f(`provider`,`Unknown provider: ${e.provider}`);return t}async applyAuth(e,t){let n=await p(this.requireProvider(e),e,this.credentials,this.authContext,{apiKey:t?.apiKey,env:t?.env}),r=n?.auth;if(!r)return{requestModel:e,requestOptions:t};let i=r.baseUrl?{...e,baseUrl:r.baseUrl}:e,a=t?.apiKey??r.apiKey,o=r.headers||t?.headers?{...r.headers,...t?.headers}:void 0,s=n.env||t?.env?{...n.env??{},...t?.env??{}}:void 0;return{requestModel:i,requestOptions:{...t,apiKey:a,headers:o,env:s}}}stream(e,t,n){return a(e,async()=>{let r=this.requireProvider(e),{requestModel:i,requestOptions:a}=await this.applyAuth(e,n);return r.stream(i,t,a)})}async complete(e,t,n){return this.stream(e,t,n).result()}streamSimple(e,t,n){return a(e,async()=>{let r=this.requireProvider(e),{requestModel:i,requestOptions:a}=await this.applyAuth(e,n);return r.streamSimple(i,t,a)})}async completeSimple(e,t,n){return this.streamSimple(e,t,n).result()}};function y(e){return new v(e)}function b(e){let t=e.models,n,r=e.refreshModels,i=typeof e.api.stream==`function`?e.api:void 0,o=i?void 0:e.api,s=e=>i??o?.[e.api],c=(t,n)=>{let r=s(t);return r?n(r):a(t,async()=>{throw new f(`stream`,`Provider ${e.id} has no API implementation for "${t.api}"`)})};return{id:e.id,name:e.name??e.id,baseUrl:e.baseUrl,headers:e.headers,auth:e.auth,getModels:()=>t,refreshModels:r?()=>(n??=(async()=>{try{t=await r()}finally{n=void 0}})(),n):void 0,stream:(e,t,n)=>c(e,r=>r.stream(e,t,n)),streamSimple:(e,t,n)=>c(e,r=>r.streamSimple(e,t,n))}}function x(e,t){return e.api===t}function S(e,t){let n=t.cacheWrite1h??0,r=t.cacheWrite-n;return t.cost.input=e.cost.input/1e6*t.input,t.cost.output=e.cost.output/1e6*t.output,t.cost.cacheRead=e.cost.cacheRead/1e6*t.cacheRead,t.cost.cacheWrite=(e.cost.cacheWrite*r+e.cost.input*2*n)/1e6,t.cost.total=t.cost.input+t.cost.output+t.cost.cacheRead+t.cost.cacheWrite,t.cost}const C=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function w(e){return e.reasoning?C.filter(t=>{let n=e.thinkingLevelMap?.[t];return n===null?!1:t===`xhigh`?n!==void 0:!0}):[`off`]}function T(e,t){let n=w(e);if(n.includes(t))return t;let r=C.indexOf(t);if(r===-1)return n[0]??`off`;for(let e=r;e<C.length;e++){let t=C[e];if(n.includes(t))return t}for(let e=r-1;e>=0;e--){let t=C[e];if(n.includes(t))return t}return n[0]??`off`}function E(e,t){return!e||!t?!1:e.id===t.id&&e.provider===t.provider}export{w as a,f as c,u as d,o as f,n as g,e as h,b as i,p as l,t as m,T as n,x as o,a as p,y as r,E as s,S as t,d as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a as e,i as t,n,r}from"./index.mjs";export{n as QuickJSModuleCallbacks,r as QuickJSWASMModule,t as applyBaseRuntimeOptions,e as applyModuleEvalRuntimeOptions};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./index.mjs";export{e as QuickJSAsyncWASMModule};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{Nt as e}from"./index.mjs";import{a as t,i as n,n as r,t as i}from"./from-Bra_AO5N.mjs";function a(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[3]||``,r=n.slice(n.lastIndexOf(`\\`)+1);return r=r.replace(/%22/g,`"`),r=r.replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t)),r}async function o(e,n){if(!/multipart/i.test(n))throw TypeError(`Failed to fetch`);let i=n.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!i)throw TypeError(`no or bad content-type header, no multipart boundary`);let o=new b(i[1]||i[2]),s,c,l,u,d,f,p=[],m=new r,h=e=>{l+=y.decode(e,{stream:!0})},g=e=>{p.push(e)},_=()=>{let e=new t(p,f,{type:d});m.append(u,e)},v=()=>{m.append(u,l)},y=new TextDecoder(`utf-8`);y.decode(),o.onPartBegin=function(){o.onPartData=h,o.onPartEnd=v,s=``,c=``,l=``,u=``,d=``,f=null,p.length=0},o.onHeaderField=function(e){s+=y.decode(e,{stream:!0})},o.onHeaderValue=function(e){c+=y.decode(e,{stream:!0})},o.onHeaderEnd=function(){if(c+=y.decode(),s=s.toLowerCase(),s===`content-disposition`){let e=c.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(u=e[2]||e[3]||``),f=a(c),f&&(o.onPartData=g,o.onPartEnd=_)}else s===`content-type`&&(d=c);c=``,s=``};for await(let t of e)o.write(t);return o.end(),m}var s,c,l,u,d,f,p,m,h,g,_,v,y,b;e((()=>{i(),n(),s=0,c={START_BOUNDARY:s++,HEADER_FIELD_START:s++,HEADER_FIELD:s++,HEADER_VALUE_START:s++,HEADER_VALUE:s++,HEADER_VALUE_ALMOST_DONE:s++,HEADERS_ALMOST_DONE:s++,PART_DATA_START:s++,PART_DATA:s++,END:s++},l=1,u={PART_BOUNDARY:l,LAST_BOUNDARY:l*=2},d=10,f=13,p=32,m=45,h=58,g=97,_=122,v=e=>e|32,y=()=>{},b=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=y,this.onHeaderField=y,this.onHeadersEnd=y,this.onHeaderValue=y,this.onPartBegin=y,this.onPartData=y,this.onPartEnd=y,this.boundaryChars={},e=`\r
3
+ --`+e;let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=c.START_BOUNDARY}write(e){let t=0,n=e.length,r=this.index,{lookbehind:i,boundary:a,boundaryChars:o,index:s,state:l,flags:y}=this,b=this.boundary.length,x=b-1,S=e.length,C,w,T=e=>{this[e+`Mark`]=t},E=e=>{delete this[e+`Mark`]},D=(e,t,n,r)=>{(t===void 0||t!==n)&&this[e](r&&r.subarray(t,n))},O=(n,r)=>{let i=n+`Mark`;i in this&&(r?(D(n,this[i],t,e),delete this[i]):(D(n,this[i],e.length,e),this[i]=0))};for(t=0;t<n;t++)switch(C=e[t],l){case c.START_BOUNDARY:if(s===a.length-2){if(C===m)y|=u.LAST_BOUNDARY;else if(C!==f)return;s++;break}else if(s-1==a.length-2){if(y&u.LAST_BOUNDARY&&C===m)l=c.END,y=0;else if(!(y&u.LAST_BOUNDARY)&&C===d)s=0,D(`onPartBegin`),l=c.HEADER_FIELD_START;else return;break}C!==a[s+2]&&(s=-2),C===a[s+2]&&s++;break;case c.HEADER_FIELD_START:l=c.HEADER_FIELD,T(`onHeaderField`),s=0;case c.HEADER_FIELD:if(C===f){E(`onHeaderField`),l=c.HEADERS_ALMOST_DONE;break}if(s++,C===m)break;if(C===h){if(s===1)return;O(`onHeaderField`,!0),l=c.HEADER_VALUE_START;break}if(w=v(C),w<g||w>_)return;break;case c.HEADER_VALUE_START:if(C===p)break;T(`onHeaderValue`),l=c.HEADER_VALUE;case c.HEADER_VALUE:C===f&&(O(`onHeaderValue`,!0),D(`onHeaderEnd`),l=c.HEADER_VALUE_ALMOST_DONE);break;case c.HEADER_VALUE_ALMOST_DONE:if(C!==d)return;l=c.HEADER_FIELD_START;break;case c.HEADERS_ALMOST_DONE:if(C!==d)return;D(`onHeadersEnd`),l=c.PART_DATA_START;break;case c.PART_DATA_START:l=c.PART_DATA,T(`onPartData`);case c.PART_DATA:if(r=s,s===0){for(t+=x;t<S&&!(e[t]in o);)t+=b;t-=x,C=e[t]}if(s<a.length)a[s]===C?(s===0&&O(`onPartData`,!0),s++):s=0;else if(s===a.length)s++,C===f?y|=u.PART_BOUNDARY:C===m?y|=u.LAST_BOUNDARY:s=0;else if(s-1===a.length)if(y&u.PART_BOUNDARY){if(s=0,C===d){y&=~u.PART_BOUNDARY,D(`onPartEnd`),D(`onPartBegin`),l=c.HEADER_FIELD_START;break}}else y&u.LAST_BOUNDARY&&C===m?(D(`onPartEnd`),l=c.END,y=0):s=0;if(s>0)i[s-1]=C;else if(r>0){let e=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);D(`onPartData`,0,r,e),r=0,T(`onPartData`),t--}break;case c.END:break;default:throw Error(`Unexpected state entered: ${l}`)}O(`onHeaderField`),O(`onHeaderValue`),O(`onPartData`),this.index=s,this.state=l,this.flags=y}end(){if(this.state===c.HEADER_FIELD_START&&this.index===0||this.state===c.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==c.END)throw Error(`MultipartParser.end(): stream ended unexpectedly`)}}}))();export{o as toFormData};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{Nt as e}from"./index.mjs";import{a as t,i as n,n as r,t as i}from"./from-BRY6g9CG.mjs";function a(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[3]||``,r=n.slice(n.lastIndexOf(`\\`)+1);return r=r.replace(/%22/g,`"`),r=r.replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t)),r}async function o(e,n){if(!/multipart/i.test(n))throw TypeError(`Failed to fetch`);let i=n.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!i)throw TypeError(`no or bad content-type header, no multipart boundary`);let o=new b(i[1]||i[2]),s,c,l,u,d,f,p=[],m=new r,h=e=>{l+=y.decode(e,{stream:!0})},g=e=>{p.push(e)},_=()=>{let e=new t(p,f,{type:d});m.append(u,e)},v=()=>{m.append(u,l)},y=new TextDecoder(`utf-8`);y.decode(),o.onPartBegin=function(){o.onPartData=h,o.onPartEnd=v,s=``,c=``,l=``,u=``,d=``,f=null,p.length=0},o.onHeaderField=function(e){s+=y.decode(e,{stream:!0})},o.onHeaderValue=function(e){c+=y.decode(e,{stream:!0})},o.onHeaderEnd=function(){if(c+=y.decode(),s=s.toLowerCase(),s===`content-disposition`){let e=c.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(u=e[2]||e[3]||``),f=a(c),f&&(o.onPartData=g,o.onPartEnd=_)}else s===`content-type`&&(d=c);c=``,s=``};for await(let t of e)o.write(t);return o.end(),m}var s,c,l,u,d,f,p,m,h,g,_,v,y,b;e((()=>{i(),n(),s=0,c={START_BOUNDARY:s++,HEADER_FIELD_START:s++,HEADER_FIELD:s++,HEADER_VALUE_START:s++,HEADER_VALUE:s++,HEADER_VALUE_ALMOST_DONE:s++,HEADERS_ALMOST_DONE:s++,PART_DATA_START:s++,PART_DATA:s++,END:s++},l=1,u={PART_BOUNDARY:l,LAST_BOUNDARY:l*=2},d=10,f=13,p=32,m=45,h=58,g=97,_=122,v=e=>e|32,y=()=>{},b=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=y,this.onHeaderField=y,this.onHeadersEnd=y,this.onHeaderValue=y,this.onPartBegin=y,this.onPartData=y,this.onPartEnd=y,this.boundaryChars={},e=`\r
3
+ --`+e;let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=c.START_BOUNDARY}write(e){let t=0,n=e.length,r=this.index,{lookbehind:i,boundary:a,boundaryChars:o,index:s,state:l,flags:y}=this,b=this.boundary.length,x=b-1,S=e.length,C,w,T=e=>{this[e+`Mark`]=t},E=e=>{delete this[e+`Mark`]},D=(e,t,n,r)=>{(t===void 0||t!==n)&&this[e](r&&r.subarray(t,n))},O=(n,r)=>{let i=n+`Mark`;i in this&&(r?(D(n,this[i],t,e),delete this[i]):(D(n,this[i],e.length,e),this[i]=0))};for(t=0;t<n;t++)switch(C=e[t],l){case c.START_BOUNDARY:if(s===a.length-2){if(C===m)y|=u.LAST_BOUNDARY;else if(C!==f)return;s++;break}else if(s-1==a.length-2){if(y&u.LAST_BOUNDARY&&C===m)l=c.END,y=0;else if(!(y&u.LAST_BOUNDARY)&&C===d)s=0,D(`onPartBegin`),l=c.HEADER_FIELD_START;else return;break}C!==a[s+2]&&(s=-2),C===a[s+2]&&s++;break;case c.HEADER_FIELD_START:l=c.HEADER_FIELD,T(`onHeaderField`),s=0;case c.HEADER_FIELD:if(C===f){E(`onHeaderField`),l=c.HEADERS_ALMOST_DONE;break}if(s++,C===m)break;if(C===h){if(s===1)return;O(`onHeaderField`,!0),l=c.HEADER_VALUE_START;break}if(w=v(C),w<g||w>_)return;break;case c.HEADER_VALUE_START:if(C===p)break;T(`onHeaderValue`),l=c.HEADER_VALUE;case c.HEADER_VALUE:C===f&&(O(`onHeaderValue`,!0),D(`onHeaderEnd`),l=c.HEADER_VALUE_ALMOST_DONE);break;case c.HEADER_VALUE_ALMOST_DONE:if(C!==d)return;l=c.HEADER_FIELD_START;break;case c.HEADERS_ALMOST_DONE:if(C!==d)return;D(`onHeadersEnd`),l=c.PART_DATA_START;break;case c.PART_DATA_START:l=c.PART_DATA,T(`onPartData`);case c.PART_DATA:if(r=s,s===0){for(t+=x;t<S&&!(e[t]in o);)t+=b;t-=x,C=e[t]}if(s<a.length)a[s]===C?(s===0&&O(`onPartData`,!0),s++):s=0;else if(s===a.length)s++,C===f?y|=u.PART_BOUNDARY:C===m?y|=u.LAST_BOUNDARY:s=0;else if(s-1===a.length)if(y&u.PART_BOUNDARY){if(s=0,C===d){y&=~u.PART_BOUNDARY,D(`onPartEnd`),D(`onPartBegin`),l=c.HEADER_FIELD_START;break}}else y&u.LAST_BOUNDARY&&C===m?(D(`onPartEnd`),l=c.END,y=0):s=0;if(s>0)i[s-1]=C;else if(r>0){let e=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);D(`onPartData`,0,r,e),r=0,T(`onPartData`),t--}break;case c.END:break;default:throw Error(`Unexpected state entered: ${l}`)}O(`onHeaderField`),O(`onHeaderValue`),O(`onPartData`),this.index=s,this.state=l,this.flags=y}end(){if(this.state===c.HEADER_FIELD_START&&this.index===0||this.state===c.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==c.END)throw Error(`MultipartParser.end(): stream ended unexpectedly`)}}}))();export{o as toFormData};
@@ -0,0 +1,247 @@
1
+ export declare const PaintStyle: Readonly<{
2
+ readonly Fill: 0;
3
+ readonly Stroke: 1;
4
+ readonly StrokeAndFill: 2;
5
+ }>;
6
+ export type PaintStyle = typeof PaintStyle[keyof typeof PaintStyle];
7
+ export declare const StrokeCap: Readonly<{
8
+ readonly Butt: 0;
9
+ readonly Round: 1;
10
+ readonly Square: 2;
11
+ }>;
12
+ export type StrokeCap = typeof StrokeCap[keyof typeof StrokeCap];
13
+ export declare const StrokeJoin: Readonly<{
14
+ readonly Miter: 0;
15
+ readonly Round: 1;
16
+ readonly Bevel: 2;
17
+ }>;
18
+ export type StrokeJoin = typeof StrokeJoin[keyof typeof StrokeJoin];
19
+ export declare const TileMode: Readonly<{
20
+ readonly Clamp: 0;
21
+ readonly Repeat: 1;
22
+ readonly Mirror: 2;
23
+ readonly Decal: 3;
24
+ }>;
25
+ export type TileMode = typeof TileMode[keyof typeof TileMode];
26
+ export declare const BlurStyle: Readonly<{
27
+ readonly Normal: 0;
28
+ readonly Solid: 1;
29
+ readonly Outer: 2;
30
+ readonly Inner: 3;
31
+ }>;
32
+ export type BlurStyle = typeof BlurStyle[keyof typeof BlurStyle];
33
+ export declare const ColorChannel: Readonly<{
34
+ readonly Red: 0;
35
+ readonly Green: 1;
36
+ readonly Blue: 2;
37
+ readonly Alpha: 3;
38
+ }>;
39
+ export type ColorChannel = typeof ColorChannel[keyof typeof ColorChannel];
40
+ export declare const Path1DEffectStyle: Readonly<{
41
+ readonly Translate: 0;
42
+ readonly Rotate: 1;
43
+ readonly Morph: 2;
44
+ }>;
45
+ export type Path1DEffectStyle = typeof Path1DEffectStyle[keyof typeof Path1DEffectStyle];
46
+ export declare const TextEncoding: Readonly<{
47
+ readonly UTF8: 0;
48
+ readonly UTF16: 1;
49
+ readonly UTF32: 2;
50
+ readonly GlyphID: 3;
51
+ }>;
52
+ export type TextEncoding = typeof TextEncoding[keyof typeof TextEncoding];
53
+ export declare const FontEdging: Readonly<{
54
+ readonly Alias: 0;
55
+ readonly AntiAlias: 1;
56
+ readonly SubpixelAntiAlias: 2;
57
+ }>;
58
+ export type FontEdging = typeof FontEdging[keyof typeof FontEdging];
59
+ export declare const FontHinting: Readonly<{
60
+ readonly None: 0;
61
+ readonly Slight: 1;
62
+ readonly Normal: 2;
63
+ readonly Full: 3;
64
+ }>;
65
+ export type FontHinting = typeof FontHinting[keyof typeof FontHinting];
66
+ export declare const ClipOp: Readonly<{
67
+ readonly Difference: 0;
68
+ readonly Intersect: 1;
69
+ }>;
70
+ export type ClipOp = typeof ClipOp[keyof typeof ClipOp];
71
+ export declare const VertexMode: Readonly<{
72
+ readonly Triangles: 0;
73
+ readonly TrianglesStrip: 1;
74
+ readonly TriangleFan: 2;
75
+ }>;
76
+ export type VertexMode = typeof VertexMode[keyof typeof VertexMode];
77
+ export declare const PointMode: Readonly<{
78
+ readonly Points: 0;
79
+ readonly Lines: 1;
80
+ readonly Polygon: 2;
81
+ }>;
82
+ export type PointMode = typeof PointMode[keyof typeof PointMode];
83
+ export declare const PathOp: Readonly<{
84
+ readonly Difference: 0;
85
+ readonly Intersect: 1;
86
+ readonly Union: 2;
87
+ readonly XOR: 3;
88
+ readonly ReverseDifference: 4;
89
+ }>;
90
+ export type PathOp = typeof PathOp[keyof typeof PathOp];
91
+ export declare const FillType: Readonly<{
92
+ readonly Winding: 0;
93
+ readonly EvenOdd: 1;
94
+ }>;
95
+ export type FillType = typeof FillType[keyof typeof FillType];
96
+ export declare const AddPathMode: Readonly<{
97
+ readonly Append: 0;
98
+ readonly Extend: 1;
99
+ }>;
100
+ export type AddPathMode = typeof AddPathMode[keyof typeof AddPathMode];
101
+ export declare const ColorSpace: Readonly<{
102
+ readonly SRGB: 0;
103
+ readonly SRGBLinear: 1;
104
+ readonly DisplayP3: 2;
105
+ readonly AdobeRGB: 3;
106
+ }>;
107
+ export type ColorSpace = typeof ColorSpace[keyof typeof ColorSpace];
108
+ export declare const BlendMode: Readonly<{
109
+ readonly Clear: 0;
110
+ readonly Src: 1;
111
+ readonly Dst: 2;
112
+ readonly SrcOver: 3;
113
+ readonly DstOver: 4;
114
+ readonly SrcIn: 5;
115
+ readonly DstIn: 6;
116
+ readonly SrcOut: 7;
117
+ readonly DstOut: 8;
118
+ readonly SrcATop: 9;
119
+ readonly DstATop: 10;
120
+ readonly Xor: 11;
121
+ readonly Plus: 12;
122
+ readonly Modulate: 13;
123
+ readonly Screen: 14;
124
+ readonly Overlay: 15;
125
+ readonly Darken: 16;
126
+ readonly Lighten: 17;
127
+ readonly ColorDodge: 18;
128
+ readonly ColorBurn: 19;
129
+ readonly HardLight: 20;
130
+ readonly SoftLight: 21;
131
+ readonly Difference: 22;
132
+ readonly Exclusion: 23;
133
+ readonly Multiply: 24;
134
+ readonly Hue: 25;
135
+ readonly Saturation: 26;
136
+ readonly Color: 27;
137
+ readonly Luminosity: 28;
138
+ }>;
139
+ export type BlendMode = typeof BlendMode[keyof typeof BlendMode];
140
+ export declare const FilterMode: Readonly<{
141
+ readonly Nearest: 0;
142
+ readonly Linear: 1;
143
+ }>;
144
+ export type FilterMode = typeof FilterMode[keyof typeof FilterMode];
145
+ export declare const MipmapMode: Readonly<{
146
+ readonly None: 0;
147
+ readonly Nearest: 1;
148
+ readonly Linear: 2;
149
+ }>;
150
+ export type MipmapMode = typeof MipmapMode[keyof typeof MipmapMode];
151
+ export declare const TextAlign: Readonly<{
152
+ readonly Left: 0;
153
+ readonly Right: 1;
154
+ readonly Center: 2;
155
+ readonly Justify: 3;
156
+ readonly Start: 4;
157
+ readonly End: 5;
158
+ }>;
159
+ export type TextAlign = typeof TextAlign[keyof typeof TextAlign];
160
+ export declare const TextDirection: Readonly<{
161
+ readonly RTL: 0;
162
+ readonly LTR: 1;
163
+ }>;
164
+ export type TextDirection = typeof TextDirection[keyof typeof TextDirection];
165
+ export declare const FontSlant: Readonly<{
166
+ readonly Upright: 0;
167
+ readonly Italic: 1;
168
+ readonly Oblique: 2;
169
+ }>;
170
+ export type FontSlant = typeof FontSlant[keyof typeof FontSlant];
171
+ export declare const FontWeight: Readonly<{
172
+ readonly Invisible: 0;
173
+ readonly Thin: 100;
174
+ readonly ExtraLight: 200;
175
+ readonly Light: 300;
176
+ readonly Normal: 400;
177
+ readonly Medium: 500;
178
+ readonly SemiBold: 600;
179
+ readonly Bold: 700;
180
+ readonly ExtraBold: 800;
181
+ readonly Black: 900;
182
+ readonly ExtraBlack: 1000;
183
+ }>;
184
+ export type FontWeight = typeof FontWeight[keyof typeof FontWeight];
185
+ export declare const FontWidth: Readonly<{
186
+ readonly UltraCondensed: 1;
187
+ readonly ExtraCondensed: 2;
188
+ readonly Condensed: 3;
189
+ readonly SemiCondensed: 4;
190
+ readonly Normal: 5;
191
+ readonly SemiExpanded: 6;
192
+ readonly Expanded: 7;
193
+ readonly ExtraExpanded: 8;
194
+ readonly UltraExpanded: 9;
195
+ }>;
196
+ export type FontWidth = typeof FontWidth[keyof typeof FontWidth];
197
+ export declare const ColorType: Readonly<{
198
+ readonly Unknown: 0;
199
+ readonly Alpha_8: 1;
200
+ readonly RGB_565: 2;
201
+ readonly ARGB_4444: 3;
202
+ readonly RGBA_8888: 4;
203
+ readonly RGB_888x: 5;
204
+ readonly BGRA_8888: 6;
205
+ readonly RGBA_1010102: 7;
206
+ readonly BGRA_1010102: 8;
207
+ readonly RGB_101010x: 9;
208
+ readonly BGR_101010x: 10;
209
+ readonly Gray_8: 14;
210
+ readonly RGBA_F16Norm: 15;
211
+ readonly RGBA_F16: 16;
212
+ readonly RGBA_F32: 18;
213
+ readonly R16_float: 21;
214
+ }>;
215
+ export type ColorType = typeof ColorType[keyof typeof ColorType];
216
+ export declare const AlphaType: Readonly<{
217
+ readonly Unknown: 0;
218
+ readonly Opaque: 1;
219
+ readonly Premul: 2;
220
+ readonly Unpremul: 3;
221
+ }>;
222
+ export type AlphaType = typeof AlphaType[keyof typeof AlphaType];
223
+ export declare const ImageFormat: Readonly<{
224
+ readonly PNG: 0;
225
+ readonly JPEG: 1;
226
+ readonly WEBP: 2;
227
+ }>;
228
+ export type ImageFormat = typeof ImageFormat[keyof typeof ImageFormat];
229
+ export declare const PathVerb: Readonly<{
230
+ readonly Move: 0;
231
+ readonly Line: 1;
232
+ readonly Quad: 2;
233
+ readonly Conic: 3;
234
+ readonly Cubic: 4;
235
+ readonly Close: 5;
236
+ }>;
237
+ export type PathVerb = typeof PathVerb[keyof typeof PathVerb];
238
+ export declare const SaveLayerFlag: Readonly<{
239
+ readonly InitWithPrevious: 4;
240
+ readonly F16ColorType: 16;
241
+ }>;
242
+ export type SaveLayerFlag = typeof SaveLayerFlag[keyof typeof SaveLayerFlag];
243
+ export declare const BitDepth: Readonly<{
244
+ readonly U8: 0;
245
+ readonly F16: 1;
246
+ }>;
247
+ export type BitDepth = typeof BitDepth[keyof typeof BitDepth];
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@highagency/pencil-wasm",
3
+ "version": "0.1.17",
4
+ "description": "WASM rendering library for Pencil",
5
+ "type": "module",
6
+ "main": "./pencil.js",
7
+ "types": "./pencil.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./pencil.d.ts",
11
+ "default": "./pencil.js"
12
+ },
13
+ "./pencil.wasm": "./pencil.wasm",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "pencil.js",
18
+ "pencil.d.ts",
19
+ "enums.gen.d.ts",
20
+ "pencil.wasm"
21
+ ],
22
+ "license": "UNLICENSED",
23
+ "publishConfig": {
24
+ "registry": "https://npm.pkg.github.com"
25
+ }
26
+ }