orcheo-studio 0.24.4 → 0.24.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bumpversion.cfg +1 -1
- package/dist/assets/{arc-99TH-Koz.js → arc-CJePtrV4.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-DugaTSY2.js → architectureDiagram-VXUJARFQ-BavAz0jp.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-BH68wVtD.js → blockDiagram-VD42YOAC-Bx1XAydH.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-V6Vqtp7B.js → c4Diagram-YG6GDRKO-B2LhByin.js} +1 -1
- package/dist/assets/channel-BuDj-lWJ.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CvbCAMNv.js → chunk-4BX2VUAB-UqiH5dLp.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-h_T3kQh7.js → chunk-55IACEB6-ChxTr_6v.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-Dm6dgbGh.js → chunk-B4BG7PRW-2ETw-eA1.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-DSXFA4Fi.js → chunk-DI55MBZ5-BdxVSKej.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DJDlfjt1.js → chunk-FMBD7UC4-BJF2M5iQ.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-BnjUGeBL.js → chunk-QN33PNHL-DI9t3nKL.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BRudOghZ.js → chunk-QZHKN3VN-DsbUIBgB.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-CpxSpvqK.js → chunk-TZMSLE5B-DzMhWfBV.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-Bc5AzWzU.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-Bc5AzWzU.js +1 -0
- package/dist/assets/clone-CtxIENQC.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-Dl80WZ_a.js → cose-bilkent-S5V4N54A-BcKKbLWz.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-vw-vkw78.js → dagre-6UL2VRFP-CERJ9KSL.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-B4MT5Nvf.js → diagram-PSM6KHXK-DGl--Cyq.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CMioZnRI.js → diagram-QEK2KX5R-DbfdELCd.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-PJAE8YS0.js → diagram-S2PKOQOG-CsR4YAm5.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-DCd-WouG.js → erDiagram-Q2GNP2WA-BlOr_gpI.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-DS__-WT4.js → flowDiagram-NV44I4VS-BAyDXjxF.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-Btifh-31.js → ganttDiagram-JELNMOA3-b2ntam6s.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-BCyjopey.js → gitGraphDiagram-V2S2FVAM-BvdeZrga.js} +1 -1
- package/dist/assets/{graph-6YBx8iQ0.js → graph-DMrtDwYQ.js} +1 -1
- package/dist/assets/{index-lkycEDHM.js → index-CaWVBOSf.js} +204 -189
- package/dist/assets/index-CbLxL6va.css +1 -0
- package/dist/assets/{infoDiagram-HS3SLOUP-CAsJ2eU1.js → infoDiagram-HS3SLOUP-CFO6LsEb.js} +1 -1
- package/dist/assets/{isUndefined-CcAlyXn3.js → isUndefined-DE2VOYrW.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-Bi8XsX15.js → journeyDiagram-XKPGCS4Q-Svi8cltR.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-PTAFVsDn.js → kanban-definition-3W4ZIXB7-C7uds03_.js} +1 -1
- package/dist/assets/{layout-Do-GOFdW.js → layout-D5N_DnHw.js} +1 -1
- package/dist/assets/{linear-CZlgolw0.js → linear-h9-K1RBq.js} +1 -1
- package/dist/assets/{min-N15IYW1Y.js → min-CjtZYucR.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-Dlgxv6Jo.js → mindmap-definition-VGOIOE7T-Bw80_6TW.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-Dr2AfIw5.js → pieDiagram-ADFJNKIX-DGukFJSP.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-B8TPuvW6.js → quadrantDiagram-AYHSOK5B-CU7GPi0P.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-CdD2oP1N.js → requirementDiagram-UZGBJVZJ-D_aCZrji.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-XEMX6l5k.js → sankeyDiagram-TZEHDZUN-Wgtprjih.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-BlIKpBev.js → sequenceDiagram-WL72ISMW-BCOCCVxS.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-D3KGQY6v.js → stateDiagram-FKZM4ZOC-DHVe22f9.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-Bq9eQr8D.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-TkL4mz_f.js → timeline-definition-IT6M3QCI-Cm4CAEQk.js} +1 -1
- package/dist/assets/{treemap-GDKQZRPO-BDp_c1Vc.js → treemap-GDKQZRPO-DvLhDp9r.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-D0dNQImL.js → xychartDiagram-PRI3JC2R-BtcJYIPe.js} +1 -1
- package/dist/index.html +8 -2
- package/index.html +6 -0
- package/package.json +1 -1
- package/src/App.tsx +48 -44
- package/src/design-system/ui/button.tsx +1 -1
- package/src/features/account/components/settings/appearance-settings-tab.tsx +1 -1
- package/src/features/account/pages/profile/components/profile-general-tab.tsx +1 -1
- package/src/features/account/pages/workspace-members.tsx +58 -62
- package/src/features/auth/pages/login.tsx +4 -2
- package/src/features/auth/pages/verify.tsx +1 -1
- package/src/features/chatkit/components/public-chat-error-boundary.tsx +1 -1
- package/src/features/chatkit/components/public-chat-widget.tsx +2 -3
- package/src/features/chatkit/lib/chatkit-theme.ts +3 -2
- package/src/features/chatkit/lib/public-chat-access.ts +13 -0
- package/src/features/chatkit/pages/public-chat.tsx +18 -27
- package/src/features/shared/components/chat-interface.types.ts +1 -5
- package/src/features/shared/components/top-navigation/studio-brand.tsx +1 -1
- package/src/features/shared/components/top-navigation/version-status.tsx +27 -31
- package/src/features/shared/components/workspace-bootstrap-gate.tsx +4 -4
- package/src/features/workflow/components/dialogs/credential-access-badge.tsx +2 -2
- package/src/features/workflow/components/dialogs/credential-status-badge.tsx +2 -2
- package/src/features/workflow/components/dialogs/credentials-table.tsx +1 -1
- package/src/features/workflow/components/dialogs/update-workflow-dialog.tsx +34 -78
- package/src/features/workflow/components/dialogs/upload-workflow-dialog.tsx +40 -136
- package/src/features/workflow/components/dialogs/workflow-folder-picker.tsx +178 -0
- package/src/features/workflow/components/panels/rjsf-cron-widget.tsx +35 -10
- package/src/features/workflow/components/panels/workflow-diff-dialog.tsx +5 -5
- package/src/features/workflow/components/panels/workflow-history-table.tsx +3 -4
- package/src/features/workflow/components/trace/agent-prism/SpanCard/SpanCardConnector.tsx +1 -5
- package/src/features/workflow/components/trace/agent-prism/shared.ts +1 -10
- package/src/features/workflow/components/trace/agent-prism/theme/theme.css +74 -74
- package/src/features/workflow/lib/workflow-execution-builders.ts +4 -4
- package/src/features/workflow/lib/workflow-execution.types.ts +2 -9
- package/src/features/workflow/lib/workflow-folder-selection.ts +239 -0
- package/src/features/workflow/lib/workflow-frontmatter.ts +3 -1
- package/src/features/workflow/lib/workflow-storage-api.ts +5 -9
- package/src/features/workflow/lib/workflow-storage-helpers.ts +2 -4
- package/src/features/workflow/lib/workflow-storage.ts +6 -2
- package/src/features/workflow/lib/workflow-storage.types.ts +1 -6
- package/src/features/workflow/lib/workflow-upload-errors.ts +6 -2
- package/src/features/workflow/pages/workflow/components/settings-tab-content.tsx +24 -9
- package/src/features/workflow/pages/workflow/components/workflow-tab-content.tsx +6 -4
- package/src/features/workflow/pages/workflow/hooks/controller/use-workflow-execution-controller.ts +4 -1
- package/src/features/workflow/pages/workflow/hooks/use-execution-updates.ts +4 -2
- package/src/features/workflow/pages/workflow-gallery/create-team-dialog.tsx +2 -6
- package/src/features/workflow/pages/workflow-gallery/workflow-card.tsx +16 -16
- package/src/index.css +101 -59
- package/src/lib/api.ts +7 -2
- package/src/lib/workspace-routing.ts +1 -3
- package/tailwind.config.js +47 -2
- package/dist/assets/channel-D562bZxL.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-Dix_KnuM.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-Dix_KnuM.js +0 -1
- package/dist/assets/clone-0c2Tu-SH.js +0 -1
- package/dist/assets/index-Df4jFRhd.css +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-Di3Nkv2n.js +0 -1
package/dist/assets/{xychartDiagram-PRI3JC2R-D0dNQImL.js → xychartDiagram-PRI3JC2R-BtcJYIPe.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Nt,H as mi,e as yi,y as bi,F as St,i as Ai,D as Yt,E as wi,K as Ci,aI as Si,R as Wt}from"./index-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Nt,H as mi,e as yi,y as bi,F as St,i as Ai,D as Yt,E as wi,K as Ci,aI as Si,R as Wt}from"./index-CaWVBOSf.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-h9-K1RBq.js";import"./defaultLocale-C4B-KCzX.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function yt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,g,m=!1,p=0,k=0,v=.5;delete e.unknown;function C(){var b=t().length,E=n<s,D=E?n:s,P=E?s:n;o=(P-D)/Math.max(1,b-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(b-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var I=Ri(b).map(function(y){return D+o*y});return i(E?I.reverse():I)}return e.domain=function(b){return arguments.length?(t(b),C()):t()},e.range=function(b){return arguments.length?([s,n]=b,s=+s,n=+n,C()):[s,n]},e.rangeRound=function(b){return[s,n]=b,s=+s,n=+n,m=!0,C()},e.bandwidth=function(){return g},e.step=function(){return o},e.round=function(b){return arguments.length?(m=!!b,C()):m},e.padding=function(b){return arguments.length?(p=Math.min(1,k=+b),C()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),C()):p},e.paddingOuter=function(b){return arguments.length?(k=+b,C()):k},e.align=function(b){return arguments.length?(v=Math.max(0,Math.min(1,b)),C()):v},e.copy=function(){return yt(t(),[s,n]).round(m).paddingInner(p).paddingOuter(k).align(v)},_i.apply(C(),arguments)}var bt=(function(){var e=a(function(F,h,u,x){for(u=u||{},x=F.length;x--;u[F[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],C=[1,29],b=[1,30],E=[1,31],D=[1,32],P=[1,33],I=[1,34],y=[1,35],_=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],$={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,u,x,d,w,r,at){var f=r.length-1;switch(w){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:g}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{20:[1,53]},{22:[1,54]},e(l,[2,18]),{1:[2,2]},e(l,[2,8]),e(l,[2,9]),e(L,[2,37],{40:55,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c}),e(L,[2,38]),e(L,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(l,[2,10]),e(l,[2,22],{30:41,29:56,24:W,27:z}),e(l,[2,24]),e(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,11]),e(l,[2,30],{33:60,27:U}),e(l,[2,32]),{31:[1,61]},e(l,[2,12]),{17:62,24:X},{25:63,27:R},e(l,[2,14]),{17:65,24:X},e(l,[2,16]),e(l,[2,17]),e(S,[2,41]),e(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(l,[2,31]),{27:[1,69]},e(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(l,[2,15]),e(l,[2,26]),e(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,33]),e(l,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:a(function(h){var u=this,x=[0],d=[],w=[null],r=[],at=this.table,f="",lt=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),T=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);T.setInput(h,Y.yy),Y.yy.lexer=T,Y.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var ft=T.yylloc;r.push(ft);var ci=T.options&&T.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(V){x.length=x.length-2*V,w.length=w.length-V,r.length=r.length-V}a(ui,"popStack");function Vt(){var V;return V=d.pop()||T.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}a(Vt,"lex");for(var M,H,B,pt,q={},ct,O,Bt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=Vt()),B=at[H]&&at[H][M]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");T.showPosition?mt="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+T.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[M]||M)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(mt,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+M);switch(B[0]){case 1:x.push(M),w.push(T.yytext),r.push(T.yylloc),x.push(B[1]),M=null,It=T.yyleng,f=T.yytext,lt=T.yylineno,ft=T.yylloc;break;case 2:if(O=this.productions_[B[1]][1],q.$=w[w.length-O],q._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},ci&&(q._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,It,lt,Y.yy,B[1],w,r].concat(li)),typeof pt<"u")return pt;O&&(x=x.slice(0,-1*O*2),w=w.slice(0,-1*O),r=r.slice(0,-1*O)),x.push(this.productions_[B[1]][0]),w.push(q.$),r.push(q._$),Bt=at[x[x.length-2]][x[x.length-1]],x.push(Bt);break;case 3:return!0}}return!0},"parse")},Et=(function(){var F={EOF:1,parseError:a(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:a(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link
|
|
10
|
+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap"
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
/>
|
|
7
13
|
<title>Orcheo</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CaWVBOSf.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CbLxL6va.css">
|
|
10
16
|
</head>
|
|
11
17
|
<body>
|
|
12
18
|
<div id="root"></div>
|
package/index.html
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link
|
|
10
|
+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap"
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
/>
|
|
7
13
|
<title>Orcheo</title>
|
|
8
14
|
</head>
|
|
9
15
|
<body>
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -78,9 +78,7 @@ function WorkspaceWorkflowRoute() {
|
|
|
78
78
|
}, [workspaceSlug]);
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
|
-
<WorkflowPage
|
|
82
|
-
workflowId={workflowId === "new" ? undefined : workflowId}
|
|
83
|
-
/>
|
|
81
|
+
<WorkflowPage workflowId={workflowId === "new" ? undefined : workflowId} />
|
|
84
82
|
);
|
|
85
83
|
}
|
|
86
84
|
|
|
@@ -88,52 +86,58 @@ export default function OrcheoStudioApp() {
|
|
|
88
86
|
return (
|
|
89
87
|
<Router>
|
|
90
88
|
<BrowserContextProvider>
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
<Routes>
|
|
90
|
+
<Route path="/login" element={<Login />} />
|
|
91
|
+
|
|
92
|
+
<Route path="/auth/verify" element={<AuthVerify />} />
|
|
93
|
+
<Route path="/chat/:workflowId" element={<PublicChatPage />} />
|
|
94
|
+
<Route
|
|
95
|
+
path="/chat/team/:teamSlug/:workflowId"
|
|
96
|
+
element={<PublicChatPage />}
|
|
97
|
+
/>
|
|
98
|
+
<Route
|
|
99
|
+
path="/chat/:workspaceSlug/:workflowId"
|
|
100
|
+
element={<PublicChatPage />}
|
|
101
|
+
/>
|
|
102
|
+
<Route
|
|
103
|
+
path="/chat/:workspaceSlug/team/:teamSlug/:workflowId"
|
|
104
|
+
element={<PublicChatPage />}
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
<Route element={<RequireAuth />}>
|
|
108
|
+
<Route path="/invitations/accept" element={<InvitationAccept />} />
|
|
109
|
+
<Route element={<RequireWorkspace />}>
|
|
110
|
+
<Route path="/" element={<WorkspaceHomeRedirect />} />
|
|
111
|
+
<Route
|
|
112
|
+
path="/:workspaceSlug"
|
|
113
|
+
element={<WorkspaceGalleryRoute />}
|
|
114
|
+
/>
|
|
93
115
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<Route path="/chat/:workspaceSlug/team/:teamSlug/:workflowId" element={<PublicChatPage />} />
|
|
116
|
+
<Route
|
|
117
|
+
path="/:workspaceSlug/workspace"
|
|
118
|
+
element={<WorkspaceManagementRoute />}
|
|
119
|
+
/>
|
|
99
120
|
|
|
100
|
-
<Route element={<RequireAuth />}>
|
|
101
121
|
<Route
|
|
102
|
-
path="/
|
|
103
|
-
element={<
|
|
122
|
+
path="/:workspaceSlug/new"
|
|
123
|
+
element={<WorkspaceWorkflowRoute />}
|
|
124
|
+
/>
|
|
125
|
+
<Route
|
|
126
|
+
path="/:workspaceSlug/team/:teamSlug/:workflowId"
|
|
127
|
+
element={<WorkspaceWorkflowRoute />}
|
|
128
|
+
/>
|
|
129
|
+
<Route
|
|
130
|
+
path="/:workspaceSlug/:workflowId"
|
|
131
|
+
element={<WorkspaceWorkflowRoute />}
|
|
104
132
|
/>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
element={<WorkspaceGalleryRoute />}
|
|
110
|
-
/>
|
|
111
|
-
|
|
112
|
-
<Route
|
|
113
|
-
path="/:workspaceSlug/workspace"
|
|
114
|
-
element={<WorkspaceManagementRoute />}
|
|
115
|
-
/>
|
|
116
|
-
|
|
117
|
-
<Route
|
|
118
|
-
path="/:workspaceSlug/new"
|
|
119
|
-
element={<WorkspaceWorkflowRoute />}
|
|
120
|
-
/>
|
|
121
|
-
<Route
|
|
122
|
-
path="/:workspaceSlug/team/:teamSlug/:workflowId"
|
|
123
|
-
element={<WorkspaceWorkflowRoute />}
|
|
124
|
-
/>
|
|
125
|
-
<Route
|
|
126
|
-
path="/:workspaceSlug/:workflowId"
|
|
127
|
-
element={<WorkspaceWorkflowRoute />}
|
|
128
|
-
/>
|
|
129
|
-
|
|
130
|
-
<Route path="/profile" element={<Profile />} />
|
|
131
|
-
|
|
132
|
-
<Route path="/settings" element={<Settings />} />
|
|
133
|
-
</Route>
|
|
133
|
+
|
|
134
|
+
<Route path="/profile" element={<Profile />} />
|
|
135
|
+
|
|
136
|
+
<Route path="/settings" element={<Settings />} />
|
|
134
137
|
</Route>
|
|
135
|
-
</
|
|
136
|
-
|
|
138
|
+
</Route>
|
|
139
|
+
</Routes>
|
|
140
|
+
<Toaster />
|
|
137
141
|
</BrowserContextProvider>
|
|
138
142
|
</Router>
|
|
139
143
|
);
|
|
@@ -10,7 +10,7 @@ const buttonVariants = cva(
|
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default:
|
|
13
|
-
"bg-primary text-primary-foreground shadow hover:bg-primary
|
|
13
|
+
"bg-primary text-primary-foreground shadow hover:bg-primary-hover active:bg-primary-active",
|
|
14
14
|
destructive:
|
|
15
15
|
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
16
16
|
outline:
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import ThemeSettings from "@features/account/components/theme-settings";
|
|
9
9
|
|
|
10
10
|
const AppearanceSettingsTab = () => (
|
|
11
|
-
<Card>
|
|
11
|
+
<Card className="border-border/70 bg-muted/40 shadow-none">
|
|
12
12
|
<CardHeader>
|
|
13
13
|
<CardTitle>Theme</CardTitle>
|
|
14
14
|
<CardDescription>
|
|
@@ -21,7 +21,7 @@ interface ProfileGeneralTabProps {
|
|
|
21
21
|
export function ProfileGeneralTab({ user }: ProfileGeneralTabProps) {
|
|
22
22
|
return (
|
|
23
23
|
<div className="space-y-4">
|
|
24
|
-
<Card>
|
|
24
|
+
<Card className="border-border/70 bg-muted/40 shadow-none">
|
|
25
25
|
<CardHeader>
|
|
26
26
|
<CardTitle>Profile Information</CardTitle>
|
|
27
27
|
<CardDescription>
|
|
@@ -282,69 +282,65 @@ export default function WorkspaceMembers() {
|
|
|
282
282
|
</div>
|
|
283
283
|
)}
|
|
284
284
|
|
|
285
|
-
{canManage &&
|
|
286
|
-
|
|
287
|
-
<div className="
|
|
288
|
-
<
|
|
289
|
-
<h3 className="text-sm font-medium">Pending Invitations</h3>
|
|
290
|
-
</div>
|
|
291
|
-
<Table>
|
|
292
|
-
<TableHeader>
|
|
293
|
-
<TableRow>
|
|
294
|
-
<TableHead>Email</TableHead>
|
|
295
|
-
<TableHead>Role</TableHead>
|
|
296
|
-
<TableHead>Expires</TableHead>
|
|
297
|
-
<TableHead className="text-right">Actions</TableHead>
|
|
298
|
-
</TableRow>
|
|
299
|
-
</TableHeader>
|
|
300
|
-
<TableBody>
|
|
301
|
-
{invitations
|
|
302
|
-
.filter((i) => i.status === "pending")
|
|
303
|
-
.map((invitation) => {
|
|
304
|
-
const isRevoking =
|
|
305
|
-
revokingInvitationId === invitation.id;
|
|
306
|
-
const isExpired =
|
|
307
|
-
new Date(invitation.expires_at) < new Date();
|
|
308
|
-
return (
|
|
309
|
-
<TableRow
|
|
310
|
-
key={invitation.id}
|
|
311
|
-
className={isExpired ? "opacity-60" : undefined}
|
|
312
|
-
>
|
|
313
|
-
<TableCell className="text-sm">
|
|
314
|
-
{invitation.email}
|
|
315
|
-
</TableCell>
|
|
316
|
-
<TableCell className="capitalize">
|
|
317
|
-
{invitation.role}
|
|
318
|
-
</TableCell>
|
|
319
|
-
<TableCell className="text-sm text-muted-foreground">
|
|
320
|
-
{isExpired ? (
|
|
321
|
-
<span className="text-destructive">Expired</span>
|
|
322
|
-
) : (
|
|
323
|
-
new Date(
|
|
324
|
-
invitation.expires_at,
|
|
325
|
-
).toLocaleDateString()
|
|
326
|
-
)}
|
|
327
|
-
</TableCell>
|
|
328
|
-
<TableCell className="text-right">
|
|
329
|
-
<Button
|
|
330
|
-
variant="ghost"
|
|
331
|
-
size="sm"
|
|
332
|
-
className="text-destructive hover:text-destructive"
|
|
333
|
-
onClick={() =>
|
|
334
|
-
void handleRevokeInvitation(invitation.id)
|
|
335
|
-
}
|
|
336
|
-
disabled={isRevoking}
|
|
337
|
-
>
|
|
338
|
-
{isRevoking ? "Revoking..." : "Revoke"}
|
|
339
|
-
</Button>
|
|
340
|
-
</TableCell>
|
|
341
|
-
</TableRow>
|
|
342
|
-
);
|
|
343
|
-
})}
|
|
344
|
-
</TableBody>
|
|
345
|
-
</Table>
|
|
285
|
+
{canManage && invitations.some((i) => i.status === "pending") && (
|
|
286
|
+
<div className="rounded-lg border">
|
|
287
|
+
<div className="border-b px-4 py-3">
|
|
288
|
+
<h3 className="text-sm font-medium">Pending Invitations</h3>
|
|
346
289
|
</div>
|
|
347
|
-
|
|
290
|
+
<Table>
|
|
291
|
+
<TableHeader>
|
|
292
|
+
<TableRow>
|
|
293
|
+
<TableHead>Email</TableHead>
|
|
294
|
+
<TableHead>Role</TableHead>
|
|
295
|
+
<TableHead>Expires</TableHead>
|
|
296
|
+
<TableHead className="text-right">Actions</TableHead>
|
|
297
|
+
</TableRow>
|
|
298
|
+
</TableHeader>
|
|
299
|
+
<TableBody>
|
|
300
|
+
{invitations
|
|
301
|
+
.filter((i) => i.status === "pending")
|
|
302
|
+
.map((invitation) => {
|
|
303
|
+
const isRevoking = revokingInvitationId === invitation.id;
|
|
304
|
+
const isExpired =
|
|
305
|
+
new Date(invitation.expires_at) < new Date();
|
|
306
|
+
return (
|
|
307
|
+
<TableRow
|
|
308
|
+
key={invitation.id}
|
|
309
|
+
className={isExpired ? "opacity-60" : undefined}
|
|
310
|
+
>
|
|
311
|
+
<TableCell className="text-sm">
|
|
312
|
+
{invitation.email}
|
|
313
|
+
</TableCell>
|
|
314
|
+
<TableCell className="capitalize">
|
|
315
|
+
{invitation.role}
|
|
316
|
+
</TableCell>
|
|
317
|
+
<TableCell className="text-sm text-muted-foreground">
|
|
318
|
+
{isExpired ? (
|
|
319
|
+
<span className="text-destructive">Expired</span>
|
|
320
|
+
) : (
|
|
321
|
+
new Date(invitation.expires_at).toLocaleDateString()
|
|
322
|
+
)}
|
|
323
|
+
</TableCell>
|
|
324
|
+
<TableCell className="text-right">
|
|
325
|
+
<Button
|
|
326
|
+
variant="ghost"
|
|
327
|
+
size="sm"
|
|
328
|
+
className="text-destructive hover:text-destructive"
|
|
329
|
+
onClick={() =>
|
|
330
|
+
void handleRevokeInvitation(invitation.id)
|
|
331
|
+
}
|
|
332
|
+
disabled={isRevoking}
|
|
333
|
+
>
|
|
334
|
+
{isRevoking ? "Revoking..." : "Revoke"}
|
|
335
|
+
</Button>
|
|
336
|
+
</TableCell>
|
|
337
|
+
</TableRow>
|
|
338
|
+
);
|
|
339
|
+
})}
|
|
340
|
+
</TableBody>
|
|
341
|
+
</Table>
|
|
342
|
+
</div>
|
|
343
|
+
)}
|
|
348
344
|
|
|
349
345
|
{isForbidden ? null : isLoading ? (
|
|
350
346
|
<p className="text-sm text-muted-foreground">Loading members...</p>
|
|
@@ -73,7 +73,9 @@ export default function Login() {
|
|
|
73
73
|
setStage("sent");
|
|
74
74
|
} catch (err) {
|
|
75
75
|
setError(
|
|
76
|
-
err instanceof Error
|
|
76
|
+
err instanceof Error
|
|
77
|
+
? err.message
|
|
78
|
+
: "Unable to send the sign-in email.",
|
|
77
79
|
);
|
|
78
80
|
} finally {
|
|
79
81
|
setBusy(false);
|
|
@@ -103,7 +105,7 @@ export default function Login() {
|
|
|
103
105
|
};
|
|
104
106
|
|
|
105
107
|
return (
|
|
106
|
-
<div className="flex min-h-screen items-center justify-center bg-
|
|
108
|
+
<div className="flex min-h-screen items-center justify-center bg-cream dark:bg-background p-6 text-foreground">
|
|
107
109
|
<Card className="w-full max-w-md border-border bg-card text-card-foreground shadow-xl">
|
|
108
110
|
<CardHeader className="text-center">
|
|
109
111
|
<CardTitle className="text-xl">Sign in to Orcheo</CardTitle>
|
|
@@ -63,7 +63,7 @@ export default function AuthVerify() {
|
|
|
63
63
|
}, [token, redirectTo, navigate]);
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<div className="flex min-h-screen items-center justify-center bg-
|
|
66
|
+
<div className="flex min-h-screen items-center justify-center bg-cream dark:bg-background p-6 text-foreground">
|
|
67
67
|
<Card className="w-full max-w-md border-border bg-card text-card-foreground shadow-xl">
|
|
68
68
|
<CardHeader>
|
|
69
69
|
<CardTitle>Signing in</CardTitle>
|
|
@@ -42,7 +42,7 @@ export class PublicChatErrorBoundary extends Component<
|
|
|
42
42
|
public override render(): ReactNode {
|
|
43
43
|
if (this.state.hasError) {
|
|
44
44
|
return (
|
|
45
|
-
<Alert className="rounded-3xl border-
|
|
45
|
+
<Alert className="rounded-3xl border-destructive/40 bg-destructive-muted p-6 text-destructive-muted-foreground">
|
|
46
46
|
<AlertTitle>Something went wrong</AlertTitle>
|
|
47
47
|
<AlertDescription>
|
|
48
48
|
{this.state.errorMessage ||
|
|
@@ -220,9 +220,8 @@ export function PublicChatWidget({
|
|
|
220
220
|
<div
|
|
221
221
|
className={cn(
|
|
222
222
|
"relative h-full w-full overflow-hidden rounded-3xl",
|
|
223
|
-
"border border-
|
|
224
|
-
"shadow-[0_25px_80px_rgba(
|
|
225
|
-
"dark:border-slate-800/70 dark:bg-slate-900",
|
|
223
|
+
"border border-border/70 bg-card",
|
|
224
|
+
"shadow-[0_25px_80px_rgba(40,30,16,0.12)]",
|
|
226
225
|
)}
|
|
227
226
|
>
|
|
228
227
|
<ChatKitSurface options={options} />
|
|
@@ -6,13 +6,14 @@ export const buildChatTheme = (
|
|
|
6
6
|
): NonNullable<UseChatKitOptions["theme"]> => ({
|
|
7
7
|
colorScheme: scheme,
|
|
8
8
|
color: {
|
|
9
|
+
// Warm ink grayscale + Orcheo orange accent (orcheo-design-system tokens).
|
|
9
10
|
grayscale: {
|
|
10
|
-
hue:
|
|
11
|
+
hue: 42,
|
|
11
12
|
tint: 6,
|
|
12
13
|
shade: scheme === "dark" ? -1 : -4,
|
|
13
14
|
},
|
|
14
15
|
accent: {
|
|
15
|
-
primary:
|
|
16
|
+
primary: "#f87825",
|
|
16
17
|
level: 1,
|
|
17
18
|
},
|
|
18
19
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PublicChatHttpError } from "@features/chatkit/lib/chatkit-client";
|
|
2
|
+
|
|
3
|
+
export const getPublicChatAccessErrorMessage = (
|
|
4
|
+
error: Pick<PublicChatHttpError, "status" | "code">,
|
|
5
|
+
): string => {
|
|
6
|
+
if (error.code === "chatkit.auth.workspace_mismatch") {
|
|
7
|
+
return "Your account is signed in, but it is not a member of this workflow workspace. Switch workspaces or ask the owner to add you.";
|
|
8
|
+
}
|
|
9
|
+
if (error.status === 403) {
|
|
10
|
+
return "You do not have permission to use this workflow. Ask the owner to confirm your workspace access.";
|
|
11
|
+
}
|
|
12
|
+
return "You do not have access to this workflow yet. Ask the owner to confirm it is still published.";
|
|
13
|
+
};
|
|
@@ -19,6 +19,7 @@ import type { PublicWorkflowMetadata } from "@features/workflow/lib/workflow-sto
|
|
|
19
19
|
import { PublicChatWidget } from "@features/chatkit/components/public-chat-widget";
|
|
20
20
|
import { PublicChatErrorBoundary } from "@features/chatkit/components/public-chat-error-boundary";
|
|
21
21
|
import type { PublicChatHttpError } from "@features/chatkit/lib/chatkit-client";
|
|
22
|
+
import { getPublicChatAccessErrorMessage } from "@features/chatkit/lib/public-chat-access";
|
|
22
23
|
|
|
23
24
|
type ColorScheme = "light" | "dark";
|
|
24
25
|
|
|
@@ -27,18 +28,6 @@ type WorkflowState =
|
|
|
27
28
|
| { status: "error"; message: string }
|
|
28
29
|
| { status: "ready"; workflow: PublicWorkflowMetadata };
|
|
29
30
|
|
|
30
|
-
export const getPublicChatAccessErrorMessage = (
|
|
31
|
-
error: Pick<PublicChatHttpError, "status" | "code">,
|
|
32
|
-
): string => {
|
|
33
|
-
if (error.code === "chatkit.auth.workspace_mismatch") {
|
|
34
|
-
return "Your account is signed in, but it is not a member of this workflow workspace. Switch workspaces or ask the owner to add you.";
|
|
35
|
-
}
|
|
36
|
-
if (error.status === 403) {
|
|
37
|
-
return "You do not have permission to use this workflow. Ask the owner to confirm your workspace access.";
|
|
38
|
-
}
|
|
39
|
-
return "You do not have access to this workflow yet. Ask the owner to confirm it is still published.";
|
|
40
|
-
};
|
|
41
|
-
|
|
42
31
|
const sanitizeWorkflowNameForEmail = (value: string): string =>
|
|
43
32
|
value
|
|
44
33
|
.replace(/[\r\n]+/g, " ")
|
|
@@ -236,9 +225,9 @@ export default function PublicChatPage() {
|
|
|
236
225
|
|
|
237
226
|
if (workflowState.status === "error") {
|
|
238
227
|
return (
|
|
239
|
-
<div className="rounded-3xl border border-
|
|
228
|
+
<div className="rounded-3xl border border-border/80 bg-card/70 p-6 text-foreground shadow-sm">
|
|
240
229
|
<p className="text-lg font-semibold">Chat unavailable</p>
|
|
241
|
-
<p className="mt-2 text-sm text-
|
|
230
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
242
231
|
We cannot open a ChatKit session until the workflow loads.
|
|
243
232
|
</p>
|
|
244
233
|
<Button asChild variant="secondary" className="mt-4">
|
|
@@ -251,7 +240,7 @@ export default function PublicChatPage() {
|
|
|
251
240
|
return (
|
|
252
241
|
<div className="space-y-4">
|
|
253
242
|
{rateLimitError && (
|
|
254
|
-
<Alert className="border-
|
|
243
|
+
<Alert className="border-warning/50 bg-warning-muted text-warning-muted-foreground">
|
|
255
244
|
<AlertTitle>Slow down for a moment</AlertTitle>
|
|
256
245
|
<AlertDescription>
|
|
257
246
|
{rateLimitError.message ||
|
|
@@ -261,7 +250,7 @@ export default function PublicChatPage() {
|
|
|
261
250
|
<Button
|
|
262
251
|
size="sm"
|
|
263
252
|
variant="outline"
|
|
264
|
-
className="border-
|
|
253
|
+
className="border-warning/60 text-warning-muted-foreground"
|
|
265
254
|
onClick={() => setRateLimitError(null)}
|
|
266
255
|
>
|
|
267
256
|
Dismiss
|
|
@@ -271,8 +260,10 @@ export default function PublicChatPage() {
|
|
|
271
260
|
)}
|
|
272
261
|
|
|
273
262
|
{chatError ? (
|
|
274
|
-
<div className="space-y-4 rounded-3xl border border-
|
|
275
|
-
<p className="font-medium text-
|
|
263
|
+
<div className="space-y-4 rounded-3xl border border-destructive/40 bg-destructive-muted p-6 text-center">
|
|
264
|
+
<p className="font-medium text-destructive-muted-foreground">
|
|
265
|
+
{chatError.message}
|
|
266
|
+
</p>
|
|
276
267
|
<div className="flex flex-wrap justify-center gap-3">
|
|
277
268
|
<Button asChild variant="outline">
|
|
278
269
|
<a href={contactHref}>Contact owner</a>
|
|
@@ -282,7 +273,7 @@ export default function PublicChatPage() {
|
|
|
282
273
|
) : (
|
|
283
274
|
<div className="relative min-h-[520px]">
|
|
284
275
|
{!isChatReady && (
|
|
285
|
-
<div className="absolute inset-0 flex flex-col gap-4 rounded-3xl bg-
|
|
276
|
+
<div className="absolute inset-0 flex flex-col gap-4 rounded-3xl bg-background/90 p-6 shadow-sm">
|
|
286
277
|
<Skeleton className="h-10 w-1/2 self-center" />
|
|
287
278
|
<Skeleton className="h-full w-full" />
|
|
288
279
|
</div>
|
|
@@ -324,21 +315,21 @@ export default function PublicChatPage() {
|
|
|
324
315
|
<div className="space-y-6">
|
|
325
316
|
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
326
317
|
<div className="space-y-2">
|
|
327
|
-
<p className="text-3xl font-semibold text-
|
|
318
|
+
<p className="text-3xl font-semibold text-foreground">
|
|
328
319
|
Chat with “{currentWorkflowName}”
|
|
329
320
|
</p>
|
|
330
|
-
<p className="text-base text-
|
|
321
|
+
<p className="text-base text-muted-foreground">
|
|
331
322
|
Chat sessions open automatically for published workflows unless
|
|
332
323
|
the owner requires OAuth login.
|
|
333
324
|
</p>
|
|
334
325
|
{workflowState.status === "ready" && (
|
|
335
|
-
<div className="flex flex-wrap gap-2 text-xs text-
|
|
326
|
+
<div className="flex flex-wrap gap-2 text-xs text-muted-foreground">
|
|
336
327
|
{workflowState.workflow.handle && (
|
|
337
|
-
<code className="rounded bg-
|
|
328
|
+
<code className="rounded bg-muted px-2 py-1">
|
|
338
329
|
handle: {workflowState.workflow.handle}
|
|
339
330
|
</code>
|
|
340
331
|
)}
|
|
341
|
-
<code className="rounded bg-
|
|
332
|
+
<code className="rounded bg-muted px-2 py-1">
|
|
342
333
|
id: {workflowState.workflow.id}
|
|
343
334
|
</code>
|
|
344
335
|
</div>
|
|
@@ -353,7 +344,7 @@ export default function PublicChatPage() {
|
|
|
353
344
|
|
|
354
345
|
return (
|
|
355
346
|
<PublicChatErrorBoundary onReset={handleErrorBoundaryReset}>
|
|
356
|
-
<div className="h-screen overflow-hidden bg-
|
|
347
|
+
<div className="h-screen overflow-hidden bg-background text-foreground">
|
|
357
348
|
<div className="mx-auto flex h-full max-w-6xl flex-col px-4 py-6 lg:py-8">
|
|
358
349
|
<div className="flex flex-1 items-center justify-center">
|
|
359
350
|
<div className="w-full max-w-3xl">{renderChatColumn()}</div>
|
|
@@ -414,7 +405,7 @@ function ThemeToggleButtonGroup({
|
|
|
414
405
|
onValueChange={handleThemeChange}
|
|
415
406
|
aria-label="Select display theme"
|
|
416
407
|
className={cn(
|
|
417
|
-
"rounded-full border border-
|
|
408
|
+
"rounded-full border border-border bg-card/90 px-1 py-1 shadow-[inset_0_-1px_4px_rgba(40,30,16,0.12)] backdrop-blur-sm dark:bg-background/70",
|
|
418
409
|
className,
|
|
419
410
|
)}
|
|
420
411
|
variant="default"
|
|
@@ -425,7 +416,7 @@ function ThemeToggleButtonGroup({
|
|
|
425
416
|
key={option.value}
|
|
426
417
|
value={option.value}
|
|
427
418
|
aria-label={`Use ${option.label.toLowerCase()} theme`}
|
|
428
|
-
className="h-9 w-9 rounded-full border border-transparent p-0 text-
|
|
419
|
+
className="h-9 w-9 rounded-full border border-transparent p-0 text-muted-foreground transition-all hover:bg-transparent hover:text-foreground data-[state=on]:border-primary/20 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=on]:shadow-[0_4px_12px_rgba(248,120,37,0.3)]"
|
|
429
420
|
>
|
|
430
421
|
{option.icon}
|
|
431
422
|
<span className="sr-only">{option.label}</span>
|
|
@@ -27,11 +27,7 @@ export interface ChatInterfaceProps {
|
|
|
27
27
|
isMinimizable?: boolean;
|
|
28
28
|
isClosable?: boolean;
|
|
29
29
|
position?:
|
|
30
|
-
| "bottom-right"
|
|
31
|
-
| "bottom-left"
|
|
32
|
-
| "top-right"
|
|
33
|
-
| "top-left"
|
|
34
|
-
| "center";
|
|
30
|
+
"bottom-right" | "bottom-left" | "top-right" | "top-left" | "center";
|
|
35
31
|
triggerButton?: React.ReactNode;
|
|
36
32
|
user: ChatParticipant;
|
|
37
33
|
ai: ChatParticipant;
|
|
@@ -42,7 +42,7 @@ export default function StudioBrand() {
|
|
|
42
42
|
>
|
|
43
43
|
<Badge
|
|
44
44
|
variant="outline"
|
|
45
|
-
className="border-
|
|
45
|
+
className="border-warning/40 bg-warning/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.2em] text-warning-muted-foreground shadow-none"
|
|
46
46
|
>
|
|
47
47
|
Beta
|
|
48
48
|
</Badge>
|