@knoflows/engine 0.1.0-alpha.9 → 0.1.0-beta.16

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 (107) hide show
  1. package/README.md +5 -10
  2. package/dist/engine.js +110 -10
  3. package/dist/migrations/20260918025930_context_files/migration.sql +7 -0
  4. package/dist/migrations/20260918025930_context_files/snapshot.json +1275 -0
  5. package/dist/migrations/20260918074816_large_kate_bishop/migration.sql +8 -0
  6. package/dist/migrations/20260918074816_large_kate_bishop/snapshot.json +1338 -0
  7. package/dist/migrations/20260919073531_tense_grey_gargoyle/migration.sql +1 -0
  8. package/dist/migrations/20260919073531_tense_grey_gargoyle/snapshot.json +1348 -0
  9. package/dist/migrations/20260919081637_fearless_warlock/migration.sql +1 -0
  10. package/dist/migrations/20260919081637_fearless_warlock/snapshot.json +1358 -0
  11. package/package.json +4 -4
  12. package/static/apple-touch-icon.png +0 -0
  13. package/static/assets/i18n/en.json +216 -12
  14. package/static/assets/i18n/es.json +216 -12
  15. package/static/chunk-9U0WIegY.js +1 -0
  16. package/static/chunk-B0kZCuEt.js +1 -0
  17. package/static/chunk-B2Xol2Un.js +1 -0
  18. package/static/chunk-B7WkIFy0.js +1 -0
  19. package/static/chunk-BW9BdLk-.js +1 -0
  20. package/static/chunk-Bgl02GNl.js +1 -0
  21. package/static/chunk-BhF-m2HP.js +70 -0
  22. package/static/chunk-BhTujCrk.js +1 -0
  23. package/static/chunk-Bu6_39Nh.js +1 -0
  24. package/static/chunk-C0HCwfa5.js +1 -0
  25. package/static/chunk-C2BVYtVN.js +66 -0
  26. package/static/chunk-C7h8oMzu.js +1 -0
  27. package/static/chunk-CRdEWPUM.js +1 -0
  28. package/static/chunk-CRv0PDB7.js +1 -0
  29. package/static/chunk-CecXf-CU.js +1 -0
  30. package/static/chunk-CenXuPs5.js +1 -0
  31. package/static/chunk-CeywzbyD.js +1 -0
  32. package/static/{chunk-WzBVBHEz.js → chunk-Cg2E0vnT.js} +1 -1
  33. package/static/chunk-CsQ_HDGC.js +1 -0
  34. package/static/chunk-D19C8Gcb.js +1 -0
  35. package/static/chunk-DGC4TkAL.js +1 -0
  36. package/static/chunk-DUkiyf7y.js +1 -0
  37. package/static/chunk-DYzSLsNo.js +1 -0
  38. package/static/chunk-DZJZYEZl.js +1 -0
  39. package/static/chunk-DfcFBVF4.js +1 -0
  40. package/static/chunk-DixyYfV_.js +1 -0
  41. package/static/chunk-Dp4H7MY0.js +1 -0
  42. package/static/chunk-DtQtDE8q.js +1 -0
  43. package/static/chunk-Dv5GyY6h.js +1 -0
  44. package/static/chunk-Edaw7VGW.js +1 -0
  45. package/static/chunk-FOJfn_t9.js +1 -0
  46. package/static/chunk-Fwpw-z7T.js +1 -0
  47. package/static/chunk-HUIPNwd9.js +1 -0
  48. package/static/chunk-NZ-CPWJ2.js +1 -0
  49. package/static/chunk-Th9whP36.js +1 -0
  50. package/static/chunk-bCuvpgQS.js +1 -0
  51. package/static/{chunk-BmSmqIC7.js → chunk-iE460Kz5.js} +1 -1
  52. package/static/chunk-p6dftaf8.js +5 -0
  53. package/static/chunk-yoe_30RI.js +1 -0
  54. package/static/chunk-z2vvQAle.js +1 -0
  55. package/static/favicon-16x16.png +0 -0
  56. package/static/favicon-32x32.png +0 -0
  57. package/static/favicon.ico +0 -0
  58. package/static/favicon.svg +12 -0
  59. package/static/icon-192.png +0 -0
  60. package/static/icon-512.png +0 -0
  61. package/static/index.html +30 -5
  62. package/static/main-CHQMTVIP.js +248 -0
  63. package/static/media/inter-latin-400-normal-55WT6UWF.woff2 +0 -0
  64. package/static/media/inter-latin-400-normal-FR5HOXA4.woff +0 -0
  65. package/static/media/inter-latin-500-normal-W62DVTXI.woff2 +0 -0
  66. package/static/media/inter-latin-500-normal-ZNGIZ2YB.woff +0 -0
  67. package/static/media/inter-latin-600-normal-R6Y2SZCR.woff2 +0 -0
  68. package/static/media/inter-latin-600-normal-ZYHV6QZT.woff +0 -0
  69. package/static/media/jetbrains-mono-latin-500-normal-ETEQEOVZ.woff +0 -0
  70. package/static/media/jetbrains-mono-latin-500-normal-V4XIP5OW.woff2 +0 -0
  71. package/static/media/space-grotesk-latin-500-normal-GESQWJQV.woff2 +0 -0
  72. package/static/media/space-grotesk-latin-500-normal-HV4TE4RA.woff +0 -0
  73. package/static/media/space-grotesk-latin-700-normal-6Z7GHSI6.woff +0 -0
  74. package/static/media/space-grotesk-latin-700-normal-I3MXRIUZ.woff2 +0 -0
  75. package/static/nz-theme-dark.css +1 -0
  76. package/static/nz-theme.css +1 -0
  77. package/static/styles-JGCTKGGH.css +1 -0
  78. package/static/chunk-1SlEtaMr.js +0 -1
  79. package/static/chunk-5H-9s7GP.js +0 -7
  80. package/static/chunk-B-P3MXAn.js +0 -1
  81. package/static/chunk-B76UD1mt.js +0 -1
  82. package/static/chunk-BFYi_kYd.js +0 -1
  83. package/static/chunk-BG0Azip9.js +0 -1
  84. package/static/chunk-BWr0M-hk.js +0 -1
  85. package/static/chunk-Bpxo3nwV.js +0 -1
  86. package/static/chunk-Bw9D3p4h.js +0 -1
  87. package/static/chunk-C-T2O6LE.js +0 -1
  88. package/static/chunk-C1E15gBW.js +0 -5
  89. package/static/chunk-C1V4WljN.js +0 -1
  90. package/static/chunk-C3wpjxgW.js +0 -1
  91. package/static/chunk-C4yhGGeB.js +0 -1
  92. package/static/chunk-C5hSEJdm.js +0 -1
  93. package/static/chunk-CTkRZ4w1.js +0 -1
  94. package/static/chunk-CYX8w88D.js +0 -1
  95. package/static/chunk-Cq4-aSSE.js +0 -1
  96. package/static/chunk-Cwf9CcBI.js +0 -1
  97. package/static/chunk-D32ZkSz4.js +0 -1
  98. package/static/chunk-DE9IK0Os.js +0 -1
  99. package/static/chunk-DNtWpE65.js +0 -1
  100. package/static/chunk-DdVQ8Ilm.js +0 -66
  101. package/static/chunk-W0OF0P_2.js +0 -1
  102. package/static/chunk-XvSvuf-k.js +0 -1
  103. package/static/chunk-aWIxMbtR.js +0 -1
  104. package/static/chunk-f1UVptf5.js +0 -1
  105. package/static/chunk-vj0RDTCf.js +0 -1
  106. package/static/main-BRWQ5RNE.js +0 -249
  107. package/static/styles-6MW3GE4V.css +0 -1
@@ -0,0 +1 @@
1
+ import {C,b0 as jn,V as Ve,bK as W0,a5 as q0,Z as ZE,e as al,bb as er,f as rl,g as $i,Y as pf,a0 as bd,a1 as sp,a2 as fp,b1 as ts,j as _i,m as mh,J as Jc,k as iE,I as Iw,o as gI,w as lh,y as aE,z as rl$1,b as at,b3 as Wn,q as qo,U as Uw,u as ue,r as r$1,c as bi,d as $8,K as Kt,P as Pw,x as xD,l as _D,p as Fw,B as AD,M as MD,b4 as N2,aV as ix,bU as M1,b5 as cx,i as ie,L as Lh,H as HD,D as ch,G as FD,al as Sh,aL as Fh,O as Fu,Q as ju}from'./main-CHQMTVIP.js';import {a as ai,z}from'./chunk-B2Xol2Un.js';var fe=(()=>{class t{constructor(){this.http=C(N2),this.baseUrl=`${ix.apiBaseUrl}/filesystem`;}browse(e,i){let n=new M1;return e!=null&&e.trim()!==""&&(n=n.set("path",e.trim())),i?.mode&&(n=n.set("mode",i.mode)),i?.extensions&&i.extensions.length>0&&(n=n.set("extensions",i.extensions.join(","))),this.http.get(`${this.baseUrl}/browse`,{params:n}).pipe(cx())}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=ie({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();function L(t){if(!t)return [];if(/^[A-Za-z]:/.test(t)){let r=t.includes("\\")?"\\":"/",h=`${t.slice(0,2)}${r}`,_=t.slice(2).replace(/^[\\/]+/,"").split(/[\\/]/).filter(Boolean),R=[{label:t.slice(0,2),path:h}],f=h;for(let O of _)f=f.endsWith(r)?f+O:f+r+O,R.push({label:O,path:f});return R}if(t.startsWith("/")){let r=t.split("/").filter(Boolean),h=[{label:"/",path:"/"}],z="";for(let _ of r)z+=`/${_}`,h.push({label:_,path:z});return h}let o=t.includes("\\")?"\\":"/",e=t.split(/[\\/]/).filter(Boolean),i=[],n="";for(let r of e)n=n?n+o+r:r,i.push({label:r,path:n});return i}function j(t){let o=L(t);return o.length<2?null:o[o.length-2].path}var be=(t,o)=>o.path;function xe(t,o){if(t&1){let e=FD();_i(0,"button",7),mh("click",function(){Fu(e);let n=HD().$implicit,r=HD();return ju(r.loadDir(n.path))}),Iw(1),Jc(),_i(2,"span",8),Iw(3,"/"),Jc();}if(t&2){let e=HD().$implicit;ch("data-testid","file-browser-crumb-"+e.label),gI(),rl$1(" ",e.label," ");}}function we(t,o){if(t&1&&(_i(0,"span",6),Iw(1),Jc()),t&2){let e=HD().$implicit;ch("data-testid","file-browser-crumb-"+e.label),gI(),Lh(e.label);}}function De(t,o){if(t&1&&_D(0,xe,4,2)(1,we,2,2,"span",6),t&2){let e=o.$index,i=o.$count;MD(e!==i-1?0:1);}}function ve(t,o){t&1&&(_i(0,"p",3),Iw(1),Pw(2,"transloco"),Jc()),t&2&&(gI(),Lh(Fw(2,1,"common.loading")));}function ye(t,o){if(t&1&&(_i(0,"p",4),Iw(1),Jc()),t&2){let e=HD();gI(),Lh(e.error());}}function Me(t,o){if(t&1){let e=FD();_i(0,"li")(1,"button",9),mh("click",function(){let n=Fu(e),r=HD(2);return ju(r.loadDir(n))}),Iw(2," ../ "),Jc()();}}function ke(t,o){if(t&1){let e=FD();_i(0,"li")(1,"button",10),mh("click",function(){let n=Fu(e).$implicit,r=HD(2);return ju(r.onEntry(n))}),Iw(2),Jc()();}if(t&2){let e=o.$implicit,i=HD(2);gI(),Sh("dir",e.isDirectory)("selected",i.isSelected(e)),ch("data-testid","file-browser-entry-"+e.name),gI(),Fh(" ",e.name,"",e.isDirectory?"/":""," ");}}function Fe(t,o){if(t&1&&(_i(0,"ul",5),_D(1,Me,3,0,"li"),xD(2,ke,3,7,"li",null,be),Jc()),t&2){let e,i=HD();gI(),MD((e=i.parentDir())?1:-1,e),gI(),AD(i.entries());}}var ge=(()=>{class t{constructor(){this.filesystem=C(fe),this.transloco=C(Ve),this.destroyRef=C(at),this.modalData=C(Wn,{optional:true}),this.path=W0(this.modalData?.path??""),this.mode=q0(this.modalData?.mode??"files"),this.extensions=q0(this.modalData?.extensions??[]),this.currentDir=qo(""),this.entries=qo([]),this.loading=qo(false),this.error=qo(null),this.crumbs=Uw(()=>L(this.currentDir())),this.parentDir=Uw(()=>j(this.currentDir()));}ngOnInit(){this.openAround(this.path());}isSelected(e){return this.mode()==="directories"?e.isDirectory&&e.path===this.path():!e.isDirectory&&e.path===this.path()}onEntry(e){if(e.isDirectory){this.loadDir(e.path);return}this.mode()==="files"&&this.path.set(e.path);}loadDir(e){this.loading.set(true),this.error.set(null),this.filesystem.browse(e,this.browseFilter()).pipe(ue(this.destroyRef)).subscribe({next:i=>this.applyListing(i),error:i=>{this.loading.set(false),this.error.set(this.errorMessage(i,this.transloco.translate("file-browser.loadFailed")));}});}browseFilter(){let e=this.extensions();return r$1({mode:this.mode()},e.length>0?{extensions:e}:{})}openAround(e){let i=e.trim();if(!i){this.loadDir(void 0);return}this.loading.set(true),this.error.set(null),this.filesystem.browse(i,this.browseFilter()).pipe(ue(this.destroyRef)).subscribe({next:n=>this.applyListing(n),error:()=>this.loadDir(j(i)??void 0)});}applyListing(e){this.currentDir.set(e.path),this.entries.set(e.entries),this.mode()==="directories"&&this.path.set(e.path),this.loading.set(false),this.error.set(null);}errorMessage(e,i){return e instanceof bi||e instanceof Error?e.message:i}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-file-browser"]],inputs:{path:[1,"path"],mode:[1,"mode"],extensions:[1,"extensions"]},outputs:{path:"pathChange"},decls:10,vars:4,consts:[["data-testid","file-browser",1,"file-browser"],["data-testid","file-browser-selected",1,"selected"],["data-testid","file-browser-breadcrumbs",1,"crumbs"],["data-testid","file-browser-loading"],["data-testid","file-browser-error",1,"error"],["data-testid","file-browser-entries",1,"entries"],[1,"current"],["nz-button","","nzType","link","type","button",3,"click"],["aria-hidden","true",1,"sep"],["type","button","data-testid","file-browser-up",1,"entry","dir",3,"click"],["type","button",1,"entry",3,"click"]],template:function(i,n){i&1&&(_i(0,"div",0)(1,"p",1),Iw(2),Pw(3,"transloco"),Jc(),_i(4,"nav",2),xD(5,De,2,1,null,null,be),Jc(),_D(7,ve,3,3,"p",3)(8,ye,2,1,"p",4)(9,Fe,4,1,"ul",5),Jc()),i&2&&(gI(2),rl$1(" ",n.path()||Fw(3,2,n.mode()==="directories"?"file-browser.emptySelectionDirectory":"file-browser.emptySelection")," "),gI(3),AD(n.crumbs()),gI(2),MD(n.loading()?7:n.error()?8:9));},dependencies:[$8,pf,bd,sp,Kt],styles:[".file-browser[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.45rem}.selected[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:#44403c;overflow-wrap:anywhere;word-break:break-word}.crumbs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.1rem;font-size:.85rem}.crumbs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-inline:.15rem;height:auto}.sep[_ngcontent-%COMP%]{color:#a8a29e}.current[_ngcontent-%COMP%]{color:#1c1917;font-weight:600}.entries[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.2rem 0;max-height:20rem;overflow:auto;border:1px solid #e7e5e4;background:#fff}.entry[_ngcontent-%COMP%]{display:block;width:100%;text-align:left;border:0;background:transparent;padding:.3rem .6rem;cursor:pointer;font:inherit;color:inherit}.entry[_ngcontent-%COMP%]:hover{background:#f5f5f4}.entry.dir[_ngcontent-%COMP%]{font-weight:600}.entry.selected[_ngcontent-%COMP%]{background:#e7e5e4}.error[_ngcontent-%COMP%]{margin:0;color:#9f1239}"]});}}return t})();var ot=(()=>{class t{constructor(){this.modal=C(jn),this.transloco=C(Ve),this.path=W0(""),this.mode=q0("files"),this.extensions=q0([]),this.placeholder=q0(void 0),this.browseLabel=q0(void 0);}placeholderText(){return this.placeholder()||this.transloco.translate(this.mode()==="directories"?"path-picker.placeholderDirectory":"path-picker.placeholderFile")}browseButtonText(){return this.browseLabel()||this.transloco.translate("path-picker.browse")}openBrowse(){let e=this.mode(),i=this.modal.create({nzTitle:this.transloco.translate(e==="directories"?"path-picker.modalTitleDirectory":"path-picker.modalTitleFile"),nzContent:ge,nzData:{path:this.path(),mode:e,extensions:this.extensions()},nzWidth:640,nzOkText:this.transloco.translate(e==="directories"?"file-browser.useFolder":"path-picker.selectFile"),nzCancelText:this.transloco.translate("common.cancel"),nzOnOk:()=>{let n=i.getContentComponent();this.path.set(n.path());}});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=ZE({type:t,selectors:[["app-path-picker"]],inputs:{path:[1,"path"],mode:[1,"mode"],extensions:[1,"extensions"],placeholder:[1,"placeholder"],browseLabel:[1,"browseLabel"]},outputs:{path:"pathChange"},decls:4,vars:3,consts:[["data-testid","path-picker",1,"path-picker"],["nz-input","","data-testid","path-picker-input",3,"ngModelChange","placeholder","ngModel"],["nz-button","","type","button","data-testid","path-picker-browse",3,"click"]],template:function(i,n){i&1&&(_i(0,"div",0)(1,"input",1),mh("ngModelChange",function(h){return n.path.set(h)}),Jc(),iE(),_i(2,"button",2),mh("click",function(){return n.openBrowse()}),Iw(3),Jc()()),i&2&&(gI(),lh("placeholder",n.placeholderText())("ngModel",n.path()),aE(),gI(2),rl$1(" ",n.browseButtonText()," "));},dependencies:[al,er,rl,$i,pf,bd,sp,fp,ai,z,ts],styles:[".path-picker[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.path-picker[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;min-width:0}"]});}}return t})();export{ot as o};