pmx-canvas 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +246 -108
- package/CHANGELOG.md +32 -0
- package/dist/canvas/chunks/abnfDiagram-N423BO3Z-p8dtp6va.js +1 -0
- package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +1 -0
- package/dist/canvas/chunks/architectureDiagram-T3A2C74G-5jhmxrzf.js +36 -0
- package/dist/canvas/chunks/blockDiagram-VBNYF7ZC-pw1fa9yb.js +132 -0
- package/dist/canvas/chunks/c4Diagram-5PPSVZJV-x07nq0tt.js +10 -0
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +1 -0
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +1 -0
- package/dist/canvas/chunks/cose-bilkent-JH36ORCC-nm39npq0.js +1 -0
- package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +1 -0
- package/dist/canvas/chunks/cynefinDiagram-MW4NZA55-vdxrwahz.js +62 -0
- package/dist/canvas/chunks/dagre-VZM6K2ZE-bqdm7wpd.js +4 -0
- package/dist/canvas/chunks/diagram-7IWD3JNH-gs5gpr93.js +30 -0
- package/dist/canvas/chunks/diagram-B4RE2ZJO-cgwjg47s.js +3 -0
- package/dist/canvas/chunks/diagram-LBJQPF4R-w3vahpav.js +24 -0
- package/dist/canvas/chunks/diagram-Q27KOJAE-42837z6h.js +24 -0
- package/dist/canvas/chunks/diagram-UB23O5K3-4fz83q59.js +41 -0
- package/dist/canvas/chunks/ebnfDiagram-BXEA7PRR-zphtgegj.js +1 -0
- package/dist/canvas/chunks/erDiagram-JOGREHBK-zvbbdxp4.js +85 -0
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +1 -0
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +1 -0
- package/dist/canvas/chunks/ganttDiagram-PKOTCBZU-282jzycm.js +292 -0
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +1 -0
- package/dist/canvas/chunks/gitGraphDiagram-DS77QQ5N-vqqy6p1b.js +106 -0
- package/dist/canvas/chunks/index-0rk4gp1g.js +2 -0
- package/dist/canvas/chunks/index-194m3hc3.js +2 -0
- package/dist/canvas/chunks/index-1r72hdzb.js +301 -0
- package/dist/canvas/chunks/index-353m7b0p.js +2 -0
- package/dist/canvas/chunks/index-3cy1bzwh.js +2 -0
- package/dist/canvas/chunks/index-5tv8v1hk.js +1 -0
- package/dist/canvas/chunks/index-6ceya556.js +332 -0
- package/dist/canvas/chunks/index-6qmsnxwy.js +4 -0
- package/dist/canvas/chunks/index-d3b3gqe9.js +2 -0
- package/dist/canvas/chunks/index-fjtdggjn.js +2 -0
- package/dist/canvas/chunks/index-g3pwnqeb.js +2 -0
- package/dist/canvas/chunks/index-gf4e0et4.js +2 -0
- package/dist/canvas/chunks/index-hj99nz1f.js +1 -0
- package/dist/canvas/chunks/index-nprm96xp.js +16 -0
- package/dist/canvas/chunks/index-qj8fxwsf.js +2 -0
- package/dist/canvas/chunks/index-r2fyc9w1.js +89 -0
- package/dist/canvas/chunks/index-rft2hcz5.js +2 -0
- package/dist/canvas/chunks/index-rh7nv68n.js +2 -0
- package/dist/canvas/chunks/index-s4j678gj.js +2 -0
- package/dist/canvas/chunks/index-tb1wf525.js +179 -0
- package/dist/canvas/chunks/index-vv56h019.js +2 -0
- package/dist/canvas/chunks/index-w2mra17t.js +207 -0
- package/dist/canvas/chunks/index-wgv7en21.js +232 -0
- package/dist/canvas/chunks/index-yw8h9vha.js +157 -0
- package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +1 -0
- package/dist/canvas/chunks/infoDiagram-6WML65LV-v1yvggqj.js +2 -0
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +70 -0
- package/dist/canvas/chunks/journeyDiagram-NVQOT4AX-zjcffveh.js +139 -0
- package/dist/canvas/chunks/kanban-definition-27J2QSJJ-dakqtfp1.js +89 -0
- package/dist/canvas/chunks/katex-dmg8k4zm.js +257 -0
- package/dist/canvas/chunks/mermaid.core-j2geswrd.js +12 -0
- package/dist/canvas/chunks/mindmap-definition-FAOFIHXS-142xhr3k.js +96 -0
- package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +1 -0
- package/dist/canvas/chunks/pegDiagram-VL7TDLO6-5wvk7vsd.js +1 -0
- package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +1 -0
- package/dist/canvas/chunks/pieDiagram-7S7Q4E2Y-ztdhwycc.js +39 -0
- package/dist/canvas/chunks/quadrantDiagram-CIZ2JOQS-c5p9gmg6.js +7 -0
- package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +1 -0
- package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +1 -0
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +1 -0
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +1 -0
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +1 -0
- package/dist/canvas/chunks/railroadDiagram-AXF67PYL-xkmqkjwf.js +1 -0
- package/dist/canvas/chunks/requirementDiagram-LRYGKXZP-9wm2dyaw.js +84 -0
- package/dist/canvas/chunks/sankeyDiagram-W5VNT64P-2w19etgb.js +40 -0
- package/dist/canvas/chunks/sequenceDiagram-SI44F4Z6-0jn0vwmz.js +162 -0
- package/dist/canvas/chunks/sizeCapture-X5ZJPWSS-x75epwdq.js +1 -0
- package/dist/canvas/chunks/stateDiagram-OKZ733FA-schjpy6d.js +1 -0
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +1 -0
- package/dist/canvas/chunks/swimlanes-SLNWSIFB-gkw4xce3.js +1 -0
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +8 -0
- package/dist/canvas/chunks/timeline-definition-Z64GVDOM-x7nkcy01.js +120 -0
- package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +1 -0
- package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +1 -0
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +34 -0
- package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +1 -0
- package/dist/canvas/chunks/wardleyDiagram-T6FBY63Y-t1j52t9r.js +78 -0
- package/dist/canvas/chunks/xychartDiagram-ELKLHX3M-38t16pme.js +7 -0
- package/dist/canvas/global.css +389 -229
- package/dist/canvas/index.js +141 -211
- package/dist/canvas/mcp-app.html +4205 -554
- package/dist/canvas/mermaid-entry.js +338 -338
- package/dist/canvas/surface-theme.css +6 -6
- package/dist/json-render/index.css +1 -1
- package/dist/json-render/index.js +49 -49
- package/dist/types/client/canvas/BarHint.d.ts +5 -3
- package/dist/types/client/canvas/CanvasNode.d.ts +0 -11
- package/dist/types/client/canvas/EdgeLayer.d.ts +1 -2
- package/dist/types/client/canvas/auto-fit.d.ts +4 -5
- package/dist/types/client/mermaid-entry.d.ts +1 -2
- package/dist/types/client/mermaid-render.d.ts +1 -0
- package/dist/types/client/nodes/BoardNode.d.ts +1 -1
- package/dist/types/client/nodes/ExtAppFrame.d.ts +7 -90
- package/dist/types/client/nodes/McpAppNode.d.ts +1 -25
- package/dist/types/client/nodes/MermaidNode.d.ts +1 -8
- package/dist/types/client/nodes/ViewerFrame.d.ts +29 -0
- package/dist/types/client/nodes/ViewerHost.d.ts +6 -0
- package/dist/types/client/nodes/iframe-document-url.d.ts +3 -9
- package/dist/types/client/nodes/primitive-copy.d.ts +5 -0
- package/dist/types/client/nodes/use-iframe-content-height.d.ts +1 -1
- package/dist/types/client/nodes/use-surface-frame.d.ts +4 -6
- package/dist/types/client/nodes/viewer-runtime-state.d.ts +2 -1
- package/dist/types/client/state/canvas-store.d.ts +3 -1
- package/dist/types/client/state/intent-bridge.d.ts +1 -0
- package/dist/types/client/state/presentation.d.ts +17 -6
- package/dist/types/json-render/server.d.ts +2 -1
- package/dist/types/server/canvas-state.d.ts +2 -0
- package/dist/types/server/index.d.ts +10 -5
- package/dist/types/server/operations/ops/boards.d.ts +0 -1
- package/dist/types/server/tour-control.d.ts +13 -3
- package/dist/types/shared/ax-surface-protocol.d.ts +0 -9
- package/dist/types/shared/tour.d.ts +8 -0
- package/docs/design/Chrome.dc.html +32 -6
- package/docs/design/Types1.dc.html +3 -2
- package/docs/design/Types2.dc.html +1 -1
- package/docs/design/Types3.dc.html +1 -1
- package/docs/design/Zoom.dc.html +37 -60
- package/docs/design/canvas.json +1 -1
- package/docs/design.md +169 -4
- package/docs/http-api.md +51 -1
- package/docs/mcp.md +8 -0
- package/docs/node-types.md +38 -3
- package/docs/plans/plan-009-tech-debt-backlog.md +2 -2
- package/docs/plans/plan-019-post-0.9-roadmap.md +283 -11
- package/docs/product-vision-2026-09.md +9 -0
- package/package.json +2 -2
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +1 -1
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/tools.json +246 -108
- package/skills/pmx-canvas/SKILL.md +11 -18
- package/skills/pmx-canvas/references/full-reference.md +9 -4
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +6 -6
- package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +3 -5
- package/src/client/canvas/BarHint.tsx +6 -3
- package/src/client/canvas/CanvasNode.tsx +34 -47
- package/src/client/canvas/CanvasViewport.tsx +6 -7
- package/src/client/canvas/ContextMenu.tsx +63 -3
- package/src/client/canvas/EdgeLayer.tsx +365 -169
- package/src/client/canvas/ExpandedNodeOverlay.tsx +1 -2
- package/src/client/canvas/Presentation.tsx +53 -3
- package/src/client/canvas/TopBar.tsx +24 -9
- package/src/client/canvas/auto-fit.ts +9 -11
- package/src/client/canvas/canvas-area.ts +1 -1
- package/src/client/canvas/use-focus-trap.ts +6 -1
- package/src/client/mermaid-entry.ts +6 -20
- package/src/client/mermaid-render.ts +39 -0
- package/src/client/nodes/AxStepControls.tsx +45 -69
- package/src/client/nodes/BoardNode.tsx +65 -9
- package/src/client/nodes/ContextNode.tsx +88 -396
- package/src/client/nodes/ExtAppFrame.tsx +283 -1462
- package/src/client/nodes/FileNode.tsx +92 -81
- package/src/client/nodes/HtmlNode.tsx +8 -36
- package/src/client/nodes/LedgerNode.tsx +31 -17
- package/src/client/nodes/MarkdownNode.tsx +8 -17
- package/src/client/nodes/McpAppNode.tsx +48 -154
- package/src/client/nodes/MermaidNode.tsx +80 -69
- package/src/client/nodes/PromptNode.tsx +12 -14
- package/src/client/nodes/ResponseNode.tsx +8 -6
- package/src/client/nodes/StatusNode.tsx +22 -7
- package/src/client/nodes/StatusSummary.tsx +5 -3
- package/src/client/nodes/TraceNode.tsx +8 -8
- package/src/client/nodes/ViewerFrame.tsx +262 -0
- package/src/client/nodes/ViewerHost.tsx +41 -0
- package/src/client/nodes/WebpageNode.tsx +22 -24
- package/src/client/nodes/iframe-document-url.ts +20 -27
- package/src/client/nodes/primitive-copy.ts +97 -0
- package/src/client/nodes/use-iframe-content-height.ts +34 -10
- package/src/client/nodes/use-surface-frame.ts +22 -11
- package/src/client/nodes/viewer-runtime-state.ts +41 -35
- package/src/client/state/canvas-store.ts +18 -12
- package/src/client/state/intent-bridge.ts +1 -0
- package/src/client/state/presentation.ts +135 -15
- package/src/client/state/sse-bridge.ts +18 -19
- package/src/client/theme/global.css +389 -229
- package/src/client/theme/surface-theme.css +6 -6
- package/src/json-render/charts/tufte-components.tsx +44 -2
- package/src/json-render/renderer/index.css +62 -2
- package/src/json-render/renderer/index.tsx +31 -7
- package/src/json-render/server.ts +3 -2
- package/src/server/board-export.ts +35 -24
- package/src/server/canvas-geometry.ts +1 -0
- package/src/server/canvas-state.ts +5 -0
- package/src/server/demo-state.json +106 -100
- package/src/server/html-primitives.ts +3 -9
- package/src/server/html-surface.ts +8 -0
- package/src/server/index.ts +19 -9
- package/src/server/operations/mcp-contracts.ts +17 -2
- package/src/server/operations/ops/boards.ts +1 -3
- package/src/server/operations/ops/viewport.ts +11 -9
- package/src/server/server.ts +7 -59
- package/src/server/tour-control.ts +66 -6
- package/src/shared/ax-surface-protocol.ts +0 -11
- package/src/shared/content-height-reporter.ts +4 -3
- package/src/shared/tour.ts +8 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{e,t,N,i,a,x,w,Ie,r,A,Ze,Je,ct,Qe,yt}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{we}from"./index-nprm96xp.js";var ae=function(){var n=e(function(V,c,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=c);return o},"o"),f=[1,4],k=[1,13],l=[1,12],y=[1,15],v=[1,16],S=[1,20],d=[1,19],R=[6,7,8],B=[1,26],b=[1,24],F=[1,25],D=[6,7,11],Y=[1,31],O=[6,7,11,24],z=[1,6,13,16,17,20,23],m=[1,35],G=[1,36],P=[1,6,7,11,13,16,17,20,23],J=[1,38],M={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(c,o,h,u,p,s,U){var g=s.length-1;switch(p){case 6:case 7:return u;case 8:u.getLogger().trace("Stop NL ");break;case 9:u.getLogger().trace("Stop EOF ");break;case 11:u.getLogger().trace("Stop NL2 ");break;case 12:u.getLogger().trace("Stop EOF2 ");break;case 15:u.getLogger().info("Node: ",s[g-1].id),u.addNode(s[g-2].length,s[g-1].id,s[g-1].descr,s[g-1].type,s[g]);break;case 16:u.getLogger().info("Node: ",s[g].id),u.addNode(s[g-1].length,s[g].id,s[g].descr,s[g].type);break;case 17:u.getLogger().trace("Icon: ",s[g]),u.decorateNode({icon:s[g]});break;case 18:case 23:u.decorateNode({class:s[g]});break;case 19:u.getLogger().trace("SPACELIST");break;case 20:u.getLogger().trace("Node: ",s[g-1].id),u.addNode(0,s[g-1].id,s[g-1].descr,s[g-1].type,s[g]);break;case 21:u.getLogger().trace("Node: ",s[g].id),u.addNode(0,s[g].id,s[g].descr,s[g].type);break;case 22:u.decorateNode({icon:s[g]});break;case 27:u.getLogger().trace("node found ..",s[g-2]),this.$={id:s[g-1],descr:s[g-1],type:u.getType(s[g-2],s[g])};break;case 28:this.$={id:s[g],descr:s[g],type:0};break;case 29:u.getLogger().trace("node found ..",s[g-3]),this.$={id:s[g-3],descr:s[g-1],type:u.getType(s[g-2],s[g])};break;case 30:this.$=s[g-1]+s[g];break;case 31:this.$=s[g];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:k,7:[1,10],9:9,12:11,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},n(R,[2,3]),{1:[2,2]},n(R,[2,4]),n(R,[2,5]),{1:[2,6],6:k,12:21,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},{6:k,9:22,12:11,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},{6:B,7:b,10:23,11:F},n(D,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:d}),n(D,[2,19]),n(D,[2,21],{15:30,24:Y}),n(D,[2,22]),n(D,[2,23]),n(O,[2,25]),n(O,[2,26]),n(O,[2,28],{20:[1,32]}),{21:[1,33]},{6:B,7:b,10:34,11:F},{1:[2,7],6:k,12:21,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},n(z,[2,14],{7:m,11:G}),n(P,[2,8]),n(P,[2,9]),n(P,[2,10]),n(D,[2,16],{15:37,24:Y}),n(D,[2,17]),n(D,[2,18]),n(D,[2,20],{24:J}),n(O,[2,31]),{21:[1,39]},{22:[1,40]},n(z,[2,13],{7:m,11:G}),n(P,[2,11]),n(P,[2,12]),n(D,[2,15],{24:J}),n(O,[2,30]),{22:[1,41]},n(O,[2,27]),n(O,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(c,o){if(o.recoverable)this.trace(c);else{var h=Error(c);throw h.hash=o,h}},"parseError"),parse:e(function(c){var o=this,h=[0],u=[],p=[null],s=[],U=this.table,g="",q=0,he=0,ue=0,be=2,ge=1,ye=s.slice.call(arguments,1),_=Object.create(this.lexer),H={yy:{}};for(var te in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,te))H.yy[te]=this.yy[te];if(_.setInput(c,H.yy),H.yy.lexer=_,H.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var ne=_.yylloc;s.push(ne);var ke=_.options&&_.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(C){h.length=h.length-2*C,p.length=p.length-C,s.length=s.length-C}e(me,"popStack");function de(){var C=u.pop()||_.lex()||ge;if(typeof C!=="number"){if(C instanceof Array)u=C,C=u.pop();C=o.symbols_[C]||C}return C}e(de,"lex");var L,ie,W,I,Ge,re,K={},Q,j,pe,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])I=this.defaultActions[W];else{if(L===null||typeof L>"u")L=de();I=U[W]&&U[W][L]}if(typeof I>"u"||!I.length||!I[0]){var se="";Z=[];for(Q in U[W])if(this.terminals_[Q]&&Q>be)Z.push("'"+this.terminals_[Q]+"'");if(_.showPosition)se="Parse error on line "+(q+1)+`:
|
|
2
|
+
`+_.showPosition()+`
|
|
3
|
+
Expecting `+Z.join(", ")+", got '"+(this.terminals_[L]||L)+"'";else se="Parse error on line "+(q+1)+": Unexpected "+(L==ge?"end of input":"'"+(this.terminals_[L]||L)+"'");this.parseError(se,{text:_.match,token:this.terminals_[L]||L,line:_.yylineno,loc:ne,expected:Z})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+L);switch(I[0]){case 1:if(h.push(L),p.push(_.yytext),s.push(_.yylloc),h.push(I[1]),L=null,!ie){if(he=_.yyleng,g=_.yytext,q=_.yylineno,ne=_.yylloc,ue>0)ue--}else L=ie,ie=null;break;case 2:if(j=this.productions_[I[1]][1],K.$=p[p.length-j],K._$={first_line:s[s.length-(j||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(j||1)].first_column,last_column:s[s.length-1].last_column},ke)K._$.range=[s[s.length-(j||1)].range[0],s[s.length-1].range[1]];if(re=this.performAction.apply(K,[g,he,q,H.yy,I[1],p,s].concat(ye)),typeof re<"u")return re;if(j)h=h.slice(0,-1*j*2),p=p.slice(0,-1*j),s=s.slice(0,-1*j);h.push(this.productions_[I[1]][0]),p.push(K.$),s.push(K._$),pe=U[h[h.length-2]][h[h.length-1]],h.push(pe);break;case 3:return!0}}return!0},"parse")},ee=function(){var V={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(c,o){if(this.yy=o||this.yy||{},this._input=c,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];return this.offset=0,this},"setInput"),input:e(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var o=c.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),c},"input"),unput:e(function(c){var o=c.length,h=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(c){this.unput(this.match.slice(c))},"less"),pastInput:e(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var c=this.pastInput(),o=Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:e(function(c,o){var h,u,p;if(this.options.backtrack_lexer){if(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)p.yylloc.range=this.yylloc.range.slice(0)}if(u=c[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in p)this[s]=p[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var c,o,h,u;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var s=0;s<p.length;s++)if(h=this._input.match(this.rules[p[s]]),h&&(!o||h[0].length>o[0].length)){if(o=h,u=s,this.options.backtrack_lexer)if(c=this.test_match(h,p[s]),c!==!1)return c;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(c=this.test_match(o,p[u]),c!==!1)return c;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,u,p){var s=p;switch(u){case 0:return this.pushState("shapeData"),h.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let U=/\n\s*/g;return h.yytext=h.yytext.replace(U,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return o.getLogger().trace("Found comment",h.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:o.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return o.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:o.getLogger().trace("end icon"),this.popState();break;case 16:return o.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return o.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return o.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return o.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:o.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return o.getLogger().trace("description:",h.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),o.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),o.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),o.getLogger().trace("node end ...",h.yytext),"NODE_DEND";break;case 36:return this.popState(),o.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),o.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),o.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),o.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),o.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return o.getLogger().trace("Long description:",h.yytext),21;break;case 42:return o.getLogger().trace("Long description:",h.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return V}();M.lexer=ee;function X(){this.yy={}}return e(X,"Parser"),X.prototype=M,M.Parser=X,new X}();ae.parser=ae;var Ee=ae,T=[],ce=[],oe=0,le={},_e=e(()=>{T=[],ce=[],oe=0,le={}},"clear"),Se=e((n)=>{if(T.length===0)return null;let f=T[0].level,k=null;for(let l=T.length-1;l>=0;l--){if(T[l].level===f&&!k)k=T[l];if(T[l].level<f)throw Error('Items without section detected, found section ("'+T[l].label+'")')}if(n===k?.level)return null;return k},"getSection"),fe=e(function(){return ce},"getSections"),Ne=e(function(){let n=[],f=[],k=fe(),l=r();for(let y of k){let v={id:y.id,label:w(y.label??"",l),labelType:"markdown",isGroup:!0,ticket:y.ticket,shape:"kanbanSection",level:y.level,look:l.look};f.push(v);let S=T.filter((d)=>d.parentId===y.id);for(let d of S){let R={id:d.id,parentId:y.id,label:w(d.label??"",l),labelType:"markdown",isGroup:!1,ticket:d?.ticket,priority:d?.priority,assigned:d?.assigned,icon:d?.icon,shape:"kanbanItem",level:d.level,rx:5,ry:5,cssStyles:["text-align: left"]};f.push(R)}}return{nodes:f,edges:n,other:{},config:r()}},"getData"),xe=e((n,f,k,l,y)=>{let v=r(),S=v.mindmap?.padding??x.mindmap.padding;switch(l){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:S*=2}let d={id:w(f,v)||"kbn"+oe++,level:n,label:w(k,v),width:v.mindmap?.maxNodeWidth??x.mindmap.maxNodeWidth,padding:S,isGroup:!1};if(y!==void 0){let B;if(!y.includes(`
|
|
7
|
+
`))B=`{
|
|
8
|
+
`+y+`
|
|
9
|
+
}`;else B=y+`
|
|
10
|
+
`;let b=Je(B,{schema:Ze});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);if(b?.shape&&b.shape==="kanbanItem")d.shape=b?.shape;if(b?.label)d.label=b?.label;if(b?.icon)d.icon=b?.icon.toString();if(b?.assigned)d.assigned=b?.assigned.toString();if(b?.ticket)d.ticket=b?.ticket.toString();if(b?.priority)d.priority=b?.priority}let R=Se(n);if(R)d.parentId=R.id||"kbn"+oe++;else ce.push(d);T.push(d)},"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=e((n,f)=>{switch(t.debug("In get type",n,f),n){case"[":return E.RECT;case"(":return f===")"?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}},"getType"),De=e((n,f)=>{le[n]=f},"setElementForId"),Le=e((n)=>{if(!n)return;let f=r(),k=T[T.length-1];if(n.icon)k.icon=w(n.icon,f);if(n.class)k.cssClasses=w(n.class,f)},"decorateNode"),Oe=e((n)=>{switch(n){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ce=e(()=>t,"getLogger"),Ae=e((n)=>le[n],"getElementById"),Te={clear:_e,addNode:xe,getSections:fe,getData:Ne,nodeType:E,getType:ve,setElementForId:De,decorateNode:Le,type2Str:Oe,getLogger:Ce,getElementById:Ae},Re=Te,Pe=e(async(n,f,k,l)=>{t.debug(`Rendering kanban diagram
|
|
11
|
+
`+n);let v=l.db.getData(),S=r();S.htmlLabels=!1;let d=A(f);for(let m of v.nodes)m.domId=`${f}-${m.id}`;let R=d.append("g");R.attr("class","sections");let B=d.append("g");B.attr("class","items");let b=v.nodes.filter((m)=>m.isGroup),F=0,D=10,Y=[],O=25;for(let m of b){let G=S?.kanban?.sectionWidth||200;F=F+1,m.x=G*F+(F-1)*D/2,m.width=G,m.y=0,m.height=G*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+F;let P=await ct(R,m);O=Math.max(O,P?.labelBBox?.height),Y.push(P)}let z=0;for(let m of b){let G=Y[z];z=z+1;let P=S?.kanban?.sectionWidth||200,J=-P*3/2+O,M=J,ee=v.nodes.filter((c)=>c.parentId===m.id);for(let c of ee){if(c.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");c.x=m.x,c.width=P-1.5*D;let h=(await Qe(B,c,{config:S})).node().getBBox();c.y=M+h.height/2,await yt(c),M=c.y+h.height/2+D/2}let X=G.cluster.select("rect"),V=Math.max(M-J+3*D,50)+(O-25);X.attr("height",V)}Ie(void 0,d,S.mindmap?.padding??x.kanban.padding,S.mindmap?.useMaxWidth??x.kanban.useMaxWidth)},"draw"),Ve={draw:Pe},Be=e((n)=>{let f="";for(let l=0;l<n.THEME_COLOR_LIMIT;l++)if(n["lineColor"+l]=n["lineColor"+l]||n["cScaleInv"+l],N(n["lineColor"+l]))n["lineColor"+l]=i(n["lineColor"+l],20);else n["lineColor"+l]=a(n["lineColor"+l],20);let k=e((l,y)=>n.darkMode?a(l,y):i(l,y),"adjuster");for(let l=0;l<n.THEME_COLOR_LIMIT;l++){let y=""+(17-3*l);f+=`
|
|
12
|
+
.section-${l-1} rect, .section-${l-1} path, .section-${l-1} circle, .section-${l-1} polygon, .section-${l-1} path {
|
|
13
|
+
fill: ${k(n["cScale"+l],10)};
|
|
14
|
+
stroke: ${k(n["cScale"+l],10)};
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
.section-${l-1} text {
|
|
18
|
+
fill: ${n["cScaleLabel"+l]};
|
|
19
|
+
}
|
|
20
|
+
.node-icon-${l-1} {
|
|
21
|
+
font-size: 40px;
|
|
22
|
+
color: ${n["cScaleLabel"+l]};
|
|
23
|
+
}
|
|
24
|
+
.section-edge-${l-1}{
|
|
25
|
+
stroke: ${n["cScale"+l]};
|
|
26
|
+
}
|
|
27
|
+
.edge-depth-${l-1}{
|
|
28
|
+
stroke-width: ${y};
|
|
29
|
+
}
|
|
30
|
+
.section-${l-1} line {
|
|
31
|
+
stroke: ${n["cScaleInv"+l]} ;
|
|
32
|
+
stroke-width: 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.disabled, .disabled circle, .disabled text {
|
|
36
|
+
fill: lightgray;
|
|
37
|
+
}
|
|
38
|
+
.disabled text {
|
|
39
|
+
fill: #efefef;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.node rect,
|
|
43
|
+
.node circle,
|
|
44
|
+
.node ellipse,
|
|
45
|
+
.node polygon,
|
|
46
|
+
.node path {
|
|
47
|
+
fill: ${n.background};
|
|
48
|
+
stroke: ${n.nodeBorder};
|
|
49
|
+
stroke-width: 1px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.kanban-ticket-link {
|
|
53
|
+
fill: ${n.background};
|
|
54
|
+
stroke: ${n.nodeBorder};
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
}
|
|
57
|
+
`}return f},"genSections"),je=e((n)=>`
|
|
58
|
+
.edge {
|
|
59
|
+
stroke-width: 3;
|
|
60
|
+
}
|
|
61
|
+
${Be(n)}
|
|
62
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
|
+
fill: ${n.git0};
|
|
64
|
+
}
|
|
65
|
+
.section-root text {
|
|
66
|
+
fill: ${n.gitBranchLabel0};
|
|
67
|
+
}
|
|
68
|
+
.icon-container {
|
|
69
|
+
height:100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
}
|
|
74
|
+
.edge {
|
|
75
|
+
fill: none;
|
|
76
|
+
}
|
|
77
|
+
.cluster-label, .label {
|
|
78
|
+
color: ${n.textColor};
|
|
79
|
+
fill: ${n.textColor};
|
|
80
|
+
}
|
|
81
|
+
.kanban-label {
|
|
82
|
+
dy: 1em;
|
|
83
|
+
alignment-baseline: middle;
|
|
84
|
+
text-anchor: middle;
|
|
85
|
+
dominant-baseline: middle;
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
${we()}
|
|
89
|
+
`,"getStyles"),Fe=je,it={db:Re,renderer:Ve,parser:Ee,styles:Fe};export{it as diagram};
|