research-copilot 0.1.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/LICENSE +21 -0
- package/README.md +190 -0
- package/app/build/icon.icns +0 -0
- package/app/build/icon.ico +0 -0
- package/app/build/icon.png +0 -0
- package/app/out/main/index.mjs +6719 -0
- package/app/out/preload/index.js +141 -0
- package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
- package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
- package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
- package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
- package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
- package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
- package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
- package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
- package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
- package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
- package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
- package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
- package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
- package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
- package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
- package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
- package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
- package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
- package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
- package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
- package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
- package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
- package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
- package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
- package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
- package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
- package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
- package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
- package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
- package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
- package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
- package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
- package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
- package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
- package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
- package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
- package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
- package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
- package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
- package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
- package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
- package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
- package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
- package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
- package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
- package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
- package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
- package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
- package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
- package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
- package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
- package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
- package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
- package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
- package/app/out/renderer/assets/http-BqypyemW.js +79 -0
- package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
- package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
- package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
- package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
- package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
- package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
- package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
- package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
- package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
- package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
- package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
- package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
- package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
- package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
- package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
- package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
- package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
- package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
- package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
- package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
- package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
- package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
- package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
- package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
- package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
- package/app/out/renderer/assets/index-fx307_f1.js +643 -0
- package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
- package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
- package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
- package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
- package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
- package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
- package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
- package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
- package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
- package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
- package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
- package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
- package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
- package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
- package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
- package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
- package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
- package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
- package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
- package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
- package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
- package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
- package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
- package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
- package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
- package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
- package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
- package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
- package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
- package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
- package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
- package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
- package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
- package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
- package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
- package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
- package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
- package/app/out/renderer/assets/r-V7nswm59.js +170 -0
- package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
- package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
- package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
- package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
- package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
- package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
- package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
- package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
- package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
- package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
- package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
- package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
- package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
- package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
- package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
- package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
- package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
- package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
- package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
- package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
- package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
- package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
- package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
- package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
- package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
- package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
- package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
- package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
- package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
- package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
- package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
- package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
- package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
- package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
- package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
- package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
- package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
- package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
- package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
- package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
- package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
- package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
- package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
- package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
- package/app/out/renderer/index.html +13 -0
- package/app/out/skills/community-builtin/README.md +29 -0
- package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
- package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
- package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
- package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
- package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
- package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
- package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
- package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
- package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
- package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
- package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
- package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
- package/app/package.json +77 -0
- package/bin/cli.mjs +56 -0
- package/lib/README.md +145 -0
- package/lib/skills/_generated.ts +13 -0
- package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
- package/lib/skills/builtin/coding/SKILL.md +114 -0
- package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
- package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
- package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
- package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
- package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
- package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
- package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
- package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
- package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
- package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
- package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
- package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
- package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
- package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
- package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
- package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
- package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
- package/lib/skills/builtin/research-grants/SKILL.md +958 -0
- package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
- package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
- package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
- package/lib/skills/builtin/research-grants/references/README.md +285 -0
- package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
- package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
- package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
- package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
- package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
- package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
- package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
- package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
- package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
- package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
- package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
- package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
- package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
- package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
- package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
- package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
- package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
- package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
- package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
- package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
- package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
- package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
- package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
- package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
- package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
- package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
- package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
- package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
- package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
- package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
- package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
- package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
- package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
- package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
- package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
- package/lib/skills/builtin/seaborn/SKILL.md +674 -0
- package/lib/skills/builtin/seaborn/references/examples.md +822 -0
- package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
- package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
- package/lib/skills/data-analysis/SKILL.md +285 -0
- package/lib/skills/generate-skill-content.mjs +58 -0
- package/lib/skills/index.ts +34 -0
- package/lib/skills/loader.ts +452 -0
- package/package.json +62 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { s as styles, d as db, p as parser$1, D as DEFAULT_NESTED_DOC_DIR, a as DEFAULT_STATE_TYPE, b as DIVIDER_TYPE, S as STMT_RELATION, c as STMT_STATE } from "./styles-ca3715f6-DgbNw99p.js";
|
|
2
|
+
import { G as Graph } from "./graph-DpC13d95.js";
|
|
3
|
+
import { v as log$1, r as getConfig, u as select, O as utils, w as configureSvgSize, C as common$1 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
|
|
4
|
+
import { r as render } from "./index-5325376f-Bbs7Fbqr.js";
|
|
5
|
+
import "./layout-ZeuHE_aY.js";
|
|
6
|
+
import "./index-BqDyyRCx.js";
|
|
7
|
+
import "./clone-CsnzsYXQ.js";
|
|
8
|
+
import "./edges-96097737-CD0EvAZQ.js";
|
|
9
|
+
import "./createText-1719965b-Cji7KN4K.js";
|
|
10
|
+
import "./line-CAgaGl-S.js";
|
|
11
|
+
import "./array-DgktLKBx.js";
|
|
12
|
+
import "./path-Cp2qmpkd.js";
|
|
13
|
+
const SHAPE_STATE = "rect";
|
|
14
|
+
const SHAPE_STATE_WITH_DESC = "rectWithTitle";
|
|
15
|
+
const SHAPE_START = "start";
|
|
16
|
+
const SHAPE_END = "end";
|
|
17
|
+
const SHAPE_DIVIDER = "divider";
|
|
18
|
+
const SHAPE_GROUP = "roundedWithTitle";
|
|
19
|
+
const SHAPE_NOTE = "note";
|
|
20
|
+
const SHAPE_NOTEGROUP = "noteGroup";
|
|
21
|
+
const CSS_DIAGRAM = "statediagram";
|
|
22
|
+
const CSS_STATE = "state";
|
|
23
|
+
const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;
|
|
24
|
+
const CSS_EDGE = "transition";
|
|
25
|
+
const CSS_NOTE = "note";
|
|
26
|
+
const CSS_NOTE_EDGE = "note-edge";
|
|
27
|
+
const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;
|
|
28
|
+
const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;
|
|
29
|
+
const CSS_CLUSTER = "cluster";
|
|
30
|
+
const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;
|
|
31
|
+
const CSS_CLUSTER_ALT = "cluster-alt";
|
|
32
|
+
const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;
|
|
33
|
+
const PARENT = "parent";
|
|
34
|
+
const NOTE = "note";
|
|
35
|
+
const DOMID_STATE = "state";
|
|
36
|
+
const DOMID_TYPE_SPACER = "----";
|
|
37
|
+
const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;
|
|
38
|
+
const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;
|
|
39
|
+
const G_EDGE_STYLE = "fill:none";
|
|
40
|
+
const G_EDGE_ARROWHEADSTYLE = "fill: #333";
|
|
41
|
+
const G_EDGE_LABELPOS = "c";
|
|
42
|
+
const G_EDGE_LABELTYPE = "text";
|
|
43
|
+
const G_EDGE_THICKNESS = "normal";
|
|
44
|
+
let nodeDb = {};
|
|
45
|
+
let graphItemCount = 0;
|
|
46
|
+
const setConf = function(cnf) {
|
|
47
|
+
const keys = Object.keys(cnf);
|
|
48
|
+
for (const key of keys) {
|
|
49
|
+
cnf[key];
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const getClasses = function(text, diagramObj) {
|
|
53
|
+
diagramObj.db.extract(diagramObj.db.getRootDocV2());
|
|
54
|
+
return diagramObj.db.getClasses();
|
|
55
|
+
};
|
|
56
|
+
function getClassesFromDbInfo(dbInfoItem) {
|
|
57
|
+
if (dbInfoItem === void 0 || dbInfoItem === null) {
|
|
58
|
+
return "";
|
|
59
|
+
} else {
|
|
60
|
+
if (dbInfoItem.classes) {
|
|
61
|
+
return dbInfoItem.classes.join(" ");
|
|
62
|
+
} else {
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) {
|
|
68
|
+
const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : "";
|
|
69
|
+
return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;
|
|
70
|
+
}
|
|
71
|
+
const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => {
|
|
72
|
+
const itemId = parsedItem.id;
|
|
73
|
+
const classStr = getClassesFromDbInfo(diagramStates[itemId]);
|
|
74
|
+
if (itemId !== "root") {
|
|
75
|
+
let shape = SHAPE_STATE;
|
|
76
|
+
if (parsedItem.start === true) {
|
|
77
|
+
shape = SHAPE_START;
|
|
78
|
+
}
|
|
79
|
+
if (parsedItem.start === false) {
|
|
80
|
+
shape = SHAPE_END;
|
|
81
|
+
}
|
|
82
|
+
if (parsedItem.type !== DEFAULT_STATE_TYPE) {
|
|
83
|
+
shape = parsedItem.type;
|
|
84
|
+
}
|
|
85
|
+
if (!nodeDb[itemId]) {
|
|
86
|
+
nodeDb[itemId] = {
|
|
87
|
+
id: itemId,
|
|
88
|
+
shape,
|
|
89
|
+
description: common$1.sanitizeText(itemId, getConfig()),
|
|
90
|
+
classes: `${classStr} ${CSS_DIAGRAM_STATE}`
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const newNode = nodeDb[itemId];
|
|
94
|
+
if (parsedItem.description) {
|
|
95
|
+
if (Array.isArray(newNode.description)) {
|
|
96
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
|
97
|
+
newNode.description.push(parsedItem.description);
|
|
98
|
+
} else {
|
|
99
|
+
if (newNode.description.length > 0) {
|
|
100
|
+
newNode.shape = SHAPE_STATE_WITH_DESC;
|
|
101
|
+
if (newNode.description === itemId) {
|
|
102
|
+
newNode.description = [parsedItem.description];
|
|
103
|
+
} else {
|
|
104
|
+
newNode.description = [newNode.description, parsedItem.description];
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
newNode.shape = SHAPE_STATE;
|
|
108
|
+
newNode.description = parsedItem.description;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
newNode.description = common$1.sanitizeTextOrArray(newNode.description, getConfig());
|
|
112
|
+
}
|
|
113
|
+
if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {
|
|
114
|
+
newNode.shape = SHAPE_STATE;
|
|
115
|
+
}
|
|
116
|
+
if (!newNode.type && parsedItem.doc) {
|
|
117
|
+
log$1.info("Setting cluster for ", itemId, getDir(parsedItem));
|
|
118
|
+
newNode.type = "group";
|
|
119
|
+
newNode.dir = getDir(parsedItem);
|
|
120
|
+
newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;
|
|
121
|
+
newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : "");
|
|
122
|
+
}
|
|
123
|
+
const nodeData = {
|
|
124
|
+
labelStyle: "",
|
|
125
|
+
shape: newNode.shape,
|
|
126
|
+
labelText: newNode.description,
|
|
127
|
+
// typeof newNode.description === 'object'
|
|
128
|
+
// ? newNode.description[0]
|
|
129
|
+
// : newNode.description,
|
|
130
|
+
classes: newNode.classes,
|
|
131
|
+
style: "",
|
|
132
|
+
//styles.style,
|
|
133
|
+
id: itemId,
|
|
134
|
+
dir: newNode.dir,
|
|
135
|
+
domId: stateDomId(itemId, graphItemCount),
|
|
136
|
+
type: newNode.type,
|
|
137
|
+
padding: 15
|
|
138
|
+
//getConfig().flowchart.padding
|
|
139
|
+
};
|
|
140
|
+
nodeData.centerLabel = true;
|
|
141
|
+
if (parsedItem.note) {
|
|
142
|
+
const noteData = {
|
|
143
|
+
labelStyle: "",
|
|
144
|
+
shape: SHAPE_NOTE,
|
|
145
|
+
labelText: parsedItem.note.text,
|
|
146
|
+
classes: CSS_DIAGRAM_NOTE,
|
|
147
|
+
// useHtmlLabels: false,
|
|
148
|
+
style: "",
|
|
149
|
+
// styles.style,
|
|
150
|
+
id: itemId + NOTE_ID + "-" + graphItemCount,
|
|
151
|
+
domId: stateDomId(itemId, graphItemCount, NOTE),
|
|
152
|
+
type: newNode.type,
|
|
153
|
+
padding: 15
|
|
154
|
+
//getConfig().flowchart.padding
|
|
155
|
+
};
|
|
156
|
+
const groupData = {
|
|
157
|
+
labelStyle: "",
|
|
158
|
+
shape: SHAPE_NOTEGROUP,
|
|
159
|
+
labelText: parsedItem.note.text,
|
|
160
|
+
classes: newNode.classes,
|
|
161
|
+
style: "",
|
|
162
|
+
// styles.style,
|
|
163
|
+
id: itemId + PARENT_ID,
|
|
164
|
+
domId: stateDomId(itemId, graphItemCount, PARENT),
|
|
165
|
+
type: "group",
|
|
166
|
+
padding: 0
|
|
167
|
+
//getConfig().flowchart.padding
|
|
168
|
+
};
|
|
169
|
+
graphItemCount++;
|
|
170
|
+
const parentNodeId = itemId + PARENT_ID;
|
|
171
|
+
g.setNode(parentNodeId, groupData);
|
|
172
|
+
g.setNode(noteData.id, noteData);
|
|
173
|
+
g.setNode(itemId, nodeData);
|
|
174
|
+
g.setParent(itemId, parentNodeId);
|
|
175
|
+
g.setParent(noteData.id, parentNodeId);
|
|
176
|
+
let from = itemId;
|
|
177
|
+
let to = noteData.id;
|
|
178
|
+
if (parsedItem.note.position === "left of") {
|
|
179
|
+
from = noteData.id;
|
|
180
|
+
to = itemId;
|
|
181
|
+
}
|
|
182
|
+
g.setEdge(from, to, {
|
|
183
|
+
arrowhead: "none",
|
|
184
|
+
arrowType: "",
|
|
185
|
+
style: G_EDGE_STYLE,
|
|
186
|
+
labelStyle: "",
|
|
187
|
+
classes: CSS_EDGE_NOTE_EDGE,
|
|
188
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
|
189
|
+
labelpos: G_EDGE_LABELPOS,
|
|
190
|
+
labelType: G_EDGE_LABELTYPE,
|
|
191
|
+
thickness: G_EDGE_THICKNESS
|
|
192
|
+
});
|
|
193
|
+
} else {
|
|
194
|
+
g.setNode(itemId, nodeData);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (parent && parent.id !== "root") {
|
|
198
|
+
log$1.trace("Setting node ", itemId, " to be child of its parent ", parent.id);
|
|
199
|
+
g.setParent(itemId, parent.id);
|
|
200
|
+
}
|
|
201
|
+
if (parsedItem.doc) {
|
|
202
|
+
log$1.trace("Adding nodes children ");
|
|
203
|
+
setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => {
|
|
207
|
+
log$1.trace("items", doc);
|
|
208
|
+
doc.forEach((item) => {
|
|
209
|
+
switch (item.stmt) {
|
|
210
|
+
case STMT_STATE:
|
|
211
|
+
setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);
|
|
212
|
+
break;
|
|
213
|
+
case DEFAULT_STATE_TYPE:
|
|
214
|
+
setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag);
|
|
215
|
+
break;
|
|
216
|
+
case STMT_RELATION:
|
|
217
|
+
{
|
|
218
|
+
setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag);
|
|
219
|
+
setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag);
|
|
220
|
+
const edgeData = {
|
|
221
|
+
id: "edge" + graphItemCount,
|
|
222
|
+
arrowhead: "normal",
|
|
223
|
+
arrowTypeEnd: "arrow_barb",
|
|
224
|
+
style: G_EDGE_STYLE,
|
|
225
|
+
labelStyle: "",
|
|
226
|
+
label: common$1.sanitizeText(item.description, getConfig()),
|
|
227
|
+
arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
|
|
228
|
+
labelpos: G_EDGE_LABELPOS,
|
|
229
|
+
labelType: G_EDGE_LABELTYPE,
|
|
230
|
+
thickness: G_EDGE_THICKNESS,
|
|
231
|
+
classes: CSS_EDGE
|
|
232
|
+
};
|
|
233
|
+
g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount);
|
|
234
|
+
graphItemCount++;
|
|
235
|
+
}
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
};
|
|
240
|
+
const getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
|
|
241
|
+
let dir = defaultDir;
|
|
242
|
+
if (parsedItem.doc) {
|
|
243
|
+
for (let i = 0; i < parsedItem.doc.length; i++) {
|
|
244
|
+
const parsedItemDoc = parsedItem.doc[i];
|
|
245
|
+
if (parsedItemDoc.stmt === "dir") {
|
|
246
|
+
dir = parsedItemDoc.value;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return dir;
|
|
251
|
+
};
|
|
252
|
+
const draw = async function(text, id, _version, diag) {
|
|
253
|
+
log$1.info("Drawing state diagram (v2)", id);
|
|
254
|
+
nodeDb = {};
|
|
255
|
+
diag.db.getDirection();
|
|
256
|
+
const { securityLevel, state: conf } = getConfig();
|
|
257
|
+
const nodeSpacing = conf.nodeSpacing || 50;
|
|
258
|
+
const rankSpacing = conf.rankSpacing || 50;
|
|
259
|
+
log$1.info(diag.db.getRootDocV2());
|
|
260
|
+
diag.db.extract(diag.db.getRootDocV2());
|
|
261
|
+
log$1.info(diag.db.getRootDocV2());
|
|
262
|
+
const diagramStates = diag.db.getStates();
|
|
263
|
+
const g = new Graph({
|
|
264
|
+
multigraph: true,
|
|
265
|
+
compound: true
|
|
266
|
+
}).setGraph({
|
|
267
|
+
rankdir: getDir(diag.db.getRootDocV2()),
|
|
268
|
+
nodesep: nodeSpacing,
|
|
269
|
+
ranksep: rankSpacing,
|
|
270
|
+
marginx: 8,
|
|
271
|
+
marginy: 8
|
|
272
|
+
}).setDefaultEdgeLabel(function() {
|
|
273
|
+
return {};
|
|
274
|
+
});
|
|
275
|
+
setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true);
|
|
276
|
+
let sandboxElement;
|
|
277
|
+
if (securityLevel === "sandbox") {
|
|
278
|
+
sandboxElement = select("#i" + id);
|
|
279
|
+
}
|
|
280
|
+
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
|
|
281
|
+
const svg = root.select(`[id="${id}"]`);
|
|
282
|
+
const element = root.select("#" + id + " g");
|
|
283
|
+
await render(element, g, ["barb"], CSS_DIAGRAM, id);
|
|
284
|
+
const padding = 8;
|
|
285
|
+
utils.insertTitle(svg, "statediagramTitleText", conf.titleTopMargin, diag.db.getDiagramTitle());
|
|
286
|
+
const bounds = svg.node().getBBox();
|
|
287
|
+
const width = bounds.width + padding * 2;
|
|
288
|
+
const height = bounds.height + padding * 2;
|
|
289
|
+
svg.attr("class", CSS_DIAGRAM);
|
|
290
|
+
const svgBounds = svg.node().getBBox();
|
|
291
|
+
configureSvgSize(svg, height, width, conf.useMaxWidth);
|
|
292
|
+
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
|
|
293
|
+
log$1.debug(`viewBox ${vBox}`);
|
|
294
|
+
svg.attr("viewBox", vBox);
|
|
295
|
+
const labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
|
|
296
|
+
for (const label of labels) {
|
|
297
|
+
const dim = label.getBBox();
|
|
298
|
+
const rect = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE);
|
|
299
|
+
rect.setAttribute("rx", 0);
|
|
300
|
+
rect.setAttribute("ry", 0);
|
|
301
|
+
rect.setAttribute("width", dim.width);
|
|
302
|
+
rect.setAttribute("height", dim.height);
|
|
303
|
+
label.insertBefore(rect, label.firstChild);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const renderer = {
|
|
307
|
+
setConf,
|
|
308
|
+
getClasses,
|
|
309
|
+
draw
|
|
310
|
+
};
|
|
311
|
+
const diagram = {
|
|
312
|
+
parser: parser$1,
|
|
313
|
+
db,
|
|
314
|
+
renderer,
|
|
315
|
+
styles,
|
|
316
|
+
init: (cnf) => {
|
|
317
|
+
if (!cnf.state) {
|
|
318
|
+
cnf.state = {};
|
|
319
|
+
}
|
|
320
|
+
cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
|
321
|
+
db.clear();
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
export {
|
|
325
|
+
diagram
|
|
326
|
+
};
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
function mkStex(mathMode) {
|
|
2
|
+
function pushCommand(state, command) {
|
|
3
|
+
state.cmdState.push(command);
|
|
4
|
+
}
|
|
5
|
+
function peekCommand(state) {
|
|
6
|
+
if (state.cmdState.length > 0) {
|
|
7
|
+
return state.cmdState[state.cmdState.length - 1];
|
|
8
|
+
} else {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function popCommand(state) {
|
|
13
|
+
var plug = state.cmdState.pop();
|
|
14
|
+
if (plug) {
|
|
15
|
+
plug.closeBracket();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function getMostPowerful(state) {
|
|
19
|
+
var context = state.cmdState;
|
|
20
|
+
for (var i = context.length - 1; i >= 0; i--) {
|
|
21
|
+
var plug = context[i];
|
|
22
|
+
if (plug.name == "DEFAULT") {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
return plug;
|
|
26
|
+
}
|
|
27
|
+
return { styleIdentifier: function() {
|
|
28
|
+
return null;
|
|
29
|
+
} };
|
|
30
|
+
}
|
|
31
|
+
function addPluginPattern(pluginName, cmdStyle, styles) {
|
|
32
|
+
return function() {
|
|
33
|
+
this.name = pluginName;
|
|
34
|
+
this.bracketNo = 0;
|
|
35
|
+
this.style = cmdStyle;
|
|
36
|
+
this.styles = styles;
|
|
37
|
+
this.argument = null;
|
|
38
|
+
this.styleIdentifier = function() {
|
|
39
|
+
return this.styles[this.bracketNo - 1] || null;
|
|
40
|
+
};
|
|
41
|
+
this.openBracket = function() {
|
|
42
|
+
this.bracketNo++;
|
|
43
|
+
return "bracket";
|
|
44
|
+
};
|
|
45
|
+
this.closeBracket = function() {
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
var plugins = {};
|
|
50
|
+
plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]);
|
|
51
|
+
plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]);
|
|
52
|
+
plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]);
|
|
53
|
+
plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]);
|
|
54
|
+
plugins["end"] = addPluginPattern("end", "tag", ["atom"]);
|
|
55
|
+
plugins["label"] = addPluginPattern("label", "tag", ["atom"]);
|
|
56
|
+
plugins["ref"] = addPluginPattern("ref", "tag", ["atom"]);
|
|
57
|
+
plugins["eqref"] = addPluginPattern("eqref", "tag", ["atom"]);
|
|
58
|
+
plugins["cite"] = addPluginPattern("cite", "tag", ["atom"]);
|
|
59
|
+
plugins["bibitem"] = addPluginPattern("bibitem", "tag", ["atom"]);
|
|
60
|
+
plugins["Bibitem"] = addPluginPattern("Bibitem", "tag", ["atom"]);
|
|
61
|
+
plugins["RBibitem"] = addPluginPattern("RBibitem", "tag", ["atom"]);
|
|
62
|
+
plugins["DEFAULT"] = function() {
|
|
63
|
+
this.name = "DEFAULT";
|
|
64
|
+
this.style = "tag";
|
|
65
|
+
this.styleIdentifier = this.openBracket = this.closeBracket = function() {
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
function setState(state, f) {
|
|
69
|
+
state.f = f;
|
|
70
|
+
}
|
|
71
|
+
function normal(source, state) {
|
|
72
|
+
var plug;
|
|
73
|
+
if (source.match(/^\\[a-zA-Z@\xc0-\u1fff\u2060-\uffff]+/)) {
|
|
74
|
+
var cmdName = source.current().slice(1);
|
|
75
|
+
plug = plugins.hasOwnProperty(cmdName) ? plugins[cmdName] : plugins["DEFAULT"];
|
|
76
|
+
plug = new plug();
|
|
77
|
+
pushCommand(state, plug);
|
|
78
|
+
setState(state, beginParams);
|
|
79
|
+
return plug.style;
|
|
80
|
+
}
|
|
81
|
+
if (source.match(/^\\[$&%#{}_]/)) {
|
|
82
|
+
return "tag";
|
|
83
|
+
}
|
|
84
|
+
if (source.match(/^\\[,;!\/\\]/)) {
|
|
85
|
+
return "tag";
|
|
86
|
+
}
|
|
87
|
+
if (source.match("\\[")) {
|
|
88
|
+
setState(state, function(source2, state2) {
|
|
89
|
+
return inMathMode(source2, state2, "\\]");
|
|
90
|
+
});
|
|
91
|
+
return "keyword";
|
|
92
|
+
}
|
|
93
|
+
if (source.match("\\(")) {
|
|
94
|
+
setState(state, function(source2, state2) {
|
|
95
|
+
return inMathMode(source2, state2, "\\)");
|
|
96
|
+
});
|
|
97
|
+
return "keyword";
|
|
98
|
+
}
|
|
99
|
+
if (source.match("$$")) {
|
|
100
|
+
setState(state, function(source2, state2) {
|
|
101
|
+
return inMathMode(source2, state2, "$$");
|
|
102
|
+
});
|
|
103
|
+
return "keyword";
|
|
104
|
+
}
|
|
105
|
+
if (source.match("$")) {
|
|
106
|
+
setState(state, function(source2, state2) {
|
|
107
|
+
return inMathMode(source2, state2, "$");
|
|
108
|
+
});
|
|
109
|
+
return "keyword";
|
|
110
|
+
}
|
|
111
|
+
var ch = source.next();
|
|
112
|
+
if (ch == "%") {
|
|
113
|
+
source.skipToEnd();
|
|
114
|
+
return "comment";
|
|
115
|
+
} else if (ch == "}" || ch == "]") {
|
|
116
|
+
plug = peekCommand(state);
|
|
117
|
+
if (plug) {
|
|
118
|
+
plug.closeBracket(ch);
|
|
119
|
+
setState(state, beginParams);
|
|
120
|
+
} else {
|
|
121
|
+
return "error";
|
|
122
|
+
}
|
|
123
|
+
return "bracket";
|
|
124
|
+
} else if (ch == "{" || ch == "[") {
|
|
125
|
+
plug = plugins["DEFAULT"];
|
|
126
|
+
plug = new plug();
|
|
127
|
+
pushCommand(state, plug);
|
|
128
|
+
return "bracket";
|
|
129
|
+
} else if (/\d/.test(ch)) {
|
|
130
|
+
source.eatWhile(/[\w.%]/);
|
|
131
|
+
return "atom";
|
|
132
|
+
} else {
|
|
133
|
+
source.eatWhile(/[\w\-_]/);
|
|
134
|
+
plug = getMostPowerful(state);
|
|
135
|
+
if (plug.name == "begin") {
|
|
136
|
+
plug.argument = source.current();
|
|
137
|
+
}
|
|
138
|
+
return plug.styleIdentifier();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function inMathMode(source, state, endModeSeq) {
|
|
142
|
+
if (source.eatSpace()) {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
if (endModeSeq && source.match(endModeSeq)) {
|
|
146
|
+
setState(state, normal);
|
|
147
|
+
return "keyword";
|
|
148
|
+
}
|
|
149
|
+
if (source.match(/^\\[a-zA-Z@]+/)) {
|
|
150
|
+
return "tag";
|
|
151
|
+
}
|
|
152
|
+
if (source.match(/^[a-zA-Z]+/)) {
|
|
153
|
+
return "variableName.special";
|
|
154
|
+
}
|
|
155
|
+
if (source.match(/^\\[$&%#{}_]/)) {
|
|
156
|
+
return "tag";
|
|
157
|
+
}
|
|
158
|
+
if (source.match(/^\\[,;!\/]/)) {
|
|
159
|
+
return "tag";
|
|
160
|
+
}
|
|
161
|
+
if (source.match(/^[\^_&]/)) {
|
|
162
|
+
return "tag";
|
|
163
|
+
}
|
|
164
|
+
if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) {
|
|
168
|
+
return "number";
|
|
169
|
+
}
|
|
170
|
+
var ch = source.next();
|
|
171
|
+
if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") {
|
|
172
|
+
return "bracket";
|
|
173
|
+
}
|
|
174
|
+
if (ch == "%") {
|
|
175
|
+
source.skipToEnd();
|
|
176
|
+
return "comment";
|
|
177
|
+
}
|
|
178
|
+
return "error";
|
|
179
|
+
}
|
|
180
|
+
function beginParams(source, state) {
|
|
181
|
+
var ch = source.peek(), lastPlug;
|
|
182
|
+
if (ch == "{" || ch == "[") {
|
|
183
|
+
lastPlug = peekCommand(state);
|
|
184
|
+
lastPlug.openBracket(ch);
|
|
185
|
+
source.eat(ch);
|
|
186
|
+
setState(state, normal);
|
|
187
|
+
return "bracket";
|
|
188
|
+
}
|
|
189
|
+
if (/[ \t\r]/.test(ch)) {
|
|
190
|
+
source.eat(ch);
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
setState(state, normal);
|
|
194
|
+
popCommand(state);
|
|
195
|
+
return normal(source, state);
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
name: "stex",
|
|
199
|
+
startState: function() {
|
|
200
|
+
var f = mathMode ? function(source, state) {
|
|
201
|
+
return inMathMode(source, state);
|
|
202
|
+
} : normal;
|
|
203
|
+
return {
|
|
204
|
+
cmdState: [],
|
|
205
|
+
f
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
copyState: function(s) {
|
|
209
|
+
return {
|
|
210
|
+
cmdState: s.cmdState.slice(),
|
|
211
|
+
f: s.f
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
token: function(stream, state) {
|
|
215
|
+
return state.f(stream, state);
|
|
216
|
+
},
|
|
217
|
+
blankLine: function(state) {
|
|
218
|
+
state.f = normal;
|
|
219
|
+
state.cmdState.length = 0;
|
|
220
|
+
},
|
|
221
|
+
languageData: {
|
|
222
|
+
commentTokens: { line: "%" }
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const stex = mkStex(false);
|
|
227
|
+
const stexMath = mkStex(true);
|
|
228
|
+
export {
|
|
229
|
+
stex,
|
|
230
|
+
stexMath
|
|
231
|
+
};
|