@diffohq/diffo 0.12.0 → 0.14.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 (98) hide show
  1. package/dist/cli.mjs +48 -31
  2. package/dist/client/assets/{abnfDiagram-O67JEVCF-Dz8VXQP2.js → abnfDiagram-O67JEVCF-CVH8WE_F.js} +1 -1
  3. package/dist/client/assets/{arc-BzCu5Txo.js → arc-B9YojSN0.js} +1 -1
  4. package/dist/client/assets/architecture-7GRP2DOG-D1V4VKXd.js +1 -0
  5. package/dist/client/assets/{architectureDiagram-NJMV4G6O-DkNhFqaV.js → architectureDiagram-NJMV4G6O-Bf5-1aP5.js} +1 -1
  6. package/dist/client/assets/{blockDiagram-BEXU5L5S-H5iGDrKH.js → blockDiagram-BEXU5L5S-BjgpE7Dd.js} +1 -1
  7. package/dist/client/assets/{c4Diagram-YGBWAQC7-BCWmLGS5.js → c4Diagram-YGBWAQC7-CWx9Vgqs.js} +1 -1
  8. package/dist/client/assets/channel-Cr5mC66X.js +1 -0
  9. package/dist/client/assets/{chunk-3FUC2YCW-ca8N6xua.js → chunk-3FUC2YCW-DDkCtmAa.js} +1 -1
  10. package/dist/client/assets/{chunk-5DYCD2WN-PNfMjtmJ.js → chunk-5DYCD2WN-Dz0Cy0TD.js} +1 -1
  11. package/dist/client/assets/{chunk-742MDFTN-BCGjcJss.js → chunk-742MDFTN-DrqtNMzc.js} +1 -1
  12. package/dist/client/assets/{chunk-7INBJB4K-CrKz2qgm.js → chunk-7INBJB4K-Dh7BrR7z.js} +1 -1
  13. package/dist/client/assets/{chunk-7M6MHVWA--GjKV-c3.js → chunk-7M6MHVWA-Boc8MHqL.js} +1 -1
  14. package/dist/client/assets/{chunk-7PRAP22T-DjHxtzzp.js → chunk-7PRAP22T-cmKadjWw.js} +1 -1
  15. package/dist/client/assets/{chunk-GTNCS2PH-Dz4v2kmQ.js → chunk-GTNCS2PH-Cxz5-QhI.js} +1 -1
  16. package/dist/client/assets/{chunk-GWA4HPMP-BSgkR_3v.js → chunk-GWA4HPMP-C8MaPoW5.js} +1 -1
  17. package/dist/client/assets/{chunk-MBY4JIJT-Bq7wFcIu.js → chunk-MBY4JIJT-BWkHqhBg.js} +1 -1
  18. package/dist/client/assets/{chunk-NETBCI7D-CcPc99um.js → chunk-NETBCI7D-5XYJLafq.js} +1 -1
  19. package/dist/client/assets/{chunk-O7XYJQB3-DmV54lZx.js → chunk-O7XYJQB3-4NIHlwbC.js} +1 -1
  20. package/dist/client/assets/{chunk-UA2S7LBM-BShAYBVS.js → chunk-UA2S7LBM-C8V6OyRz.js} +1 -1
  21. package/dist/client/assets/{chunk-WEXAMYUT-D19EF-TI.js → chunk-WEXAMYUT-BmG_ZoXb.js} +1 -1
  22. package/dist/client/assets/{chunk-XXDRQBXY-DYNSGGeq.js → chunk-XXDRQBXY-C8A-keEi.js} +1 -1
  23. package/dist/client/assets/{chunk-Z7XXMR3K-CUy3HgJd.js → chunk-Z7XXMR3K-CmzJ-VFv.js} +1 -1
  24. package/dist/client/assets/{chunk-ZIGJFQKS-D9UToYrl.js → chunk-ZIGJFQKS-BBRj9o51.js} +1 -1
  25. package/dist/client/assets/{classDiagram-v2-NBCMYWYE-Chemkzmq.js → classDiagram-v2-NBCMYWYE-ywtl_aLK.js} +1 -1
  26. package/dist/client/assets/{core-DHnkJax7.js → core-Df-hGU6u.js} +1 -1
  27. package/dist/client/assets/{cose-bilkent-JH36ORCC-Bewr0AYG.js → cose-bilkent-JH36ORCC-TGc2vY3y.js} +1 -1
  28. package/dist/client/assets/{cynefin-OW5HDTMX-CirO8zKP.js → cynefin-OW5HDTMX-vl0jmJbf.js} +1 -1
  29. package/dist/client/assets/{cynefinDiagram-VND7K2PF-DGrP6yY_.js → cynefinDiagram-VND7K2PF-BUAaUuOC.js} +1 -1
  30. package/dist/client/assets/{dagre-6A5THRUB-Co00MmNX.js → dagre-6A5THRUB-CrSrGBN2.js} +1 -1
  31. package/dist/client/assets/{diagram-22UHCM2B-CyINGoxd.js → diagram-22UHCM2B-DC8LxnGD.js} +1 -1
  32. package/dist/client/assets/{diagram-3UASUU5V-9-GW6GaI.js → diagram-3UASUU5V-Bxygic4n.js} +1 -1
  33. package/dist/client/assets/{diagram-ATOU4E4O-BQ-r4IMq.js → diagram-ATOU4E4O-C6LRlKne.js} +1 -1
  34. package/dist/client/assets/{diagram-CDSNMT55-wDvP2y-X.js → diagram-CDSNMT55-BhDhgpOc.js} +1 -1
  35. package/dist/client/assets/{diagram-MLGK6HIB-BnQVNLhl.js → diagram-MLGK6HIB-CptdWPN1.js} +1 -1
  36. package/dist/client/assets/{diagram-MPIPVDR6-CvQmhTpZ.js → diagram-MPIPVDR6-BdeJWONi.js} +1 -1
  37. package/dist/client/assets/{dist-Be-c8hXl.js → dist-By-966m5.js} +1 -1
  38. package/dist/client/assets/{dist-Deo8rbAn.js → dist-m1fhZ4RP.js} +1 -1
  39. package/dist/client/assets/{ebnfDiagram-ZINNZB2B-D_lCUmG0.js → ebnfDiagram-ZINNZB2B-BzjgspXj.js} +1 -1
  40. package/dist/client/assets/{elk-276RUBZZ-rxjXBYWb.js → elk-276RUBZZ-DpzEVpPK.js} +1 -1
  41. package/dist/client/assets/{engine-oniguruma-BJ2pZwxc.js → engine-oniguruma-JCdnWHQL.js} +1 -1
  42. package/dist/client/assets/{erDiagram-OPXOYQCR-Dfd_ZBo9.js → erDiagram-OPXOYQCR-CH00EQH7.js} +1 -1
  43. package/dist/client/assets/eventmodeling-NTZA5JFV-m-OSCGRe.js +1 -0
  44. package/dist/client/assets/flowDiagram-KWPJA3E3-BmW4Yh_d.js +1 -0
  45. package/dist/client/assets/{ganttDiagram-FUAMR5RP-C1eOGnpc.js → ganttDiagram-FUAMR5RP-FjydKHiU.js} +1 -1
  46. package/dist/client/assets/{gitGraph-4MIJSDKK-BJDMPbrH.js → gitGraph-4MIJSDKK-CZaJEgDt.js} +1 -1
  47. package/dist/client/assets/{gitGraphDiagram-X574FWY7-COQk3bFW.js → gitGraphDiagram-X574FWY7-BOYve_u_.js} +1 -1
  48. package/dist/client/assets/index-CL27xGK3.js +93 -0
  49. package/dist/client/assets/index-CsnzLzk-.css +1 -0
  50. package/dist/client/assets/{info-A6RAGUB7-YKHokYRL.js → info-A6RAGUB7-B1ZKVby8.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-VRGFBTTK-6uJdW7Uf.js → infoDiagram-VRGFBTTK-DAut_YRI.js} +1 -1
  52. package/dist/client/assets/{ishikawaDiagram-OU5B5YK6-BF3c1rog.js → ishikawaDiagram-OU5B5YK6-CDZp3We3.js} +1 -1
  53. package/dist/client/assets/{journeyDiagram-ZHPQQLJL-DuWY0HyM.js → journeyDiagram-ZHPQQLJL-DTo5Gjov.js} +1 -1
  54. package/dist/client/assets/{kanban-definition-PNTS6WVX-DpxFXlZZ.js → kanban-definition-PNTS6WVX-DlSJ32EM.js} +1 -1
  55. package/dist/client/assets/{line-u-U51JAx.js → line-DVQODRiw.js} +1 -1
  56. package/dist/client/assets/{linear-Dpw7ISW8.js → linear-C7oWAPRa.js} +1 -1
  57. package/dist/client/assets/{mermaid-parser.core-NVWntgrf.js → mermaid-parser.core-T2yOXQQd.js} +3 -3
  58. package/dist/client/assets/{mermaid.core-B93MCzyy.js → mermaid.core-BH5lSEUI.js} +4 -4
  59. package/dist/client/assets/{mindmap-definition-NLK3R4M7-CIFJqrKY.js → mindmap-definition-NLK3R4M7-n3EvR1cJ.js} +1 -1
  60. package/dist/client/assets/{packet-AYTQ26CC-DlE9OJIa.js → packet-AYTQ26CC-3rKnMWOd.js} +1 -1
  61. package/dist/client/assets/{pegDiagram-GJSIUBJH-DVAxFXk4.js → pegDiagram-GJSIUBJH-B2duwehd.js} +1 -1
  62. package/dist/client/assets/{pie-WAS4IAKB-CnF58beD.js → pie-WAS4IAKB-Bc5MR0wR.js} +1 -1
  63. package/dist/client/assets/{pieDiagram-5QR66LMP-C9NRYvUb.js → pieDiagram-5QR66LMP-0JrBYCP1.js} +1 -1
  64. package/dist/client/assets/{quadrantDiagram-O4NWA36T-Bk84qmTE.js → quadrantDiagram-O4NWA36T-BUbFNDXD.js} +1 -1
  65. package/dist/client/assets/{radar-RG4KPBEZ--0RoMbvC.js → radar-RG4KPBEZ-BeqQz_At.js} +1 -1
  66. package/dist/client/assets/{railroad-74A4TZTK-QYeNnCgA.js → railroad-74A4TZTK-BCrRx3tN.js} +1 -1
  67. package/dist/client/assets/railroad-abnf-HS5TGJTU-DI-j3FX4.js +1 -0
  68. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DLclu3W6.js +1 -0
  69. package/dist/client/assets/railroad-peg-WCYAUIDC-DuUuJQWr.js +1 -0
  70. package/dist/client/assets/{railroadDiagram-XR7U4H2S-CCTlqXdV.js → railroadDiagram-XR7U4H2S-ar75S4BD.js} +1 -1
  71. package/dist/client/assets/{requirementDiagram-PLB6GJNP-Bqbgo3QR.js → requirementDiagram-PLB6GJNP-DhL4njRA.js} +1 -1
  72. package/dist/client/assets/{sankeyDiagram-IPEJSGJF-BXC5cjxI.js → sankeyDiagram-IPEJSGJF-Bra-2Kg9.js} +1 -1
  73. package/dist/client/assets/{sequenceDiagram-PO4LG4MO-Bds-OSHb.js → sequenceDiagram-PO4LG4MO-DWtCNs1j.js} +1 -1
  74. package/dist/client/assets/{src-DQOrnl7t.js → src-B3kD43jI.js} +1 -1
  75. package/dist/client/assets/{stateDiagram-v2-GCMORJYK-D1xkwXMJ.js → stateDiagram-v2-GCMORJYK-CVu5Tzzw.js} +1 -1
  76. package/dist/client/assets/{swimlanes-2SLR337P-Djv5MaNv.js → swimlanes-2SLR337P-03qTyGpz.js} +1 -1
  77. package/dist/client/assets/swimlanesDiagram-TC7HE7FX-D-Qm2hjA.js +8 -0
  78. package/dist/client/assets/{timeline-definition-EJHVYXUP-Xpylk9Go.js → timeline-definition-EJHVYXUP-CZp4QvTx.js} +1 -1
  79. package/dist/client/assets/{treeView-Q6P3EWNA-DZhZ3oTA.js → treeView-Q6P3EWNA-BAtTAOZo.js} +1 -1
  80. package/dist/client/assets/{treemap-WGGIJYW6-DM7_PSXC.js → treemap-WGGIJYW6-BFu67HT2.js} +1 -1
  81. package/dist/client/assets/{usecaseDiagram-POWQR4AR-BFIAR0u1.js → usecaseDiagram-POWQR4AR-EuSDU41A.js} +1 -1
  82. package/dist/client/assets/{vennDiagram-UO4OBE2U-JHvTvqTF.js → vennDiagram-UO4OBE2U-BiOvMbFR.js} +1 -1
  83. package/dist/client/assets/{wardley-WFR3VGLG-DwlxIwqO.js → wardley-WFR3VGLG-DiKbCXBA.js} +1 -1
  84. package/dist/client/assets/{wardleyDiagram-VNRHLVJA-BqfNR_Ex.js → wardleyDiagram-VNRHLVJA-DZ7cCA5C.js} +1 -1
  85. package/dist/client/assets/{xychartDiagram-PMCCYNJV-CNVbi53o.js → xychartDiagram-PMCCYNJV-C14JVEbW.js} +1 -1
  86. package/dist/client/index.html +2 -2
  87. package/package.json +1 -1
  88. package/plugin.json +1 -1
  89. package/dist/client/assets/architecture-7GRP2DOG-DXR42FQE.js +0 -1
  90. package/dist/client/assets/channel-SN11_URN.js +0 -1
  91. package/dist/client/assets/eventmodeling-NTZA5JFV-C3U-p4vY.js +0 -1
  92. package/dist/client/assets/flowDiagram-KWPJA3E3-Czdi2rFR.js +0 -1
  93. package/dist/client/assets/index-B8R5lnLt.css +0 -1
  94. package/dist/client/assets/index-DOSGiRCe.js +0 -93
  95. package/dist/client/assets/railroad-abnf-HS5TGJTU-CAw2FOzX.js +0 -1
  96. package/dist/client/assets/railroad-ebnf-LZEXJU2U-lUllLfGX.js +0 -1
  97. package/dist/client/assets/railroad-peg-WCYAUIDC-Cnu3kREr.js +0 -1
  98. package/dist/client/assets/swimlanesDiagram-TC7HE7FX-By5FZWiE.js +0 -8
package/dist/cli.mjs CHANGED
@@ -421,13 +421,17 @@ const HELP_AGENT_PR = `Reviewing a pull request (\`diffo <PR URL | owner/repo#N
421
421
  on late completions") is a thought on its way to the author: write the
422
422
  review comment they would leave, in their voice, and attach it with
423
423
  \`--pr-comment "<text>"\` on your reply (or your comment). It shows under
424
- your reply with Add to review / Edit / Dismiss; your evidence stays in the
425
- reply, never in the comment. Attach one when they state a finding, when
426
- their hunch proves right, when they ask you to draft it, or when a plain
427
- question turns up a bug you can show. Not when they were wrong (say so
428
- privately), not on pushback against your own reply — redraft the one
429
- already in the thread instead — and not when asked but you have nothing
430
- worth saying to the author: say so privately, never invent one.
424
+ your reply with Add as PR comment draft / Edit / Dismiss; your evidence
425
+ stays in the reply, never in the comment. Attach one when they state a
426
+ finding, their hunch proves right, they ask you to draft it, or a plain
427
+ question turns up something the author should hear; when unsure, lean
428
+ toward attaching — the reviewer would rather dismiss one than type it. Not
429
+ when they were wrong (say so privately), not on pushback against your own
430
+ reply — redraft the one already in the thread instead — and not when asked
431
+ but you have nothing worth saying to the author: say so privately, never
432
+ invent one. Keep it to one or two short sentences, the point first, the
433
+ way a person types a review comment; no preamble, no "Suggest …", no
434
+ report.
431
435
  - The guide and layers work as above, built from the description, the commits
432
436
  and the diff; skip the guide when the description already orients.
433
437
  - When the reviewer submits, a poll returns a \`"kind": "submitted"\` notice:
@@ -527,27 +531,38 @@ is a review comment. Write that comment for them, attached to your reply:
527
531
 
528
532
  ${CLI} reply <threadId> --message "<your private answer>" --pr-comment "<the comment>"
529
533
 
530
- Attach one when: they state a finding (always, a nit included); their hunch
531
- phrased as a question turns out right; they ask you to draft it ("write this
532
- up for the author"); or your answer to a plain question is a bug with a case
533
- to show. Do not attach one when they were wrong — say so privately — or when
534
- they are pushing back on your own reply; then redraft the comment already in
535
- the thread, which replaces it. Asked to suggest a change where you find
536
- nothing worth saying to the author, say so privately and attach nothing: a
537
- comment invented to fill the request is the one thing the reviewer cannot
538
- tell apart from a finding. On a comment of your own (\`${CLI} comment\`), the
539
- same flag carries a finding you can show, never a hunch.
534
+ When unsure, lean toward attaching: the reviewer would rather dismiss a
535
+ comment they did not need than type one you could have written. Attach one
536
+ when they state a finding (a nit included); when a hunch phrased as a
537
+ question turns out right; when they ask you to write it up; and when the
538
+ answer to a plain question is something the author should hear too (a case
539
+ the change misses, a name that misleads, a check that is dead). Not every
540
+ answer is — a question that only clarifies the code for the reviewer gets a
541
+ reply and no comment. Leave it off when they were wrong — say so privately —
542
+ or when they are pushing back on your own reply; then redraft the comment
543
+ already in the thread, which replaces it. Asked to suggest a change where you find nothing worth saying to the
544
+ author, say so privately and attach nothing: a comment invented to fill the
545
+ request is the one thing the reviewer cannot tell apart from a finding. On a
546
+ comment of your own (\`${CLI} comment\`), the same flag carries a finding you
547
+ can show, never a hunch.
540
548
 
541
- The comment is in the reviewer's voice, to the author: state the finding, why
542
- it matters, and what would fix it. A \`\`\`suggestion block when the fix is local
543
- to the anchored lines. Nothing about you, the worktree, tests you ran, or
544
- Diffo — that evidence goes in --message, where the reviewer reads it. Match
545
- how this reviewer writes: their own review comments on this pull request are
546
- quoted under "The reviewer's voice" when there are any.
549
+ Write it the way a person types a review comment at the line: one or two
550
+ short sentences, the point first, done. "This resets the streak on late
551
+ completions — should it?" is a review comment. A paragraph that states the
552
+ finding, explains why it matters and proposes the fix is not; it is a report,
553
+ and the reviewer rewrites it every time. No preamble ("This reads as…"), no
554
+ "Suggest …" or "Consider …" framing, no restating what the diff already
555
+ shows, no examples in parentheses, no hedging. Name the fix only when it is
556
+ not obvious from the finding, and when it is local to the anchored lines put
557
+ it in a \`\`\`suggestion block instead of prose. A question is often the
558
+ whole comment. Nothing about you, the worktree, tests you ran, or Diffo —
559
+ that evidence goes in --message, where the reviewer reads it. Match how this
560
+ reviewer writes: their own review comments on this pull request are quoted
561
+ under "The reviewer's voice" when there are any.
547
562
 
548
- Nothing you attach reaches GitHub. It appears under your reply with Add to
549
- review / Edit / Dismiss; the reviewer decides, and the submit notice tells you
550
- what happened to each.`;
563
+ Nothing you attach reaches GitHub. It appears under your reply with Add as
564
+ PR comment draft / Edit / Dismiss; the reviewer decides, and the submit
565
+ notice tells you what happened to each.`;
551
566
  const PR_DOCTRINE = {
552
567
  guide: {
553
568
  when: "the pull request description leaves a cold reader without the shape of the change — skip when the description already orients",
@@ -664,7 +679,7 @@ ${intentContract(threads, D).map((line) => ` ${line}`).join("\n")}
664
679
 
665
680
  Change only what these threads ask about — the reviewer is mid-read. Re-read
666
681
  the current file before editing; the code may have moved. Resolving a thread
667
- is the reviewer's call, never yours.${D.prComment ? `\n\nA private message that states a finding about the code is a review comment in the making: attach the comment the reviewer would leave the author, in their voice, with \`--pr-comment "<text>"\` on your reply (evidence stays in --message). Not when they were wrong, not on pushback against your reply. \`${CLI} help agent\` has the whole rule.` : ""}`;
682
+ is the reviewer's call, never yours.${D.prComment ? `\n\nA private message that states a finding about the code is a review comment in the making: attach the comment the reviewer would leave the author, in their voice, with \`--pr-comment "<text>"\` on your reply (evidence stays in --message). When unsure, lean toward attaching; one or two short sentences, the point first. Not when they were wrong, not on pushback against your reply. \`${CLI} help agent\` has the whole rule.` : ""}`;
668
683
  }
669
684
  function replyProtocol(threads, mode = "full", D = AUTHOR_DOCTRINE) {
670
685
  if (mode === "compact") return compactProtocol(threads, D);
@@ -1585,10 +1600,12 @@ Use it when your message ends in a decision that is theirs to make
1585
1600
  on a message that only reports.
1586
1601
  --pr-comment, on a pull request only, attaches the review comment the
1587
1602
  reviewer would leave the author: in their voice, to the author, as GitHub
1588
- will show it (Markdown; a \`\`\`suggestion block when the fix is local to the
1589
- anchored lines). It appears under your reply with Add to review / Edit /
1590
- Dismiss; nothing posts until the reviewer submits. Your evidence goes in
1591
- --message, never in the comment. \`diffo help agent\` says when to attach one.
1603
+ will show it — one or two short sentences, the point first (Markdown; a
1604
+ \`\`\`suggestion block when the fix is local to the anchored lines). When
1605
+ unsure, lean toward attaching; the reviewer would rather dismiss it than
1606
+ type it. It appears under your reply with Add as PR comment draft / Edit / Dismiss;
1607
+ nothing posts until the reviewer submits. Your evidence goes in --message,
1608
+ never in the comment. \`diffo help agent\` says when to attach one.
1592
1609
  Messages render GitHub-flavored markdown; a \`\`\`mermaid fence renders as a
1593
1610
  diagram in the review.
1594
1611
 
@@ -1 +1 @@
1
- import{m as e,t}from"./mermaid-parser.core-NVWntgrf.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-DQOrnl7t.js";import"./chunk-O7XYJQB3-DmV54lZx.js";import{n as i,r as a,t as o}from"./chunk-GTNCS2PH-Dz4v2kmQ.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-B93MCzyy.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=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`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=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 l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
1
+ import{m as e,t}from"./mermaid-parser.core-T2yOXQQd.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-B3kD43jI.js";import"./chunk-O7XYJQB3-4NIHlwbC.js";import{n as i,r as a,t as o}from"./chunk-GTNCS2PH-Cxz5-QhI.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BH5lSEUI.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=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`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=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 l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
@@ -1 +1 @@
1
- import{n as e,t}from"./path-fybaL0A-.js";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-Be-c8hXl.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(e,t,n,r,i,a,o){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;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){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;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);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));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):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(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*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i){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/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(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,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)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
1
+ import{n as e,t}from"./path-fybaL0A-.js";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-By-966m5.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(e,t,n,r,i,a,o){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;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){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;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);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));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):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(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*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i){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/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(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,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)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
@@ -0,0 +1 @@
1
+ import"./chunk-FOHPRMQF-DzxwRta7.js";import{M as e}from"./mermaid-parser.core-T2yOXQQd.js";export{e as createArchitectureServices};