@pi-outpost/embed 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.
Files changed (250) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/abnfDiagram-VRR7QNED-BPTALLb_.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-DlAvVtuC.js +89 -0
  5. package/dist/arc-BBnpgwVQ.js +80 -0
  6. package/dist/arc-DcUn9_NX.cjs +1 -0
  7. package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-DDyMqjR1.js +3 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +36 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D7UsY5ua.js +4120 -0
  11. package/dist/array-CApNbSU9.js +6 -0
  12. package/dist/array-DZSRzHA_.cjs +1 -0
  13. package/dist/bash-BLBHkRa_.js +169 -0
  14. package/dist/bash-DHJu-DNv.cjs +1 -0
  15. package/dist/blockDiagram-677ZJIJ3-BrXgigdO.cjs +132 -0
  16. package/dist/blockDiagram-677ZJIJ3-s-fanRPN.js +3160 -0
  17. package/dist/c-4QgYfi8K.cjs +1 -0
  18. package/dist/c-Cw4FsAeJ.js +176 -0
  19. package/dist/c4Diagram-LMCZKHZV-BbZFAi_K.js +2962 -0
  20. package/dist/c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs +10 -0
  21. package/dist/channel-DV0ST12Z.js +5 -0
  22. package/dist/channel-DkMGzfUR.cjs +1 -0
  23. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
  24. package/dist/chunk-2Q5K7J3B-DqJF2oYF.js +15 -0
  25. package/dist/chunk-32BRIVSS-Byu3FrKX.js +61 -0
  26. package/dist/chunk-32BRIVSS-oWSJWk-u.cjs +1 -0
  27. package/dist/chunk-52WLFC77-C9zQbcGs.js +590 -0
  28. package/dist/chunk-52WLFC77-D9PTsiCj.cjs +10 -0
  29. package/dist/chunk-5VM5RSS4-BMfgdMFU.js +5 -0
  30. package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +15 -0
  31. package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +82 -0
  32. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +1 -0
  33. package/dist/chunk-C7G6YPKG-CDjkH_UW.cjs +1 -0
  34. package/dist/chunk-C7G6YPKG-GTlyrFFt.js +67 -0
  35. package/dist/chunk-EX3LRPZG-BBldDxGh.js +2046 -0
  36. package/dist/chunk-EX3LRPZG-u-BKCEWO.cjs +231 -0
  37. package/dist/chunk-FWX5IMBZ-h3GfgkP2.js +57 -0
  38. package/dist/chunk-FWX5IMBZ-nqBth1J9.cjs +1 -0
  39. package/dist/chunk-HOUHSVGY-CgfXy94u.cjs +1 -0
  40. package/dist/chunk-HOUHSVGY-CtRCnz1G.js +277 -0
  41. package/dist/chunk-ICXQ74PX-BmEfYj-r.cjs +2 -0
  42. package/dist/chunk-ICXQ74PX-CC59NQmW.js +1366 -0
  43. package/dist/chunk-JWPE2WC7-B_J6qwQL.js +8 -0
  44. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
  45. package/dist/chunk-KEIR6QF5-BVnxrdHo.js +21388 -0
  46. package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +161 -0
  47. package/dist/chunk-MOJQB5TN-D6YxvkUY.js +490 -0
  48. package/dist/chunk-MOJQB5TN-H2vwz-oQ.cjs +88 -0
  49. package/dist/chunk-OGEWGWER-BGdqgMza.js +32 -0
  50. package/dist/chunk-OGEWGWER-BP4o8A-v.cjs +1 -0
  51. package/dist/chunk-PUDLZKDR-C8jMDFq6.js +4142 -0
  52. package/dist/chunk-PUDLZKDR-DtzwSdxX.cjs +156 -0
  53. package/dist/chunk-Q4XR5HBZ-Bk18cMuk.js +1628 -0
  54. package/dist/chunk-Q4XR5HBZ-COrrWZzi.cjs +70 -0
  55. package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +1 -0
  56. package/dist/chunk-RYQCIY6F-C-YC3QS_.js +239 -0
  57. package/dist/chunk-V7JOEXUC-BROsdKzY.js +3357 -0
  58. package/dist/chunk-V7JOEXUC-Cfrm5GQn.cjs +206 -0
  59. package/dist/chunk-VAUOI2AC-05FwamOA.js +10 -0
  60. package/dist/chunk-VAUOI2AC-CBXi4Di2.cjs +1 -0
  61. package/dist/chunk-VR4S4FIN-CSU_1xTZ.cjs +1 -0
  62. package/dist/chunk-VR4S4FIN-Ci491c8N.js +26 -0
  63. package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +127 -0
  64. package/dist/chunk-WYO6CB5R-Y9HJHB3Q.js +3739 -0
  65. package/dist/chunk-XXDRQBXY-DsVp5qjg.js +9 -0
  66. package/dist/chunk-XXDRQBXY-gWcN0uCZ.cjs +1 -0
  67. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
  68. package/dist/chunk-Y2CYZVJY-CwsV_8W4.js +12 -0
  69. package/dist/chunk-ZGVPDNZ5-CDTkXY1G.js +3736 -0
  70. package/dist/chunk-ZGVPDNZ5-COEQX4AZ.cjs +62 -0
  71. package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +32 -0
  72. package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +1146 -0
  73. package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +1 -0
  74. package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +30 -0
  75. package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +1 -0
  76. package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +30 -0
  77. package/dist/core-2nR1zkKb.cjs +3 -0
  78. package/dist/core-BO2hTFeF.js +845 -0
  79. package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +1 -0
  80. package/dist/cose-bilkent-JH36ORCC-BFo5zomD.js +2251 -0
  81. package/dist/cpp-BUtp-HE2.cjs +1 -0
  82. package/dist/cpp-CeyO6lBG.js +225 -0
  83. package/dist/csharp-BJu4kEpt.cjs +1 -0
  84. package/dist/csharp-Ck6Fet_o.js +260 -0
  85. package/dist/css-ClSGJRju.js +140 -0
  86. package/dist/css-DeFr0lev.cjs +1 -0
  87. package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +1 -0
  88. package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +3 -0
  89. package/dist/cynefinDiagram-TSTJHNR4-BRUl09PN.js +349 -0
  90. package/dist/cynefinDiagram-TSTJHNR4-rKPqxFde.cjs +62 -0
  91. package/dist/cytoscape.esm-ByjvpCPI.cjs +321 -0
  92. package/dist/cytoscape.esm-asYnbYTy.js +18148 -0
  93. package/dist/dagre-BBlCxSvR.cjs +1 -0
  94. package/dist/dagre-BpqwxFKp.js +1701 -0
  95. package/dist/dagre-VKFMJZFB-BsfMZfPu.cjs +4 -0
  96. package/dist/dagre-VKFMJZFB-ChTkS14y.js +328 -0
  97. package/dist/defaultLocale-u9yUoUmE.cjs +1 -0
  98. package/dist/defaultLocale-up9-vqhM.js +201 -0
  99. package/dist/diagram-FQU43EPY-BnAYoLDy.js +432 -0
  100. package/dist/diagram-FQU43EPY-CdbwLZpm.cjs +3 -0
  101. package/dist/diagram-G47NLZAW-C1ZiELQG.js +525 -0
  102. package/dist/diagram-G47NLZAW-CtWKuxkf.cjs +24 -0
  103. package/dist/diagram-NH7WQ7WH-Be0KXo6w.js +134 -0
  104. package/dist/diagram-NH7WQ7WH-CG6VWVza.cjs +24 -0
  105. package/dist/diagram-OA4YK3LP-B7avlqjG.js +300 -0
  106. package/dist/diagram-OA4YK3LP-Drq_GA6o.cjs +30 -0
  107. package/dist/diagram-WEI45ONY-CoPX6-sx.js +214 -0
  108. package/dist/diagram-WEI45ONY-SJmgVL59.cjs +41 -0
  109. package/dist/dist-D6LMt8nW.js +59 -0
  110. package/dist/dist-DNGlMOWd.cjs +1 -0
  111. package/dist/dockerfile-O4rAswfG.js +34 -0
  112. package/dist/dockerfile-YBgAWga3.cjs +1 -0
  113. package/dist/ebnfDiagram-CCIWWBDH-B-T4_JnX.js +100 -0
  114. package/dist/ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs +1 -0
  115. package/dist/erDiagram-Q63AITRT-DPgZpeaH.js +1727 -0
  116. package/dist/erDiagram-Q63AITRT-w4C1PxYd.cjs +85 -0
  117. package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +3 -0
  118. package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +1 -0
  119. package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +1 -0
  120. package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +17 -0
  121. package/dist/ganttDiagram-NO4QXBWP-BcBp028S.cjs +292 -0
  122. package/dist/ganttDiagram-NO4QXBWP-Cf12fLfa.js +3083 -0
  123. package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +3 -0
  124. package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +1 -0
  125. package/dist/gitGraphDiagram-IHSO6WYX-13ahKewT.js +729 -0
  126. package/dist/gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs +106 -0
  127. package/dist/go-D-pz-dmd.cjs +1 -0
  128. package/dist/go-rg7jg1mu.js +140 -0
  129. package/dist/graphlib-B0GbLif1.js +1267 -0
  130. package/dist/graphlib-CkkG5MuS.cjs +1 -0
  131. package/dist/info-DKCQHKI2-BEYhR6ip.cjs +1 -0
  132. package/dist/info-DKCQHKI2-BPF6-pOb.js +3 -0
  133. package/dist/infoDiagram-FWYZ7A6U-20rh0VNL.cjs +2 -0
  134. package/dist/infoDiagram-FWYZ7A6U-DcV-eSsb.js +20 -0
  135. package/dist/ini-C1q3_1-Q.js +88 -0
  136. package/dist/ini-nVcUEghj.cjs +1 -0
  137. package/dist/init-07zIhv_j.cjs +1 -0
  138. package/dist/init-CirqLVcp.js +15 -0
  139. package/dist/ishikawaDiagram-FXEZZL3T-BTaBCHIG.js +719 -0
  140. package/dist/ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs +70 -0
  141. package/dist/java-CUN_usaq.cjs +1 -0
  142. package/dist/java-HguKEfA2.js +169 -0
  143. package/dist/javascript-C8NCH8DE.js +436 -0
  144. package/dist/javascript-UZXSyUuu.cjs +1 -0
  145. package/dist/journeyDiagram-5HDEW3XC-Cl9Z4b58.js +884 -0
  146. package/dist/journeyDiagram-5HDEW3XC-XQa-rhY_.cjs +139 -0
  147. package/dist/json-Cp01TR_B.js +36 -0
  148. package/dist/json-usH_MUzR.cjs +1 -0
  149. package/dist/kanban-definition-HUTT4EX6-CtWnZ0nS.js +975 -0
  150. package/dist/kanban-definition-HUTT4EX6-DVHXUPOt.cjs +89 -0
  151. package/dist/line-Ca8dE_lT.cjs +1 -0
  152. package/dist/line-O2xx2vVQ.js +34 -0
  153. package/dist/linear-CVhyaVzf.js +289 -0
  154. package/dist/linear-Cl2-QuPP.cjs +1 -0
  155. package/dist/map-CwPlMWPw.cjs +1 -0
  156. package/dist/map-DU12fF3s.js +241 -0
  157. package/dist/markdown-CzgRofaE.js +181 -0
  158. package/dist/markdown-qeo95R0i.cjs +1 -0
  159. package/dist/mermaid-parser.core-B8DQcCaz.js +638 -0
  160. package/dist/mermaid-parser.core-Cgsz0CdK.cjs +6 -0
  161. package/dist/mermaid.core-BR-iKb2Q.js +1064 -0
  162. package/dist/mermaid.core-DQrbAA--.cjs +10 -0
  163. package/dist/mindmap-definition-LN4V7U3C-C0I9iWmq.cjs +96 -0
  164. package/dist/mindmap-definition-LN4V7U3C-lkSmRsIC.js +1008 -0
  165. package/dist/mount.d.ts +31 -0
  166. package/dist/ordinal-CCTD6_le.js +65 -0
  167. package/dist/ordinal-CUPR-p0T.cjs +1 -0
  168. package/dist/packet-7NZHBO7P-DqvBYJTR.js +3 -0
  169. package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +1 -0
  170. package/dist/path-Kklx0M1v.cjs +1 -0
  171. package/dist/path-mKa7UESy.js +85 -0
  172. package/dist/pegDiagram-2B236MQR-BgRCQTZd.js +94 -0
  173. package/dist/pegDiagram-2B236MQR-hlmRl_PA.cjs +1 -0
  174. package/dist/php-C9FOMGEA.js +294 -0
  175. package/dist/php-j6EhDZDE.cjs +2 -0
  176. package/dist/pi-outpost-embed.cjs +305 -0
  177. package/dist/pi-outpost-embed.js +40942 -0
  178. package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +1 -0
  179. package/dist/pie-RZYD4A2V-qnruo9sH.js +3 -0
  180. package/dist/pieDiagram-ENE6RG2P-BVi7ck2I.js +205 -0
  181. package/dist/pieDiagram-ENE6RG2P-Buuvrs-h.cjs +39 -0
  182. package/dist/plaintext-BYYAHR3Z.js +10 -0
  183. package/dist/plaintext-DmnjizxG.cjs +1 -0
  184. package/dist/python-BYJzTRkK.cjs +1 -0
  185. package/dist/python-DKAazMIE.js +238 -0
  186. package/dist/quadrantDiagram-ABIIQ3AL-DeU97c2B.js +2001 -0
  187. package/dist/quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs +7 -0
  188. package/dist/radar-I7S5WNFK-Dqdssa34.cjs +1 -0
  189. package/dist/radar-I7S5WNFK-np_pJCO-.js +3 -0
  190. package/dist/railroad-3IZDKUUU-NILjDQft.cjs +1 -0
  191. package/dist/railroad-3IZDKUUU-sjKBeXxB.js +3 -0
  192. package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +1 -0
  193. package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +3 -0
  194. package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +3 -0
  195. package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +1 -0
  196. package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +1 -0
  197. package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +3 -0
  198. package/dist/railroadDiagram-RFXS5EU6-CMTDNjsw.cjs +1 -0
  199. package/dist/railroadDiagram-RFXS5EU6-DNSNpLmQ.js +76 -0
  200. package/dist/requirementDiagram-TGXJPOKE-CdspXMgv.js +2223 -0
  201. package/dist/requirementDiagram-TGXJPOKE-irImpO8w.cjs +84 -0
  202. package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
  203. package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
  204. package/dist/rough.esm-C5XyeDCN.js +1352 -0
  205. package/dist/rough.esm-r0QOSzHM.cjs +1 -0
  206. package/dist/ruby-BAUeZQKZ.js +262 -0
  207. package/dist/ruby-ClR4zp-1.cjs +1 -0
  208. package/dist/rust-DiTjMjP5.js +169 -0
  209. package/dist/rust-ghVvEWhm.cjs +1 -0
  210. package/dist/sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs +40 -0
  211. package/dist/sankeyDiagram-HTMAVEWB-BQcvUCMA.js +970 -0
  212. package/dist/scss-CKxh5HRg.cjs +1 -0
  213. package/dist/scss-CckAvQOx.js +150 -0
  214. package/dist/sequenceDiagram-DBY2YBRQ-BQFP2DGs.js +4168 -0
  215. package/dist/sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs +162 -0
  216. package/dist/sizeCapture-X5ZJPWSS-DKbHZNyz.js +46 -0
  217. package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +1 -0
  218. package/dist/sql-B-Rnc2C3.js +118 -0
  219. package/dist/sql-B7syKcd8.cjs +1 -0
  220. package/dist/src-CR--T_NF.cjs +1 -0
  221. package/dist/src-DJ4x3y2O.js +2142 -0
  222. package/dist/stateDiagram-2N3HPSRC-4aBQt5dk.js +220 -0
  223. package/dist/stateDiagram-2N3HPSRC-YbRd67eD.cjs +1 -0
  224. package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +30 -0
  225. package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +1 -0
  226. package/dist/swimlanes-5IMT3BWC-C8zkS7yx.cjs +1 -0
  227. package/dist/swimlanes-5IMT3BWC-aKH3Xgob.js +5066 -0
  228. package/dist/swimlanesDiagram-G3AALYLV-BcgsG1in.js +31 -0
  229. package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +8 -0
  230. package/dist/timeline-definition-FHXFAJF6-DS-X0FCl.cjs +120 -0
  231. package/dist/timeline-definition-FHXFAJF6-Lnag6wiw.js +1069 -0
  232. package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +1 -0
  233. package/dist/treeView-QDETBFTQ-DdpEhzZX.js +3 -0
  234. package/dist/treemap-6X3UGDF4-BeCuRpkA.js +3 -0
  235. package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +1 -0
  236. package/dist/typescript-clWeqIBY.cjs +1 -0
  237. package/dist/typescript-mdYq8uqf.js +521 -0
  238. package/dist/vennDiagram-L72KCM5P-CF7lC7jn.js +1880 -0
  239. package/dist/vennDiagram-L72KCM5P-DYZP8jT_.cjs +34 -0
  240. package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +1 -0
  241. package/dist/wardley-OPB4EBWU-DlIk2K0J.js +3 -0
  242. package/dist/wardleyDiagram-EHGQE667-CbtWlMOa.js +645 -0
  243. package/dist/wardleyDiagram-EHGQE667-Dxewrpeh.cjs +78 -0
  244. package/dist/xml-BamqaQOf.cjs +1 -0
  245. package/dist/xml-DVYfB8uY.js +166 -0
  246. package/dist/xychartDiagram-FW5EYKEG-BAnVfMdN.cjs +7 -0
  247. package/dist/xychartDiagram-FW5EYKEG-DmdGPSi6.js +2102 -0
  248. package/dist/yaml-_1BORZTQ.js +144 -0
  249. package/dist/yaml-bAgWofBg.cjs +1 -0
  250. package/package.json +72 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Laurent Francoise
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,63 @@
1
+ # @pi-outpost/embed
2
+
3
+ Mount [pi-outpost](https://github.com/laurentftech/pi-outpost) — a web chat UI for the [pi coding agent](https://github.com/earendil-works/pi) — as a widget inside any web app.
4
+
5
+ The widget renders into a **Shadow DOM**, fully isolated from the host app's CSS in both directions: Tailwind's reset never touches the host page, and the host page's styles never bleed into the widget. React is a peer dependency (supplied by the host); everything else — Tailwind, markdown, mermaid, highlight.js, the wire protocol — is compiled into the package.
6
+
7
+ It talks to a pi-outpost server over WebSocket, so you need one running:
8
+
9
+ ```sh
10
+ npx pi-outpost init # writes a starter config
11
+ npx pi-outpost # http://127.0.0.1:3141/
12
+ ```
13
+
14
+ See the [main README](https://github.com/laurentftech/pi-outpost#readme) for configuring it.
15
+
16
+ ## Install
17
+
18
+ ```sh
19
+ npm install @pi-outpost/embed
20
+ ```
21
+
22
+ Requires `react` and `react-dom` ≥ 19 in the host app.
23
+
24
+ ## Usage
25
+
26
+ ```js
27
+ import { mount } from "@pi-outpost/embed";
28
+
29
+ const widget = mount(document.getElementById("assistant"), {
30
+ serverUrl: "https://your-pi-outpost-server", // omit for same-origin
31
+ theme: "dark", // optional; falls back to the server's branding.defaultTheme, then "system"
32
+ token: "…", // only for servers with `server.token` set
33
+ });
34
+
35
+ widget.setTheme("light"); // change the theme at runtime
36
+ widget.unmount(); // tear down the React tree
37
+ ```
38
+
39
+ `mount(container, options?)` returns `{ unmount(), setTheme(theme) }`. The container itself stays in the DOM after `unmount()`, with an empty shadow root.
40
+
41
+ ## Server-rendered apps
42
+
43
+ Importing the package is safe anywhere, but `mount()` needs a real DOM: it attaches a shadow root to the element you give it. In Next.js, Remix or Astro, call it from an effect (client-side only):
44
+
45
+ ```jsx
46
+ useEffect(() => {
47
+ const widget = mount(ref.current);
48
+ return () => widget.unmount();
49
+ }, []);
50
+ ```
51
+
52
+ In Next.js, the component doing this must be a client component (`"use client"`).
53
+
54
+ ## Server-side configuration
55
+
56
+ Two things to set on the pi-outpost server, whatever the deployment topology:
57
+
58
+ - **`server.allowedOrigins`** — the widget's WebSocket carries the *host page's* origin (e.g. `https://your-app.example.com`), not pi-outpost's own. Add it explicitly; even same-domain deployments need this (only `localhost`/`127.0.0.1` are trusted automatically).
59
+ - **CORS** — `/branding` and `/health` are plain HTTP endpoints with no CORS headers. They work with zero extra config when the widget and the backend share an origin (recommended: reverse-proxy pi-outpost under your own domain). A genuinely cross-origin deployment needs a CORS layer in front.
60
+
61
+ ## License
62
+
63
+ MIT
@@ -0,0 +1 @@
1
+ const e=require("./mermaid-parser.core-Cgsz0CdK.cjs"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.cjs"),n=require("./src-CR--T_NF.cjs");require("./chunk-WYO6CB5R-BTvDzbWd.cjs"),require("./chunk-VAUOI2AC-CBXi4Di2.cjs");const r=require("./chunk-MOJQB5TN-H2vwz-oQ.cjs"),i=require("./chunk-JWPE2WC7-Cs1kjq8S.cjs");var a=e.m().RailroadAbnf.parser.LangiumParser,o=t.n(e=>{let t=e.alternatives.map(s);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),s=t.n(e=>{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),c=t.n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),l=t.n(e=>{let t=u(e.primary);if(!e.repeat)return t;let{min:n,max:r}=c(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),u=t.n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return o(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:o(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),d=t.n(e=>({name:e.name,definition:o(e.definition)}),`transformRule`),f=t.n(e=>{i.t(e,r.t),e.title&&r.t.setTitle(e.title),e.rules.map(e=>r.t.addRule(d(e)))},`populateDb`),p={parser:{parse:t.n(t=>{r.t.clear(),n.m.debug(`[ABNF Parser] Starting Langium parse`);let i=a.parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new e.t(i);let o=i.value;n.m.debug(`[ABNF Parser] Parsed rules:`,o.rules.length),f(o),n.m.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:r.t}},db:r.t,renderer:r.r,styles:r.n};exports.diagram=p;
@@ -0,0 +1,89 @@
1
+ import { m as e, t } from "./mermaid-parser.core-B8DQcCaz.js";
2
+ import { n } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
3
+ import { m as r } from "./src-DJ4x3y2O.js";
4
+ import "./chunk-WYO6CB5R-Y9HJHB3Q.js";
5
+ import "./chunk-VAUOI2AC-05FwamOA.js";
6
+ import { n as i, r as a, t as o } from "./chunk-MOJQB5TN-D6YxvkUY.js";
7
+ import { t as s } from "./chunk-JWPE2WC7-B_J6qwQL.js";
8
+ //#region ../node_modules/mermaid/dist/chunks/mermaid.core/abnfDiagram-VRR7QNED.mjs
9
+ var c = e().RailroadAbnf.parser.LangiumParser, l = /* @__PURE__ */ n((e) => {
10
+ let t = e.alternatives.map(u);
11
+ return t.length === 1 ? t[0] : {
12
+ type: "choice",
13
+ alternatives: t
14
+ };
15
+ }, "transformAlternation"), u = /* @__PURE__ */ n((e) => {
16
+ let t = e.elements.map(f);
17
+ return t.length === 1 ? t[0] : {
18
+ type: "sequence",
19
+ elements: t
20
+ };
21
+ }, "transformConcatenation"), d = /* @__PURE__ */ n((e) => {
22
+ if (e.includes("*")) {
23
+ let [t, n] = e.split("*");
24
+ return {
25
+ min: t ? parseInt(t, 10) : 0,
26
+ max: n ? parseInt(n, 10) : Infinity
27
+ };
28
+ }
29
+ let t = parseInt(e, 10);
30
+ return {
31
+ min: t,
32
+ max: t
33
+ };
34
+ }, "parseRepeat"), f = /* @__PURE__ */ n((e) => {
35
+ let t = p(e.primary);
36
+ if (!e.repeat) return t;
37
+ let { min: n, max: r } = d(e.repeat);
38
+ return n === 0 && r === 1 ? {
39
+ type: "optional",
40
+ element: t
41
+ } : {
42
+ type: "repetition",
43
+ element: t,
44
+ min: n,
45
+ max: r
46
+ };
47
+ }, "transformElement"), p = /* @__PURE__ */ n((e) => {
48
+ switch (e.$type) {
49
+ case "AbnfStringLiteral": return {
50
+ type: "terminal",
51
+ value: e.value
52
+ };
53
+ case "AbnfNumVal": return {
54
+ type: "terminal",
55
+ value: e.value
56
+ };
57
+ case "AbnfRuleName": return {
58
+ type: "nonterminal",
59
+ name: e.name
60
+ };
61
+ case "AbnfGroup": return l(e.element);
62
+ case "AbnfOptionalGroup": return {
63
+ type: "optional",
64
+ element: l(e.element)
65
+ };
66
+ default: throw Error(`Unsupported ABNF primary node: ${e.$type}`);
67
+ }
68
+ }, "transformPrimary"), m = /* @__PURE__ */ n((e) => ({
69
+ name: e.name,
70
+ definition: l(e.definition)
71
+ }), "transformRule"), h = /* @__PURE__ */ n((e) => {
72
+ s(e, o), e.title && o.setTitle(e.title), e.rules.map((e) => o.addRule(m(e)));
73
+ }, "populateDb"), g = {
74
+ parser: {
75
+ parse: /* @__PURE__ */ n((e) => {
76
+ o.clear(), r.debug("[ABNF Parser] Starting Langium parse");
77
+ let n = c.parse(e);
78
+ if (n.lexerErrors.length > 0 || n.parserErrors.length > 0) throw new t(n);
79
+ let i = n.value;
80
+ r.debug("[ABNF Parser] Parsed rules:", i.rules.length), h(i), r.debug("[ABNF Parser] Parse complete");
81
+ }, "parse"),
82
+ parser: { yy: o }
83
+ },
84
+ db: o,
85
+ renderer: a,
86
+ styles: i
87
+ };
88
+ //#endregion
89
+ export { g as diagram };
@@ -0,0 +1,80 @@
1
+ import { n as e, t } from "./path-mKa7UESy.js";
2
+ import { a as n, c as r, d as i, f as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, u as p } from "./dist-D6LMt8nW.js";
3
+ //#region ../node_modules/d3-shape/src/arc.js
4
+ function m(e) {
5
+ return e.innerRadius;
6
+ }
7
+ function h(e) {
8
+ return e.outerRadius;
9
+ }
10
+ function g(e) {
11
+ return e.startAngle;
12
+ }
13
+ function _(e) {
14
+ return e.endAngle;
15
+ }
16
+ function v(e) {
17
+ return e && e.padAngle;
18
+ }
19
+ function y(e, t, n, r, i, a, o, s) {
20
+ var c = n - e, l = r - t, u = o - i, d = s - a, f = d * c - u * l;
21
+ if (!(f * f < 1e-12)) return f = (u * (t - a) - d * (e - i)) / f, [e + f * c, t + f * l];
22
+ }
23
+ function b(e, t, n, r, i, a, o) {
24
+ var c = e - n, l = t - r, u = (o ? a : -a) / d(c * c + l * l), f = u * l, p = -u * c, m = e + f, h = t + p, g = n + f, _ = r + p, v = (m + g) / 2, y = (h + _) / 2, b = g - m, x = _ - h, S = b * b + x * x, C = i - a, w = m * _ - g * h, T = (x < 0 ? -1 : 1) * d(s(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;
25
+ return A * A + j * j > M * M + N * N && (E = O, D = k), {
26
+ cx: E,
27
+ cy: D,
28
+ x01: -f,
29
+ y01: -p,
30
+ x11: E * (i / C - 1),
31
+ y11: D * (i / C - 1)
32
+ };
33
+ }
34
+ function x() {
35
+ var s = m, x = h, S = e(0), C = null, w = g, T = _, E = v, D = null, O = t(k);
36
+ function k() {
37
+ var e, t, m = +s.apply(this, arguments), h = +x.apply(this, arguments), g = w.apply(this, arguments) - r, _ = T.apply(this, arguments) - r, v = l(_ - g), k = _ > g;
38
+ if (D ||= e = O(), h < m && (t = h, h = m, m = t), !(h > 1e-12)) D.moveTo(0, 0);
39
+ else if (v > c - 1e-12) D.moveTo(h * u(g), h * a(g)), D.arc(0, 0, h, g, _, !k), m > 1e-12 && (D.moveTo(m * u(_), m * a(_)), D.arc(0, 0, m, _, g, k));
40
+ else {
41
+ 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) : d(m * m + h * h)), R = p(l(h - m) / 2, +S.apply(this, arguments)), z = R, B = R, V, H;
42
+ if (L > 1e-12) {
43
+ var U = o(L / m * a(I)), W = o(L / h * a(I));
44
+ (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);
45
+ }
46
+ var G = h * u(A), K = h * a(A), q = m * u(N), J = m * a(N);
47
+ if (R > 1e-12) {
48
+ var Y = h * u(j), X = h * a(j), Z = m * u(M), Q = m * a(M), $;
49
+ if (v < i) if ($ = y(G, K, Z, Q, Y, X, q, J)) {
50
+ var ee = G - $[0], te = K - $[1], ne = Y - $[0], re = X - $[1], ie = 1 / a(f((ee * ne + te * re) / (d(ee * ee + te * te) * d(ne * ne + re * re))) / 2), ae = d($[0] * $[0] + $[1] * $[1]);
51
+ z = p(R, (m - ae) / (ie - 1)), B = p(R, (h - ae) / (ie + 1));
52
+ } else z = B = 0;
53
+ }
54
+ 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, n(V.y01, V.x01), n(H.y01, H.x01), !k) : (D.arc(V.cx, V.cy, B, n(V.y01, V.x01), n(V.y11, V.x11), !k), D.arc(0, 0, h, n(V.cy + V.y11, V.cx + V.x11), n(H.cy + H.y11, H.cx + H.x11), !k), D.arc(H.cx, H.cy, B, n(H.y11, H.x11), n(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, n(V.y01, V.x01), n(H.y01, H.x01), !k) : (D.arc(V.cx, V.cy, z, n(V.y01, V.x01), n(V.y11, V.x11), !k), D.arc(0, 0, m, n(V.cy + V.y11, V.cx + V.x11), n(H.cy + H.y11, H.cx + H.x11), k), D.arc(H.cx, H.cy, z, n(H.y11, H.x11), n(H.y01, H.x01), !k))) : D.arc(0, 0, m, N, M, k);
55
+ }
56
+ if (D.closePath(), e) return D = null, e + "" || null;
57
+ }
58
+ return k.centroid = function() {
59
+ var e = (+s.apply(this, arguments) + +x.apply(this, arguments)) / 2, t = (+w.apply(this, arguments) + +T.apply(this, arguments)) / 2 - i / 2;
60
+ return [u(t) * e, a(t) * e];
61
+ }, k.innerRadius = function(t) {
62
+ return arguments.length ? (s = typeof t == "function" ? t : e(+t), k) : s;
63
+ }, k.outerRadius = function(t) {
64
+ return arguments.length ? (x = typeof t == "function" ? t : e(+t), k) : x;
65
+ }, k.cornerRadius = function(t) {
66
+ return arguments.length ? (S = typeof t == "function" ? t : e(+t), k) : S;
67
+ }, k.padRadius = function(t) {
68
+ return arguments.length ? (C = t == null ? null : typeof t == "function" ? t : e(+t), k) : C;
69
+ }, k.startAngle = function(t) {
70
+ return arguments.length ? (w = typeof t == "function" ? t : e(+t), k) : w;
71
+ }, k.endAngle = function(t) {
72
+ return arguments.length ? (T = typeof t == "function" ? t : e(+t), k) : T;
73
+ }, k.padAngle = function(t) {
74
+ return arguments.length ? (E = typeof t == "function" ? t : e(+t), k) : E;
75
+ }, k.context = function(e) {
76
+ return arguments.length ? (D = e ?? null, k) : D;
77
+ }, k;
78
+ }
79
+ //#endregion
80
+ export { x as t };
@@ -0,0 +1 @@
1
+ const e=require("./path-Kklx0M1v.cjs"),t=require("./dist-DNGlMOWd.cjs");function n(e){return e.innerRadius}function r(e){return e.outerRadius}function i(e){return e.startAngle}function a(e){return e.endAngle}function o(e){return e&&e.padAngle}function s(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 c(e,n,r,i,a,o,s){var c=e-r,l=n-i,u=(s?o:-o)/t.p(c*c+l*l),d=u*l,f=-u*c,p=e+d,m=n+f,h=r+d,g=i+f,_=(p+h)/2,v=(m+g)/2,y=h-p,b=g-m,x=y*y+b*b,S=a-o,C=p*g-h*m,w=(b<0?-1:1)*t.p(t.l(0,S*S*x-C*C)),T=(C*b-y*w)/x,E=(-C*y-b*w)/x,D=(C*b+y*w)/x,O=(-C*y+b*w)/x,k=T-_,A=E-v,j=D-_,M=O-v;return k*k+A*A>j*j+M*M&&(T=D,E=O),{cx:T,cy:E,x01:-d,y01:-f,x11:T*(a/S-1),y11:E*(a/S-1)}}function l(){var l=n,u=r,d=e.n(0),f=null,p=i,m=a,h=o,g=null,_=e.t(v);function v(){var e,n,r=+l.apply(this,arguments),i=+u.apply(this,arguments),a=p.apply(this,arguments)-t.c,o=m.apply(this,arguments)-t.c,v=t.n(o-a),y=o>a;if(g||=e=_(),i<r&&(n=i,i=r,r=n),!(i>1e-12))g.moveTo(0,0);else if(v>t.m-1e-12)g.moveTo(i*t.o(a),i*t.f(a)),g.arc(0,0,i,a,o,!y),r>1e-12&&(g.moveTo(r*t.o(o),r*t.f(o)),g.arc(0,0,r,o,a,y));else{var b=a,x=o,S=a,C=o,w=v,T=v,E=h.apply(this,arguments)/2,D=E>1e-12&&(f?+f.apply(this,arguments):t.p(r*r+i*i)),O=t.u(t.n(i-r)/2,+d.apply(this,arguments)),k=O,A=O,j,M;if(D>1e-12){var N=t.i(D/r*t.f(E)),P=t.i(D/i*t.f(E));(w-=N*2)>1e-12?(N*=y?1:-1,S+=N,C-=N):(w=0,S=C=(a+o)/2),(T-=P*2)>1e-12?(P*=y?1:-1,b+=P,x-=P):(T=0,b=x=(a+o)/2)}var F=i*t.o(b),I=i*t.f(b),L=r*t.o(C),R=r*t.f(C);if(O>1e-12){var z=i*t.o(x),B=i*t.f(x),V=r*t.o(S),H=r*t.f(S),U;if(v<t.d)if(U=s(F,I,V,H,z,B,L,R)){var W=F-U[0],G=I-U[1],K=z-U[0],q=B-U[1],J=1/t.f(t.r((W*K+G*q)/(t.p(W*W+G*G)*t.p(K*K+q*q)))/2),Y=t.p(U[0]*U[0]+U[1]*U[1]);k=t.u(O,(r-Y)/(J-1)),A=t.u(O,(i-Y)/(J+1))}else k=A=0}T>1e-12?A>1e-12?(j=c(V,H,F,I,i,A,y),M=c(z,B,L,R,i,A,y),g.moveTo(j.cx+j.x01,j.cy+j.y01),A<O?g.arc(j.cx,j.cy,A,t.a(j.y01,j.x01),t.a(M.y01,M.x01),!y):(g.arc(j.cx,j.cy,A,t.a(j.y01,j.x01),t.a(j.y11,j.x11),!y),g.arc(0,0,i,t.a(j.cy+j.y11,j.cx+j.x11),t.a(M.cy+M.y11,M.cx+M.x11),!y),g.arc(M.cx,M.cy,A,t.a(M.y11,M.x11),t.a(M.y01,M.x01),!y))):(g.moveTo(F,I),g.arc(0,0,i,b,x,!y)):g.moveTo(F,I),!(r>1e-12)||!(w>1e-12)?g.lineTo(L,R):k>1e-12?(j=c(L,R,z,B,r,-k,y),M=c(F,I,V,H,r,-k,y),g.lineTo(j.cx+j.x01,j.cy+j.y01),k<O?g.arc(j.cx,j.cy,k,t.a(j.y01,j.x01),t.a(M.y01,M.x01),!y):(g.arc(j.cx,j.cy,k,t.a(j.y01,j.x01),t.a(j.y11,j.x11),!y),g.arc(0,0,r,t.a(j.cy+j.y11,j.cx+j.x11),t.a(M.cy+M.y11,M.cx+M.x11),y),g.arc(M.cx,M.cy,k,t.a(M.y11,M.x11),t.a(M.y01,M.x01),!y))):g.arc(0,0,r,C,S,y)}if(g.closePath(),e)return g=null,e+``||null}return v.centroid=function(){var e=(+l.apply(this,arguments)+ +u.apply(this,arguments))/2,n=(+p.apply(this,arguments)+ +m.apply(this,arguments))/2-t.d/2;return[t.o(n)*e,t.f(n)*e]},v.innerRadius=function(t){return arguments.length?(l=typeof t==`function`?t:e.n(+t),v):l},v.outerRadius=function(t){return arguments.length?(u=typeof t==`function`?t:e.n(+t),v):u},v.cornerRadius=function(t){return arguments.length?(d=typeof t==`function`?t:e.n(+t),v):d},v.padRadius=function(t){return arguments.length?(f=t==null?null:typeof t==`function`?t:e.n(+t),v):f},v.startAngle=function(t){return arguments.length?(p=typeof t==`function`?t:e.n(+t),v):p},v.endAngle=function(t){return arguments.length?(m=typeof t==`function`?t:e.n(+t),v):m},v.padAngle=function(t){return arguments.length?(h=typeof t==`function`?t:e.n(+t),v):h},v.context=function(e){return arguments.length?(g=e??null,v):g},v}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
@@ -0,0 +1 @@
1
+ require("./chunk-KEIR6QF5-Cy_QBNG6.cjs");const e=require("./mermaid-parser.core-Cgsz0CdK.cjs");exports.createArchitectureServices=e.M;
@@ -0,0 +1,3 @@
1
+ import "./chunk-KEIR6QF5-BVnxrdHo.js";
2
+ import { M as e } from "./mermaid-parser.core-B8DQcCaz.js";
3
+ export { e as createArchitectureServices };