preview-artifact 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/bin/preview-artifact.js +125 -0
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/apl-CnwPGSsG.js +1 -0
- package/dist/assets/arc-CJ3_-PAT.js +1 -0
- package/dist/assets/architecture-7EHR7CIX-Z0xF5NqR.js +1 -0
- package/dist/assets/architectureDiagram-3BPJPVTR--rREWXNq.js +36 -0
- package/dist/assets/asciiarmor-qTkVPQu6.js +1 -0
- package/dist/assets/asn1-Dr8qZg38.js +1 -0
- package/dist/assets/asterisk-Bja0s6e1.js +1 -0
- package/dist/assets/blockDiagram-GPEHLZMM-BV1c1Mfq.js +132 -0
- package/dist/assets/brainfuck-D5EjA2JK.js +1 -0
- package/dist/assets/c4Diagram-AAUBKEIU-Bc6XHTqW.js +10 -0
- package/dist/assets/channel-Bj7QtUIY.js +1 -0
- package/dist/assets/chunk-2J33WTMH-eTp7ioqm.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-DeAmcro3.js +1 -0
- package/dist/assets/chunk-55IACEB6-fvzFs169.js +1 -0
- package/dist/assets/chunk-727SXJPM-BWnGyv0z.js +206 -0
- package/dist/assets/chunk-AQP2D5EJ-DpWR_SeI.js +231 -0
- package/dist/assets/chunk-FMBD7UC4-DMyBW8iC.js +15 -0
- package/dist/assets/chunk-ND2GUHAM-BWO3mIks.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-BZ-TNixB.js +1 -0
- package/dist/assets/classDiagram-4FO5ZUOK-DfFXNbKt.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DfFXNbKt.js +1 -0
- package/dist/assets/clike-DHH8Ad3s.js +1 -0
- package/dist/assets/clojure-BflJGmDX.js +1 -0
- package/dist/assets/cmake-CyVbuzPu.js +1 -0
- package/dist/assets/cobol-B_OZ4V-R.js +1 -0
- package/dist/assets/coffeescript-B2pKbFk8.js +1 -0
- package/dist/assets/commonlisp-CcllspGY.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-C0oZ9Wdh.js +1 -0
- package/dist/assets/crystal-M5-qzICs.js +1 -0
- package/dist/assets/css-CYpP4FRV.js +1 -0
- package/dist/assets/cypher-p9eYesGn.js +1 -0
- package/dist/assets/cytoscape.esm-FqbQrHcz.js +321 -0
- package/dist/assets/d-BhMjBjQP.js +1 -0
- package/dist/assets/dagre-BM42HDAG-8yabnAvH.js +4 -0
- package/dist/assets/dagre-DjzBNxbY.js +1 -0
- package/dist/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/dist/assets/diagram-2AECGRRQ-8ounJ_ea.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-Dis8fSWn.js +10 -0
- package/dist/assets/diagram-KO2AKTUF-C6EHdpm4.js +3 -0
- package/dist/assets/diagram-LMA3HP47-DNFfc6f_.js +24 -0
- package/dist/assets/diagram-OG6HWLK6-T3xi-usC.js +24 -0
- package/dist/assets/diff-ChtP43wD.js +1 -0
- package/dist/assets/dist-3LHbYvzB.js +1 -0
- package/dist/assets/dist-BBZDeMcg.js +1 -0
- package/dist/assets/dist-BQ3j-7m-.js +6 -0
- package/dist/assets/dist-BaQ073UB.js +1 -0
- package/dist/assets/dist-Bat5IVRd.js +1 -0
- package/dist/assets/dist-BzXJV1j0.js +23 -0
- package/dist/assets/dist-C4F0WDhe.js +1 -0
- package/dist/assets/dist-CEGhJ1xl.js +1 -0
- package/dist/assets/dist-CF78u7GS.js +1 -0
- package/dist/assets/dist-CMxhtH1e.js +1 -0
- package/dist/assets/dist-CN0qWAiT.js +1 -0
- package/dist/assets/dist-CO6gjtrq.js +11 -0
- package/dist/assets/dist-CwfCEqoZ.js +1 -0
- package/dist/assets/dist-CxkjL8u9.js +1 -0
- package/dist/assets/dist-D3Gxtn_g.js +2 -0
- package/dist/assets/dist-D9o03QzN.js +1 -0
- package/dist/assets/dist-DUVOpSfr.js +1 -0
- package/dist/assets/dist-DVp3z0N1.js +9 -0
- package/dist/assets/dist-DbgoG8p0.js +1 -0
- package/dist/assets/dist-Dx7RIjDF.js +1 -0
- package/dist/assets/dist-hHJOGFR3.js +1 -0
- package/dist/assets/dist-r1yFQKfc.js +1 -0
- package/dist/assets/dockerfile-BLkNEvjs.js +1 -0
- package/dist/assets/dtd-DTF72YNO.js +1 -0
- package/dist/assets/dylan-C6jEEEk-.js +1 -0
- package/dist/assets/ebnf-D4c0_ac3.js +1 -0
- package/dist/assets/ecl-BSZaIHnp.js +1 -0
- package/dist/assets/eiffel-BEjRio4Q.js +1 -0
- package/dist/assets/elm-Cshzl8qu.js +1 -0
- package/dist/assets/erDiagram-TEJ5UH35-DmLQldz3.js +85 -0
- package/dist/assets/erlang-DaB2Rkuy.js +1 -0
- package/dist/assets/eventmodeling-FCH6USID-CjbfWKFY.js +1 -0
- package/dist/assets/factor-D7LVTn2l.js +1 -0
- package/dist/assets/fcl-ClOhbFR7.js +1 -0
- package/dist/assets/flowDiagram-I6XJVG4X-DVUVTV7y.js +162 -0
- package/dist/assets/forth-Cezjo90N.js +1 -0
- package/dist/assets/fortran-Bt6PBEDR.js +1 -0
- package/dist/assets/ganttDiagram-6RSMTGT7-B29Uh60s.js +292 -0
- package/dist/assets/gas-BHEdbvp9.js +1 -0
- package/dist/assets/gherkin-oBAE_ms0.js +1 -0
- package/dist/assets/gitGraph-WXDBUCRP-UjXKP53I.js +1 -0
- package/dist/assets/gitGraphDiagram-PVQCEYII-smrXHnBr.js +106 -0
- package/dist/assets/graphlib-DpLcPBYV.js +1 -0
- package/dist/assets/groovy-BC3IOsC8.js +1 -0
- package/dist/assets/haskell-BRsoo5mP.js +1 -0
- package/dist/assets/haxe-DIz0ZZqd.js +1 -0
- package/dist/assets/http-CLVgA2GD.js +1 -0
- package/dist/assets/idl-BUZw3wgd.js +1 -0
- package/dist/assets/index-Czi2sVlL.js +1910 -0
- package/dist/assets/index-nBHjSfNd.css +1 -0
- package/dist/assets/info-J43DQDTF-D0rV5uTf.js +1 -0
- package/dist/assets/infoDiagram-5YYISTIA-B1Gf8Uv-.js +2 -0
- package/dist/assets/init-D6jRqBbL.js +1 -0
- package/dist/assets/ishikawaDiagram-YF4QCWOH-D02jcukO.js +70 -0
- package/dist/assets/javascript-9Tg8ixDm.js +1 -0
- package/dist/assets/journeyDiagram-JHISSGLW-B2VXi2OP.js +139 -0
- package/dist/assets/julia-CQfgDRfP.js +1 -0
- package/dist/assets/kanban-definition-UN3LZRKU-2-V_ZAd5.js +89 -0
- package/dist/assets/katex-Vhh-h91d.js +257 -0
- package/dist/assets/linear-BEHGKHxt.js +1 -0
- package/dist/assets/livescript-BXxG0Yva.js +1 -0
- package/dist/assets/lua-CiA1ziua.js +1 -0
- package/dist/assets/mathematica-u8YMmbU0.js +1 -0
- package/dist/assets/mbox-BEMVcqjs.js +1 -0
- package/dist/assets/mermaid-parser.core-DedvXRIg.js +161 -0
- package/dist/assets/mindmap-definition-RKZ34NQL-CmE26Ash.js +96 -0
- package/dist/assets/mirc-C9zpzAZU.js +1 -0
- package/dist/assets/mllike-B45xgp2S.js +1 -0
- package/dist/assets/modelica-CqHI_q-D.js +1 -0
- package/dist/assets/mscgen-qgSLujhx.js +1 -0
- package/dist/assets/mumps-CW_TBmxz.js +1 -0
- package/dist/assets/nginx-BMaDbqW3.js +1 -0
- package/dist/assets/nsis-AQ_alPln.js +1 -0
- package/dist/assets/ntriples-d28e9m0E.js +1 -0
- package/dist/assets/octave-D2Q8cUp1.js +1 -0
- package/dist/assets/ordinal-hYBb2elL.js +1 -0
- package/dist/assets/oz-BwTct_5T.js +1 -0
- package/dist/assets/packet-YPE3B663-BgNtBtap.js +1 -0
- package/dist/assets/pascal-Dp_KdFgX.js +1 -0
- package/dist/assets/perl-CdEHsPfU.js +1 -0
- package/dist/assets/pie-LRSECV5Y-BtNYo6fY.js +1 -0
- package/dist/assets/pieDiagram-4H26LBE5-DA8Tc6HA.js +30 -0
- package/dist/assets/pig-AF4Hwhju.js +1 -0
- package/dist/assets/playfair-display-cyrillic-600-normal-DbWAkkgN.woff +0 -0
- package/dist/assets/playfair-display-cyrillic-600-normal-oLY6jnZ7.woff2 +0 -0
- package/dist/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
- package/dist/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
- package/dist/assets/playfair-display-latin-600-normal-CZLGqjJe.woff2 +0 -0
- package/dist/assets/playfair-display-latin-600-normal-CxxueQ0Z.woff +0 -0
- package/dist/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
- package/dist/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
- package/dist/assets/playfair-display-latin-ext-600-normal-BumBfC1v.woff +0 -0
- package/dist/assets/playfair-display-latin-ext-600-normal-CEjQclLc.woff2 +0 -0
- package/dist/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
- package/dist/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
- package/dist/assets/playfair-display-vietnamese-600-normal-BPJkAZPN.woff +0 -0
- package/dist/assets/playfair-display-vietnamese-600-normal-ICsRR-qJ.woff2 +0 -0
- package/dist/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
- package/dist/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
- package/dist/assets/powershell-CzG71I4L.js +1 -0
- package/dist/assets/properties-C357ku5U.js +1 -0
- package/dist/assets/protobuf-D1ij_kNL.js +1 -0
- package/dist/assets/pug-Bugr-47h.js +1 -0
- package/dist/assets/puppet-B4hC2X4m.js +1 -0
- package/dist/assets/python-BqYw9LYJ.js +1 -0
- package/dist/assets/q-B9NhS7L_.js +1 -0
- package/dist/assets/quadrantDiagram-W4KKPZXB-Kkoca0z9.js +7 -0
- package/dist/assets/r-DADKenSm.js +1 -0
- package/dist/assets/radar-GUYGQ44K-CT8UiwEf.js +1 -0
- package/dist/assets/requirementDiagram-4Y6WPE33-lfBTeFxy.js +84 -0
- package/dist/assets/rpm-gpDK5sbt.js +1 -0
- package/dist/assets/ruby-DsYpTuWg.js +1 -0
- package/dist/assets/sankeyDiagram-5OEKKPKP-I9io9g_r.js +40 -0
- package/dist/assets/sas-C2OyD2Y6.js +1 -0
- package/dist/assets/scheme-CyDdOh7e.js +1 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-DctmO3Ji.js +162 -0
- package/dist/assets/shell-Du5Qg9im.js +1 -0
- package/dist/assets/sieve-BAxa3IjF.js +1 -0
- package/dist/assets/simple-mode-DRpGK0lJ.js +1 -0
- package/dist/assets/smalltalk-BLp5-jwC.js +1 -0
- package/dist/assets/solr-BBopId9w.js +1 -0
- package/dist/assets/source-serif-4-cyrillic-400-normal-B8Z6Jvzv.woff +0 -0
- package/dist/assets/source-serif-4-cyrillic-400-normal-C44pakCn.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-600-normal-BDP5YDHD.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-600-normal-DFnC3vAY.woff +0 -0
- package/dist/assets/source-serif-4-cyrillic-ext-400-normal-CWV284fw.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-ext-400-normal-DLkyKLvH.woff +0 -0
- package/dist/assets/source-serif-4-cyrillic-ext-600-normal-D_E8FDgP.woff2 +0 -0
- package/dist/assets/source-serif-4-cyrillic-ext-600-normal-DiT2IGQm.woff +0 -0
- package/dist/assets/source-serif-4-greek-400-normal-BccYJ-vZ.woff +0 -0
- package/dist/assets/source-serif-4-greek-400-normal-Cw5-AHNN.woff2 +0 -0
- package/dist/assets/source-serif-4-greek-600-normal-DdRkKr-1.woff2 +0 -0
- package/dist/assets/source-serif-4-greek-600-normal-DhXQw1Kl.woff +0 -0
- package/dist/assets/source-serif-4-latin-400-normal-DJ5YJwmz.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-400-normal-Dn3IlU-Z.woff +0 -0
- package/dist/assets/source-serif-4-latin-600-normal-DMD1h6_f.woff +0 -0
- package/dist/assets/source-serif-4-latin-600-normal-DouSKlru.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-ext-400-normal-CEpydyUl.woff +0 -0
- package/dist/assets/source-serif-4-latin-ext-400-normal-Cp7z-ARB.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-ext-600-normal-0sIUyHMO.woff2 +0 -0
- package/dist/assets/source-serif-4-latin-ext-600-normal-C6NNqpJh.woff +0 -0
- package/dist/assets/source-serif-4-vietnamese-400-normal-BbG3LG1A.woff2 +0 -0
- package/dist/assets/source-serif-4-vietnamese-400-normal-DR1UuFon.woff +0 -0
- package/dist/assets/source-serif-4-vietnamese-600-normal-B0WJbuqT.woff +0 -0
- package/dist/assets/source-serif-4-vietnamese-600-normal-CznyfUKR.woff2 +0 -0
- package/dist/assets/sparql-Dz-mlCAC.js +1 -0
- package/dist/assets/spreadsheet-CTIncYxj.js +1 -0
- package/dist/assets/sql-DcCJ9jop.js +1 -0
- package/dist/assets/stateDiagram-AJRCARHV-C5Nx7EBG.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-MxkuKT7f.js +1 -0
- package/dist/assets/stex-sDrdk2BW.js +1 -0
- package/dist/assets/stylus-DLLZ8dgm.js +1 -0
- package/dist/assets/swift-DKB6_1j6.js +1 -0
- package/dist/assets/tcl-BGfruO1u.js +1 -0
- package/dist/assets/textile-DWBqthVk.js +1 -0
- package/dist/assets/tiddlywiki-VlUiK86J.js +1 -0
- package/dist/assets/tiki-CxVlf5KZ.js +1 -0
- package/dist/assets/timeline-definition-PNZ67QCA-Dg9cWzqH.js +120 -0
- package/dist/assets/toml-LvoKBwCs.js +1 -0
- package/dist/assets/treeView-BLDUP644-DwODQHAM.js +1 -0
- package/dist/assets/treemap-LRROVOQU-D1GWl9XK.js +1 -0
- package/dist/assets/troff-C2dAgh7P.js +1 -0
- package/dist/assets/ttcn-BePYh-hG.js +1 -0
- package/dist/assets/ttcn-cfg-CY0aot7Q.js +1 -0
- package/dist/assets/turtle-BDLWE2cD.js +1 -0
- package/dist/assets/vb-BthdM_4N.js +1 -0
- package/dist/assets/vbscript-D9f6rSsU.js +1 -0
- package/dist/assets/velocity-CqftRsjg.js +1 -0
- package/dist/assets/vennDiagram-CIIHVFJN-Cq75Ue3t.js +34 -0
- package/dist/assets/verilog-D-x6ne0Z.js +1 -0
- package/dist/assets/vhdl-CMrOq2q1.js +1 -0
- package/dist/assets/wardley-L42UT6IY-C--1EU_5.js +1 -0
- package/dist/assets/wardleyDiagram-YWT4CUSO-DDjtFIKf.js +78 -0
- package/dist/assets/webidl-D5jiJvOU.js +1 -0
- package/dist/assets/xquery-fj_R-kMw.js +1 -0
- package/dist/assets/xychartDiagram-2RQKCTM6-xtq4jnQX.js +7 -0
- package/dist/assets/yacas-CXXgtw0p.js +1 -0
- package/dist/assets/z80-CL1naaMV.js +1 -0
- package/dist/index.html +13 -0
- package/package.json +76 -0
- package/server/index.mjs +224 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anup Aglawe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# preview-artifact
|
|
2
|
+
|
|
3
|
+
Open the artifacts your coding agents produce (plans, design docs, audit
|
|
4
|
+
reports, papers) in the browser — **read them beautifully, edit them in place,
|
|
5
|
+
save back to disk, and live-reload** when an agent rewrites the file.
|
|
6
|
+
|
|
7
|
+
Handles **Markdown** (`.md`), **LaTeX** (`.tex`), and **PDF** (`.pdf`).
|
|
8
|
+
|
|
9
|
+
Fully local. No cloud, no telemetry, no account.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
preview-artifact open docs/plans/2026-05-31-some-design.md
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Screenshots
|
|
16
|
+
|
|
17
|
+
Editorial read view — serif display type, warm paper, orange frame:
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
Rich markdown — images, headings, and a live mermaid diagram, GFM tables, task
|
|
22
|
+
lists and KaTeX math:
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
LaTeX (`.tex`) — equations typeset by KaTeX over highlighted source:
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
WYSIWYG edit mode (Milkdown) with the YAML frontmatter split into its own panel:
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
## Why
|
|
36
|
+
|
|
37
|
+
Terminal markdown is hard to read and IDE preview is read-only & bland. AI
|
|
38
|
+
artifacts are code-heavy — fenced code, mermaid diagrams, GFM tables, YAML
|
|
39
|
+
frontmatter, task lists — and deserve a real reading surface you can also edit.
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Read mode** — rich typography (GitHub markdown CSS), syntax-highlighted
|
|
44
|
+
code (highlight.js), rendered **mermaid** diagrams, GFM tables and task lists,
|
|
45
|
+
**KaTeX math** (`$…$` / `$$…$$`), and **images** (remote URLs plus local files
|
|
46
|
+
resolved relative to the document, in both read and edit modes).
|
|
47
|
+
- **LaTeX (`.tex`)** — display equations typeset by KaTeX with the rest shown as
|
|
48
|
+
highlighted LaTeX source; editable and saveable as plain source.
|
|
49
|
+
- **PDF (`.pdf`)** — embedded read-only viewer.
|
|
50
|
+
- **Edit mode** — Milkdown (ProseMirror) WYSIWYG that round-trips markdown
|
|
51
|
+
faithfully. YAML frontmatter is split into its own panel so the editor can
|
|
52
|
+
never corrupt it.
|
|
53
|
+
- **Save** — writes back to the same file. `Cmd/Ctrl+S`.
|
|
54
|
+
- **Live-reload** — a file watcher pushes external changes over a websocket; if
|
|
55
|
+
you have unsaved edits it asks before discarding them.
|
|
56
|
+
- **Toggle** — `Cmd/Ctrl+E` flips Read ⇄ Edit.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
Requires Node ≥ 18. One command — installs the `preview-artifact` binary
|
|
61
|
+
globally (builds itself on install):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# once published to npm:
|
|
65
|
+
npm install -g preview-artifact
|
|
66
|
+
|
|
67
|
+
# or straight from GitHub today:
|
|
68
|
+
npm install -g github:anup-a/preview-artifact
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<details>
|
|
72
|
+
<summary>From a local clone (for development)</summary>
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git clone https://github.com/anup-a/preview-artifact.git
|
|
76
|
+
cd preview-artifact
|
|
77
|
+
npm install # runs the build automatically (prepare script)
|
|
78
|
+
npm link # makes `preview-artifact` available globally
|
|
79
|
+
```
|
|
80
|
+
</details>
|
|
81
|
+
|
|
82
|
+
## Usage
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
preview-artifact open path/to/file.md # open in the browser
|
|
86
|
+
preview-artifact path/to/file.md # shorthand
|
|
87
|
+
preview-artifact open file.md --no-open # start server without launching a browser
|
|
88
|
+
preview-artifact --help
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Use it from any project — it's not tied to any particular repo.
|
|
92
|
+
|
|
93
|
+
## Use it from your coding agent
|
|
94
|
+
|
|
95
|
+
This tool is meant to be launched *by* your agent when it finishes writing an
|
|
96
|
+
artifact. The CLI self-daemonizes and returns immediately, so agents just run it
|
|
97
|
+
— no backgrounding needed. See [`AGENTS.md`](./AGENTS.md) for the canonical
|
|
98
|
+
instructions; quick reference below.
|
|
99
|
+
|
|
100
|
+
### Claude Code (plugin)
|
|
101
|
+
|
|
102
|
+
Install the plugin from this repo's marketplace, which adds the
|
|
103
|
+
`/preview-artifact` command in every project:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
/plugin marketplace add anup-a/preview-artifact
|
|
107
|
+
/plugin install preview-artifact@preview-artifact
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Then: `/preview-artifact path/to/file.md`. (When working inside this repo the
|
|
111
|
+
command is also auto-available from [`.claude/commands/`](./.claude/commands/).)
|
|
112
|
+
|
|
113
|
+
### Codex (custom prompt)
|
|
114
|
+
|
|
115
|
+
Adds a `/preview-artifact` slash command to Codex. See
|
|
116
|
+
[`plugins/codex/`](./plugins/codex/):
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
mkdir -p ~/.codex/prompts
|
|
120
|
+
cp plugins/codex/prompts/preview-artifact.md ~/.codex/prompts/
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Cursor / Aider / other shell agents
|
|
124
|
+
|
|
125
|
+
They read `AGENTS.md` automatically and can launch it directly:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
preview-artifact open path/to/file.md # prints the URL, then returns
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### If `preview-artifact` isn't on your agent's PATH
|
|
132
|
+
|
|
133
|
+
`npm link` installs the binary into npm's global bin. If your agent runs with a
|
|
134
|
+
minimal PATH and can't find it, add npm's global bin to PATH:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
export PATH="$(npm prefix -g)/bin:$PATH"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
…or run it straight from the cloned repo without linking at all:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
node bin/preview-artifact.js open file.md # from the preview-artifact/ dir
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## How it works
|
|
147
|
+
|
|
148
|
+
One shared **daemon** serves every file; the file is passed as a `?path=` query
|
|
149
|
+
parameter rather than getting its own server/port. The CLI auto-starts the
|
|
150
|
+
daemon (detached) on first use, reuses it afterward, and records its port in
|
|
151
|
+
`~/.preview-artifact/daemon.json`.
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
bin/preview-artifact.js CLI — ensures the daemon is up, opens /?path=<file>
|
|
155
|
+
server/index.mjs daemon: serves the SPA, GET/PUT /api/file?path=,
|
|
156
|
+
GET /api/raw?path= (pdf bytes), /ws?path= live-reload
|
|
157
|
+
src/ Vite + React SPA
|
|
158
|
+
App.tsx orchestration: load, read/edit toggle, save, reload
|
|
159
|
+
readview.ts markdown-it + highlight.js + mermaid + KaTeX (read mode)
|
|
160
|
+
Editor.tsx Milkdown Crepe wrapper (markdown edit mode)
|
|
161
|
+
frontmatter.ts split/join YAML frontmatter so it never round-trips
|
|
162
|
+
.claude/commands/ Claude Code /preview-artifact slash command
|
|
163
|
+
AGENTS.md instructions for coding agents
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
- Binds to `127.0.0.1` only and sets no CORS headers, so cross-origin pages
|
|
167
|
+
can't read API responses or perform preflighted writes.
|
|
168
|
+
- Markdown frontmatter is sliced off before the editor sees the body and
|
|
169
|
+
re-attached verbatim on save, so YAML survives editing untouched.
|
|
170
|
+
|
|
171
|
+
## Development
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
node server/index.mjs # start the daemon (default port 4317)
|
|
175
|
+
npm run dev # Vite dev server, proxies /api + /ws to 4317
|
|
176
|
+
# then open http://localhost:5173/?path=/abs/path/to/file.md
|
|
177
|
+
npm run typecheck
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
After any change under `src/`, run `npm run build` — the daemon serves the built
|
|
181
|
+
`dist/`, not live source.
|
|
182
|
+
|
|
183
|
+
## Scope
|
|
184
|
+
|
|
185
|
+
v1 is deliberately single-file. No directory browser, auth, multi-user, or
|
|
186
|
+
collaboration — git already handles history.
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
MIT
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// CLI for preview-artifact.
|
|
3
|
+
//
|
|
4
|
+
// preview-artifact open <file> open a file in the shared local daemon
|
|
5
|
+
// preview-artifact <file> shorthand for "open"
|
|
6
|
+
// preview-artifact stop stop the daemon
|
|
7
|
+
//
|
|
8
|
+
// A single daemon serves every file (passed as ?path=), auto-started on first
|
|
9
|
+
// use and reused afterwards. State lives in ~/.preview-artifact/daemon.json.
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import os from "node:os";
|
|
12
|
+
import { existsSync, readFileSync, mkdirSync, openSync } from "node:fs";
|
|
13
|
+
import { spawn } from "node:child_process";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
import open from "open";
|
|
16
|
+
|
|
17
|
+
const STATE_DIR = path.join(os.homedir(), ".preview-artifact");
|
|
18
|
+
const STATE_FILE = path.join(STATE_DIR, "daemon.json");
|
|
19
|
+
const LOG_FILE = path.join(STATE_DIR, "daemon.log");
|
|
20
|
+
const serverEntry = fileURLToPath(new URL("../server/index.mjs", import.meta.url));
|
|
21
|
+
|
|
22
|
+
function usage(code = 0) {
|
|
23
|
+
console.log(`preview-artifact — read & edit agent artifacts in the browser
|
|
24
|
+
|
|
25
|
+
Usage:
|
|
26
|
+
preview-artifact open <file> Open a .md / .tex / .pdf file in the browser
|
|
27
|
+
preview-artifact <file> Shorthand for "open"
|
|
28
|
+
preview-artifact stop Stop the background daemon
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
--no-open Print the URL but don't launch a browser
|
|
32
|
+
-h, --help Show this help
|
|
33
|
+
`);
|
|
34
|
+
process.exit(code);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function readState() {
|
|
38
|
+
if (!existsSync(STATE_FILE)) return null;
|
|
39
|
+
try {
|
|
40
|
+
return JSON.parse(readFileSync(STATE_FILE, "utf8"));
|
|
41
|
+
} catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Return the port of a running, healthy daemon, or null.
|
|
47
|
+
async function healthyPort() {
|
|
48
|
+
const state = readState();
|
|
49
|
+
if (!state?.port) return null;
|
|
50
|
+
try {
|
|
51
|
+
const res = await fetch(`http://127.0.0.1:${state.port}/api/health`, {
|
|
52
|
+
signal: AbortSignal.timeout(800),
|
|
53
|
+
});
|
|
54
|
+
if (!res.ok) return null;
|
|
55
|
+
const body = await res.json();
|
|
56
|
+
return body?.app === "preview-artifact" ? state.port : null;
|
|
57
|
+
} catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function startDaemon() {
|
|
63
|
+
mkdirSync(STATE_DIR, { recursive: true });
|
|
64
|
+
const out = openSync(LOG_FILE, "a");
|
|
65
|
+
const child = spawn(process.execPath, [serverEntry], {
|
|
66
|
+
detached: true,
|
|
67
|
+
stdio: ["ignore", out, out],
|
|
68
|
+
env: process.env,
|
|
69
|
+
});
|
|
70
|
+
child.unref();
|
|
71
|
+
// Poll for the daemon to come up (~5s max).
|
|
72
|
+
for (let i = 0; i < 50; i++) {
|
|
73
|
+
await new Promise((r) => setTimeout(r, 100));
|
|
74
|
+
const port = await healthyPort();
|
|
75
|
+
if (port) return port;
|
|
76
|
+
}
|
|
77
|
+
throw new Error(`daemon did not start; see ${LOG_FILE}`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function stopDaemon() {
|
|
81
|
+
const state = readState();
|
|
82
|
+
if (!state?.pid) {
|
|
83
|
+
console.log("preview-artifact: no daemon running");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
process.kill(state.pid, "SIGTERM");
|
|
88
|
+
console.log(`preview-artifact: stopped daemon (pid ${state.pid})`);
|
|
89
|
+
} catch {
|
|
90
|
+
console.log("preview-artifact: daemon not running");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async function openFile(file, noOpen) {
|
|
95
|
+
const target = path.resolve(process.cwd(), file);
|
|
96
|
+
if (!existsSync(target)) {
|
|
97
|
+
console.error(`error: file not found: ${target}`);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
const port = (await healthyPort()) ?? (await startDaemon());
|
|
101
|
+
const url = `http://127.0.0.1:${port}/?path=${encodeURIComponent(target)}`;
|
|
102
|
+
console.log(`[preview-artifact] ${path.basename(target)} → ${url}`);
|
|
103
|
+
if (!noOpen) {
|
|
104
|
+
await open(url).catch(() => console.log(`open your browser at ${url}`));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const argv = process.argv.slice(2);
|
|
109
|
+
if (argv.includes("-h") || argv.includes("--help") || argv.length === 0) {
|
|
110
|
+
usage(0);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const noOpen = argv.includes("--no-open");
|
|
114
|
+
const positional = argv.filter((a) => !a.startsWith("-"));
|
|
115
|
+
|
|
116
|
+
if (positional[0] === "stop") {
|
|
117
|
+
await stopDaemon();
|
|
118
|
+
} else {
|
|
119
|
+
const file = positional[0] === "open" ? positional[1] : positional[0];
|
|
120
|
+
if (!file) {
|
|
121
|
+
console.error("error: no file specified\n");
|
|
122
|
+
usage(1);
|
|
123
|
+
}
|
|
124
|
+
await openFile(file, noOpen);
|
|
125
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"+":[`conjugate`,`add`],"−":[`negate`,`subtract`],"×":[`signOf`,`multiply`],"÷":[`reciprocal`,`divide`],"⌈":[`ceiling`,`greaterOf`],"⌊":[`floor`,`lesserOf`],"∣":[`absolute`,`residue`],"⍳":[`indexGenerate`,`indexOf`],"?":[`roll`,`deal`],"⋆":[`exponentiate`,`toThePowerOf`],"⍟":[`naturalLog`,`logToTheBase`],"○":[`piTimes`,`circularFuncs`],"!":[`factorial`,`binomial`],"⌹":[`matrixInverse`,`matrixDivide`],"<":[null,`lessThan`],"≤":[null,`lessThanOrEqual`],"=":[null,`equals`],">":[null,`greaterThan`],"≥":[null,`greaterThanOrEqual`],"≠":[null,`notEqual`],"≡":[`depth`,`match`],"≢":[null,`notMatch`],"∈":[`enlist`,`membership`],"⍷":[null,`find`],"∪":[`unique`,`union`],"∩":[null,`intersection`],"∼":[`not`,`without`],"∨":[null,`or`],"∧":[null,`and`],"⍱":[null,`nor`],"⍲":[null,`nand`],"⍴":[`shapeOf`,`reshape`],",":[`ravel`,`catenate`],"⍪":[null,`firstAxisCatenate`],"⌽":[`reverse`,`rotate`],"⊖":[`axis1Reverse`,`axis1Rotate`],"⍉":[`transpose`,null],"↑":[`first`,`take`],"↓":[null,`drop`],"⊂":[`enclose`,`partitionWithAxis`],"⊃":[`diclose`,`pick`],"⌷":[null,`index`],"⍋":[`gradeUp`,null],"⍒":[`gradeDown`,null],"⊤":[`encode`,null],"⊥":[`decode`,null],"⍕":[`format`,`formatByExample`],"⍎":[`execute`,null],"⊣":[`stop`,`left`],"⊢":[`pass`,`right`]},t=/[\.\/⌿⍀¨⍣]/,n=/⍬/,r=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,i=/←/,a=/[⍝#].*$/,o=function(e){var t=!1;return function(n){return t=n,n===e?t===`\\`:!0}},s={name:`apl`,startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(s,c){var l;return s.eatSpace()?null:(l=s.next(),l===`"`||l===`'`?(s.eatWhile(o(l)),s.next(),c.prev=!0,`string`):/[\[{\(]/.test(l)?(c.prev=!1,null):/[\]}\)]/.test(l)?(c.prev=!0,null):n.test(l)?(c.prev=!1,`atom`):/[¯\d]/.test(l)?(c.func?(c.func=!1,c.prev=!1):c.prev=!0,s.eatWhile(/[\w\.]/),`number`):t.test(l)||i.test(l)?`operator`:r.test(l)?(c.func=!0,c.prev=!1,e[l]?`variableName.function.standard`:`variableName.function`):a.test(l)?(s.skipToEnd(),`comment`):l===`∘`&&s.peek()===`.`?(s.next(),`variableName.function`):(s.eatWhile(/[\w\$_]/),c.prev=!0,`keyword`))}};export{s as apl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{At as e,Ct as t,Dt as n,Et as r,Mt as i,Ot as a,St as o,Tt as s,bt as c,jt as l,kt as u,vt as d,xt as f,yt as p}from"./index-Czi2sVlL.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(t,n,i,a,o,s,c){var l=t-i,u=n-a,d=(c?s:-s)/e(l*l+u*u),f=d*u,p=-d*l,m=t+f,h=n+p,g=i+f,_=a+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=o-s,w=m*_-g*h,T=(x<0?-1:1)*e(r(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(o/C-1),y11:D*(o/C-1)}}function x(){var r=m,x=h,S=i(0),C=null,w=g,T=_,E=v,D=null,O=d(k);function k(){var i,d,m=+r.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-s,_=T.apply(this,arguments)-s,v=p(_-g),k=_>g;if(D||=i=O(),h<m&&(d=h,h=m,m=d),!(h>1e-12))D.moveTo(0,0);else if(v>l-1e-12)D.moveTo(h*t(g),h*u(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*t(_),m*u(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):e(m*m+h*h)),R=n(p(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=f(L/m*u(I)),W=f(L/h*u(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*t(A),K=h*u(A),q=m*t(N),J=m*u(N);if(R>1e-12){var Y=h*t(j),X=h*u(j),Z=m*t(M),Q=m*u(M),$;if(v<a)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/u(c((ee*ne+te*re)/(e(ee*ee+te*te)*e(ne*ne+re*re)))/2),ae=e($[0]*$[0]+$[1]*$[1]);z=n(R,(m-ae)/(ie-1)),B=n(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,o(V.y01,V.x01),o(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,o(V.y01,V.x01),o(V.y11,V.x11),!k),D.arc(0,0,h,o(V.cy+V.y11,V.cx+V.x11),o(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,o(H.y11,H.x11),o(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,o(V.y01,V.x01),o(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,o(V.y01,V.x01),o(V.y11,V.x11),!k),D.arc(0,0,m,o(V.cy+V.y11,V.cx+V.x11),o(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,o(H.y11,H.x11),o(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),i)return D=null,i+``||null}return k.centroid=function(){var e=(+r.apply(this,arguments)+ +x.apply(this,arguments))/2,n=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-a/2;return[t(n)*e,u(n)*e]},k.innerRadius=function(e){return arguments.length?(r=typeof e==`function`?e:i(+e),k):r},k.outerRadius=function(e){return arguments.length?(x=typeof e==`function`?e:i(+e),k):x},k.cornerRadius=function(e){return arguments.length?(S=typeof e==`function`?e:i(+e),k):S},k.padRadius=function(e){return arguments.length?(C=e==null?null:typeof e==`function`?e:i(+e),k):C},k.startAngle=function(e){return arguments.length?(w=typeof e==`function`?e:i(+e),k):w},k.endAngle=function(e){return arguments.length?(T=typeof e==`function`?e:i(+e),k):T},k.padAngle=function(e){return arguments.length?(E=typeof e==`function`?e:i(+e),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as e}from"./mermaid-parser.core-DedvXRIg.js";export{e as createArchitectureServices};
|