@prefecthq/prefab-ui 0.19.2 → 0.20.1
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/dist/app/{_baseUniq-BHlgyaoi.js → _baseUniq-BaR7L3VQ.js} +1 -1
- package/dist/app/app-DCQ8NMoB.js +61 -0
- package/dist/app/{architectureDiagram-2XIMDMQ5-D2SrEBM2.js → architectureDiagram-2XIMDMQ5-C182oGV6.js} +1 -1
- package/dist/app/{blockDiagram-WCTKOSBZ-B8Z_Ltro.js → blockDiagram-WCTKOSBZ-Onxp8QEy.js} +1 -1
- package/dist/app/{bundle-CW9DqwGK.js → bundle-DNvyPu0y.js} +179 -47
- package/dist/app/{c4Diagram-IC4MRINW-Cg3ITwB8.js → c4Diagram-IC4MRINW-CWWNrFhw.js} +1 -1
- package/dist/app/channel-DCCBGJ5F.js +1 -0
- package/dist/app/{charts-vQRKX19o.js → charts-mdsKtCbG.js} +41 -41
- package/dist/app/{chunk-4BX2VUAB-B1xMZLtX.js → chunk-4BX2VUAB-DyGULS9O.js} +1 -1
- package/dist/app/{chunk-55IACEB6-Dybri14v.js → chunk-55IACEB6-BkZobGVm.js} +1 -1
- package/dist/app/{chunk-FMBD7UC4-wpB0w2u-.js → chunk-FMBD7UC4-wZvI77Sa.js} +1 -1
- package/dist/app/{chunk-JSJVCQXG-DUdvv_KV.js → chunk-JSJVCQXG-jdtMiwMf.js} +1 -1
- package/dist/app/{chunk-KX2RTZJC-B2GIR0DF.js → chunk-KX2RTZJC-a_PbWEu8.js} +1 -1
- package/dist/app/{chunk-NQ4KR5QH-CNDsKiDi.js → chunk-NQ4KR5QH-DQxC4Zpe.js} +1 -1
- package/dist/app/{chunk-QZHKN3VN-BrAOGwbS.js → chunk-QZHKN3VN-DIxYjo1b.js} +1 -1
- package/dist/app/{chunk-WL4C6EOR-hFbvGfN_.js → chunk-WL4C6EOR-DwzPj8K4.js} +1 -1
- package/dist/app/classDiagram-VBA2DB6C-BYnmQqtm.js +1 -0
- package/dist/app/classDiagram-v2-RAHNMMFH-BYnmQqtm.js +1 -0
- package/dist/app/clone-C46Geeg6.js +1 -0
- package/dist/app/{cose-bilkent-S5V4N54A-BHQfPpAj.js → cose-bilkent-S5V4N54A-Vodg29r5.js} +1 -1
- package/dist/app/{dagre-KLK3FWXG-BlILasVe.js → dagre-KLK3FWXG-ByIsUIEW.js} +1 -1
- package/dist/app/{diagram-E7M64L7V-D5-LYl_l.js → diagram-E7M64L7V-B90RHT8C.js} +1 -1
- package/dist/app/{diagram-IFDJBPK2-DZUFN8iH.js → diagram-IFDJBPK2-DCC_ANQ3.js} +1 -1
- package/dist/app/{diagram-P4PSJMXO-n7A_7fnQ.js → diagram-P4PSJMXO-czAOmsot.js} +1 -1
- package/dist/app/{erDiagram-INFDFZHY-Dxa-maDR.js → erDiagram-INFDFZHY-CV_ByKOr.js} +1 -1
- package/dist/app/{flowDiagram-PKNHOUZH-D0qT3gXs.js → flowDiagram-PKNHOUZH-JyCi4Jaw.js} +1 -1
- package/dist/app/{ganttDiagram-A5KZAMGK-BcKD86Gg.js → ganttDiagram-A5KZAMGK-SvAqxlBT.js} +1 -1
- package/dist/app/{gitGraphDiagram-K3NZZRJ6-BSy3d6QY.js → gitGraphDiagram-K3NZZRJ6-CKR91HOu.js} +1 -1
- package/dist/app/{graph-BdAWYzJh.js → graph-CYNeNgKt.js} +1 -1
- package/dist/app/{icons-barrel-BsWue30w.js → icons-barrel-sH7tI5Au.js} +90 -90
- package/dist/app/{infoDiagram-LFFYTUFH-B7DQ_FAU.js → infoDiagram-LFFYTUFH-CpWLlyOJ.js} +1 -1
- package/dist/app/{ishikawaDiagram-PHBUUO56-D4-I6S8S.js → ishikawaDiagram-PHBUUO56-CvPLoIeY.js} +1 -1
- package/dist/app/{journeyDiagram-4ABVD52K-CdHqMpXH.js → journeyDiagram-4ABVD52K-DM99Fbm6.js} +1 -1
- package/dist/app/{kanban-definition-K7BYSVSG-DcmfHWcA.js → kanban-definition-K7BYSVSG-BlFWG4G2.js} +1 -1
- package/dist/app/{layout-Bes3UwVt.js → layout-DKZyRq64.js} +1 -1
- package/dist/app/{mermaid-DPg_vyar.js → mermaid-D36PoJAH.js} +2 -2
- package/dist/app/{mermaid.core-bNRKpJH0.js → mermaid.core-DJBXpCSw.js} +3 -3
- package/dist/app/{min-C-AlOD15.js → min-BnvAT8JL.js} +1 -1
- package/dist/app/{mindmap-definition-YRQLILUH-CDqlVVzc.js → mindmap-definition-YRQLILUH-BOSCxM0z.js} +1 -1
- package/dist/app/{pieDiagram-SKSYHLDU-DROb_p9B.js → pieDiagram-SKSYHLDU-Ci9XYcut.js} +1 -1
- package/dist/app/{quadrantDiagram-337W2JSQ-DYvI8_wt.js → quadrantDiagram-337W2JSQ-DvcJIYcF.js} +1 -1
- package/dist/app/renderer.css +1 -1
- package/dist/app/renderer.js +89 -79
- package/dist/app/{requirementDiagram-Z7DCOOCP-wEmp-0FP.js → requirementDiagram-Z7DCOOCP-wUb6_8T7.js} +1 -1
- package/dist/app/{sankeyDiagram-WA2Y5GQK-BnXRy6uk.js → sankeyDiagram-WA2Y5GQK-D2YrEWIB.js} +1 -1
- package/dist/app/{sequenceDiagram-2WXFIKYE-Dwo_UUGe.js → sequenceDiagram-2WXFIKYE-8zIp-2GX.js} +1 -1
- package/dist/app/{stateDiagram-RAJIS63D-DLl70nqM.js → stateDiagram-RAJIS63D-WFTiTf20.js} +1 -1
- package/dist/app/{stateDiagram-v2-FVOUBMTO-CdRDRbnc.js → stateDiagram-v2-FVOUBMTO-C6_3iem9.js} +1 -1
- package/dist/app/{timeline-definition-YZTLITO2-hBaNPeZQ.js → timeline-definition-YZTLITO2-Fsj9mulm.js} +1 -1
- package/dist/app/{treemap-KZPCXAKY-Ch6yFIsU.js → treemap-KZPCXAKY-CAkU2XYd.js} +1 -1
- package/dist/app/{vennDiagram-LZ73GAT5-Bl4dCPug.js → vennDiagram-LZ73GAT5-BcurNkbG.js} +1 -1
- package/dist/app/{xychartDiagram-JWTSCODW-QY1cKLWE.js → xychartDiagram-JWTSCODW-DPifccGl.js} +1 -1
- package/package.json +1 -1
- package/dist/app/app-DWWmwIek.js +0 -72
- package/dist/app/channel-BhddhB3X.js +0 -1
- package/dist/app/classDiagram-VBA2DB6C-D6qE_fms.js +0 -1
- package/dist/app/classDiagram-v2-RAHNMMFH-D6qE_fms.js +0 -1
- package/dist/app/clone-CwW_8LM5.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as he}from"./chunk-FMBD7UC4-
|
|
1
|
+
import{g as he}from"./chunk-FMBD7UC4-wZvI77Sa.js";import{_ as d,F as lt,d as C,e as ge,l as v,y as de,A as ue,a3 as pe,c as M,O as fe,a4 as Y,a5 as vt,a6 as at,a7 as xe,u as st,k as ye,a8 as be,i as Bt,a9 as Ct,aa as we}from"./mermaid.core-DJBXpCSw.js";import{c as me}from"./clone-C46Geeg6.js";import{G as Le}from"./graph-CYNeNgKt.js";import{c as Se}from"./channel-DCCBGJ5F.js";import{l as ve,c as Ee}from"./string-Bl2zznvy.js";import"./renderer.js";import"./purify.es-DKgZpLtg.js";import"./_baseUniq-BaR7L3VQ.js";var bt=(function(){var e=d(function(N,y,u,p){for(u=u||{},p=N.length;p--;u[N[p]]=y);return u},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],x=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],L={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(y,u,p,S,E,o,_){var g=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[g-1]),S.setHierarchy(o[g-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[g]),typeof o[g].length=="number"?this.$=o[g]:this.$=[o[g]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[g-1]),this.$=[o[g-1]].concat(o[g]);break;case 14:S.getLogger().debug("Rule: link: ",o[g],y),this.$={edgeTypeStr:o[g],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[g-3],o[g-1],o[g]),this.$={edgeTypeStr:o[g],label:o[g-1]};break;case 18:const D=parseInt(o[g]),T=S.generateId();this.$={id:T,type:"space",label:"",width:D,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[g-2],o[g-1],o[g]," typestr: ",o[g-1].edgeTypeStr);const K=S.edgeStrToEdgeData(o[g-1].edgeTypeStr);this.$=[{id:o[g-2].id,label:o[g-2].label,type:o[g-2].type,directions:o[g-2].directions},{id:o[g-2].id+"-"+o[g].id,start:o[g-2].id,end:o[g].id,label:o[g-1].label,type:"edge",directions:o[g].directions,arrowTypeEnd:K,arrowTypeStart:"arrow_open"},{id:o[g].id,label:o[g].label,type:S.typeStr2Type(o[g].typeStr),directions:o[g].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[g-1],o[g]),this.$={id:o[g-1].id,label:o[g-1].label,type:S.typeStr2Type(o[g-1].typeStr),directions:o[g-1].directions,widthInColumns:parseInt(o[g],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[g]),this.$={id:o[g].id,label:o[g].label,type:S.typeStr2Type(o[g].typeStr),directions:o[g].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[g]),this.$={type:"column-setting",columns:o[g]==="auto"?-1:parseInt(o[g])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[g-2],o[g-1]),S.generateId(),this.$={...o[g-2],type:"composite",children:o[g-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[g-2],o[g-1],o[g]);const P=S.generateId();this.$={id:P,type:"composite",label:"",children:o[g-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[g]),this.$={id:o[g]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[g-1],o[g]),this.$={id:o[g-1],label:o[g].label,typeStr:o[g].typeStr,directions:o[g].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[g]),this.$=[o[g]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[g-1],o[g]),this.$=[o[g-1]].concat(o[g]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[g-2],o[g-1],o[g]),this.$={typeStr:o[g-2]+o[g],label:o[g-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[g-3],o[g-2]," #3:",o[g-1],o[g]),this.$={typeStr:o[g-3]+o[g],label:o[g-2],directions:o[g-1]};break;case 35:case 36:this.$={type:"classDef",id:o[g-1].trim(),css:o[g].trim()};break;case 37:this.$={type:"applyClass",id:o[g-1].trim(),styleClass:o[g].trim()};break;case 38:this.$={type:"applyStyles",id:o[g-1].trim(),stylesStr:o[g].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(x,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(h,[2,16],{14:22,15:f,16:w}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(b,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(x,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(h,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,u){if(u.recoverable)this.trace(y);else{var p=new Error(y);throw p.hash=u,p}},"parseError"),parse:d(function(y){var u=this,p=[0],S=[],E=[null],o=[],_=this.table,g="",D=0,T=0,K=2,P=1,Q=o.slice.call(arguments,1),R=Object.create(this.lexer),U={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(U.yy[et]=this.yy[et]);R.setInput(y,U.yy),U.yy.lexer=R,U.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var rt=R.yylloc;o.push(rt);var ce=R.options&&R.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(X){p.length=p.length-2*X,E.length=E.length-X,o.length=o.length-X}d(oe,"popStack");function Nt(){var X;return X=S.pop()||R.lex()||P,typeof X!="number"&&(X instanceof Array&&(S=X,X=S.pop()),X=u.symbols_[X]||X),X}d(Nt,"lex");for(var H,$,V,ft,tt={},ct,J,It,ot;;){if($=p[p.length-1],this.defaultActions[$]?V=this.defaultActions[$]:((H===null||typeof H>"u")&&(H=Nt()),V=_[$]&&_[$][H]),typeof V>"u"||!V.length||!V[0]){var xt="";ot=[];for(ct in _[$])this.terminals_[ct]&&ct>K&&ot.push("'"+this.terminals_[ct]+"'");R.showPosition?xt="Parse error on line "+(D+1)+`:
|
|
2
2
|
`+R.showPosition()+`
|
|
3
3
|
Expecting `+ot.join(", ")+", got '"+(this.terminals_[H]||H)+"'":xt="Parse error on line "+(D+1)+": Unexpected "+(H==P?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(xt,{text:R.match,token:this.terminals_[H]||H,line:R.yylineno,loc:rt,expected:ot})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+H);switch(V[0]){case 1:p.push(H),E.push(R.yytext),o.push(R.yylloc),p.push(V[1]),H=null,T=R.yyleng,g=R.yytext,D=R.yylineno,rt=R.yylloc;break;case 2:if(J=this.productions_[V[1]][1],tt.$=E[E.length-J],tt._$={first_line:o[o.length-(J||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(J||1)].first_column,last_column:o[o.length-1].last_column},ce&&(tt._$.range=[o[o.length-(J||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(tt,[g,T,D,U.yy,V[1],E,o].concat(Q)),typeof ft<"u")return ft;J&&(p=p.slice(0,-1*J*2),E=E.slice(0,-1*J),o=o.slice(0,-1*J)),p.push(this.productions_[V[1]][0]),E.push(tt.$),o.push(tt._$),It=_[p[p.length-2]][p[p.length-1]],p.push(It);break;case 3:return!0}}return!0},"parse")},B=(function(){var N={EOF:1,parseError:d(function(u,p){if(this.yy.parser)this.yy.parser.parseError(u,p);else throw new Error(u)},"parseError"),setInput:d(function(y,u){return this.yy=u||this.yy||{},this._input=y,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:d(function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var u=y.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),y},"input"),unput:d(function(y){var u=y.length,p=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var S=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),p.length-1&&(this.yylineno-=p.length-1);var E=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:p?(p.length===S.length?this.yylloc.first_column:0)+S[S.length-p.length].length-p[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(y){this.unput(this.match.slice(y))},"less"),pastInput:d(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var y=this.pastInput(),u=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
|
|
@@ -66,7 +66,7 @@ import dataclasses
|
|
|
66
66
|
import json
|
|
67
67
|
from collections.abc import Callable
|
|
68
68
|
from contextvars import ContextVar
|
|
69
|
-
from typing import Any
|
|
69
|
+
from typing import Any, Literal
|
|
70
70
|
|
|
71
71
|
import pydantic_core
|
|
72
72
|
from pydantic import BaseModel, Field, PrivateAttr, model_validator
|
|
@@ -80,7 +80,7 @@ from prefab_ui.renderer import (
|
|
|
80
80
|
from prefab_ui.rx import _sanitize_floats
|
|
81
81
|
from prefab_ui.themes import Theme
|
|
82
82
|
|
|
83
|
-
PROTOCOL_VERSION = "0.
|
|
83
|
+
PROTOCOL_VERSION = "0.3"
|
|
84
84
|
|
|
85
85
|
# ── Tool Resolver ─────────────────────────────────────────────────────
|
|
86
86
|
|
|
@@ -130,6 +130,37 @@ def _serialize_state(state: dict[str, Any]) -> dict[str, Any]:
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
|
|
133
|
+
def _theme_from_dict(theme: dict[str, Any]) -> Theme:
|
|
134
|
+
mode = theme.get("mode")
|
|
135
|
+
data: dict[str, Any] = {
|
|
136
|
+
"light_css": theme["light"] if "light" in theme else theme.get("light_css", ""),
|
|
137
|
+
"dark_css": theme["dark"] if "dark" in theme else theme.get("dark_css"),
|
|
138
|
+
"css": theme.get("css", ""),
|
|
139
|
+
"mode": _normalize_mode(mode),
|
|
140
|
+
}
|
|
141
|
+
return Theme.model_validate(data)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _normalize_mode(value: Any) -> Literal["light", "dark"] | None:
|
|
145
|
+
return value if value in ("light", "dark") else None
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def _theme_css(theme: Theme | dict[str, Any] | None) -> str | None:
|
|
149
|
+
if theme is None:
|
|
150
|
+
return None
|
|
151
|
+
return (
|
|
152
|
+
_theme_from_dict(theme).to_css() if isinstance(theme, dict) else theme.to_css()
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def _theme_mode(
|
|
157
|
+
theme: Theme | dict[str, Any] | None,
|
|
158
|
+
) -> Literal["light", "dark"] | None:
|
|
159
|
+
if theme is None:
|
|
160
|
+
return None
|
|
161
|
+
return _theme_from_dict(theme).mode if isinstance(theme, dict) else theme.mode
|
|
162
|
+
|
|
163
|
+
|
|
133
164
|
class PrefabApp(BaseModel):
|
|
134
165
|
"""A complete Prefab application.
|
|
135
166
|
|
|
@@ -162,7 +193,15 @@ class PrefabApp(BaseModel):
|
|
|
162
193
|
)
|
|
163
194
|
stylesheets: list[str] | None = Field(
|
|
164
195
|
default=None,
|
|
165
|
-
description="CSS URLs
|
|
196
|
+
description="External CSS URLs to load as <link> stylesheets",
|
|
197
|
+
)
|
|
198
|
+
css: list[str] | None = Field(
|
|
199
|
+
default=None,
|
|
200
|
+
description="Inline CSS strings to inject as <style> blocks",
|
|
201
|
+
)
|
|
202
|
+
mode: Literal["light", "dark"] | None = Field(
|
|
203
|
+
default=None,
|
|
204
|
+
description="Force light or dark mode in the renderer",
|
|
166
205
|
)
|
|
167
206
|
scripts: list[str] | None = Field(
|
|
168
207
|
default=None,
|
|
@@ -239,6 +278,9 @@ class PrefabApp(BaseModel):
|
|
|
239
278
|
state: dict[str, Any] | None = None,
|
|
240
279
|
defs: list[Any] | dict[str, Any] | None = None,
|
|
241
280
|
theme: Theme | dict[str, Any] | None = None,
|
|
281
|
+
css: list[str] | None = None,
|
|
282
|
+
stylesheets: list[str] | None = None,
|
|
283
|
+
mode: Literal["light", "dark"] | None = None,
|
|
242
284
|
) -> PrefabApp:
|
|
243
285
|
"""Create a PrefabApp from a wire protocol dict.
|
|
244
286
|
|
|
@@ -254,6 +296,11 @@ class PrefabApp(BaseModel):
|
|
|
254
296
|
state=state if state is not None else wire.get("state"),
|
|
255
297
|
defs=defs if defs is not None else wire.get("defs"),
|
|
256
298
|
theme=theme if theme is not None else wire.get("theme"),
|
|
299
|
+
css=css if css is not None else wire.get("css"),
|
|
300
|
+
stylesheets=(
|
|
301
|
+
stylesheets if stylesheets is not None else wire.get("stylesheets")
|
|
302
|
+
),
|
|
303
|
+
mode=mode if mode is not None else _normalize_mode(wire.get("mode")),
|
|
257
304
|
)
|
|
258
305
|
|
|
259
306
|
def _wrap_view(self) -> dict[str, Any] | None:
|
|
@@ -342,11 +389,31 @@ class PrefabApp(BaseModel):
|
|
|
342
389
|
if self.state is not None:
|
|
343
390
|
result["state"] = _serialize_state(self.state)
|
|
344
391
|
|
|
392
|
+
css_parts: list[str] = []
|
|
345
393
|
if self.theme is not None:
|
|
346
394
|
if isinstance(self.theme, dict):
|
|
347
|
-
|
|
395
|
+
# Pre-compiled dict — emit mode separately, rest as css
|
|
396
|
+
theme_obj = _theme_from_dict(self.theme)
|
|
397
|
+
css_parts.append(theme_obj.to_css())
|
|
398
|
+
if theme_obj.mode is not None:
|
|
399
|
+
result["mode"] = theme_obj.mode
|
|
348
400
|
else:
|
|
349
|
-
|
|
401
|
+
css_parts.append(self.theme.to_css())
|
|
402
|
+
if self.theme.mode is not None:
|
|
403
|
+
result["mode"] = self.theme.mode
|
|
404
|
+
|
|
405
|
+
if self.css:
|
|
406
|
+
css_parts.extend(self.css)
|
|
407
|
+
|
|
408
|
+
css_parts = [s for s in css_parts if s.strip()]
|
|
409
|
+
if css_parts:
|
|
410
|
+
result["css"] = css_parts
|
|
411
|
+
|
|
412
|
+
if self.mode is not None:
|
|
413
|
+
result["mode"] = self.mode
|
|
414
|
+
|
|
415
|
+
if self.stylesheets:
|
|
416
|
+
result["stylesheets"] = list(self.stylesheets)
|
|
350
417
|
|
|
351
418
|
if self.key_bindings:
|
|
352
419
|
from prefab_ui.actions import Action
|
|
@@ -397,12 +464,23 @@ class PrefabApp(BaseModel):
|
|
|
397
464
|
"""
|
|
398
465
|
head_parts = [get_renderer_head(mode=renderer_mode, cdn_version=cdn_version)]
|
|
399
466
|
|
|
467
|
+
theme_css = _theme_css(self.theme)
|
|
468
|
+
if theme_css:
|
|
469
|
+
head_parts.append(f" <style>{theme_css}</style>")
|
|
470
|
+
|
|
471
|
+
mode_val = self.mode if self.mode is not None else _theme_mode(self.theme)
|
|
472
|
+
if mode_val:
|
|
473
|
+
head_parts.append(
|
|
474
|
+
f' <script>document.documentElement.classList.toggle("dark",{json.dumps(mode_val == "dark")});<\/script>'
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
if self.css:
|
|
478
|
+
for entry in self.css:
|
|
479
|
+
head_parts.append(f" <style>{entry}</style>")
|
|
480
|
+
|
|
400
481
|
if self.stylesheets:
|
|
401
|
-
for
|
|
402
|
-
|
|
403
|
-
head_parts.append(f" <style>{entry}</style>")
|
|
404
|
-
else:
|
|
405
|
-
head_parts.append(f' <link rel="stylesheet" href="{entry}">')
|
|
482
|
+
for url in self.stylesheets:
|
|
483
|
+
head_parts.append(f' <link rel="stylesheet" href="{url}">')
|
|
406
484
|
|
|
407
485
|
if self.scripts:
|
|
408
486
|
for url in self.scripts:
|
|
@@ -425,16 +503,16 @@ class PrefabApp(BaseModel):
|
|
|
425
503
|
f" <script>\\nwindow.__prefab_handlers = {{\\n{obj}\\n}};\\n <\/script>"
|
|
426
504
|
)
|
|
427
505
|
|
|
506
|
+
# Strip css/stylesheets/mode from embedded JSON — they're already in <head>
|
|
507
|
+
wire = self.to_json(tool_resolver=tool_resolver)
|
|
508
|
+
wire.pop("css", None)
|
|
509
|
+
wire.pop("stylesheets", None)
|
|
510
|
+
wire.pop("mode", None)
|
|
511
|
+
|
|
428
512
|
if pretty:
|
|
429
|
-
data_json = json.dumps(
|
|
430
|
-
self.to_json(tool_resolver=tool_resolver),
|
|
431
|
-
indent=2,
|
|
432
|
-
)
|
|
513
|
+
data_json = json.dumps(wire, indent=2)
|
|
433
514
|
else:
|
|
434
|
-
data_json = json.dumps(
|
|
435
|
-
self.to_json(tool_resolver=tool_resolver),
|
|
436
|
-
separators=(",", ":"),
|
|
437
|
-
)
|
|
515
|
+
data_json = json.dumps(wire, separators=(",", ":"))
|
|
438
516
|
# Escape </ to prevent premature closing of the script tag
|
|
439
517
|
safe_json = data_json.replace("</", r"<\\/")
|
|
440
518
|
|
|
@@ -463,10 +541,8 @@ class PrefabApp(BaseModel):
|
|
|
463
541
|
result["connect_domains"] = list(self.connect_domains)
|
|
464
542
|
|
|
465
543
|
if self.stylesheets:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
origins = sorted({_get_origin(url) for url in urls})
|
|
469
|
-
result["style_domains"] = origins
|
|
544
|
+
origins = sorted({_get_origin(url) for url in self.stylesheets})
|
|
545
|
+
result["style_domains"] = origins
|
|
470
546
|
|
|
471
547
|
if self.scripts:
|
|
472
548
|
origins = sorted({_get_origin(url) for url in self.scripts})
|
|
@@ -2186,13 +2262,13 @@ class Component(BaseModel):
|
|
|
2186
2262
|
|
|
2187
2263
|
css_class: Annotated[str | None, BeforeValidator(_coerce_css_class)] = Field(
|
|
2188
2264
|
default=None,
|
|
2189
|
-
|
|
2265
|
+
serialization_alias="cssClass",
|
|
2190
2266
|
description="CSS/Tailwind classes for styling. Accepts a Responsive() for breakpoint-aware classes.",
|
|
2191
2267
|
)
|
|
2192
2268
|
|
|
2193
2269
|
on_mount: Any | None = Field(
|
|
2194
2270
|
default=None,
|
|
2195
|
-
|
|
2271
|
+
serialization_alias="onMount",
|
|
2196
2272
|
description="Action(s) to execute when this component mounts.",
|
|
2197
2273
|
)
|
|
2198
2274
|
|
|
@@ -3013,6 +3089,8 @@ from pydantic import BaseModel, Field
|
|
|
3013
3089
|
from prefab_ui.components.base import Component
|
|
3014
3090
|
from prefab_ui.rx import RxStr
|
|
3015
3091
|
|
|
3092
|
+
ChartValueFormat = str
|
|
3093
|
+
|
|
3016
3094
|
|
|
3017
3095
|
class ChartSeries(BaseModel):
|
|
3018
3096
|
"""Series definition for cartesian charts (Bar, Line, Area).
|
|
@@ -3051,7 +3129,7 @@ class BarChart(Component):
|
|
|
3051
3129
|
show_tooltip: Show tooltip on hover.
|
|
3052
3130
|
show_grid: Show cartesian grid.
|
|
3053
3131
|
show_y_axis: Show y-axis with tick labels.
|
|
3054
|
-
|
|
3132
|
+
value_format: Pipe format for value-axis ticks and tooltip values.
|
|
3055
3133
|
|
|
3056
3134
|
**Example:**
|
|
3057
3135
|
|
|
@@ -3063,6 +3141,7 @@ class BarChart(Component):
|
|
|
3063
3141
|
series=[ChartSeries(data_key="a"), ChartSeries(data_key="b")],
|
|
3064
3142
|
x_axis="month",
|
|
3065
3143
|
stacked=True,
|
|
3144
|
+
value_format="compact",
|
|
3066
3145
|
)
|
|
3067
3146
|
\`\`\`
|
|
3068
3147
|
"""
|
|
@@ -3098,10 +3177,13 @@ class BarChart(Component):
|
|
|
3098
3177
|
show_y_axis: bool = Field(
|
|
3099
3178
|
default=True, alias="showYAxis", description="Show y-axis with tick labels"
|
|
3100
3179
|
)
|
|
3101
|
-
|
|
3180
|
+
value_format: ChartValueFormat = Field(
|
|
3102
3181
|
default="auto",
|
|
3103
|
-
alias="
|
|
3104
|
-
description=
|
|
3182
|
+
alias="valueFormat",
|
|
3183
|
+
description=(
|
|
3184
|
+
"Value-axis tick and tooltip value format pipe, such as 'compact', "
|
|
3185
|
+
"'currency', or 'percent:1'"
|
|
3186
|
+
),
|
|
3105
3187
|
)
|
|
3106
3188
|
|
|
3107
3189
|
|
|
@@ -3122,7 +3204,7 @@ class LineChart(Component):
|
|
|
3122
3204
|
show_tooltip: Show tooltip on hover.
|
|
3123
3205
|
show_grid: Show cartesian grid.
|
|
3124
3206
|
show_y_axis: Show y-axis with tick labels.
|
|
3125
|
-
|
|
3207
|
+
value_format: Pipe format for value-axis ticks and tooltip values.
|
|
3126
3208
|
|
|
3127
3209
|
**Example:**
|
|
3128
3210
|
|
|
@@ -3133,6 +3215,7 @@ class LineChart(Component):
|
|
|
3133
3215
|
data=[{"month": "Jan", "a": 10}],
|
|
3134
3216
|
series=[ChartSeries(data_key="a")],
|
|
3135
3217
|
x_axis="month",
|
|
3218
|
+
value_format="percent:1",
|
|
3136
3219
|
)
|
|
3137
3220
|
\`\`\`
|
|
3138
3221
|
"""
|
|
@@ -3167,10 +3250,13 @@ class LineChart(Component):
|
|
|
3167
3250
|
show_y_axis: bool = Field(
|
|
3168
3251
|
default=True, alias="showYAxis", description="Show y-axis with tick labels"
|
|
3169
3252
|
)
|
|
3170
|
-
|
|
3253
|
+
value_format: ChartValueFormat = Field(
|
|
3171
3254
|
default="auto",
|
|
3172
|
-
alias="
|
|
3173
|
-
description=
|
|
3255
|
+
alias="valueFormat",
|
|
3256
|
+
description=(
|
|
3257
|
+
"Value-axis tick and tooltip value format pipe, such as 'compact', "
|
|
3258
|
+
"'currency', or 'percent:1'"
|
|
3259
|
+
),
|
|
3174
3260
|
)
|
|
3175
3261
|
|
|
3176
3262
|
|
|
@@ -3192,7 +3278,7 @@ class AreaChart(Component):
|
|
|
3192
3278
|
show_tooltip: Show tooltip on hover.
|
|
3193
3279
|
show_grid: Show cartesian grid.
|
|
3194
3280
|
show_y_axis: Show y-axis with tick labels.
|
|
3195
|
-
|
|
3281
|
+
value_format: Pipe format for value-axis ticks and tooltip values.
|
|
3196
3282
|
|
|
3197
3283
|
**Example:**
|
|
3198
3284
|
|
|
@@ -3204,6 +3290,7 @@ class AreaChart(Component):
|
|
|
3204
3290
|
series=[ChartSeries(data_key="a"), ChartSeries(data_key="b")],
|
|
3205
3291
|
x_axis="month",
|
|
3206
3292
|
stacked=True,
|
|
3293
|
+
value_format="currency",
|
|
3207
3294
|
)
|
|
3208
3295
|
\`\`\`
|
|
3209
3296
|
"""
|
|
@@ -3239,10 +3326,13 @@ class AreaChart(Component):
|
|
|
3239
3326
|
show_y_axis: bool = Field(
|
|
3240
3327
|
default=True, alias="showYAxis", description="Show y-axis with tick labels"
|
|
3241
3328
|
)
|
|
3242
|
-
|
|
3329
|
+
value_format: ChartValueFormat = Field(
|
|
3243
3330
|
default="auto",
|
|
3244
|
-
alias="
|
|
3245
|
-
description=
|
|
3331
|
+
alias="valueFormat",
|
|
3332
|
+
description=(
|
|
3333
|
+
"Value-axis tick and tooltip value format pipe, such as 'compact', "
|
|
3334
|
+
"'currency', or 'percent:1'"
|
|
3335
|
+
),
|
|
3246
3336
|
)
|
|
3247
3337
|
|
|
3248
3338
|
|
|
@@ -3259,6 +3349,7 @@ class PieChart(Component):
|
|
|
3259
3349
|
padding_angle: Gap between slices in degrees.
|
|
3260
3350
|
show_legend: Show legend.
|
|
3261
3351
|
show_tooltip: Show tooltip on hover.
|
|
3352
|
+
value_format: Pipe format for tooltip values.
|
|
3262
3353
|
|
|
3263
3354
|
**Example:**
|
|
3264
3355
|
|
|
@@ -3271,6 +3362,7 @@ class PieChart(Component):
|
|
|
3271
3362
|
data_key="visitors",
|
|
3272
3363
|
name_key="browser",
|
|
3273
3364
|
inner_radius=60,
|
|
3365
|
+
value_format="compact",
|
|
3274
3366
|
)
|
|
3275
3367
|
\`\`\`
|
|
3276
3368
|
"""
|
|
@@ -3300,6 +3392,11 @@ class PieChart(Component):
|
|
|
3300
3392
|
animate: bool = Field(
|
|
3301
3393
|
default=True, description="Animate transitions when data changes"
|
|
3302
3394
|
)
|
|
3395
|
+
value_format: ChartValueFormat = Field(
|
|
3396
|
+
default="auto",
|
|
3397
|
+
alias="valueFormat",
|
|
3398
|
+
description="Tooltip value format pipe, such as 'currency' or 'percent:1'",
|
|
3399
|
+
)
|
|
3303
3400
|
|
|
3304
3401
|
|
|
3305
3402
|
class ScatterChart(Component):
|
|
@@ -3432,6 +3529,7 @@ class RadialChart(Component):
|
|
|
3432
3529
|
end_angle: Arc end angle in degrees.
|
|
3433
3530
|
show_legend: Show legend.
|
|
3434
3531
|
show_tooltip: Show tooltip on hover.
|
|
3532
|
+
value_format: Pipe format for tooltip values.
|
|
3435
3533
|
|
|
3436
3534
|
**Example:**
|
|
3437
3535
|
|
|
@@ -3443,6 +3541,7 @@ class RadialChart(Component):
|
|
|
3443
3541
|
],
|
|
3444
3542
|
data_key="visitors",
|
|
3445
3543
|
name_key="browser",
|
|
3544
|
+
value_format="compact",
|
|
3446
3545
|
)
|
|
3447
3546
|
\`\`\`
|
|
3448
3547
|
"""
|
|
@@ -3472,6 +3571,11 @@ class RadialChart(Component):
|
|
|
3472
3571
|
animate: bool = Field(
|
|
3473
3572
|
default=True, description="Animate transitions when data changes"
|
|
3474
3573
|
)
|
|
3574
|
+
value_format: ChartValueFormat = Field(
|
|
3575
|
+
default="auto",
|
|
3576
|
+
alias="valueFormat",
|
|
3577
|
+
description="Tooltip value format pipe, such as 'currency' or 'percent:1'",
|
|
3578
|
+
)
|
|
3475
3579
|
|
|
3476
3580
|
|
|
3477
3581
|
SparklineVariant = (
|
|
@@ -4396,7 +4500,9 @@ class DataTable(Component):
|
|
|
4396
4500
|
search: Show a search input above the table.
|
|
4397
4501
|
paginated: Show pagination controls.
|
|
4398
4502
|
page_size: Rows per page when paginated.
|
|
4399
|
-
on_row_click: Action(s) when a row is clicked. \`$event\` is the row dict
|
|
4503
|
+
on_row_click: Action(s) when a row is clicked. \`$event\` is the row dict;
|
|
4504
|
+
access row fields with \`$event.<field>\`. Clicking anywhere in the
|
|
4505
|
+
row fires the action.
|
|
4400
4506
|
|
|
4401
4507
|
**Example:**
|
|
4402
4508
|
|
|
@@ -4454,7 +4560,11 @@ class DataTable(Component):
|
|
|
4454
4560
|
on_row_click: Action | list[Action] | None = Field(
|
|
4455
4561
|
default=None,
|
|
4456
4562
|
alias="onRowClick",
|
|
4457
|
-
description=
|
|
4563
|
+
description=(
|
|
4564
|
+
"Action(s) when a row is clicked. $event is the row data dict; access"
|
|
4565
|
+
" row fields with $event.<field>. Clicking anywhere in the row fires"
|
|
4566
|
+
" the action."
|
|
4567
|
+
),
|
|
4458
4568
|
)
|
|
4459
4569
|
|
|
4460
4570
|
def to_json(self) -> dict[str, Any]:
|
|
@@ -5271,7 +5381,7 @@ class Form(ContainerComponent):
|
|
|
5271
5381
|
gap: int = Field(default=4, exclude=True)
|
|
5272
5382
|
on_submit: Action | list[Action] | None = Field(
|
|
5273
5383
|
default=None,
|
|
5274
|
-
|
|
5384
|
+
serialization_alias="onSubmit",
|
|
5275
5385
|
description="Action(s) to execute when the form is submitted",
|
|
5276
5386
|
)
|
|
5277
5387
|
|
|
@@ -6320,7 +6430,7 @@ class Input(StatefulMixin, Component):
|
|
|
6320
6430
|
type: Literal["Input"] = "Input"
|
|
6321
6431
|
input_type: InputType = Field(
|
|
6322
6432
|
default="text",
|
|
6323
|
-
|
|
6433
|
+
serialization_alias="inputType",
|
|
6324
6434
|
description="Input type (text, email, password, etc.)",
|
|
6325
6435
|
)
|
|
6326
6436
|
placeholder: RxStr | None = Field(
|
|
@@ -6335,18 +6445,18 @@ class Input(StatefulMixin, Component):
|
|
|
6335
6445
|
disabled: bool = Field(default=False, description="Whether input is disabled")
|
|
6336
6446
|
read_only: bool = Field(
|
|
6337
6447
|
default=False,
|
|
6338
|
-
|
|
6448
|
+
serialization_alias="readOnly",
|
|
6339
6449
|
description="Whether input is read-only (visible and selectable but not editable)",
|
|
6340
6450
|
)
|
|
6341
6451
|
required: bool = Field(default=False, description="Whether input is required")
|
|
6342
6452
|
min_length: int | None = Field(
|
|
6343
6453
|
default=None,
|
|
6344
|
-
|
|
6454
|
+
serialization_alias="minLength",
|
|
6345
6455
|
description="Minimum character length",
|
|
6346
6456
|
)
|
|
6347
6457
|
max_length: int | None = Field(
|
|
6348
6458
|
default=None,
|
|
6349
|
-
|
|
6459
|
+
serialization_alias="maxLength",
|
|
6350
6460
|
description="Maximum character length",
|
|
6351
6461
|
)
|
|
6352
6462
|
min: float | None = Field(
|
|
@@ -6363,7 +6473,7 @@ class Input(StatefulMixin, Component):
|
|
|
6363
6473
|
)
|
|
6364
6474
|
on_change: Action | list[Action] | None = Field(
|
|
6365
6475
|
default=None,
|
|
6366
|
-
|
|
6476
|
+
serialization_alias="onChange",
|
|
6367
6477
|
description="Action(s) to execute when value changes",
|
|
6368
6478
|
)
|
|
6369
6479
|
`,"prefab_ui/components/kbd.py":`"""Kbd — keyboard key indicator."""
|
|
@@ -8238,17 +8348,17 @@ class Textarea(StatefulMixin, Component):
|
|
|
8238
8348
|
required: bool = Field(default=False, description="Whether textarea is required")
|
|
8239
8349
|
min_length: int | None = Field(
|
|
8240
8350
|
default=None,
|
|
8241
|
-
|
|
8351
|
+
serialization_alias="minLength",
|
|
8242
8352
|
description="Minimum character length",
|
|
8243
8353
|
)
|
|
8244
8354
|
max_length: int | None = Field(
|
|
8245
8355
|
default=None,
|
|
8246
|
-
|
|
8356
|
+
serialization_alias="maxLength",
|
|
8247
8357
|
description="Maximum character length",
|
|
8248
8358
|
)
|
|
8249
8359
|
on_change: Action | list[Action] | None = Field(
|
|
8250
8360
|
default=None,
|
|
8251
|
-
|
|
8361
|
+
serialization_alias="onChange",
|
|
8252
8362
|
description="Action(s) to execute when value changes",
|
|
8253
8363
|
)
|
|
8254
8364
|
`,"prefab_ui/components/tooltip.py":`"""Tooltip — hover text on any component.
|
|
@@ -10588,6 +10698,28 @@ class Theme(BaseModel):
|
|
|
10588
10698
|
if self.mode is not None:
|
|
10589
10699
|
result["mode"] = self.mode
|
|
10590
10700
|
return result
|
|
10701
|
+
|
|
10702
|
+
def to_css(self) -> str:
|
|
10703
|
+
"""Compile theme to a CSS string with standard :root / .dark selectors."""
|
|
10704
|
+
j = self.to_json()
|
|
10705
|
+
light = j.get("light", "")
|
|
10706
|
+
dark = j.get("dark", "")
|
|
10707
|
+
freeform = j.get("css", "")
|
|
10708
|
+
|
|
10709
|
+
imports, rest = [], []
|
|
10710
|
+
for line in freeform.split("\\n"):
|
|
10711
|
+
(imports if line.strip().startswith("@import") else rest).append(line)
|
|
10712
|
+
freeform = "\\n".join(rest)
|
|
10713
|
+
|
|
10714
|
+
result = "\\n".join(imports) + ("\\n" if imports else "")
|
|
10715
|
+
if light:
|
|
10716
|
+
result += f":root {{\\n {light}\\n}}\\n"
|
|
10717
|
+
if dark:
|
|
10718
|
+
result += f".dark {{\\n {dark}\\n}}\\n"
|
|
10719
|
+
if freeform.strip():
|
|
10720
|
+
result += freeform.strip() + "\\n"
|
|
10721
|
+
|
|
10722
|
+
return result
|
|
10591
10723
|
`,"prefab_ui/themes/basic.py":`"""Basic single-hue theme."""
|
|
10592
10724
|
|
|
10593
10725
|
from __future__ import annotations
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Se,d as De}from"./chunk-JSJVCQXG-DUdvv_KV.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as g,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./mermaid.core-bNRKpJH0.js";import"./renderer.js";import"./purify.es-DKgZpLtg.js";import"./string-Bl2zznvy.js";var Ft=(function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
|
|
1
|
+
import{g as Se,d as De}from"./chunk-JSJVCQXG-jdtMiwMf.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as g,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./mermaid.core-DJBXpCSw.js";import"./renderer.js";import"./purify.es-DKgZpLtg.js";import"./string-Bl2zznvy.js";var Ft=(function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=(function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,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:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=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),v.length-1&&(this.yylineno-=v.length-1);var R=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:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a1 as o,a2 as n}from"./mermaid.core-DJBXpCSw.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|