@pb33f/cowboy-components 0.13.1 → 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.
- package/dist/{_baseUniq-CacIA2LC.cjs → _baseUniq-BCBHARBa.cjs} +1 -1
- package/dist/{_baseUniq-CL3reOBl.js → _baseUniq-DxKTOiyd.js} +74 -74
- package/dist/arc-BuSUjh0s.js +84 -0
- package/dist/arc-CH-0H1TF.cjs +1 -0
- package/dist/{architecture-YZFGNWBL-_gv9FazX.cjs → architecture-YZFGNWBL-BPn_727R.cjs} +1 -1
- package/dist/{architecture-YZFGNWBL-fFrwoJ4k.js → architecture-YZFGNWBL-BTpBH05L.js} +1 -1
- package/dist/{architectureDiagram-Q4EWVU46-B3fgqlMK.js → architectureDiagram-Q4EWVU46-CYewkKfJ.js} +4 -4
- package/dist/{architectureDiagram-Q4EWVU46-DtZlfd53.cjs → architectureDiagram-Q4EWVU46-DiD3e6PQ.cjs} +1 -1
- package/dist/blockDiagram-DXYQGD6D-B1FzGfTA.cjs +132 -0
- package/dist/{blockDiagram-DXYQGD6D-CX0JRAKx.js → blockDiagram-DXYQGD6D-C1Xzgnrv.js} +18 -17
- package/dist/{c4Diagram-AHTNJAMY-BfMyY6ox.js → c4Diagram-AHTNJAMY-L6Az2dvx.js} +2 -2
- package/dist/{c4Diagram-AHTNJAMY-DLeN9ZAF.cjs → c4Diagram-AHTNJAMY-c5bsYT5q.cjs} +1 -1
- package/dist/change-list-item-4xBSo3-U.cjs +4586 -0
- package/dist/change-list-item-Bu_mPv-k.js +19108 -0
- package/dist/{channel-IzC5TEAD.cjs → channel-BR_Krb9l.cjs} +1 -1
- package/dist/channel-Bo_TnECw.js +5 -0
- package/dist/{chunk-4BX2VUAB-CeMFPKaY.cjs → chunk-4BX2VUAB-B1uaSl0e.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-Bn2rH23T.js → chunk-4BX2VUAB-ClX8oE7L.js} +1 -1
- package/dist/{chunk-4TB4RGXK-BbYCdNI3.cjs → chunk-4TB4RGXK-D0JpJZOs.cjs} +1 -1
- package/dist/{chunk-4TB4RGXK-C5Pdp8au.js → chunk-4TB4RGXK-DzEEAztK.js} +5 -5
- package/dist/{chunk-55IACEB6-DX9DtTQS.cjs → chunk-55IACEB6-595ZDi6s.cjs} +1 -1
- package/dist/{chunk-55IACEB6-DdI_-Q_K.js → chunk-55IACEB6-DL_DHCyZ.js} +1 -1
- package/dist/{chunk-EDXVE4YY-CCku7m5j.js → chunk-EDXVE4YY-BII9TpbV.js} +1 -1
- package/dist/{chunk-EDXVE4YY-nccXma-D.cjs → chunk-EDXVE4YY-CQbtNtXr.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-Bt5qtKsR.cjs → chunk-FMBD7UC4-BO92YnlB.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-BG1WV71B.js → chunk-FMBD7UC4-cN7XywSK.js} +1 -1
- package/dist/{chunk-OYMX7WX6-DTbRX5BF.cjs → chunk-OYMX7WX6-BxqhsynN.cjs} +1 -1
- package/dist/{chunk-OYMX7WX6-Dj8r6q8i.js → chunk-OYMX7WX6-DTXPUCgU.js} +35 -35
- package/dist/{chunk-QZHKN3VN-LZahlHwm.js → chunk-QZHKN3VN-Biauj3yN.js} +1 -1
- package/dist/{chunk-QZHKN3VN-v9FRBMwC.cjs → chunk-QZHKN3VN-C-mnteH7.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-DJNk9cax.cjs → chunk-YZCP3GAM-WiD5REgL.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-BfcbLjwl.js → chunk-YZCP3GAM-eo-UEr6G.js} +1 -1
- package/dist/{classDiagram-v2-HSJHXN6E-BHEetvl6.js → classDiagram-6PBFFD2Q-8kzuzUL4.js} +2 -2
- package/dist/{classDiagram-6PBFFD2Q-DnanA8bA.cjs → classDiagram-6PBFFD2Q-ay2Efc0y.cjs} +1 -1
- package/dist/{classDiagram-6PBFFD2Q-BHEetvl6.js → classDiagram-v2-HSJHXN6E-8kzuzUL4.js} +2 -2
- package/dist/{classDiagram-v2-HSJHXN6E-DnanA8bA.cjs → classDiagram-v2-HSJHXN6E-ay2Efc0y.cjs} +1 -1
- package/dist/{clone-C3LRmiE8.js → clone-CC2YvoOD.js} +1 -1
- package/dist/clone-DAIpdsWe.cjs +1 -0
- package/dist/components/diff-viewer/diff-viewer.js +5 -36
- package/dist/components/diff-viewer/line-renderer.d.ts +15 -0
- package/dist/components/diff-viewer/line-renderer.js +49 -0
- package/dist/components/footer/footer.d.ts +3 -0
- package/dist/components/footer/footer.js +10 -4
- package/dist/components/logo-wall/logos/apache.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apache.svg.js +100 -0
- package/dist/components/logo-wall/logos/apideck.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apideck.svg.js +14 -0
- package/dist/components/logo-wall/logos/apigee.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/apigee.svg.js +16 -0
- package/dist/components/logo-wall/logos/bump.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/bump.svg.js +14 -0
- package/dist/components/logo-wall/logos/bytebase.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/bytebase.svg.js +11 -0
- package/dist/components/logo-wall/logos/chainlink.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/chainlink.svg.js +18 -0
- package/dist/components/logo-wall/logos/cisco.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/cisco.svg.js +14 -0
- package/dist/components/logo-wall/logos/elastic.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/elastic.svg.js +14 -0
- package/dist/components/logo-wall/logos/google.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/google.svg.js +12 -0
- package/dist/components/logo-wall/logos/grafana.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/grafana.svg.js +14 -0
- package/dist/components/logo-wall/logos/hashicorp.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/hashicorp.svg.js +18 -0
- package/dist/components/logo-wall/logos/hasura.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/hasura.svg.js +14 -0
- package/dist/components/logo-wall/logos/jpmorgan.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/jpmorgan.svg.js +22 -0
- package/dist/components/logo-wall/logos/kong.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/kong.svg.js +13 -0
- package/dist/components/logo-wall/logos/mongodb.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/mongodb.svg.js +17 -0
- package/dist/components/logo-wall/logos/nhost.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/nhost.svg.js +9 -0
- package/dist/components/logo-wall/logos/okta.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/okta.svg.js +8 -0
- package/dist/components/logo-wall/logos/opentelemetry.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/opentelemetry.svg.js +8 -0
- package/dist/components/logo-wall/logos/prometheus.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/prometheus.svg.js +8 -0
- package/dist/components/logo-wall/logos/pulumi.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/pulumi.svg.js +10 -0
- package/dist/components/logo-wall/logos/redhat.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/redhat.svg.js +8 -0
- package/dist/components/logo-wall/logos/scalar.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/scalar.svg.js +19 -0
- package/dist/components/logo-wall/logos/splunk.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/splunk.svg.js +8 -0
- package/dist/components/logo-wall/logos/unkey.svg.d.ts +2 -0
- package/dist/components/logo-wall/logos/unkey.svg.js +15 -0
- package/dist/components/logo-wall/logowall.d.ts +2 -24
- package/dist/components/logo-wall/logowall.js +58 -373
- package/dist/components/premium-gate/premium-gate.css.js +18 -1
- package/dist/components/premium-gate/premium-gate.js +2 -2
- package/dist/components/problem-list/problem-item.js +3 -2
- package/dist/components/problem-list/problem-list.d.ts +2 -0
- package/dist/components/problem-list/problem-list.js +26 -7
- package/dist/components/problems-overview/problem-overview-group.js +2 -1
- package/dist/components/visualizer/edge.d.ts +6 -2
- package/dist/components/visualizer/edge.js +26 -4
- package/dist/components/visualizer/equalizer.css.js +11 -2
- package/dist/components/visualizer/explorer.d.ts +3 -1
- package/dist/components/visualizer/explorer.js +51 -59
- package/dist/components/visualizer/nodes/change-view-node.d.ts +2 -2
- package/dist/components/visualizer/nodes/change-view-node.js +10 -6
- package/dist/components/visualizer/nodes/graph-node.d.ts +12 -8
- package/dist/components/visualizer/nodes/graph-node.js +47 -25
- package/dist/components/visualizer/nodes/schema.d.ts +7 -0
- package/dist/components/visualizer/nodes/schema.js +81 -59
- package/dist/components/visualizer/shared.css.js +48 -10
- package/dist/components/visualizer/viewport-position.d.ts +28 -0
- package/dist/components/visualizer/viewport-position.js +38 -0
- package/dist/components/workspaces/workspace-view.js +10 -7
- package/dist/components/yaml-viewer/yaml-viewer.css.d.ts +2 -0
- package/dist/components/yaml-viewer/yaml-viewer.css.js +45 -0
- package/dist/components/yaml-viewer/yaml-viewer.d.ts +22 -0
- package/dist/components/yaml-viewer/yaml-viewer.js +86 -0
- package/dist/controllers/problem-controller.d.ts +1 -0
- package/dist/controllers/problem-controller.js +40 -24
- package/dist/{cose-bilkent-S5V4N54A-FFskauHi.js → cose-bilkent-S5V4N54A-BvU_SKfP.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-CdEgH7NU.cjs → cose-bilkent-S5V4N54A-CjLPT2aq.cjs} +1 -1
- package/dist/{cowboy-components-_6157Gms.js → cowboy-components-B5MDHQs5.js} +8691 -8836
- package/dist/{cowboy-components-DlcOqYuh.cjs → cowboy-components-DMQv-nwp.cjs} +561 -489
- package/dist/{dagre-KV5264BT-BBKAH5Vs.cjs → dagre-KV5264BT-BJ3g2OfF.cjs} +1 -1
- package/dist/{dagre-KV5264BT-BnGcCOZB.js → dagre-KV5264BT-CZZ7IWMJ.js} +29 -29
- package/dist/{diagram-5BDNPKRD-C9cE16Nq.js → diagram-5BDNPKRD-BtgWDNH6.js} +4 -4
- package/dist/{diagram-5BDNPKRD-Caf5-T5J.cjs → diagram-5BDNPKRD-C8f_rKrj.cjs} +1 -1
- package/dist/{diagram-G4DWMVQ6-B_Z6cYPf.cjs → diagram-G4DWMVQ6-CdbbbjZ1.cjs} +1 -1
- package/dist/{diagram-G4DWMVQ6-eVnE9je7.js → diagram-G4DWMVQ6-Cvo7MOEn.js} +4 -4
- package/dist/{diagram-MMDJMWI5-CAOLJUQB.js → diagram-MMDJMWI5-BBZMNBAZ.js} +3 -3
- package/dist/{diagram-MMDJMWI5-Btfr_jTp.cjs → diagram-MMDJMWI5-CmuOqtUd.cjs} +1 -1
- package/dist/{diagram-TYMM5635-pKdjOMF8.cjs → diagram-TYMM5635-BDWJ5rTp.cjs} +1 -1
- package/dist/{diagram-TYMM5635-B5eh2zfi.js → diagram-TYMM5635-BJ6YAfrg.js} +3 -3
- package/dist/{erDiagram-SMLLAGMA-B2OnES7y.js → erDiagram-SMLLAGMA-CYctRkDG.js} +4 -4
- package/dist/{erDiagram-SMLLAGMA-DIG0NSaA.cjs → erDiagram-SMLLAGMA-oQiAbd77.cjs} +1 -1
- package/dist/events/doctor.d.ts +2 -1
- package/dist/factories/explorer-component-factory.d.ts +2 -1
- package/dist/factories/explorer-component-factory.js +1 -0
- package/dist/{flowDiagram-DWJPFMVM-2zskCMow.cjs → flowDiagram-DWJPFMVM-Cl2ZAgx-.cjs} +1 -1
- package/dist/{flowDiagram-DWJPFMVM-CXPAxHvt.js → flowDiagram-DWJPFMVM-XzVvDcKE.js} +6 -6
- package/dist/{ganttDiagram-T4ZO3ILL-D6Frz-JF.js → ganttDiagram-T4ZO3ILL-Bw3whz8Z.js} +3 -3
- package/dist/{ganttDiagram-T4ZO3ILL-BeVChtO1.cjs → ganttDiagram-T4ZO3ILL-D6p69Xut.cjs} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-ZUTHDSj9.js → gitGraph-7Q5UKJZL-CV8uXlc6.js} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-BJ6cbAq9.cjs → gitGraph-7Q5UKJZL-Dc00T47S.cjs} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF-Bk5mBktt.cjs → gitGraphDiagram-UUTBAWPF-DO7-Vg9n.cjs} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF--sskoNSw.js → gitGraphDiagram-UUTBAWPF-DyF52xzw.js} +4 -4
- package/dist/{graph-n3mQ-eMa.js → graph-BNtv6wPN.js} +43 -43
- package/dist/{graph-CitLzybf.cjs → graph-nnOjqfSF.cjs} +1 -1
- package/dist/info-OMHHGYJF-BEJOj8rC.js +5 -0
- package/dist/{info-OMHHGYJF-Drd77e1G.cjs → info-OMHHGYJF-DenwEztT.cjs} +1 -1
- package/dist/{infoDiagram-42DDH7IO-Drbr569o.cjs → infoDiagram-42DDH7IO-CDwaPJgE.cjs} +1 -1
- package/dist/{infoDiagram-42DDH7IO-BYCSBry1.js → infoDiagram-42DDH7IO-D5ZWT_PY.js} +2 -2
- package/dist/{ishikawaDiagram-UXIWVN3A-DtA8KbKf.js → ishikawaDiagram-UXIWVN3A-DO1TQj8y.js} +1 -1
- package/dist/{ishikawaDiagram-UXIWVN3A-DTTtSjta.cjs → ishikawaDiagram-UXIWVN3A-DgxKja6G.cjs} +1 -1
- package/dist/{journeyDiagram-VCZTEJTY-NGtPMfE0.js → journeyDiagram-VCZTEJTY-BOrvmHFC.js} +4 -4
- package/dist/{journeyDiagram-VCZTEJTY-B2Mj0NKu.cjs → journeyDiagram-VCZTEJTY-CJCEu2Bp.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-BBqZKCyL.cjs → kanban-definition-6JOO6SKY-DEuqG8My.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-BH9sPBGO.js → kanban-definition-6JOO6SKY-DbcLaE1y.js} +22 -22
- package/dist/{layout-BXXLjgVz.cjs → layout-C5IxZs51.cjs} +1 -1
- package/dist/{layout-Dxl_HlKH.js → layout-US8yryxu.js} +89 -89
- package/dist/linear-Bmlq6WJ8.cjs +1 -0
- package/dist/{linear-CZplgftO.js → linear-D6nUCk2i.js} +26 -26
- package/dist/{mermaid-parser.core-By3g6lf1.cjs → mermaid-parser.core-COvBhcPG.cjs} +2 -2
- package/dist/{mermaid-parser.core-DsLOyQb-.js → mermaid-parser.core-DvOBQD0s.js} +13 -13
- package/dist/{min-sstTPxgN.cjs → min-BeG6JEx2.cjs} +1 -1
- package/dist/{min-CqEuxX5S.js → min-gCZaz5eW.js} +8 -8
- package/dist/{mindmap-definition-QFDTVHPH-BNYDl_JS.js → mindmap-definition-QFDTVHPH-Bf7uOPBO.js} +11 -11
- package/dist/{mindmap-definition-QFDTVHPH-B3Oxj65X.cjs → mindmap-definition-QFDTVHPH-Bh_mtad8.cjs} +1 -1
- package/dist/{packet-4T2RLAQJ-Dz7awUWB.js → packet-4T2RLAQJ-CnjxgpUP.js} +1 -1
- package/dist/{packet-4T2RLAQJ-E5BuU-_N.cjs → packet-4T2RLAQJ-EX3JjNtR.cjs} +1 -1
- package/dist/pie-ZZUOXDRM-B0-esN8S.js +5 -0
- package/dist/{pie-ZZUOXDRM-Dy70KTXz.cjs → pie-ZZUOXDRM-S9g0lXgu.cjs} +1 -1
- package/dist/pieDiagram-DEJITSTG-An0q-g5y.cjs +30 -0
- package/dist/{pieDiagram-DEJITSTG-N6CuTO5d.js → pieDiagram-DEJITSTG-DIkSdQCd.js} +43 -42
- package/dist/{quadrantDiagram-34T5L4WZ-BFmWaVMB.cjs → quadrantDiagram-34T5L4WZ-B5f35ihC.cjs} +1 -1
- package/dist/{quadrantDiagram-34T5L4WZ-aciP1QIx.js → quadrantDiagram-34T5L4WZ-CBlxIaIn.js} +2 -2
- package/dist/radar-PYXPWWZC-1Ezs-b76.js +5 -0
- package/dist/{radar-PYXPWWZC-BF0Fb1TH.cjs → radar-PYXPWWZC-C0zC2ZSo.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-DkopqGtb.cjs → requirementDiagram-MS252O5E-C2bJ8iZf.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-BKe1ubad.js → requirementDiagram-MS252O5E-CLQv0oWl.js} +3 -3
- package/dist/{sankeyDiagram-XADWPNL6-DrZ6paqw.cjs → sankeyDiagram-XADWPNL6--gS8yJdi.cjs} +1 -1
- package/dist/{sankeyDiagram-XADWPNL6-CXWxDxz9.js → sankeyDiagram-XADWPNL6-BPSHvjZ8.js} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-AgywoQ1Q.cjs → sequenceDiagram-FGHM5R23-C8D7r5pW.cjs} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-DeT0Ej2-.js → sequenceDiagram-FGHM5R23-Pz7V2MNd.js} +3 -3
- package/dist/services/workspace-service.js +3 -3
- package/dist/stateDiagram-FHFEXIEX-BAF5DJ1S.cjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-7A28ex_-.js → stateDiagram-FHFEXIEX-D5m6EHM0.js} +44 -43
- package/dist/{stateDiagram-v2-QKLJ7IA2-DKdmAkPd.js → stateDiagram-v2-QKLJ7IA2-Bewn3XVh.js} +2 -2
- package/dist/{stateDiagram-v2-QKLJ7IA2-COHQmika.cjs → stateDiagram-v2-QKLJ7IA2-D8ygFuIi.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-CLIWGUDx.cjs → timeline-definition-GMOUNBTQ-DGnNWVK8.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-a3VL8qvl.js → timeline-definition-GMOUNBTQ-D_q_Aq0R.js} +23 -23
- package/dist/{treeView-SZITEDCU-BI7UKP6V.js → treeView-SZITEDCU-CJ-dtg22.js} +1 -1
- package/dist/{treeView-SZITEDCU-DhzhM13M.cjs → treeView-SZITEDCU-D_h6_ShC.cjs} +1 -1
- package/dist/{treemap-W4RFUUIX-DBHIrtnC.js → treemap-W4RFUUIX-B9GQw9aZ.js} +1 -1
- package/dist/{treemap-W4RFUUIX-D27UX2aI.cjs → treemap-W4RFUUIX-BtKxSF22.cjs} +1 -1
- package/dist/{vennDiagram-DHZGUBPP-BA4bv3TJ.js → vennDiagram-DHZGUBPP-JEim8wmH.js} +59 -59
- package/dist/{vennDiagram-DHZGUBPP-u9RE2cv7.cjs → vennDiagram-DHZGUBPP-amyk4YMx.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-CAZiB4K3.cjs → wardley-RL74JXVD-Cni1Bfk_.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-9hft70S_.js → wardley-RL74JXVD-sMbm0y_r.js} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-CKCVdEN3.cjs → wardleyDiagram-NUSXRM2D-BxrRpNG2.cjs} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-DBsr2UYG.js → wardleyDiagram-NUSXRM2D-C2MLJ-IT.js} +3 -3
- package/dist/workers/elk-fake-worker.generated.d.ts +3 -0
- package/dist/workers/elk-fake-worker.generated.js +50224 -0
- package/dist/workers/elk-layout-blob.generated.js +16 -18
- package/dist/workers/elk-layout.worker.js +5 -2
- package/dist/{xychartDiagram-5P7HB3ND-CIeY2sBx.js → xychartDiagram-5P7HB3ND-CSCEAZnj.js} +8 -7
- package/dist/{xychartDiagram-5P7HB3ND-BfkKtA74.cjs → xychartDiagram-5P7HB3ND-CpDJRyka.cjs} +4 -4
- package/package.json +11 -2
- package/dist/arc-2E-fJnok.js +0 -83
- package/dist/arc-Cah-EtVa.cjs +0 -1
- package/dist/blockDiagram-DXYQGD6D-CUmPhtkh.cjs +0 -132
- package/dist/change-list-item-CrZn84tY.cjs +0 -4535
- package/dist/change-list-item-DMLMmZ6U.js +0 -18744
- package/dist/channel-CMrLSZsY.js +0 -5
- package/dist/clone-Bqh1gJUP.cjs +0 -1
- package/dist/info-OMHHGYJF-D5oOa7Mo.js +0 -5
- package/dist/linear-DpB2Zi1A.cjs +0 -1
- package/dist/pie-ZZUOXDRM-DjXev5ml.js +0 -5
- package/dist/pieDiagram-DEJITSTG-HFspfzyv.cjs +0 -30
- package/dist/radar-PYXPWWZC-atHOjpus.js +0 -5
- package/dist/stateDiagram-FHFEXIEX-CKm2mS6U.cjs +0 -1
|
@@ -5,8 +5,15 @@ import { Node } from "../../../model/graph";
|
|
|
5
5
|
export declare class SchemaNodeComponent extends GraphNodeComponent {
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
schema: Schema;
|
|
8
|
+
private cachedExampleCoverageSchema?;
|
|
9
|
+
private cachedExampleCoverage?;
|
|
8
10
|
embedded: boolean;
|
|
9
11
|
constructor(nodeMap: Map<string, Node>);
|
|
12
|
+
private countExamples;
|
|
13
|
+
private schemaExampleCount;
|
|
14
|
+
private schemaDoesNotNeedExamples;
|
|
15
|
+
private schemasHaveExampleCoverage;
|
|
16
|
+
private getExampleCoverage;
|
|
10
17
|
renderNode(): TemplateResult[];
|
|
11
18
|
render(): TemplateResult<1>;
|
|
12
19
|
}
|
|
@@ -17,6 +17,73 @@ let SchemaNodeComponent = class SchemaNodeComponent extends GraphNodeComponent {
|
|
|
17
17
|
super(nodeMap);
|
|
18
18
|
this.embedded = false;
|
|
19
19
|
}
|
|
20
|
+
countExamples(examples) {
|
|
21
|
+
if (!examples) {
|
|
22
|
+
return 0;
|
|
23
|
+
}
|
|
24
|
+
if (Array.isArray(examples)) {
|
|
25
|
+
return examples.length;
|
|
26
|
+
}
|
|
27
|
+
if (typeof examples === 'object') {
|
|
28
|
+
return Object.keys(examples).length;
|
|
29
|
+
}
|
|
30
|
+
return 1;
|
|
31
|
+
}
|
|
32
|
+
schemaExampleCount(schema) {
|
|
33
|
+
if (!schema) {
|
|
34
|
+
return 0;
|
|
35
|
+
}
|
|
36
|
+
let count = this.countExamples(schema.examples);
|
|
37
|
+
if (schema.example !== undefined) {
|
|
38
|
+
count++;
|
|
39
|
+
}
|
|
40
|
+
return count;
|
|
41
|
+
}
|
|
42
|
+
schemaDoesNotNeedExamples(schema) {
|
|
43
|
+
const hasEnum = schema.enum && schema.enum.length > 0;
|
|
44
|
+
const isBoolean = schema.type === 'boolean' ||
|
|
45
|
+
(Array.isArray(schema.type) && schema.type.length === 1 && schema.type[0] === 'boolean');
|
|
46
|
+
const hasDefault = schema.default !== undefined;
|
|
47
|
+
return Boolean(hasEnum || isBoolean || hasDefault);
|
|
48
|
+
}
|
|
49
|
+
schemasHaveExampleCoverage(values) {
|
|
50
|
+
if (values.length === 0) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return values.every(value => {
|
|
54
|
+
if (isHasRef(value)) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const schema = value;
|
|
58
|
+
return this.schemaDoesNotNeedExamples(schema) || this.schemaExampleCount(schema) > 0;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
getExampleCoverage(schema) {
|
|
62
|
+
if (!schema) {
|
|
63
|
+
return {
|
|
64
|
+
schemaExampleCount: 0,
|
|
65
|
+
allPropertiesHaveExamples: false,
|
|
66
|
+
allPolyChildrenHaveExamples: false
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (this.cachedExampleCoverageSchema === schema && this.cachedExampleCoverage) {
|
|
70
|
+
return this.cachedExampleCoverage;
|
|
71
|
+
}
|
|
72
|
+
const props = schema.properties ? Object.values(schema.properties) : [];
|
|
73
|
+
const polyChildren = [
|
|
74
|
+
...(schema.anyOf || []),
|
|
75
|
+
...(schema.oneOf || []),
|
|
76
|
+
...(schema.allOf || [])
|
|
77
|
+
];
|
|
78
|
+
const coverage = {
|
|
79
|
+
schemaExampleCount: this.schemaExampleCount(schema),
|
|
80
|
+
allPropertiesHaveExamples: this.schemasHaveExampleCoverage(props),
|
|
81
|
+
allPolyChildrenHaveExamples: this.schemasHaveExampleCoverage(polyChildren)
|
|
82
|
+
};
|
|
83
|
+
this.cachedExampleCoverageSchema = schema;
|
|
84
|
+
this.cachedExampleCoverage = coverage;
|
|
85
|
+
return coverage;
|
|
86
|
+
}
|
|
20
87
|
renderNode() {
|
|
21
88
|
let label = 'Schema';
|
|
22
89
|
if (this.label) {
|
|
@@ -95,64 +162,16 @@ let SchemaNodeComponent = class SchemaNodeComponent extends GraphNodeComponent {
|
|
|
95
162
|
if (this.nodeMap && this.node && this.nodeMap.has(this.node.parentId)) {
|
|
96
163
|
parent = this.nodeMap.get(this.node.parentId);
|
|
97
164
|
}
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
parentExamples = true;
|
|
102
|
-
count++;
|
|
103
|
-
}
|
|
104
|
-
// Check if all immediate properties have examples (or don't need them)
|
|
105
|
-
let allPropertiesHaveExamples = false;
|
|
106
|
-
if (this.schema?.properties) {
|
|
107
|
-
const props = Object.values(this.schema.properties);
|
|
108
|
-
if (props.length > 0) {
|
|
109
|
-
allPropertiesHaveExamples = props.every(prop => {
|
|
110
|
-
if (isHasRef(prop)) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
const schemaProp = prop;
|
|
114
|
-
// Properties with enums, booleans, or defaults don't need examples
|
|
115
|
-
const hasEnum = schemaProp.enum && schemaProp.enum.length > 0;
|
|
116
|
-
const isBoolean = schemaProp.type === 'boolean';
|
|
117
|
-
const hasDefault = schemaProp.default !== undefined;
|
|
118
|
-
if (hasEnum || isBoolean || hasDefault) {
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
return schemaProp.example !== undefined || schemaProp.examples !== undefined;
|
|
122
|
-
});
|
|
123
|
-
}
|
|
165
|
+
let parentExampleCount = 0;
|
|
166
|
+
if (parent && parent.instance) {
|
|
167
|
+
parentExampleCount = this.schemaExampleCount(parent.instance);
|
|
124
168
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
];
|
|
132
|
-
if (polyChildren.length > 0) {
|
|
133
|
-
allPolyChildrenHaveExamples = polyChildren.every(child => {
|
|
134
|
-
if (isHasRef(child)) {
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
const schemaChild = child;
|
|
138
|
-
// Children with enums, booleans, or defaults don't need examples
|
|
139
|
-
const hasEnum = schemaChild.enum && schemaChild.enum.length > 0;
|
|
140
|
-
const isBoolean = schemaChild.type === 'boolean';
|
|
141
|
-
const hasDefault = schemaChild.default !== undefined;
|
|
142
|
-
if (hasEnum || isBoolean || hasDefault) {
|
|
143
|
-
return true;
|
|
144
|
-
}
|
|
145
|
-
return schemaChild.example !== undefined || schemaChild.examples !== undefined;
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
const hasExamples = this.schema?.examples || this.schema?.example || parentExamples || allPropertiesHaveExamples || allPolyChildrenHaveExamples;
|
|
149
|
-
if (!this.hideExamples && hasExamples) {
|
|
150
|
-
if (this.node?.instance.examples) {
|
|
151
|
-
count = Object.keys(this.node.instance.examples).length;
|
|
152
|
-
}
|
|
153
|
-
if (count <= 0 && this.node?.instance?.example) {
|
|
154
|
-
count++;
|
|
155
|
-
}
|
|
169
|
+
const { schemaExampleCount, allPropertiesHaveExamples, allPolyChildrenHaveExamples } = this.getExampleCoverage(this.schema);
|
|
170
|
+
const childExamplesCoverSchema = allPropertiesHaveExamples || allPolyChildrenHaveExamples;
|
|
171
|
+
const hasRenderableExamples = schemaExampleCount > 0 || (parentExampleCount > 0 && !childExamplesCoverSchema);
|
|
172
|
+
const exampleCoverageSatisfied = hasRenderableExamples || childExamplesCoverSchema;
|
|
173
|
+
if (!this.hideExamples && hasRenderableExamples) {
|
|
174
|
+
const count = schemaExampleCount > 0 ? schemaExampleCount : parentExampleCount;
|
|
156
175
|
values.push(html `
|
|
157
176
|
<div class="row"><span class="chevron"> ></span>
|
|
158
177
|
<pb33f-model-icon style="padding-left: 3px;" color="${IconColor.primary}" size="${IconSize.small}" icon="${NodeType.EXAMPLE}"></pb33f-model-icon>
|
|
@@ -160,7 +179,7 @@ let SchemaNodeComponent = class SchemaNodeComponent extends GraphNodeComponent {
|
|
|
160
179
|
<sl-badge variant="primary" class="count">${count}</sl-badge>
|
|
161
180
|
</div>`);
|
|
162
181
|
}
|
|
163
|
-
else if (!this.hideExamples) {
|
|
182
|
+
else if (!this.hideExamples && !exampleCoverageSatisfied) {
|
|
164
183
|
values.push(html `
|
|
165
184
|
<div class="row">
|
|
166
185
|
<pb33f-model-icon style="padding-left: 3px;" color="${IconColor.warning}" size="${IconSize.small}" icon="${NodeType.NO_EXAMPLE}"></pb33f-model-icon>
|
|
@@ -172,12 +191,15 @@ let SchemaNodeComponent = class SchemaNodeComponent extends GraphNodeComponent {
|
|
|
172
191
|
render() {
|
|
173
192
|
this.schema = this.nodeInstance;
|
|
174
193
|
if (this.embedded) {
|
|
194
|
+
const results = this.countResults();
|
|
195
|
+
const changeCounts = this.changeCounts;
|
|
175
196
|
return html `
|
|
176
197
|
<div class="${(this.isRef && this.outputs.length == 1) ? 'ref' : ''}"
|
|
177
198
|
style="height: ${this.height}px; width: ${this.width}px" @click="${this.clicked}">
|
|
178
199
|
${this.renderNode()}
|
|
179
|
-
${this.
|
|
200
|
+
${this.renderExtensions()}
|
|
180
201
|
</div>
|
|
202
|
+
${this.renderUnderNodeAnnotations(results, changeCounts)}
|
|
181
203
|
${this.renderActiveArrow()}
|
|
182
204
|
`;
|
|
183
205
|
}
|
|
@@ -96,7 +96,7 @@ export default css `
|
|
|
96
96
|
|
|
97
97
|
.pov-icon {
|
|
98
98
|
position: absolute;
|
|
99
|
-
bottom: -
|
|
99
|
+
bottom: -31px;
|
|
100
100
|
left: 2px;
|
|
101
101
|
font-size: 16px;
|
|
102
102
|
color: var(--primary-color);
|
|
@@ -107,6 +107,7 @@ export default css `
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.rendered-element {
|
|
110
|
+
position: relative;
|
|
110
111
|
overflow: hidden;
|
|
111
112
|
border: 1px solid var(--change-border-color, var(--primary-color));
|
|
112
113
|
}
|
|
@@ -147,8 +148,14 @@ export default css `
|
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
.row-node {
|
|
150
|
-
padding-top: 2px;
|
|
151
151
|
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
min-height: 25px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.node-content {
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: 100%;
|
|
152
159
|
}
|
|
153
160
|
|
|
154
161
|
.load-more-btn {
|
|
@@ -173,7 +180,7 @@ export default css `
|
|
|
173
180
|
}
|
|
174
181
|
|
|
175
182
|
.single-line .pov-icon {
|
|
176
|
-
bottom: -
|
|
183
|
+
bottom: -31px;
|
|
177
184
|
}
|
|
178
185
|
|
|
179
186
|
.single-line .vacuum-results {
|
|
@@ -185,14 +192,20 @@ export default css `
|
|
|
185
192
|
font-family: var(--font-stack), monospace;
|
|
186
193
|
text-align: center;
|
|
187
194
|
width: 100%;
|
|
195
|
+
gap: 4px;
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
.header-node > pb33f-model-icon {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
flex: 0 0 30px;
|
|
191
203
|
width: 30px;
|
|
192
204
|
}
|
|
193
205
|
|
|
194
206
|
.header-text {
|
|
195
|
-
flex
|
|
207
|
+
flex: 1 1 auto;
|
|
208
|
+
min-width: 0;
|
|
196
209
|
text-align: left;
|
|
197
210
|
overflow: hidden;
|
|
198
211
|
text-overflow: ellipsis;
|
|
@@ -232,6 +245,16 @@ export default css `
|
|
|
232
245
|
margin-top: 2px;
|
|
233
246
|
font-family: var(--font-stack-bold), monospace;
|
|
234
247
|
}
|
|
248
|
+
.header-node .array-count,
|
|
249
|
+
.header-node .dependent-icon,
|
|
250
|
+
.header-node .count {
|
|
251
|
+
flex: 0 0 auto;
|
|
252
|
+
float: none;
|
|
253
|
+
margin-top: 0;
|
|
254
|
+
}
|
|
255
|
+
.header-node .dependent-icon::part(base) {
|
|
256
|
+
padding: 0 4px 0 0;
|
|
257
|
+
}
|
|
235
258
|
.count::part(base) {
|
|
236
259
|
font-family: var(--font-stack-bold), monospace;
|
|
237
260
|
color: var(--primary-color);
|
|
@@ -279,18 +302,33 @@ export default css `
|
|
|
279
302
|
background-color: var(--secondary-color-very-lowalpha);
|
|
280
303
|
}
|
|
281
304
|
|
|
282
|
-
.active > .vacuum-results {
|
|
283
|
-
bottom: 0;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
305
|
.slash {
|
|
287
306
|
color: var(--primary-color);
|
|
288
307
|
}
|
|
289
308
|
|
|
309
|
+
.node-annotation {
|
|
310
|
+
position: absolute;
|
|
311
|
+
bottom: -24px;
|
|
312
|
+
height: 20px;
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
white-space: nowrap;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.change-div {
|
|
319
|
+
left: 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
290
322
|
.vacuum-results {
|
|
291
323
|
position: absolute;
|
|
292
|
-
right:
|
|
293
|
-
bottom:
|
|
324
|
+
right: 6px;
|
|
325
|
+
bottom: -24px;
|
|
326
|
+
display: flex;
|
|
327
|
+
align-items: center;
|
|
328
|
+
justify-content: flex-end;
|
|
329
|
+
gap: 3px;
|
|
330
|
+
height: 20px;
|
|
331
|
+
white-space: nowrap;
|
|
294
332
|
}
|
|
295
333
|
|
|
296
334
|
.embedded-schema {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type LayoutDirection = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT';
|
|
2
|
+
export interface ViewportTargetNode {
|
|
3
|
+
id?: string;
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ViewportBox {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function rootExpansionAnchor(direction: LayoutDirection): {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function calculateRootViewportTarget(direction: LayoutDirection, rootNode: ViewportTargetNode, viewBox: ViewportBox): {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function calculateCenteredNodeViewportTarget(node: ViewportTargetNode, viewBox: ViewportBox): {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
export declare function calculateNodeViewportTarget(direction: LayoutDirection, node: ViewportTargetNode, viewBox: ViewportBox): {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const EXPANSION_ANCHOR = 0.22;
|
|
2
|
+
const CENTER_ANCHOR = 0.5;
|
|
3
|
+
export function rootExpansionAnchor(direction) {
|
|
4
|
+
switch (direction) {
|
|
5
|
+
case 'LEFT':
|
|
6
|
+
return { x: 1 - EXPANSION_ANCHOR, y: CENTER_ANCHOR };
|
|
7
|
+
case 'UP':
|
|
8
|
+
return { x: CENTER_ANCHOR, y: 1 - EXPANSION_ANCHOR };
|
|
9
|
+
case 'DOWN':
|
|
10
|
+
return { x: CENTER_ANCHOR, y: EXPANSION_ANCHOR };
|
|
11
|
+
case 'RIGHT':
|
|
12
|
+
default:
|
|
13
|
+
return { x: EXPANSION_ANCHOR, y: CENTER_ANCHOR };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export function calculateRootViewportTarget(direction, rootNode, viewBox) {
|
|
17
|
+
const anchor = rootExpansionAnchor(direction);
|
|
18
|
+
const nodeCenterX = (rootNode.x || 0) + (rootNode.width || 0) / 2;
|
|
19
|
+
const nodeCenterY = (rootNode.y || 0) + (rootNode.height || 0) / 2;
|
|
20
|
+
return {
|
|
21
|
+
x: nodeCenterX - viewBox.width * anchor.x,
|
|
22
|
+
y: nodeCenterY - viewBox.height * anchor.y
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function calculateCenteredNodeViewportTarget(node, viewBox) {
|
|
26
|
+
const nodeCenterX = (node.x || 0) + (node.width || 0) / 2;
|
|
27
|
+
const nodeCenterY = (node.y || 0) + (node.height || 0) / 2;
|
|
28
|
+
return {
|
|
29
|
+
x: nodeCenterX - viewBox.width / 2,
|
|
30
|
+
y: nodeCenterY - viewBox.height / 2
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function calculateNodeViewportTarget(direction, node, viewBox) {
|
|
34
|
+
if (node.id === 'root') {
|
|
35
|
+
return calculateRootViewportTarget(direction, node, viewBox);
|
|
36
|
+
}
|
|
37
|
+
return calculateCenteredNodeViewportTarget(node, viewBox);
|
|
38
|
+
}
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html } from "lit";
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
8
|
import { customElement, state } from "lit/decorators.js";
|
|
9
9
|
import { GitHubWorkspaceView } from "../github/github-workspace-view.js";
|
|
10
10
|
import { ApiKeyViewComponent } from "../api-keys/api-key-view.js";
|
|
@@ -22,6 +22,7 @@ import hrCss from "../../css/hr.css.js";
|
|
|
22
22
|
import tabsCss from "../../css/tabs.css.js";
|
|
23
23
|
import scrollbarCss from "../../css/scrollbar.css.js";
|
|
24
24
|
import { DoctorIcon } from "../model-icon/doctor-icon.js";
|
|
25
|
+
const showApiKeyTab = false;
|
|
25
26
|
let WorkspacesView = class WorkspacesView extends Formable {
|
|
26
27
|
constructor(doc, wsController, walletController, githubController, apiKeyController) {
|
|
27
28
|
super(doc);
|
|
@@ -168,7 +169,7 @@ let WorkspacesView = class WorkspacesView extends Formable {
|
|
|
168
169
|
|
|
169
170
|
<sl-tab-group class="tab-group workspace-tabs" placement="start">
|
|
170
171
|
<sl-tab slot="nav" panel="workspaces" class="tab" active>Workspaces</sl-tab>
|
|
171
|
-
|
|
172
|
+
${showApiKeyTab ? html `<sl-tab slot="nav" panel="api-keys" class="tab">API Keys</sl-tab>` : nothing}
|
|
172
173
|
<sl-tab slot="nav" panel="credit" class="tab">Credit</sl-tab>
|
|
173
174
|
|
|
174
175
|
<sl-tab-panel name="workspaces">
|
|
@@ -248,11 +249,13 @@ let WorkspacesView = class WorkspacesView extends Formable {
|
|
|
248
249
|
</div>
|
|
249
250
|
</sl-tab-panel>
|
|
250
251
|
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
${showApiKeyTab ? html `
|
|
253
|
+
<sl-tab-panel name="api-keys">
|
|
254
|
+
<div class="tab-panel-content scroller">
|
|
255
|
+
${this.apiKeyView}
|
|
256
|
+
</div>
|
|
257
|
+
</sl-tab-panel>
|
|
258
|
+
` : nothing}
|
|
256
259
|
|
|
257
260
|
<sl-tab-panel name="credit">
|
|
258
261
|
<div class="tab-panel-content scroller">
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { focusedDiffSharedCss } from '../diff-viewer/line-renderer.js';
|
|
3
|
+
export default [
|
|
4
|
+
focusedDiffSharedCss,
|
|
5
|
+
css `
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
min-height: 0;
|
|
9
|
+
height: 100%;
|
|
10
|
+
background: var(--background-color);
|
|
11
|
+
color: var(--font-color);
|
|
12
|
+
font-family: var(--font-stack), monospace;
|
|
13
|
+
overflow: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.yaml-viewer {
|
|
17
|
+
min-width: max-content;
|
|
18
|
+
padding: var(--global-padding-half) 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.diff-line {
|
|
22
|
+
min-height: var(--global-padding-double);
|
|
23
|
+
height: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.line-gutter {
|
|
27
|
+
color: var(--font-color-sub3);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.line-content {
|
|
31
|
+
overflow: visible;
|
|
32
|
+
white-space: pre;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.diff-line[data-emphasis="focus"] {
|
|
36
|
+
background: var(--secondary-color-lowalpha);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.diff-line[data-emphasis="focus"] .line-number {
|
|
40
|
+
background: var(--secondary-color-lowalpha);
|
|
41
|
+
color: var(--secondary-color);
|
|
42
|
+
font-family: var(--font-stack-bold), monospace;
|
|
43
|
+
}
|
|
44
|
+
`
|
|
45
|
+
];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class Pb33fYamlViewer extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
spec: string;
|
|
5
|
+
highlighted: Record<number, string>;
|
|
6
|
+
firstLine: number;
|
|
7
|
+
focusStart: number;
|
|
8
|
+
focusEnd: number;
|
|
9
|
+
language: 'yaml' | 'json';
|
|
10
|
+
private cachedSpec;
|
|
11
|
+
private cachedLines;
|
|
12
|
+
scrollToLine(line: number): void;
|
|
13
|
+
private emphasis;
|
|
14
|
+
private lines;
|
|
15
|
+
private renderLine;
|
|
16
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'pb33f-yaml-viewer': Pb33fYamlViewer;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
10
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
11
|
+
import yamlViewerCss from './yaml-viewer.css.js';
|
|
12
|
+
let Pb33fYamlViewer = class Pb33fYamlViewer extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.spec = '';
|
|
16
|
+
this.highlighted = {};
|
|
17
|
+
this.firstLine = 1;
|
|
18
|
+
this.focusStart = 0;
|
|
19
|
+
this.focusEnd = 0;
|
|
20
|
+
this.language = 'yaml';
|
|
21
|
+
this.cachedSpec = '';
|
|
22
|
+
this.cachedLines = [];
|
|
23
|
+
}
|
|
24
|
+
scrollToLine(line) {
|
|
25
|
+
const row = this.renderRoot.querySelector(`[data-line="${line}"]`);
|
|
26
|
+
row?.scrollIntoView({ block: 'center', behavior: 'auto' });
|
|
27
|
+
}
|
|
28
|
+
emphasis(line) {
|
|
29
|
+
if (this.focusStart > 0 && line >= this.focusStart && line <= (this.focusEnd || this.focusStart)) {
|
|
30
|
+
return 'focus';
|
|
31
|
+
}
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
lines() {
|
|
35
|
+
if (this.spec !== this.cachedSpec) {
|
|
36
|
+
this.cachedSpec = this.spec;
|
|
37
|
+
this.cachedLines = this.spec.split('\n');
|
|
38
|
+
}
|
|
39
|
+
return this.cachedLines;
|
|
40
|
+
}
|
|
41
|
+
renderLine(line, idx) {
|
|
42
|
+
const lineNumber = this.firstLine + idx;
|
|
43
|
+
const highlightedContent = this.highlighted?.[lineNumber];
|
|
44
|
+
const emphasis = this.emphasis(lineNumber);
|
|
45
|
+
return html `
|
|
46
|
+
<div class="diff-line equal"
|
|
47
|
+
data-emphasis=${emphasis || nothing}
|
|
48
|
+
data-line=${lineNumber}
|
|
49
|
+
data-original-line=${lineNumber}>
|
|
50
|
+
<span class="line-gutter"></span>
|
|
51
|
+
<span class="line-number">${lineNumber}</span>
|
|
52
|
+
<span class="line-content">${highlightedContent ? unsafeHTML(highlightedContent) : line}</span>
|
|
53
|
+
</div>
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return html `
|
|
58
|
+
<div class="yaml-viewer" data-language=${this.language}>
|
|
59
|
+
${repeat(this.lines(), (_, idx) => this.firstLine + idx, (line, idx) => this.renderLine(line, idx))}
|
|
60
|
+
</div>
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
Pb33fYamlViewer.styles = yamlViewerCss;
|
|
65
|
+
__decorate([
|
|
66
|
+
property()
|
|
67
|
+
], Pb33fYamlViewer.prototype, "spec", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
property({ type: Object })
|
|
70
|
+
], Pb33fYamlViewer.prototype, "highlighted", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
property({ type: Number })
|
|
73
|
+
], Pb33fYamlViewer.prototype, "firstLine", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
property({ type: Number })
|
|
76
|
+
], Pb33fYamlViewer.prototype, "focusStart", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property({ type: Number })
|
|
79
|
+
], Pb33fYamlViewer.prototype, "focusEnd", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
property()
|
|
82
|
+
], Pb33fYamlViewer.prototype, "language", void 0);
|
|
83
|
+
Pb33fYamlViewer = __decorate([
|
|
84
|
+
customElement('pb33f-yaml-viewer')
|
|
85
|
+
], Pb33fYamlViewer);
|
|
86
|
+
export { Pb33fYamlViewer };
|
|
@@ -4,6 +4,7 @@ export declare class ProblemController extends EventTarget {
|
|
|
4
4
|
private readonly deps;
|
|
5
5
|
constructor(deps: ProblemControllerDeps);
|
|
6
6
|
problemClicked(event: CustomEvent<ProblemClickedEvent>): void;
|
|
7
|
+
private resolveProblemClickTarget;
|
|
7
8
|
private ensureSpecTabActive;
|
|
8
9
|
private normalizeSourceLocation;
|
|
9
10
|
private navigateToRolodexNode;
|