@spteck/react-controls-v2 2.0.18 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +143 -387
- package/dist/LocalizationProvider-BLjmybBa.cjs +2 -0
- package/dist/LocalizationProvider-BSlUf0tp.js +497 -0
- package/dist/_arrayEach-CnIMt1eB.js +61 -0
- package/dist/_arrayEach-vx8gLv03.cjs +2 -0
- package/dist/abstractions/ILocalizationProvider.d.ts +52 -0
- package/dist/abstractions/index.d.ts +1 -0
- package/dist/abstractions/providers/DefaultLocalizationProvider.d.ts +52 -0
- package/dist/abstractions/providers/LocalizationProvider.d.ts +47 -0
- package/dist/abstractions/providers/index.d.ts +3 -1
- package/dist/ar-C1pLt8fa.js +219 -0
- package/dist/ar-Jzw7PLrc.cjs +2 -0
- package/dist/arc-DPTV8xm_.js +132 -0
- package/dist/arc-fdHOvWdS.cjs +2 -0
- package/dist/architecture-7HQA4BMR-BAUhgjE2.js +6 -0
- package/dist/architecture-7HQA4BMR-DwCjpO72.cjs +2 -0
- package/dist/architectureDiagram-VXUJARFQ-B5yGOjRk.js +8680 -0
- package/dist/architectureDiagram-VXUJARFQ-C7K57uon.cjs +2 -0
- package/dist/az-C0Ow5Hxa.cjs +2 -0
- package/dist/az-C3-F9ybX.js +219 -0
- package/dist/bg-YB0TmpRF.cjs +2 -0
- package/dist/bg-w2e_udiK.js +219 -0
- package/dist/blockDiagram-VD42YOAC-B9MtQVc8.js +3756 -0
- package/dist/blockDiagram-VD42YOAC-CXUX1_9K.cjs +2 -0
- package/dist/bs-BoW04lRb.cjs +2 -0
- package/dist/bs-CEe_gjEx.js +219 -0
- package/dist/c4Diagram-YG6GDRKO-0rSYap-S.cjs +2 -0
- package/dist/c4Diagram-YG6GDRKO-CKFTKCbq.js +2483 -0
- package/dist/ca-Bsy2Y5pS.cjs +2 -0
- package/dist/ca-CKpd72XI.js +219 -0
- package/dist/channel-CJ2FoHig.js +8 -0
- package/dist/channel-DjKs64mj.cjs +2 -0
- package/dist/chunk-4BX2VUAB-DJlF8TIZ.cjs +2 -0
- package/dist/chunk-4BX2VUAB-ghaW5jSQ.js +18 -0
- package/dist/chunk-55IACEB6-9B1z6QHL.cjs +2 -0
- package/dist/chunk-55IACEB6-__yJgpDO.js +14 -0
- package/dist/chunk-B4BG7PRW-Dbzu88Oo.cjs +2 -0
- package/dist/chunk-B4BG7PRW-NVucxzRs.js +1828 -0
- package/dist/chunk-DI55MBZ5-Bun58OTZ.js +1928 -0
- package/dist/chunk-DI55MBZ5-e__JA50C.cjs +2 -0
- package/dist/chunk-FMBD7UC4-DulgQOWY.js +20 -0
- package/dist/chunk-FMBD7UC4-Pi8Fs7F6.cjs +2 -0
- package/dist/chunk-QN33PNHL-DA_6jplh.js +26 -0
- package/dist/chunk-QN33PNHL-DcHwlyDo.cjs +2 -0
- package/dist/chunk-QZHKN3VN-BfGBK4_s.cjs +2 -0
- package/dist/chunk-QZHKN3VN-C5x9oEL1.js +18 -0
- package/dist/chunk-TZMSLE5B-BCBp8EeB.cjs +2 -0
- package/dist/chunk-TZMSLE5B-Bj2-6aT8.js +109 -0
- package/dist/classDiagram-2ON5EDUG-BGUaVc1W.cjs +2 -0
- package/dist/classDiagram-2ON5EDUG-BcR1HP9z.js +20 -0
- package/dist/classDiagram-v2-WZHVMYZB-BGUaVc1W.cjs +2 -0
- package/dist/classDiagram-v2-WZHVMYZB-BcR1HP9z.js +20 -0
- package/dist/components/AISearchControl/index.d.ts +1 -0
- package/dist/components/Card/index.d.ts +0 -1
- package/dist/components/Carousel/index.d.ts +0 -3
- package/dist/components/Container/Container.d.ts +1 -9
- package/dist/components/Container/IContainerProps.d.ts +10 -4
- package/dist/components/Container/index.d.ts +1 -1
- package/dist/components/ContentRenderer/ContentRenderer.d.ts +1 -37
- package/dist/components/ContentRenderer/IContentRendererProps.d.ts +45 -0
- package/dist/components/ContentRenderer/index.d.ts +1 -1
- package/dist/components/DataGridV2/DataGridHandle.d.ts +14 -0
- package/dist/components/DataGridV2/DataGridV2.d.ts +2 -36
- package/dist/components/DataGridV2/IDataGridV2ExtraProps.d.ts +25 -0
- package/dist/components/DataGridV2/index.d.ts +1 -0
- package/dist/components/Grid/useGridStyles.d.ts +1 -1
- package/dist/components/ItemPicker/IItemPickerOption.d.ts +14 -0
- package/dist/components/ItemPicker/IItemPickerPagingInfo.d.ts +9 -0
- package/dist/components/ItemPicker/IItemPickerProps.d.ts +54 -0
- package/dist/components/ItemPicker/ItemPicker.d.ts +4 -0
- package/dist/components/ItemPicker/index.d.ts +5 -0
- package/dist/components/ItemPicker/useItemPickerStyles.d.ts +10 -0
- package/dist/components/KPIControl/IKpiCardData.d.ts +19 -0
- package/dist/components/KPIControl/IKpiCardProps.d.ts +6 -0
- package/dist/components/KPIControl/KpiCard.d.ts +4 -0
- package/dist/components/KPIControl/KpiCardCompact.d.ts +4 -0
- package/dist/components/KPIControl/KpiCardSkeleton.d.ts +8 -0
- package/dist/components/KPIControl/Kpis.d.ts +7 -0
- package/dist/components/KPIControl/NoKpisCard.d.ts +8 -0
- package/dist/components/KPIControl/index.d.ts +8 -0
- package/dist/components/KPIControl/useKpiStyles.d.ts +33 -0
- package/dist/components/ListToolbar/FlatItem.d.ts +8 -0
- package/dist/components/ListToolbar/IListToolbarProps.d.ts +27 -0
- package/dist/components/ListToolbar/IToolbarItem.d.ts +37 -0
- package/dist/components/ListToolbar/IToolbarItemRendererProps.d.ts +13 -0
- package/dist/components/ListToolbar/ListToolbar.d.ts +5 -0
- package/dist/components/ListToolbar/ToolbarItemRenderer.d.ts +7 -0
- package/dist/components/ListToolbar/helpers.d.ts +6 -0
- package/dist/components/ListToolbar/index.d.ts +4 -0
- package/dist/components/ListToolbar/useListToolbarStyles.d.ts +16 -0
- package/dist/components/ListToolbar/useOverflowIndex.d.ts +18 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.d.ts +1 -1
- package/dist/components/MarkdownRenderer/useMarkdownStyles.d.ts +4 -0
- package/dist/components/MermaidDiagram/IMermaidDiagramProps.d.ts +31 -0
- package/dist/components/MermaidDiagram/MermaidDiagram.d.ts +4 -0
- package/dist/components/MermaidDiagram/index.d.ts +4 -0
- package/dist/components/MermaidDiagram/useMermaidDiagramStyles.d.ts +9 -0
- package/dist/components/Navigation/INavigationProps.d.ts +141 -0
- package/dist/components/Navigation/Navigation.d.ts +27 -0
- package/dist/components/Navigation/index.d.ts +4 -0
- package/dist/components/Navigation/useNavigationStyles.d.ts +13 -0
- package/dist/components/SelectTime/IOptionTimeProps.d.ts +23 -0
- package/dist/components/SelectTime/ISelectTimeProps.d.ts +25 -0
- package/dist/components/SelectTime/OptionTime.d.ts +16 -0
- package/dist/components/SelectTime/SelectTime.d.ts +4 -0
- package/dist/components/SelectTime/index.d.ts +7 -0
- package/dist/components/SelectTime/useOptionTimeStyles.d.ts +6 -0
- package/dist/components/SelectTime/useSelectTimeStyles.d.ts +7 -0
- package/dist/components/SplitPane/ISplitPaneProps.d.ts +28 -0
- package/dist/components/SplitPane/SplitPane.d.ts +10 -0
- package/dist/components/SplitPane/index.d.ts +4 -0
- package/dist/components/SplitPane/useSplitPaneStyles.d.ts +13 -0
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.Utilities.d.ts +1 -1
- package/dist/components/adaptiveCardHost/fluentUI/renderCompat.d.ts +7 -0
- package/dist/components/aiAssistant/index.d.ts +1 -0
- package/dist/components/appDashboard/IAppDashboardProps.d.ts +2 -2
- package/dist/components/breadcrumb/IBreadcrumProps.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts +1 -0
- package/dist/components/customControlBar/CustomControlBar.d.ts +1 -13
- package/dist/components/customControlBar/IControlItem.d.ts +6 -0
- package/dist/components/customControlBar/ICustomControlBarProps.d.ts +11 -0
- package/dist/components/customControlBar/index.d.ts +2 -0
- package/dist/components/dropDownField/useDropdownFieldStyles.d.ts +5 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/inputField/IInputFieldProps.d.ts +22 -0
- package/dist/components/inputField/InputField.d.ts +4 -0
- package/dist/components/inputField/index.d.ts +3 -0
- package/dist/components/inputField/useInputFieldStyles.d.ts +5 -0
- package/dist/components/renderDrawer/RenderDrawer.d.ts +1 -4
- package/dist/components/renderHeader/index.d.ts +1 -0
- package/dist/components/searchControl/ISearchControlProps.d.ts +14 -0
- package/dist/components/searchControl/SearchControl.d.ts +5 -0
- package/dist/components/searchControl/index.d.ts +3 -0
- package/dist/components/searchControl/useSearchControlStyles.d.ts +13 -0
- package/dist/components/stackv2/StackV2.d.ts +1 -1
- package/dist/components/worldMap/index.d.ts +2 -0
- package/dist/components/worldMap/useContentToolTipStyles.d.ts +2 -8
- package/dist/cose-bilkent-S5V4N54A-BcLbJZT7.cjs +2 -0
- package/dist/cose-bilkent-S5V4N54A-CtEV3dGx.js +4934 -0
- package/dist/cs-D-801PIR.cjs +2 -0
- package/dist/cs-DQvRPciB.js +219 -0
- package/dist/cy-BxyJCM05.js +219 -0
- package/dist/cy-aUPUcn-S.cjs +2 -0
- package/dist/cytoscape.esm-BS1owLay.js +30250 -0
- package/dist/cytoscape.esm-BxB3woZB.cjs +10 -0
- package/dist/da-B05ad5Iq.js +219 -0
- package/dist/da-CTiLOqut.cjs +2 -0
- package/dist/dagre-6UL2VRFP-BZ9apxkx.js +696 -0
- package/dist/dagre-6UL2VRFP-FmOJGmX_.cjs +2 -0
- package/dist/de-DJ5iwpd7.js +219 -0
- package/dist/de-Dm204UMA.cjs +2 -0
- package/dist/defaultLocale-7NeEK7SF.cjs +2 -0
- package/dist/defaultLocale-DVr69WTU.js +207 -0
- package/dist/diagram-PSM6KHXK-BZxXJahR.cjs +2 -0
- package/dist/diagram-PSM6KHXK-_wkJk__z.js +848 -0
- package/dist/diagram-QEK2KX5R-NQiK3YZe.cjs +2 -0
- package/dist/diagram-QEK2KX5R-YQAU79Lo.js +305 -0
- package/dist/diagram-S2PKOQOG-Cob2HIrt.cjs +2 -0
- package/dist/diagram-S2PKOQOG-D8jaJbP8.js +212 -0
- package/dist/el-CBS9mHS3.js +219 -0
- package/dist/el-DbtZj-ph.cjs +2 -0
- package/dist/erDiagram-Q2GNP2WA-DAzex-RZ.cjs +2 -0
- package/dist/erDiagram-Q2GNP2WA-syuB6Tgc.js +1160 -0
- package/dist/es-Bo08apQr.js +219 -0
- package/dist/es-Cc-4Vqf7.cjs +2 -0
- package/dist/et-D5pQ66eY.cjs +2 -0
- package/dist/et-pRL0Tmle.js +219 -0
- package/dist/eu-Br68gaf7.js +219 -0
- package/dist/eu-RZ-27koK.cjs +2 -0
- package/dist/fi-BCXB-k_X.js +219 -0
- package/dist/fi-Dqa9mgnW.cjs +2 -0
- package/dist/flowDiagram-NV44I4VS-CXJA5Xu7.js +2339 -0
- package/dist/flowDiagram-NV44I4VS-DOcXDmk8.cjs +2 -0
- package/dist/fr-B7fhkle4.cjs +2 -0
- package/dist/fr-gKE1SSIF.js +219 -0
- package/dist/ga-4Hf7vKvr.cjs +2 -0
- package/dist/ga-C1SpITZy.js +219 -0
- package/dist/ganttDiagram-JELNMOA3-BodaBsjX.js +3652 -0
- package/dist/ganttDiagram-JELNMOA3-oeOE4Au1.cjs +2 -0
- package/dist/gitGraph-G5XIXVHT-BAoUh2t9.js +6 -0
- package/dist/gitGraph-G5XIXVHT-bEuOx0_B.cjs +2 -0
- package/dist/gitGraphDiagram-V2S2FVAM-B5dByD3_.js +1215 -0
- package/dist/gitGraphDiagram-V2S2FVAM-D4G2FRg-.cjs +2 -0
- package/dist/gl-COSpsMSK.cjs +2 -0
- package/dist/gl-CSzCeu2L.js +219 -0
- package/dist/graph-C7xixGrW.cjs +2 -0
- package/dist/graph-DH3cnEko.js +421 -0
- package/dist/he-BrkfqoIm.js +219 -0
- package/dist/he-C7Wi6-EL.cjs +2 -0
- package/dist/hi-C1RGDPzn.js +219 -0
- package/dist/hi-ojklJj-a.cjs +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useLocalizationStrings.d.ts +71 -0
- package/dist/hr-CsO_h2VT.js +219 -0
- package/dist/hr-DkEwOCGU.cjs +2 -0
- package/dist/hu-CVtbM-V2.js +219 -0
- package/dist/hu-D8uAAzvN.cjs +2 -0
- package/dist/id-18yPGK2f.cjs +2 -0
- package/dist/id-CARSN0W8.js +219 -0
- package/dist/index-CP55uT1-.js +55270 -0
- package/dist/index-DkoeCnje.cjs +428 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +165 -200
- package/dist/info-VBDWY6EO-CCtIeR-l.js +6 -0
- package/dist/info-VBDWY6EO-CIQZzC1h.cjs +2 -0
- package/dist/infoDiagram-HS3SLOUP-BCGLBWdb.js +32 -0
- package/dist/infoDiagram-HS3SLOUP-l61UBAGu.cjs +2 -0
- package/dist/init-DZ96s0AS.cjs +2 -0
- package/dist/init-ZxktEp_H.js +17 -0
- package/dist/it-BVq911RW.cjs +2 -0
- package/dist/it-ClWGK7XT.js +219 -0
- package/dist/ja-BgcKuKZ4.cjs +2 -0
- package/dist/ja-DGL12HwE.js +219 -0
- package/dist/journeyDiagram-XKPGCS4Q-CngaMpvw.js +1255 -0
- package/dist/journeyDiagram-XKPGCS4Q-DDFQr_sf.cjs +2 -0
- package/dist/kanban-definition-3W4ZIXB7-DE64tG2k.js +1049 -0
- package/dist/kanban-definition-3W4ZIXB7-Yh2cXBd5.cjs +2 -0
- package/dist/katex-DPu4QpBP.cjs +2 -0
- package/dist/katex-Dd1-wdX2.js +14523 -0
- package/dist/kk-CkKXbKso.js +219 -0
- package/dist/kk-Dn3FBkOR.cjs +2 -0
- package/dist/ko-CKAbV25b.cjs +2 -0
- package/dist/ko-QYvDV2aw.js +219 -0
- package/dist/layout-D6yO7DzL.cjs +2 -0
- package/dist/layout-bxkZz7Cm.js +1919 -0
- package/dist/linear-CytTXQM2.cjs +2 -0
- package/dist/linear-R5bATomY.js +341 -0
- package/dist/localization/ILibraryStrings.d.ts +299 -0
- package/dist/localization/defaults/ar.d.ts +8 -0
- package/dist/localization/defaults/az.d.ts +8 -0
- package/dist/localization/defaults/bg.d.ts +8 -0
- package/dist/localization/defaults/bs.d.ts +8 -0
- package/dist/localization/defaults/ca.d.ts +8 -0
- package/dist/localization/defaults/cs.d.ts +8 -0
- package/dist/localization/defaults/cy.d.ts +8 -0
- package/dist/localization/defaults/da.d.ts +8 -0
- package/dist/localization/defaults/de.d.ts +8 -0
- package/dist/localization/defaults/el.d.ts +8 -0
- package/dist/localization/defaults/en.d.ts +8 -0
- package/dist/localization/defaults/es.d.ts +8 -0
- package/dist/localization/defaults/et.d.ts +8 -0
- package/dist/localization/defaults/eu.d.ts +8 -0
- package/dist/localization/defaults/fi.d.ts +8 -0
- package/dist/localization/defaults/fr.d.ts +8 -0
- package/dist/localization/defaults/ga.d.ts +8 -0
- package/dist/localization/defaults/gl.d.ts +8 -0
- package/dist/localization/defaults/he.d.ts +8 -0
- package/dist/localization/defaults/hi.d.ts +8 -0
- package/dist/localization/defaults/hr.d.ts +8 -0
- package/dist/localization/defaults/hu.d.ts +8 -0
- package/dist/localization/defaults/id.d.ts +8 -0
- package/dist/localization/defaults/index.d.ts +47 -0
- package/dist/localization/defaults/it.d.ts +8 -0
- package/dist/localization/defaults/ja.d.ts +8 -0
- package/dist/localization/defaults/kk.d.ts +8 -0
- package/dist/localization/defaults/ko.d.ts +8 -0
- package/dist/localization/defaults/lt.d.ts +8 -0
- package/dist/localization/defaults/lv.d.ts +8 -0
- package/dist/localization/defaults/mk.d.ts +8 -0
- package/dist/localization/defaults/ms.d.ts +8 -0
- package/dist/localization/defaults/nb.d.ts +8 -0
- package/dist/localization/defaults/nl.d.ts +8 -0
- package/dist/localization/defaults/pl.d.ts +8 -0
- package/dist/localization/defaults/pt.d.ts +8 -0
- package/dist/localization/defaults/ro.d.ts +8 -0
- package/dist/localization/defaults/ru.d.ts +8 -0
- package/dist/localization/defaults/sk.d.ts +8 -0
- package/dist/localization/defaults/sl.d.ts +8 -0
- package/dist/localization/defaults/sr.d.ts +8 -0
- package/dist/localization/defaults/sv.d.ts +8 -0
- package/dist/localization/defaults/th.d.ts +8 -0
- package/dist/localization/defaults/tr.d.ts +8 -0
- package/dist/localization/defaults/uk.d.ts +8 -0
- package/dist/localization/defaults/vi.d.ts +8 -0
- package/dist/localization/defaults/zh.d.ts +8 -0
- package/dist/localization/index.d.ts +8 -0
- package/dist/localization/utils.d.ts +10 -0
- package/dist/lt-BKnFyiLV.js +219 -0
- package/dist/lt-BnGNEsIS.cjs +2 -0
- package/dist/lv-Clqo0Ogm.js +219 -0
- package/dist/lv-D3rJQRhc.cjs +2 -0
- package/dist/maplibre-gl-D9TSGNCf.cjs +6 -0
- package/dist/maplibre-gl-DwyiD0x9.js +23511 -0
- package/dist/mermaid-parser.core-BbdofhA6.js +23791 -0
- package/dist/mermaid-parser.core-C4ChZJz4.cjs +2 -0
- package/dist/mindmap-definition-VGOIOE7T-BonbrEly.cjs +2 -0
- package/dist/mindmap-definition-VGOIOE7T-C8FL7caj.js +1129 -0
- package/dist/mk-EhcD0RzW.js +219 -0
- package/dist/mk-hVxJgrE0.cjs +2 -0
- package/dist/ms-CJACwjo7.js +219 -0
- package/dist/ms-D0txYckK.cjs +2 -0
- package/dist/nb-BfKRl99z.cjs +2 -0
- package/dist/nb-NCgnP0Pu.js +219 -0
- package/dist/nl-EgsNCunP.js +219 -0
- package/dist/nl-ZXiLkBj_.cjs +2 -0
- package/dist/ordinal-BZdahNih.cjs +2 -0
- package/dist/ordinal-DSZU4PqD.js +77 -0
- package/dist/packet-DYOGHKS2-64UpspMA.cjs +2 -0
- package/dist/packet-DYOGHKS2-DCndr5Wp.js +6 -0
- package/dist/pie-VRWISCQL-B_5_SIgL.cjs +2 -0
- package/dist/pie-VRWISCQL-BbSFz_Jh.js +6 -0
- package/dist/pieDiagram-ADFJNKIX-C8b4kPLp.cjs +2 -0
- package/dist/pieDiagram-ADFJNKIX-CQjh4P80.js +238 -0
- package/dist/pl-H28GVtiG.js +219 -0
- package/dist/pl-tVjdYTB9.cjs +2 -0
- package/dist/providers.cjs +2 -0
- package/dist/providers.js +252 -1
- package/dist/pt-1k62N9F3.cjs +2 -0
- package/dist/pt-BSPZhWKl.js +211 -0
- package/dist/quadrantDiagram-AYHSOK5B-Bb99yQJL.cjs +2 -0
- package/dist/quadrantDiagram-AYHSOK5B-BiLBDCHf.js +1338 -0
- package/dist/radar-ZZBFDIW7-DC8bA3_e.cjs +2 -0
- package/dist/radar-ZZBFDIW7-DpGZ3D_F.js +6 -0
- package/dist/requirementDiagram-UZGBJVZJ-BeLfR5tA.cjs +2 -0
- package/dist/requirementDiagram-UZGBJVZJ-D6hcN5kf.js +1164 -0
- package/dist/ro-9Qt1qDDA.cjs +2 -0
- package/dist/ro-BpaZLre_.js +219 -0
- package/dist/ru-4WxRouIU.cjs +2 -0
- package/dist/ru-CUZzD-Tx.js +219 -0
- package/dist/sankeyDiagram-TZEHDZUN-7K2pggbF.js +1194 -0
- package/dist/sankeyDiagram-TZEHDZUN-T1lqY3ke.cjs +2 -0
- package/dist/sequenceDiagram-WL72ISMW-CaSRrEHR.cjs +2 -0
- package/dist/sequenceDiagram-WL72ISMW-DymCRly8.js +3882 -0
- package/dist/sk-CoQ6XiCY.js +219 -0
- package/dist/sk-uWukDQab.cjs +2 -0
- package/dist/sl-B6DVbKg6.cjs +2 -0
- package/dist/sl-CHW-ZGol.js +219 -0
- package/dist/sr-BOD8Tc-D.cjs +2 -0
- package/dist/sr-EQGjIBJE.js +219 -0
- package/dist/stateDiagram-FKZM4ZOC-B3uhYYpW.js +449 -0
- package/dist/stateDiagram-FKZM4ZOC-BETxyYxX.cjs +2 -0
- package/dist/stateDiagram-v2-4FDKWEC3-B4AjT1wB.cjs +2 -0
- package/dist/stateDiagram-v2-4FDKWEC3-BuiA8K0X.js +20 -0
- package/dist/style.css +1 -0
- package/dist/sv-B6nLuQr7.cjs +2 -0
- package/dist/sv-DTxWN6ED.js +219 -0
- package/dist/th-BVPzHvBf.js +219 -0
- package/dist/th-DmULV6uT.cjs +2 -0
- package/dist/timeline-definition-IT6M3QCI-CsJvwNrg.cjs +2 -0
- package/dist/timeline-definition-IT6M3QCI-DNROY61n.js +1227 -0
- package/dist/tr-BE5geTUC.cjs +2 -0
- package/dist/tr-BHR1QA-D.js +219 -0
- package/dist/treemap-GDKQZRPO-DbPXSmw-.js +6 -0
- package/dist/treemap-GDKQZRPO-Dj3L_VQH.cjs +2 -0
- package/dist/uk-Bc5TwelE.js +219 -0
- package/dist/uk-DS5ukB_-.cjs +2 -0
- package/dist/vi-D9FF4kkG.cjs +2 -0
- package/dist/vi-DC0eQZb7.js +219 -0
- package/dist/xychartDiagram-PRI3JC2R-CXT2FhOm.cjs +2 -0
- package/dist/xychartDiagram-PRI3JC2R-D7UaoGaC.js +1887 -0
- package/dist/zh-CGcOiJ3s.cjs +2 -0
- package/dist/zh-GsCLn8OE.js +219 -0
- package/package.json +95 -92
- package/dist/ILoggingProvider-C4FFlnQ0.js +0 -2
- package/dist/ILoggingProvider-C4FFlnQ0.js.map +0 -1
- package/dist/ILoggingProvider-CYYYCGLY.mjs +0 -18
- package/dist/ILoggingProvider-CYYYCGLY.mjs.map +0 -1
- package/dist/abstractions/IApplicationContext.d.ts.map +0 -1
- package/dist/abstractions/IAuthenticationProvider.d.ts.map +0 -1
- package/dist/abstractions/IGraphProvider.d.ts.map +0 -1
- package/dist/abstractions/ILoggingProvider.d.ts.map +0 -1
- package/dist/abstractions/IPageContext.d.ts.map +0 -1
- package/dist/abstractions/IStorageProvider.d.ts.map +0 -1
- package/dist/abstractions/index.d.ts.map +0 -1
- package/dist/abstractions/providers/ConsoleLoggingProvider.d.ts.map +0 -1
- package/dist/abstractions/providers/DefaultGraphClient.d.ts.map +0 -1
- package/dist/abstractions/providers/LocalStorageProvider.d.ts.map +0 -1
- package/dist/abstractions/providers/index.d.ts.map +0 -1
- package/dist/components/AISearchControl/AISearchControl.d.ts.map +0 -1
- package/dist/components/AISearchControl/AISearchIcon.d.ts.map +0 -1
- package/dist/components/AISearchControl/AISearchIconExample.d.ts.map +0 -1
- package/dist/components/AISearchControl/index.d.ts.map +0 -1
- package/dist/components/AISearchControl/useAISearchControlStyles.d.ts.map +0 -1
- package/dist/components/AspectRatio/AspectRatio.d.ts.map +0 -1
- package/dist/components/AspectRatio/IAspectRationProps.d.ts.map +0 -1
- package/dist/components/AspectRatio/index.d.ts.map +0 -1
- package/dist/components/AspectRatio/useAspectRatioStyles.d.ts.map +0 -1
- package/dist/components/Card/Card.d.ts.map +0 -1
- package/dist/components/Card/ICardProps.d.ts.map +0 -1
- package/dist/components/Card/index.d.ts.map +0 -1
- package/dist/components/Card/useCardStyles.d.ts.map +0 -1
- package/dist/components/Carousel/Carousel.d.ts.map +0 -1
- package/dist/components/Carousel/ICarouselProps.d.ts.map +0 -1
- package/dist/components/Carousel/index.d.ts.map +0 -1
- package/dist/components/Carousel/useCarouselButton.d.ts.map +0 -1
- package/dist/components/Carousel/useCarouselStyles.d.ts.map +0 -1
- package/dist/components/Carousel/useCarouselStylesMain.d.ts.map +0 -1
- package/dist/components/Center/Center.d.ts.map +0 -1
- package/dist/components/Center/ICenterProps.d.ts.map +0 -1
- package/dist/components/Center/index.d.ts.map +0 -1
- package/dist/components/Center/useCenterStyles.d.ts.map +0 -1
- package/dist/components/Container/Container.d.ts.map +0 -1
- package/dist/components/Container/IContainerProps.d.ts.map +0 -1
- package/dist/components/Container/index.d.ts.map +0 -1
- package/dist/components/Container/useContainerStyles.d.ts.map +0 -1
- package/dist/components/ContentRenderer/ContentRenderer.d.ts.map +0 -1
- package/dist/components/ContentRenderer/index.d.ts.map +0 -1
- package/dist/components/DataGridV2/DataGridV2.d.ts.map +0 -1
- package/dist/components/DataGridV2/index.d.ts.map +0 -1
- package/dist/components/DataGridV2/useDataGridV2Styles.d.ts.map +0 -1
- package/dist/components/Grid/Grid.d.ts.map +0 -1
- package/dist/components/Grid/IGridProps.d.ts.map +0 -1
- package/dist/components/Grid/index.d.ts.map +0 -1
- package/dist/components/Grid/useGridStyles.d.ts.map +0 -1
- package/dist/components/Layout/ILayoutProps.d.ts.map +0 -1
- package/dist/components/Layout/Layout.d.ts.map +0 -1
- package/dist/components/Layout/LayoutItem.d.ts.map +0 -1
- package/dist/components/Layout/index.d.ts.map +0 -1
- package/dist/components/Layout/useLayoutStyles.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/IAction.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/IActivity.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/IActivityMessageProps.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/IActor.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/IUserActor.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/ListItemActivityMessage.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/index.d.ts.map +0 -1
- package/dist/components/ListItemActivityMessage/useSharePointActivities.d.ts.map +0 -1
- package/dist/components/LivePersona/ILivePersonaProps.d.ts.map +0 -1
- package/dist/components/LivePersona/LivePersona.d.ts.map +0 -1
- package/dist/components/LivePersona/index.d.ts.map +0 -1
- package/dist/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +0 -1
- package/dist/components/MarkdownRenderer/index.d.ts.map +0 -1
- package/dist/components/Popup/Popup.d.ts.map +0 -1
- package/dist/components/Popup/index.d.ts.map +0 -1
- package/dist/components/Provider/UniversalProvider.d.ts.map +0 -1
- package/dist/components/Provider/index.d.ts.map +0 -1
- package/dist/components/RenderLabel/RenderLabel.d.ts.map +0 -1
- package/dist/components/RenderLabel/index.d.ts.map +0 -1
- package/dist/components/RenderLabel/useRenderLabelStylesStyles.d.ts.map +0 -1
- package/dist/components/RenderSpninner/RenderSpinner.d.ts.map +0 -1
- package/dist/components/RenderSpninner/index.d.ts.map +0 -1
- package/dist/components/Space/ISpaceProps.d.ts.map +0 -1
- package/dist/components/Space/SPace.d.ts.map +0 -1
- package/dist/components/Space/index.d.ts.map +0 -1
- package/dist/components/Space/useSpaceStyles.d.ts.map +0 -1
- package/dist/components/Stack/IStackProps.d.ts.map +0 -1
- package/dist/components/Stack/Stack.d.ts.map +0 -1
- package/dist/components/Stack/StackItem.d.ts.map +0 -1
- package/dist/components/Stack/index.d.ts.map +0 -1
- package/dist/components/Stack/useStackStyles.d.ts.map +0 -1
- package/dist/components/StackedUsers/IStackedUsersProps.d.ts.map +0 -1
- package/dist/components/StackedUsers/StackedUsers.d.ts.map +0 -1
- package/dist/components/StackedUsers/index.d.ts.map +0 -1
- package/dist/components/StackedUsers/useStackedUsersStyles.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.Exports.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.HostConfig.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.Utilities.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/IAdaptiveCardHostProps.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Actions.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Elements.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIChoiceSetInput.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIDateInput.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUINumberInput.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUITextInput.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUITimeInput.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIToggleInput.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/HostCapability.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/HostConfig.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/IconButton.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Styles.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/index.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/inlineButtonRootStyle.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/internalRender.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/index.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/AdaptiveCardHostThemeType.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/IAadInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostActionResult.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostConfigResult.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostEvaluationContext.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/ICultureInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/ISPListInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/ISPListItemInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/ISPSiteInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/ISPWebInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/IUserInfo.d.ts.map +0 -1
- package/dist/components/adaptiveCardHost/models/index.d.ts.map +0 -1
- package/dist/components/aiAssistant/AIAssistant.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatAction.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatInput.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatInputProps.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensions.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsProps.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsV1.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsV2.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatList.d.ts.map +0 -1
- package/dist/components/aiAssistant/ChatState.d.ts.map +0 -1
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts.map +0 -1
- package/dist/components/aiAssistant/IChatItem.d.ts.map +0 -1
- package/dist/components/aiAssistant/IResponse.d.ts.map +0 -1
- package/dist/components/aiAssistant/LoadingDots.d.ts.map +0 -1
- package/dist/components/aiAssistant/chatReducer.d.ts.map +0 -1
- package/dist/components/aiAssistant/index.d.ts.map +0 -1
- package/dist/components/aiAssistant/useAIAssistantStyles.d.ts.map +0 -1
- package/dist/components/aiAssistant/useChatInputStyles.d.ts.map +0 -1
- package/dist/components/aiAssistant/useChatInputWithMensionsStyles.d.ts.map +0 -1
- package/dist/components/aiAssistant/useLoadingDotsStyles.d.ts.map +0 -1
- package/dist/components/aiAssistant/useStreamRequest.d.ts.map +0 -1
- package/dist/components/aiAssistant/useStyles.d.ts.map +0 -1
- package/dist/components/appDashboard/AppDashboard.d.ts.map +0 -1
- package/dist/components/appDashboard/IAppDashboardProps.d.ts.map +0 -1
- package/dist/components/appDashboard/NoDashboards.d.ts.map +0 -1
- package/dist/components/appDashboard/index.d.ts.map +0 -1
- package/dist/components/appDashboard/selectZoom/SelectZoom.d.ts.map +0 -1
- package/dist/components/appDashboard/useDashboardStyles.d.ts.map +0 -1
- package/dist/components/baseComponentProps/IBaseProps.d.ts.map +0 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
- package/dist/components/breadcrumb/IBreadcrumItem.d.ts.map +0 -1
- package/dist/components/breadcrumb/IBreadcrumProps.d.ts.map +0 -1
- package/dist/components/breadcrumb/OverflowMenu.d.ts.map +0 -1
- package/dist/components/breadcrumb/index.d.ts.map +0 -1
- package/dist/components/breadcrumb/useBreadcrumStyles.d.ts.map +0 -1
- package/dist/components/buttonMenu/ButtonMenu.d.ts.map +0 -1
- package/dist/components/buttonMenu/IButtonMenuOption.d.ts.map +0 -1
- package/dist/components/buttonMenu/index.d.ts.map +0 -1
- package/dist/components/calendarControl/CalendarControl.d.ts.map +0 -1
- package/dist/components/calendarControl/Day.d.ts.map +0 -1
- package/dist/components/calendarControl/DayView.d.ts.map +0 -1
- package/dist/components/calendarControl/EventDetailsPopover.d.ts.map +0 -1
- package/dist/components/calendarControl/EventPopoverCard.d.ts.map +0 -1
- package/dist/components/calendarControl/EventRender.d.ts.map +0 -1
- package/dist/components/calendarControl/RenderEventToDayOfMonth.d.ts.map +0 -1
- package/dist/components/calendarControl/SelectCalendarView.d.ts.map +0 -1
- package/dist/components/calendarControl/Toolbar.d.ts.map +0 -1
- package/dist/components/calendarControl/WeekView.d.ts.map +0 -1
- package/dist/components/calendarControl/hooks/index.d.ts.map +0 -1
- package/dist/components/calendarControl/hooks/useCalendar.d.ts.map +0 -1
- package/dist/components/calendarControl/hooks/useCalendarStyles.d.ts.map +0 -1
- package/dist/components/calendarControl/hooks/useDayViewStyles.d.ts.map +0 -1
- package/dist/components/calendarControl/hooks/useUtils.d.ts.map +0 -1
- package/dist/components/calendarControl/hooks/useWeekViewStyles.d.ts.map +0 -1
- package/dist/components/calendarControl/index.d.ts.map +0 -1
- package/dist/components/calendarControl/models/ECalendarViews.d.ts.map +0 -1
- package/dist/components/calendarControl/models/IAttendee.d.ts.map +0 -1
- package/dist/components/calendarControl/models/ICalendarControlProps.d.ts.map +0 -1
- package/dist/components/calendarControl/models/ICalendarDay.d.ts.map +0 -1
- package/dist/components/calendarControl/models/IEventColors.d.ts.map +0 -1
- package/dist/components/calendarControl/models/IEvents.d.ts.map +0 -1
- package/dist/components/calendarControl/models/IStrings.d.ts.map +0 -1
- package/dist/components/calendarControl/models/index.d.ts.map +0 -1
- package/dist/components/customControlBar/CustomControlBar.d.ts.map +0 -1
- package/dist/components/customControlBar/index.d.ts.map +0 -1
- package/dist/components/dataGrid/DataGrid.d.ts.map +0 -1
- package/dist/components/dataGrid/IColumnConfig.d.ts.map +0 -1
- package/dist/components/dataGrid/IDataGridProps.d.ts.map +0 -1
- package/dist/components/dataGrid/ISortState.d.ts.map +0 -1
- package/dist/components/dataGrid/index.d.ts.map +0 -1
- package/dist/components/dataGrid/stack/IStackProps.d.ts.map +0 -1
- package/dist/components/dataGrid/stack/Stack.d.ts.map +0 -1
- package/dist/components/dataGrid/useDataGridStyles.d.ts.map +0 -1
- package/dist/components/dropDownField/DropDownField.d.ts.map +0 -1
- package/dist/components/dropDownField/IDropDownFieldProps.d.ts.map +0 -1
- package/dist/components/dropDownField/IOption.d.ts.map +0 -1
- package/dist/components/dropDownField/index.d.ts.map +0 -1
- package/dist/components/genericOverFlowMenu/GenericOverFlowMenu.d.ts.map +0 -1
- package/dist/components/genericOverFlowMenu/index.d.ts.map +0 -1
- package/dist/components/genericOverFlowMenu/useOverflowMenuStyles.d.ts.map +0 -1
- package/dist/components/iconButton/IconButton.d.ts.map +0 -1
- package/dist/components/iconButton/IconButtonProps.d.ts.map +0 -1
- package/dist/components/iconButton/index.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/mensions/IMensionsProps.d.ts.map +0 -1
- package/dist/components/mensions/Mensions.d.ts.map +0 -1
- package/dist/components/mensions/MensionsExample.d.ts.map +0 -1
- package/dist/components/mensions/index.d.ts.map +0 -1
- package/dist/components/mensions/useMensionsStyles.d.ts.map +0 -1
- package/dist/components/renderAdaptiveCard/RenderAdaptiveCard.d.ts.map +0 -1
- package/dist/components/renderAdaptiveCard/index.d.ts.map +0 -1
- package/dist/components/renderDialog/RenderDialog.d.ts.map +0 -1
- package/dist/components/renderDialog/index.d.ts.map +0 -1
- package/dist/components/renderDrawer/RenderDrawer.d.ts.map +0 -1
- package/dist/components/renderDrawer/index.d.ts.map +0 -1
- package/dist/components/renderHeader/IRenderHeaderProps.d.ts.map +0 -1
- package/dist/components/renderHeader/RenderHeader.d.ts.map +0 -1
- package/dist/components/renderHeader/index.d.ts.map +0 -1
- package/dist/components/renderHeader/useRenderHeaderStyles.d.ts.map +0 -1
- package/dist/components/selectDay/SelectDay.d.ts.map +0 -1
- package/dist/components/selectDay/index.d.ts.map +0 -1
- package/dist/components/selectMonth/CalendarMonth.d.ts.map +0 -1
- package/dist/components/selectMonth/SelectMonth.d.ts.map +0 -1
- package/dist/components/selectMonth/index.d.ts.map +0 -1
- package/dist/components/selectView/SelectView.d.ts.map +0 -1
- package/dist/components/selectView/index.d.ts.map +0 -1
- package/dist/components/selectWeek/SelectWeek.d.ts.map +0 -1
- package/dist/components/selectWeek/index.d.ts.map +0 -1
- package/dist/components/shareDialog/ShareDialog.d.ts.map +0 -1
- package/dist/components/shareDialog/index.d.ts.map +0 -1
- package/dist/components/showError/IErrorDisplayProps.d.ts.map +0 -1
- package/dist/components/showError/ShowError.d.ts.map +0 -1
- package/dist/components/showError/index.d.ts.map +0 -1
- package/dist/components/showError/useShowErrorStyles.d.ts.map +0 -1
- package/dist/components/showMessage/IShowMessage.d.ts.map +0 -1
- package/dist/components/showMessage/ShowMessage.d.ts.map +0 -1
- package/dist/components/showMessage/index.d.ts.map +0 -1
- package/dist/components/showMessage/useShowMessageStyles.d.ts.map +0 -1
- package/dist/components/stackv2/IStackV2Props.d.ts.map +0 -1
- package/dist/components/stackv2/StackV2.d.ts.map +0 -1
- package/dist/components/stackv2/index.d.ts.map +0 -1
- package/dist/components/svgImages/BusinessReportIcon.d.ts.map +0 -1
- package/dist/components/typographyControl/ITypographyControlProps.d.ts.map +0 -1
- package/dist/components/typographyControl/TypographyControl.d.ts.map +0 -1
- package/dist/components/typographyControl/index.d.ts.map +0 -1
- package/dist/components/userCard/IUserCardProps.d.ts.map +0 -1
- package/dist/components/userCard/IUserInfo.d.ts.map +0 -1
- package/dist/components/userCard/UserCard.d.ts.map +0 -1
- package/dist/components/userCard/constants.d.ts.map +0 -1
- package/dist/components/userCard/index.d.ts.map +0 -1
- package/dist/components/userCard/useUserCardStyles.d.ts.map +0 -1
- package/dist/components/userCard/useUserProfile.d.ts.map +0 -1
- package/dist/components/videoPlayer/VideoPlayer.d.ts.map +0 -1
- package/dist/components/videoPlayer/index.d.ts.map +0 -1
- package/dist/components/videoPlayer/useVideoStyles.d.ts.map +0 -1
- package/dist/components/worldMap/IWorldMapProps.d.ts.map +0 -1
- package/dist/components/worldMap/MapNavigation.d.ts.map +0 -1
- package/dist/components/worldMap/MaplibreWorldMapProps.d.ts.map +0 -1
- package/dist/components/worldMap/TooltipContent.d.ts.map +0 -1
- package/dist/components/worldMap/WorldMap.d.ts.map +0 -1
- package/dist/components/worldMap/WorldMapControl.d.ts.map +0 -1
- package/dist/components/worldMap/data.d.ts.map +0 -1
- package/dist/components/worldMap/index.d.ts.map +0 -1
- package/dist/components/worldMap/marker.d.ts.map +0 -1
- package/dist/components/worldMap/useCleanMapStyle.d.ts.map +0 -1
- package/dist/components/worldMap/useContentToolTipStyles.d.ts.map +0 -1
- package/dist/components/worldMap/useGeocodedCountries.d.ts.map +0 -1
- package/dist/constants/EBreakPoints.d.ts.map +0 -1
- package/dist/constants/EMessageTypes.d.ts.map +0 -1
- package/dist/constants/index.d.ts.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/useAIAssistant.d.ts.map +0 -1
- package/dist/hooks/useAIAssistantParser.d.ts.map +0 -1
- package/dist/hooks/useGraphAPI.d.ts.map +0 -1
- package/dist/hooks/useIndexedDB.d.ts.map +0 -1
- package/dist/hooks/useLogging.d.ts.map +0 -1
- package/dist/hooks/usePolling.d.ts.map +0 -1
- package/dist/hooks/useTimeZone.d.ts.map +0 -1
- package/dist/hooks/useTimeZoneHelper.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -27983
- package/dist/index.mjs.map +0 -1
- package/dist/models/IAppCardContainer.d.ts.map +0 -1
- package/dist/models/index.d.ts.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/providers.mjs +0 -250
- package/dist/providers.mjs.map +0 -1
- package/dist/types/TBaseSpacing.d.ts.map +0 -1
- package/dist/types/THorizontalSpacing.d.ts.map +0 -1
- package/dist/types/THorizontalSpacingBreakPoints.d.ts.map +0 -1
- package/dist/types/TLayoutBreakPoints.d.ts.map +0 -1
- package/dist/types/TPaddingBreakPoints.d.ts.map +0 -1
- package/dist/types/TPading.d.ts.map +0 -1
- package/dist/types/TVerticalSpacing.d.ts.map +0 -1
- package/dist/types/TVerticalSpacingBreakPoints.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/contentDetector.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/lodash.d.ts.map +0 -1
- package/dist/utils/useComponentsUtils.d.ts.map +0 -1
- package/dist/utils/useDateUtils.d.ts.map +0 -1
- package/dist/utils/useImageUtils.d.ts.map +0 -1
|
@@ -0,0 +1,1215 @@
|
|
|
1
|
+
import { p as populateCommonDb } from "./chunk-4BX2VUAB-ghaW5jSQ.js";
|
|
2
|
+
import { I as ImperativeState } from "./chunk-QZHKN3VN-C5x9oEL1.js";
|
|
3
|
+
import { _ as __name, t as getDiagramTitle, q as setDiagramTitle, s as setAccDescription, g as getAccDescription, a as getAccTitle, b as setAccTitle, l as log, c as getConfig2, d as select, u as utils_default, E as setupGraphViewbox2, z as clear, k as common_default, F as cleanAndMerge, G as getConfig, H as defaultConfig_default, I as random } from "./index-CP55uT1-.js";
|
|
4
|
+
import { p as parse } from "./mermaid-parser.core-BbdofhA6.js";
|
|
5
|
+
var commitType = {
|
|
6
|
+
NORMAL: 0,
|
|
7
|
+
REVERSE: 1,
|
|
8
|
+
HIGHLIGHT: 2,
|
|
9
|
+
MERGE: 3,
|
|
10
|
+
CHERRY_PICK: 4
|
|
11
|
+
};
|
|
12
|
+
var DEFAULT_GITGRAPH_CONFIG = defaultConfig_default.gitGraph;
|
|
13
|
+
var getConfig3 = /* @__PURE__ */ __name(() => {
|
|
14
|
+
const config = cleanAndMerge({
|
|
15
|
+
...DEFAULT_GITGRAPH_CONFIG,
|
|
16
|
+
...getConfig().gitGraph
|
|
17
|
+
});
|
|
18
|
+
return config;
|
|
19
|
+
}, "getConfig");
|
|
20
|
+
var state = new ImperativeState(() => {
|
|
21
|
+
const config = getConfig3();
|
|
22
|
+
const mainBranchName = config.mainBranchName;
|
|
23
|
+
const mainBranchOrder = config.mainBranchOrder;
|
|
24
|
+
return {
|
|
25
|
+
mainBranchName,
|
|
26
|
+
commits: /* @__PURE__ */ new Map(),
|
|
27
|
+
head: null,
|
|
28
|
+
branchConfig: /* @__PURE__ */ new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]),
|
|
29
|
+
branches: /* @__PURE__ */ new Map([[mainBranchName, null]]),
|
|
30
|
+
currBranch: mainBranchName,
|
|
31
|
+
direction: "LR",
|
|
32
|
+
seq: 0,
|
|
33
|
+
options: {}
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
function getID() {
|
|
37
|
+
return random({ length: 7 });
|
|
38
|
+
}
|
|
39
|
+
__name(getID, "getID");
|
|
40
|
+
function uniqBy(list, fn) {
|
|
41
|
+
const recordMap = /* @__PURE__ */ Object.create(null);
|
|
42
|
+
return list.reduce((out, item) => {
|
|
43
|
+
const key = fn(item);
|
|
44
|
+
if (!recordMap[key]) {
|
|
45
|
+
recordMap[key] = true;
|
|
46
|
+
out.push(item);
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}, []);
|
|
50
|
+
}
|
|
51
|
+
__name(uniqBy, "uniqBy");
|
|
52
|
+
var setDirection = /* @__PURE__ */ __name(function(dir2) {
|
|
53
|
+
state.records.direction = dir2;
|
|
54
|
+
}, "setDirection");
|
|
55
|
+
var setOptions = /* @__PURE__ */ __name(function(rawOptString) {
|
|
56
|
+
log.debug("options str", rawOptString);
|
|
57
|
+
rawOptString = rawOptString == null ? void 0 : rawOptString.trim();
|
|
58
|
+
rawOptString = rawOptString || "{}";
|
|
59
|
+
try {
|
|
60
|
+
state.records.options = JSON.parse(rawOptString);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
log.error("error while parsing gitGraph options", e.message);
|
|
63
|
+
}
|
|
64
|
+
}, "setOptions");
|
|
65
|
+
var getOptions = /* @__PURE__ */ __name(function() {
|
|
66
|
+
return state.records.options;
|
|
67
|
+
}, "getOptions");
|
|
68
|
+
var commit = /* @__PURE__ */ __name(function(commitDB) {
|
|
69
|
+
let msg = commitDB.msg;
|
|
70
|
+
let id = commitDB.id;
|
|
71
|
+
const type = commitDB.type;
|
|
72
|
+
let tags = commitDB.tags;
|
|
73
|
+
log.info("commit", msg, id, type, tags);
|
|
74
|
+
log.debug("Entering commit:", msg, id, type, tags);
|
|
75
|
+
const config = getConfig3();
|
|
76
|
+
id = common_default.sanitizeText(id, config);
|
|
77
|
+
msg = common_default.sanitizeText(msg, config);
|
|
78
|
+
tags = tags == null ? void 0 : tags.map((tag) => common_default.sanitizeText(tag, config));
|
|
79
|
+
const newCommit = {
|
|
80
|
+
id: id ? id : state.records.seq + "-" + getID(),
|
|
81
|
+
message: msg,
|
|
82
|
+
seq: state.records.seq++,
|
|
83
|
+
type: type ?? commitType.NORMAL,
|
|
84
|
+
tags: tags ?? [],
|
|
85
|
+
parents: state.records.head == null ? [] : [state.records.head.id],
|
|
86
|
+
branch: state.records.currBranch
|
|
87
|
+
};
|
|
88
|
+
state.records.head = newCommit;
|
|
89
|
+
log.info("main branch", config.mainBranchName);
|
|
90
|
+
if (state.records.commits.has(newCommit.id)) {
|
|
91
|
+
log.warn(`Commit ID ${newCommit.id} already exists`);
|
|
92
|
+
}
|
|
93
|
+
state.records.commits.set(newCommit.id, newCommit);
|
|
94
|
+
state.records.branches.set(state.records.currBranch, newCommit.id);
|
|
95
|
+
log.debug("in pushCommit " + newCommit.id);
|
|
96
|
+
}, "commit");
|
|
97
|
+
var branch = /* @__PURE__ */ __name(function(branchDB) {
|
|
98
|
+
let name = branchDB.name;
|
|
99
|
+
const order = branchDB.order;
|
|
100
|
+
name = common_default.sanitizeText(name, getConfig3());
|
|
101
|
+
if (state.records.branches.has(name)) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${name}")`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
state.records.branches.set(name, state.records.head != null ? state.records.head.id : null);
|
|
107
|
+
state.records.branchConfig.set(name, { name, order });
|
|
108
|
+
checkout(name);
|
|
109
|
+
log.debug("in createBranch");
|
|
110
|
+
}, "branch");
|
|
111
|
+
var merge = /* @__PURE__ */ __name((mergeDB) => {
|
|
112
|
+
let otherBranch = mergeDB.branch;
|
|
113
|
+
let customId = mergeDB.id;
|
|
114
|
+
const overrideType = mergeDB.type;
|
|
115
|
+
const customTags = mergeDB.tags;
|
|
116
|
+
const config = getConfig3();
|
|
117
|
+
otherBranch = common_default.sanitizeText(otherBranch, config);
|
|
118
|
+
if (customId) {
|
|
119
|
+
customId = common_default.sanitizeText(customId, config);
|
|
120
|
+
}
|
|
121
|
+
const currentBranchCheck = state.records.branches.get(state.records.currBranch);
|
|
122
|
+
const otherBranchCheck = state.records.branches.get(otherBranch);
|
|
123
|
+
const currentCommit = currentBranchCheck ? state.records.commits.get(currentBranchCheck) : void 0;
|
|
124
|
+
const otherCommit = otherBranchCheck ? state.records.commits.get(otherBranchCheck) : void 0;
|
|
125
|
+
if (currentCommit && otherCommit && currentCommit.branch === otherBranch) {
|
|
126
|
+
throw new Error(`Cannot merge branch '${otherBranch}' into itself.`);
|
|
127
|
+
}
|
|
128
|
+
if (state.records.currBranch === otherBranch) {
|
|
129
|
+
const error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
|
|
130
|
+
error.hash = {
|
|
131
|
+
text: `merge ${otherBranch}`,
|
|
132
|
+
token: `merge ${otherBranch}`,
|
|
133
|
+
expected: ["branch abc"]
|
|
134
|
+
};
|
|
135
|
+
throw error;
|
|
136
|
+
}
|
|
137
|
+
if (currentCommit === void 0 || !currentCommit) {
|
|
138
|
+
const error = new Error(
|
|
139
|
+
`Incorrect usage of "merge". Current branch (${state.records.currBranch})has no commits`
|
|
140
|
+
);
|
|
141
|
+
error.hash = {
|
|
142
|
+
text: `merge ${otherBranch}`,
|
|
143
|
+
token: `merge ${otherBranch}`,
|
|
144
|
+
expected: ["commit"]
|
|
145
|
+
};
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
if (!state.records.branches.has(otherBranch)) {
|
|
149
|
+
const error = new Error(
|
|
150
|
+
'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist"
|
|
151
|
+
);
|
|
152
|
+
error.hash = {
|
|
153
|
+
text: `merge ${otherBranch}`,
|
|
154
|
+
token: `merge ${otherBranch}`,
|
|
155
|
+
expected: [`branch ${otherBranch}`]
|
|
156
|
+
};
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
if (otherCommit === void 0 || !otherCommit) {
|
|
160
|
+
const error = new Error(
|
|
161
|
+
'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits"
|
|
162
|
+
);
|
|
163
|
+
error.hash = {
|
|
164
|
+
text: `merge ${otherBranch}`,
|
|
165
|
+
token: `merge ${otherBranch}`,
|
|
166
|
+
expected: ['"commit"']
|
|
167
|
+
};
|
|
168
|
+
throw error;
|
|
169
|
+
}
|
|
170
|
+
if (currentCommit === otherCommit) {
|
|
171
|
+
const error = new Error('Incorrect usage of "merge". Both branches have same head');
|
|
172
|
+
error.hash = {
|
|
173
|
+
text: `merge ${otherBranch}`,
|
|
174
|
+
token: `merge ${otherBranch}`,
|
|
175
|
+
expected: ["branch abc"]
|
|
176
|
+
};
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
179
|
+
if (customId && state.records.commits.has(customId)) {
|
|
180
|
+
const error = new Error(
|
|
181
|
+
'Incorrect usage of "merge". Commit with id:' + customId + " already exists, use different custom id"
|
|
182
|
+
);
|
|
183
|
+
error.hash = {
|
|
184
|
+
text: `merge ${otherBranch} ${customId} ${overrideType} ${customTags == null ? void 0 : customTags.join(" ")}`,
|
|
185
|
+
token: `merge ${otherBranch} ${customId} ${overrideType} ${customTags == null ? void 0 : customTags.join(" ")}`,
|
|
186
|
+
expected: [
|
|
187
|
+
`merge ${otherBranch} ${customId}_UNIQUE ${overrideType} ${customTags == null ? void 0 : customTags.join(" ")}`
|
|
188
|
+
]
|
|
189
|
+
};
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
const verifiedBranch = otherBranchCheck ? otherBranchCheck : "";
|
|
193
|
+
const commit2 = {
|
|
194
|
+
id: customId || `${state.records.seq}-${getID()}`,
|
|
195
|
+
message: `merged branch ${otherBranch} into ${state.records.currBranch}`,
|
|
196
|
+
seq: state.records.seq++,
|
|
197
|
+
parents: state.records.head == null ? [] : [state.records.head.id, verifiedBranch],
|
|
198
|
+
branch: state.records.currBranch,
|
|
199
|
+
type: commitType.MERGE,
|
|
200
|
+
customType: overrideType,
|
|
201
|
+
customId: customId ? true : false,
|
|
202
|
+
tags: customTags ?? []
|
|
203
|
+
};
|
|
204
|
+
state.records.head = commit2;
|
|
205
|
+
state.records.commits.set(commit2.id, commit2);
|
|
206
|
+
state.records.branches.set(state.records.currBranch, commit2.id);
|
|
207
|
+
log.debug(state.records.branches);
|
|
208
|
+
log.debug("in mergeBranch");
|
|
209
|
+
}, "merge");
|
|
210
|
+
var cherryPick = /* @__PURE__ */ __name(function(cherryPickDB) {
|
|
211
|
+
let sourceId = cherryPickDB.id;
|
|
212
|
+
let targetId = cherryPickDB.targetId;
|
|
213
|
+
let tags = cherryPickDB.tags;
|
|
214
|
+
let parentCommitId = cherryPickDB.parent;
|
|
215
|
+
log.debug("Entering cherryPick:", sourceId, targetId, tags);
|
|
216
|
+
const config = getConfig3();
|
|
217
|
+
sourceId = common_default.sanitizeText(sourceId, config);
|
|
218
|
+
targetId = common_default.sanitizeText(targetId, config);
|
|
219
|
+
tags = tags == null ? void 0 : tags.map((tag) => common_default.sanitizeText(tag, config));
|
|
220
|
+
parentCommitId = common_default.sanitizeText(parentCommitId, config);
|
|
221
|
+
if (!sourceId || !state.records.commits.has(sourceId)) {
|
|
222
|
+
const error = new Error(
|
|
223
|
+
'Incorrect usage of "cherryPick". Source commit id should exist and provided'
|
|
224
|
+
);
|
|
225
|
+
error.hash = {
|
|
226
|
+
text: `cherryPick ${sourceId} ${targetId}`,
|
|
227
|
+
token: `cherryPick ${sourceId} ${targetId}`,
|
|
228
|
+
expected: ["cherry-pick abc"]
|
|
229
|
+
};
|
|
230
|
+
throw error;
|
|
231
|
+
}
|
|
232
|
+
const sourceCommit = state.records.commits.get(sourceId);
|
|
233
|
+
if (sourceCommit === void 0 || !sourceCommit) {
|
|
234
|
+
throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
|
|
235
|
+
}
|
|
236
|
+
if (parentCommitId && !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) {
|
|
237
|
+
const error = new Error(
|
|
238
|
+
"Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
|
|
239
|
+
);
|
|
240
|
+
throw error;
|
|
241
|
+
}
|
|
242
|
+
const sourceCommitBranch = sourceCommit.branch;
|
|
243
|
+
if (sourceCommit.type === commitType.MERGE && !parentCommitId) {
|
|
244
|
+
const error = new Error(
|
|
245
|
+
"Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
|
|
246
|
+
);
|
|
247
|
+
throw error;
|
|
248
|
+
}
|
|
249
|
+
if (!targetId || !state.records.commits.has(targetId)) {
|
|
250
|
+
if (sourceCommitBranch === state.records.currBranch) {
|
|
251
|
+
const error = new Error(
|
|
252
|
+
'Incorrect usage of "cherryPick". Source commit is already on current branch'
|
|
253
|
+
);
|
|
254
|
+
error.hash = {
|
|
255
|
+
text: `cherryPick ${sourceId} ${targetId}`,
|
|
256
|
+
token: `cherryPick ${sourceId} ${targetId}`,
|
|
257
|
+
expected: ["cherry-pick abc"]
|
|
258
|
+
};
|
|
259
|
+
throw error;
|
|
260
|
+
}
|
|
261
|
+
const currentCommitId = state.records.branches.get(state.records.currBranch);
|
|
262
|
+
if (currentCommitId === void 0 || !currentCommitId) {
|
|
263
|
+
const error = new Error(
|
|
264
|
+
`Incorrect usage of "cherry-pick". Current branch (${state.records.currBranch})has no commits`
|
|
265
|
+
);
|
|
266
|
+
error.hash = {
|
|
267
|
+
text: `cherryPick ${sourceId} ${targetId}`,
|
|
268
|
+
token: `cherryPick ${sourceId} ${targetId}`,
|
|
269
|
+
expected: ["cherry-pick abc"]
|
|
270
|
+
};
|
|
271
|
+
throw error;
|
|
272
|
+
}
|
|
273
|
+
const currentCommit = state.records.commits.get(currentCommitId);
|
|
274
|
+
if (currentCommit === void 0 || !currentCommit) {
|
|
275
|
+
const error = new Error(
|
|
276
|
+
`Incorrect usage of "cherry-pick". Current branch (${state.records.currBranch})has no commits`
|
|
277
|
+
);
|
|
278
|
+
error.hash = {
|
|
279
|
+
text: `cherryPick ${sourceId} ${targetId}`,
|
|
280
|
+
token: `cherryPick ${sourceId} ${targetId}`,
|
|
281
|
+
expected: ["cherry-pick abc"]
|
|
282
|
+
};
|
|
283
|
+
throw error;
|
|
284
|
+
}
|
|
285
|
+
const commit2 = {
|
|
286
|
+
id: state.records.seq + "-" + getID(),
|
|
287
|
+
message: `cherry-picked ${sourceCommit == null ? void 0 : sourceCommit.message} into ${state.records.currBranch}`,
|
|
288
|
+
seq: state.records.seq++,
|
|
289
|
+
parents: state.records.head == null ? [] : [state.records.head.id, sourceCommit.id],
|
|
290
|
+
branch: state.records.currBranch,
|
|
291
|
+
type: commitType.CHERRY_PICK,
|
|
292
|
+
tags: tags ? tags.filter(Boolean) : [
|
|
293
|
+
`cherry-pick:${sourceCommit.id}${sourceCommit.type === commitType.MERGE ? `|parent:${parentCommitId}` : ""}`
|
|
294
|
+
]
|
|
295
|
+
};
|
|
296
|
+
state.records.head = commit2;
|
|
297
|
+
state.records.commits.set(commit2.id, commit2);
|
|
298
|
+
state.records.branches.set(state.records.currBranch, commit2.id);
|
|
299
|
+
log.debug(state.records.branches);
|
|
300
|
+
log.debug("in cherryPick");
|
|
301
|
+
}
|
|
302
|
+
}, "cherryPick");
|
|
303
|
+
var checkout = /* @__PURE__ */ __name(function(branch2) {
|
|
304
|
+
branch2 = common_default.sanitizeText(branch2, getConfig3());
|
|
305
|
+
if (!state.records.branches.has(branch2)) {
|
|
306
|
+
const error = new Error(
|
|
307
|
+
`Trying to checkout branch which is not yet created. (Help try using "branch ${branch2}")`
|
|
308
|
+
);
|
|
309
|
+
error.hash = {
|
|
310
|
+
text: `checkout ${branch2}`,
|
|
311
|
+
token: `checkout ${branch2}`,
|
|
312
|
+
expected: [`branch ${branch2}`]
|
|
313
|
+
};
|
|
314
|
+
throw error;
|
|
315
|
+
} else {
|
|
316
|
+
state.records.currBranch = branch2;
|
|
317
|
+
const id = state.records.branches.get(state.records.currBranch);
|
|
318
|
+
if (id === void 0 || !id) {
|
|
319
|
+
state.records.head = null;
|
|
320
|
+
} else {
|
|
321
|
+
state.records.head = state.records.commits.get(id) ?? null;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}, "checkout");
|
|
325
|
+
function upsert(arr, key, newVal) {
|
|
326
|
+
const index = arr.indexOf(key);
|
|
327
|
+
if (index === -1) {
|
|
328
|
+
arr.push(newVal);
|
|
329
|
+
} else {
|
|
330
|
+
arr.splice(index, 1, newVal);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
__name(upsert, "upsert");
|
|
334
|
+
function prettyPrintCommitHistory(commitArr) {
|
|
335
|
+
const commit2 = commitArr.reduce((out, commit3) => {
|
|
336
|
+
if (out.seq > commit3.seq) {
|
|
337
|
+
return out;
|
|
338
|
+
}
|
|
339
|
+
return commit3;
|
|
340
|
+
}, commitArr[0]);
|
|
341
|
+
let line = "";
|
|
342
|
+
commitArr.forEach(function(c) {
|
|
343
|
+
if (c === commit2) {
|
|
344
|
+
line += " *";
|
|
345
|
+
} else {
|
|
346
|
+
line += " |";
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
const label = [line, commit2.id, commit2.seq];
|
|
350
|
+
for (const branch2 in state.records.branches) {
|
|
351
|
+
if (state.records.branches.get(branch2) === commit2.id) {
|
|
352
|
+
label.push(branch2);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
log.debug(label.join(" "));
|
|
356
|
+
if (commit2.parents && commit2.parents.length == 2 && commit2.parents[0] && commit2.parents[1]) {
|
|
357
|
+
const newCommit = state.records.commits.get(commit2.parents[0]);
|
|
358
|
+
upsert(commitArr, commit2, newCommit);
|
|
359
|
+
if (commit2.parents[1]) {
|
|
360
|
+
commitArr.push(state.records.commits.get(commit2.parents[1]));
|
|
361
|
+
}
|
|
362
|
+
} else if (commit2.parents.length == 0) {
|
|
363
|
+
return;
|
|
364
|
+
} else {
|
|
365
|
+
if (commit2.parents[0]) {
|
|
366
|
+
const newCommit = state.records.commits.get(commit2.parents[0]);
|
|
367
|
+
upsert(commitArr, commit2, newCommit);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
commitArr = uniqBy(commitArr, (c) => c.id);
|
|
371
|
+
prettyPrintCommitHistory(commitArr);
|
|
372
|
+
}
|
|
373
|
+
__name(prettyPrintCommitHistory, "prettyPrintCommitHistory");
|
|
374
|
+
var prettyPrint = /* @__PURE__ */ __name(function() {
|
|
375
|
+
log.debug(state.records.commits);
|
|
376
|
+
const node = getCommitsArray()[0];
|
|
377
|
+
prettyPrintCommitHistory([node]);
|
|
378
|
+
}, "prettyPrint");
|
|
379
|
+
var clear2 = /* @__PURE__ */ __name(function() {
|
|
380
|
+
state.reset();
|
|
381
|
+
clear();
|
|
382
|
+
}, "clear");
|
|
383
|
+
var getBranchesAsObjArray = /* @__PURE__ */ __name(function() {
|
|
384
|
+
const branchesArray = [...state.records.branchConfig.values()].map((branchConfig, i) => {
|
|
385
|
+
if (branchConfig.order !== null && branchConfig.order !== void 0) {
|
|
386
|
+
return branchConfig;
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
...branchConfig,
|
|
390
|
+
order: parseFloat(`0.${i}`)
|
|
391
|
+
};
|
|
392
|
+
}).sort((a, b) => (a.order ?? 0) - (b.order ?? 0)).map(({ name }) => ({ name }));
|
|
393
|
+
return branchesArray;
|
|
394
|
+
}, "getBranchesAsObjArray");
|
|
395
|
+
var getBranches = /* @__PURE__ */ __name(function() {
|
|
396
|
+
return state.records.branches;
|
|
397
|
+
}, "getBranches");
|
|
398
|
+
var getCommits = /* @__PURE__ */ __name(function() {
|
|
399
|
+
return state.records.commits;
|
|
400
|
+
}, "getCommits");
|
|
401
|
+
var getCommitsArray = /* @__PURE__ */ __name(function() {
|
|
402
|
+
const commitArr = [...state.records.commits.values()];
|
|
403
|
+
commitArr.forEach(function(o) {
|
|
404
|
+
log.debug(o.id);
|
|
405
|
+
});
|
|
406
|
+
commitArr.sort((a, b) => a.seq - b.seq);
|
|
407
|
+
return commitArr;
|
|
408
|
+
}, "getCommitsArray");
|
|
409
|
+
var getCurrentBranch = /* @__PURE__ */ __name(function() {
|
|
410
|
+
return state.records.currBranch;
|
|
411
|
+
}, "getCurrentBranch");
|
|
412
|
+
var getDirection = /* @__PURE__ */ __name(function() {
|
|
413
|
+
return state.records.direction;
|
|
414
|
+
}, "getDirection");
|
|
415
|
+
var getHead = /* @__PURE__ */ __name(function() {
|
|
416
|
+
return state.records.head;
|
|
417
|
+
}, "getHead");
|
|
418
|
+
var db = {
|
|
419
|
+
commitType,
|
|
420
|
+
getConfig: getConfig3,
|
|
421
|
+
setDirection,
|
|
422
|
+
setOptions,
|
|
423
|
+
getOptions,
|
|
424
|
+
commit,
|
|
425
|
+
branch,
|
|
426
|
+
merge,
|
|
427
|
+
cherryPick,
|
|
428
|
+
checkout,
|
|
429
|
+
//reset,
|
|
430
|
+
prettyPrint,
|
|
431
|
+
clear: clear2,
|
|
432
|
+
getBranchesAsObjArray,
|
|
433
|
+
getBranches,
|
|
434
|
+
getCommits,
|
|
435
|
+
getCommitsArray,
|
|
436
|
+
getCurrentBranch,
|
|
437
|
+
getDirection,
|
|
438
|
+
getHead,
|
|
439
|
+
setAccTitle,
|
|
440
|
+
getAccTitle,
|
|
441
|
+
getAccDescription,
|
|
442
|
+
setAccDescription,
|
|
443
|
+
setDiagramTitle,
|
|
444
|
+
getDiagramTitle
|
|
445
|
+
};
|
|
446
|
+
var populate = /* @__PURE__ */ __name((ast, db2) => {
|
|
447
|
+
populateCommonDb(ast, db2);
|
|
448
|
+
if (ast.dir) {
|
|
449
|
+
db2.setDirection(ast.dir);
|
|
450
|
+
}
|
|
451
|
+
for (const statement of ast.statements) {
|
|
452
|
+
parseStatement(statement, db2);
|
|
453
|
+
}
|
|
454
|
+
}, "populate");
|
|
455
|
+
var parseStatement = /* @__PURE__ */ __name((statement, db2) => {
|
|
456
|
+
const parsers = {
|
|
457
|
+
Commit: /* @__PURE__ */ __name((stmt) => db2.commit(parseCommit(stmt)), "Commit"),
|
|
458
|
+
Branch: /* @__PURE__ */ __name((stmt) => db2.branch(parseBranch(stmt)), "Branch"),
|
|
459
|
+
Merge: /* @__PURE__ */ __name((stmt) => db2.merge(parseMerge(stmt)), "Merge"),
|
|
460
|
+
Checkout: /* @__PURE__ */ __name((stmt) => db2.checkout(parseCheckout(stmt)), "Checkout"),
|
|
461
|
+
CherryPicking: /* @__PURE__ */ __name((stmt) => db2.cherryPick(parseCherryPicking(stmt)), "CherryPicking")
|
|
462
|
+
};
|
|
463
|
+
const parser2 = parsers[statement.$type];
|
|
464
|
+
if (parser2) {
|
|
465
|
+
parser2(statement);
|
|
466
|
+
} else {
|
|
467
|
+
log.error(`Unknown statement type: ${statement.$type}`);
|
|
468
|
+
}
|
|
469
|
+
}, "parseStatement");
|
|
470
|
+
var parseCommit = /* @__PURE__ */ __name((commit2) => {
|
|
471
|
+
const commitDB = {
|
|
472
|
+
id: commit2.id,
|
|
473
|
+
msg: commit2.message ?? "",
|
|
474
|
+
type: commit2.type !== void 0 ? commitType[commit2.type] : commitType.NORMAL,
|
|
475
|
+
tags: commit2.tags ?? void 0
|
|
476
|
+
};
|
|
477
|
+
return commitDB;
|
|
478
|
+
}, "parseCommit");
|
|
479
|
+
var parseBranch = /* @__PURE__ */ __name((branch2) => {
|
|
480
|
+
const branchDB = {
|
|
481
|
+
name: branch2.name,
|
|
482
|
+
order: branch2.order ?? 0
|
|
483
|
+
};
|
|
484
|
+
return branchDB;
|
|
485
|
+
}, "parseBranch");
|
|
486
|
+
var parseMerge = /* @__PURE__ */ __name((merge2) => {
|
|
487
|
+
const mergeDB = {
|
|
488
|
+
branch: merge2.branch,
|
|
489
|
+
id: merge2.id ?? "",
|
|
490
|
+
type: merge2.type !== void 0 ? commitType[merge2.type] : void 0,
|
|
491
|
+
tags: merge2.tags ?? void 0
|
|
492
|
+
};
|
|
493
|
+
return mergeDB;
|
|
494
|
+
}, "parseMerge");
|
|
495
|
+
var parseCheckout = /* @__PURE__ */ __name((checkout2) => {
|
|
496
|
+
const branch2 = checkout2.branch;
|
|
497
|
+
return branch2;
|
|
498
|
+
}, "parseCheckout");
|
|
499
|
+
var parseCherryPicking = /* @__PURE__ */ __name((cherryPicking) => {
|
|
500
|
+
var _a;
|
|
501
|
+
const cherryPickDB = {
|
|
502
|
+
id: cherryPicking.id,
|
|
503
|
+
targetId: "",
|
|
504
|
+
tags: ((_a = cherryPicking.tags) == null ? void 0 : _a.length) === 0 ? void 0 : cherryPicking.tags,
|
|
505
|
+
parent: cherryPicking.parent
|
|
506
|
+
};
|
|
507
|
+
return cherryPickDB;
|
|
508
|
+
}, "parseCherryPicking");
|
|
509
|
+
var parser = {
|
|
510
|
+
parse: /* @__PURE__ */ __name(async (input) => {
|
|
511
|
+
const ast = await parse("gitGraph", input);
|
|
512
|
+
log.debug(ast);
|
|
513
|
+
populate(ast, db);
|
|
514
|
+
}, "parse")
|
|
515
|
+
};
|
|
516
|
+
var DEFAULT_CONFIG = getConfig2();
|
|
517
|
+
var DEFAULT_GITGRAPH_CONFIG2 = DEFAULT_CONFIG == null ? void 0 : DEFAULT_CONFIG.gitGraph;
|
|
518
|
+
var LAYOUT_OFFSET = 10;
|
|
519
|
+
var COMMIT_STEP = 40;
|
|
520
|
+
var PX = 4;
|
|
521
|
+
var PY = 2;
|
|
522
|
+
var THEME_COLOR_LIMIT = 8;
|
|
523
|
+
var branchPos = /* @__PURE__ */ new Map();
|
|
524
|
+
var commitPos = /* @__PURE__ */ new Map();
|
|
525
|
+
var defaultPos = 30;
|
|
526
|
+
var allCommitsDict = /* @__PURE__ */ new Map();
|
|
527
|
+
var lanes = [];
|
|
528
|
+
var maxPos = 0;
|
|
529
|
+
var dir = "LR";
|
|
530
|
+
var clear3 = /* @__PURE__ */ __name(() => {
|
|
531
|
+
branchPos.clear();
|
|
532
|
+
commitPos.clear();
|
|
533
|
+
allCommitsDict.clear();
|
|
534
|
+
maxPos = 0;
|
|
535
|
+
lanes = [];
|
|
536
|
+
dir = "LR";
|
|
537
|
+
}, "clear");
|
|
538
|
+
var drawText = /* @__PURE__ */ __name((txt) => {
|
|
539
|
+
const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
540
|
+
const rows = typeof txt === "string" ? txt.split(/\\n|\n|<br\s*\/?>/gi) : txt;
|
|
541
|
+
rows.forEach((row) => {
|
|
542
|
+
const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
543
|
+
tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
|
|
544
|
+
tspan.setAttribute("dy", "1em");
|
|
545
|
+
tspan.setAttribute("x", "0");
|
|
546
|
+
tspan.setAttribute("class", "row");
|
|
547
|
+
tspan.textContent = row.trim();
|
|
548
|
+
svgLabel.appendChild(tspan);
|
|
549
|
+
});
|
|
550
|
+
return svgLabel;
|
|
551
|
+
}, "drawText");
|
|
552
|
+
var findClosestParent = /* @__PURE__ */ __name((parents) => {
|
|
553
|
+
let closestParent;
|
|
554
|
+
let comparisonFunc;
|
|
555
|
+
let targetPosition;
|
|
556
|
+
if (dir === "BT") {
|
|
557
|
+
comparisonFunc = /* @__PURE__ */ __name((a, b) => a <= b, "comparisonFunc");
|
|
558
|
+
targetPosition = Infinity;
|
|
559
|
+
} else {
|
|
560
|
+
comparisonFunc = /* @__PURE__ */ __name((a, b) => a >= b, "comparisonFunc");
|
|
561
|
+
targetPosition = 0;
|
|
562
|
+
}
|
|
563
|
+
parents.forEach((parent) => {
|
|
564
|
+
var _a, _b;
|
|
565
|
+
const parentPosition = dir === "TB" || dir == "BT" ? (_a = commitPos.get(parent)) == null ? void 0 : _a.y : (_b = commitPos.get(parent)) == null ? void 0 : _b.x;
|
|
566
|
+
if (parentPosition !== void 0 && comparisonFunc(parentPosition, targetPosition)) {
|
|
567
|
+
closestParent = parent;
|
|
568
|
+
targetPosition = parentPosition;
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
return closestParent;
|
|
572
|
+
}, "findClosestParent");
|
|
573
|
+
var findClosestParentBT = /* @__PURE__ */ __name((parents) => {
|
|
574
|
+
let closestParent = "";
|
|
575
|
+
let maxPosition = Infinity;
|
|
576
|
+
parents.forEach((parent) => {
|
|
577
|
+
const parentPosition = commitPos.get(parent).y;
|
|
578
|
+
if (parentPosition <= maxPosition) {
|
|
579
|
+
closestParent = parent;
|
|
580
|
+
maxPosition = parentPosition;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
return closestParent || void 0;
|
|
584
|
+
}, "findClosestParentBT");
|
|
585
|
+
var setParallelBTPos = /* @__PURE__ */ __name((sortedKeys, commits, defaultPos2) => {
|
|
586
|
+
let curPos = defaultPos2;
|
|
587
|
+
let maxPosition = defaultPos2;
|
|
588
|
+
const roots = [];
|
|
589
|
+
sortedKeys.forEach((key) => {
|
|
590
|
+
const commit2 = commits.get(key);
|
|
591
|
+
if (!commit2) {
|
|
592
|
+
throw new Error(`Commit not found for key ${key}`);
|
|
593
|
+
}
|
|
594
|
+
if (commit2.parents.length) {
|
|
595
|
+
curPos = calculateCommitPosition(commit2);
|
|
596
|
+
maxPosition = Math.max(curPos, maxPosition);
|
|
597
|
+
} else {
|
|
598
|
+
roots.push(commit2);
|
|
599
|
+
}
|
|
600
|
+
setCommitPosition(commit2, curPos);
|
|
601
|
+
});
|
|
602
|
+
curPos = maxPosition;
|
|
603
|
+
roots.forEach((commit2) => {
|
|
604
|
+
setRootPosition(commit2, curPos, defaultPos2);
|
|
605
|
+
});
|
|
606
|
+
sortedKeys.forEach((key) => {
|
|
607
|
+
const commit2 = commits.get(key);
|
|
608
|
+
if (commit2 == null ? void 0 : commit2.parents.length) {
|
|
609
|
+
const closestParent = findClosestParentBT(commit2.parents);
|
|
610
|
+
curPos = commitPos.get(closestParent).y - COMMIT_STEP;
|
|
611
|
+
if (curPos <= maxPosition) {
|
|
612
|
+
maxPosition = curPos;
|
|
613
|
+
}
|
|
614
|
+
const x = branchPos.get(commit2.branch).pos;
|
|
615
|
+
const y = curPos - LAYOUT_OFFSET;
|
|
616
|
+
commitPos.set(commit2.id, { x, y });
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
}, "setParallelBTPos");
|
|
620
|
+
var findClosestParentPos = /* @__PURE__ */ __name((commit2) => {
|
|
621
|
+
var _a;
|
|
622
|
+
const closestParent = findClosestParent(commit2.parents.filter((p) => p !== null));
|
|
623
|
+
if (!closestParent) {
|
|
624
|
+
throw new Error(`Closest parent not found for commit ${commit2.id}`);
|
|
625
|
+
}
|
|
626
|
+
const closestParentPos = (_a = commitPos.get(closestParent)) == null ? void 0 : _a.y;
|
|
627
|
+
if (closestParentPos === void 0) {
|
|
628
|
+
throw new Error(`Closest parent position not found for commit ${commit2.id}`);
|
|
629
|
+
}
|
|
630
|
+
return closestParentPos;
|
|
631
|
+
}, "findClosestParentPos");
|
|
632
|
+
var calculateCommitPosition = /* @__PURE__ */ __name((commit2) => {
|
|
633
|
+
const closestParentPos = findClosestParentPos(commit2);
|
|
634
|
+
return closestParentPos + COMMIT_STEP;
|
|
635
|
+
}, "calculateCommitPosition");
|
|
636
|
+
var setCommitPosition = /* @__PURE__ */ __name((commit2, curPos) => {
|
|
637
|
+
const branch2 = branchPos.get(commit2.branch);
|
|
638
|
+
if (!branch2) {
|
|
639
|
+
throw new Error(`Branch not found for commit ${commit2.id}`);
|
|
640
|
+
}
|
|
641
|
+
const x = branch2.pos;
|
|
642
|
+
const y = curPos + LAYOUT_OFFSET;
|
|
643
|
+
commitPos.set(commit2.id, { x, y });
|
|
644
|
+
return { x, y };
|
|
645
|
+
}, "setCommitPosition");
|
|
646
|
+
var setRootPosition = /* @__PURE__ */ __name((commit2, curPos, defaultPos2) => {
|
|
647
|
+
const branch2 = branchPos.get(commit2.branch);
|
|
648
|
+
if (!branch2) {
|
|
649
|
+
throw new Error(`Branch not found for commit ${commit2.id}`);
|
|
650
|
+
}
|
|
651
|
+
const y = curPos + defaultPos2;
|
|
652
|
+
const x = branch2.pos;
|
|
653
|
+
commitPos.set(commit2.id, { x, y });
|
|
654
|
+
}, "setRootPosition");
|
|
655
|
+
var drawCommitBullet = /* @__PURE__ */ __name((gBullets, commit2, commitPosition, typeClass, branchIndex, commitSymbolType) => {
|
|
656
|
+
if (commitSymbolType === commitType.HIGHLIGHT) {
|
|
657
|
+
gBullets.append("rect").attr("x", commitPosition.x - 10).attr("y", commitPosition.y - 10).attr("width", 20).attr("height", 20).attr(
|
|
658
|
+
"class",
|
|
659
|
+
`commit ${commit2.id} commit-highlight${branchIndex % THEME_COLOR_LIMIT} ${typeClass}-outer`
|
|
660
|
+
);
|
|
661
|
+
gBullets.append("rect").attr("x", commitPosition.x - 6).attr("y", commitPosition.y - 6).attr("width", 12).attr("height", 12).attr(
|
|
662
|
+
"class",
|
|
663
|
+
`commit ${commit2.id} commit${branchIndex % THEME_COLOR_LIMIT} ${typeClass}-inner`
|
|
664
|
+
);
|
|
665
|
+
} else if (commitSymbolType === commitType.CHERRY_PICK) {
|
|
666
|
+
gBullets.append("circle").attr("cx", commitPosition.x).attr("cy", commitPosition.y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`);
|
|
667
|
+
gBullets.append("circle").attr("cx", commitPosition.x - 3).attr("cy", commitPosition.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
|
|
668
|
+
gBullets.append("circle").attr("cx", commitPosition.x + 3).attr("cy", commitPosition.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
|
|
669
|
+
gBullets.append("line").attr("x1", commitPosition.x + 3).attr("y1", commitPosition.y + 1).attr("x2", commitPosition.x).attr("y2", commitPosition.y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
|
|
670
|
+
gBullets.append("line").attr("x1", commitPosition.x - 3).attr("y1", commitPosition.y + 1).attr("x2", commitPosition.x).attr("y2", commitPosition.y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`);
|
|
671
|
+
} else {
|
|
672
|
+
const circle = gBullets.append("circle");
|
|
673
|
+
circle.attr("cx", commitPosition.x);
|
|
674
|
+
circle.attr("cy", commitPosition.y);
|
|
675
|
+
circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10);
|
|
676
|
+
circle.attr("class", `commit ${commit2.id} commit${branchIndex % THEME_COLOR_LIMIT}`);
|
|
677
|
+
if (commitSymbolType === commitType.MERGE) {
|
|
678
|
+
const circle2 = gBullets.append("circle");
|
|
679
|
+
circle2.attr("cx", commitPosition.x);
|
|
680
|
+
circle2.attr("cy", commitPosition.y);
|
|
681
|
+
circle2.attr("r", 6);
|
|
682
|
+
circle2.attr(
|
|
683
|
+
"class",
|
|
684
|
+
`commit ${typeClass} ${commit2.id} commit${branchIndex % THEME_COLOR_LIMIT}`
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
if (commitSymbolType === commitType.REVERSE) {
|
|
688
|
+
const cross = gBullets.append("path");
|
|
689
|
+
cross.attr(
|
|
690
|
+
"d",
|
|
691
|
+
`M ${commitPosition.x - 5},${commitPosition.y - 5}L${commitPosition.x + 5},${commitPosition.y + 5}M${commitPosition.x - 5},${commitPosition.y + 5}L${commitPosition.x + 5},${commitPosition.y - 5}`
|
|
692
|
+
).attr("class", `commit ${typeClass} ${commit2.id} commit${branchIndex % THEME_COLOR_LIMIT}`);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}, "drawCommitBullet");
|
|
696
|
+
var drawCommitLabel = /* @__PURE__ */ __name((gLabels, commit2, commitPosition, pos) => {
|
|
697
|
+
var _a;
|
|
698
|
+
if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && (DEFAULT_GITGRAPH_CONFIG2 == null ? void 0 : DEFAULT_GITGRAPH_CONFIG2.showCommitLabel)) {
|
|
699
|
+
const wrapper = gLabels.append("g");
|
|
700
|
+
const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg");
|
|
701
|
+
const text = wrapper.append("text").attr("x", pos).attr("y", commitPosition.y + 25).attr("class", "commit-label").text(commit2.id);
|
|
702
|
+
const bbox = (_a = text.node()) == null ? void 0 : _a.getBBox();
|
|
703
|
+
if (bbox) {
|
|
704
|
+
labelBkg.attr("x", commitPosition.posWithOffset - bbox.width / 2 - PY).attr("y", commitPosition.y + 13.5).attr("width", bbox.width + 2 * PY).attr("height", bbox.height + 2 * PY);
|
|
705
|
+
if (dir === "TB" || dir === "BT") {
|
|
706
|
+
labelBkg.attr("x", commitPosition.x - (bbox.width + 4 * PX + 5)).attr("y", commitPosition.y - 12);
|
|
707
|
+
text.attr("x", commitPosition.x - (bbox.width + 4 * PX)).attr("y", commitPosition.y + bbox.height - 12);
|
|
708
|
+
} else {
|
|
709
|
+
text.attr("x", commitPosition.posWithOffset - bbox.width / 2);
|
|
710
|
+
}
|
|
711
|
+
if (DEFAULT_GITGRAPH_CONFIG2.rotateCommitLabel) {
|
|
712
|
+
if (dir === "TB" || dir === "BT") {
|
|
713
|
+
text.attr(
|
|
714
|
+
"transform",
|
|
715
|
+
"rotate(-45, " + commitPosition.x + ", " + commitPosition.y + ")"
|
|
716
|
+
);
|
|
717
|
+
labelBkg.attr(
|
|
718
|
+
"transform",
|
|
719
|
+
"rotate(-45, " + commitPosition.x + ", " + commitPosition.y + ")"
|
|
720
|
+
);
|
|
721
|
+
} else {
|
|
722
|
+
const r_x = -7.5 - (bbox.width + 10) / 25 * 9.5;
|
|
723
|
+
const r_y = 10 + bbox.width / 25 * 8.5;
|
|
724
|
+
wrapper.attr(
|
|
725
|
+
"transform",
|
|
726
|
+
"translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + commitPosition.y + ")"
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}, "drawCommitLabel");
|
|
733
|
+
var drawCommitTags = /* @__PURE__ */ __name((gLabels, commit2, commitPosition, pos) => {
|
|
734
|
+
var _a;
|
|
735
|
+
if (commit2.tags.length > 0) {
|
|
736
|
+
let yOffset = 0;
|
|
737
|
+
let maxTagBboxWidth = 0;
|
|
738
|
+
let maxTagBboxHeight = 0;
|
|
739
|
+
const tagElements = [];
|
|
740
|
+
for (const tagValue of commit2.tags.reverse()) {
|
|
741
|
+
const rect = gLabels.insert("polygon");
|
|
742
|
+
const hole = gLabels.append("circle");
|
|
743
|
+
const tag = gLabels.append("text").attr("y", commitPosition.y - 16 - yOffset).attr("class", "tag-label").text(tagValue);
|
|
744
|
+
const tagBbox = (_a = tag.node()) == null ? void 0 : _a.getBBox();
|
|
745
|
+
if (!tagBbox) {
|
|
746
|
+
throw new Error("Tag bbox not found");
|
|
747
|
+
}
|
|
748
|
+
maxTagBboxWidth = Math.max(maxTagBboxWidth, tagBbox.width);
|
|
749
|
+
maxTagBboxHeight = Math.max(maxTagBboxHeight, tagBbox.height);
|
|
750
|
+
tag.attr("x", commitPosition.posWithOffset - tagBbox.width / 2);
|
|
751
|
+
tagElements.push({
|
|
752
|
+
tag,
|
|
753
|
+
hole,
|
|
754
|
+
rect,
|
|
755
|
+
yOffset
|
|
756
|
+
});
|
|
757
|
+
yOffset += 20;
|
|
758
|
+
}
|
|
759
|
+
for (const { tag, hole, rect, yOffset: yOffset2 } of tagElements) {
|
|
760
|
+
const h2 = maxTagBboxHeight / 2;
|
|
761
|
+
const ly = commitPosition.y - 19.2 - yOffset2;
|
|
762
|
+
rect.attr("class", "tag-label-bkg").attr(
|
|
763
|
+
"points",
|
|
764
|
+
`
|
|
765
|
+
${pos - maxTagBboxWidth / 2 - PX / 2},${ly + PY}
|
|
766
|
+
${pos - maxTagBboxWidth / 2 - PX / 2},${ly - PY}
|
|
767
|
+
${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly - h2 - PY}
|
|
768
|
+
${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly - h2 - PY}
|
|
769
|
+
${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly + h2 + PY}
|
|
770
|
+
${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly + h2 + PY}`
|
|
771
|
+
);
|
|
772
|
+
hole.attr("cy", ly).attr("cx", pos - maxTagBboxWidth / 2 + PX / 2).attr("r", 1.5).attr("class", "tag-hole");
|
|
773
|
+
if (dir === "TB" || dir === "BT") {
|
|
774
|
+
const yOrigin = pos + yOffset2;
|
|
775
|
+
rect.attr("class", "tag-label-bkg").attr(
|
|
776
|
+
"points",
|
|
777
|
+
`
|
|
778
|
+
${commitPosition.x},${yOrigin + 2}
|
|
779
|
+
${commitPosition.x},${yOrigin - 2}
|
|
780
|
+
${commitPosition.x + LAYOUT_OFFSET},${yOrigin - h2 - 2}
|
|
781
|
+
${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin - h2 - 2}
|
|
782
|
+
${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin + h2 + 2}
|
|
783
|
+
${commitPosition.x + LAYOUT_OFFSET},${yOrigin + h2 + 2}`
|
|
784
|
+
).attr("transform", "translate(12,12) rotate(45, " + commitPosition.x + "," + pos + ")");
|
|
785
|
+
hole.attr("cx", commitPosition.x + PX / 2).attr("cy", yOrigin).attr("transform", "translate(12,12) rotate(45, " + commitPosition.x + "," + pos + ")");
|
|
786
|
+
tag.attr("x", commitPosition.x + 5).attr("y", yOrigin + 3).attr("transform", "translate(14,14) rotate(45, " + commitPosition.x + "," + pos + ")");
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}, "drawCommitTags");
|
|
791
|
+
var getCommitClassType = /* @__PURE__ */ __name((commit2) => {
|
|
792
|
+
const commitSymbolType = commit2.customType ?? commit2.type;
|
|
793
|
+
switch (commitSymbolType) {
|
|
794
|
+
case commitType.NORMAL:
|
|
795
|
+
return "commit-normal";
|
|
796
|
+
case commitType.REVERSE:
|
|
797
|
+
return "commit-reverse";
|
|
798
|
+
case commitType.HIGHLIGHT:
|
|
799
|
+
return "commit-highlight";
|
|
800
|
+
case commitType.MERGE:
|
|
801
|
+
return "commit-merge";
|
|
802
|
+
case commitType.CHERRY_PICK:
|
|
803
|
+
return "commit-cherry-pick";
|
|
804
|
+
default:
|
|
805
|
+
return "commit-normal";
|
|
806
|
+
}
|
|
807
|
+
}, "getCommitClassType");
|
|
808
|
+
var calculatePosition = /* @__PURE__ */ __name((commit2, dir2, pos, commitPos2) => {
|
|
809
|
+
const defaultCommitPosition = { x: 0, y: 0 };
|
|
810
|
+
if (commit2.parents.length > 0) {
|
|
811
|
+
const closestParent = findClosestParent(commit2.parents);
|
|
812
|
+
if (closestParent) {
|
|
813
|
+
const parentPosition = commitPos2.get(closestParent) ?? defaultCommitPosition;
|
|
814
|
+
if (dir2 === "TB") {
|
|
815
|
+
return parentPosition.y + COMMIT_STEP;
|
|
816
|
+
} else if (dir2 === "BT") {
|
|
817
|
+
const currentPosition = commitPos2.get(commit2.id) ?? defaultCommitPosition;
|
|
818
|
+
return currentPosition.y - COMMIT_STEP;
|
|
819
|
+
} else {
|
|
820
|
+
return parentPosition.x + COMMIT_STEP;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
} else {
|
|
824
|
+
if (dir2 === "TB") {
|
|
825
|
+
return defaultPos;
|
|
826
|
+
} else if (dir2 === "BT") {
|
|
827
|
+
const currentPosition = commitPos2.get(commit2.id) ?? defaultCommitPosition;
|
|
828
|
+
return currentPosition.y - COMMIT_STEP;
|
|
829
|
+
} else {
|
|
830
|
+
return 0;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return 0;
|
|
834
|
+
}, "calculatePosition");
|
|
835
|
+
var getCommitPosition = /* @__PURE__ */ __name((commit2, pos, isParallelCommits) => {
|
|
836
|
+
var _a, _b;
|
|
837
|
+
const posWithOffset = dir === "BT" && isParallelCommits ? pos : pos + LAYOUT_OFFSET;
|
|
838
|
+
const y = dir === "TB" || dir === "BT" ? posWithOffset : (_a = branchPos.get(commit2.branch)) == null ? void 0 : _a.pos;
|
|
839
|
+
const x = dir === "TB" || dir === "BT" ? (_b = branchPos.get(commit2.branch)) == null ? void 0 : _b.pos : posWithOffset;
|
|
840
|
+
if (x === void 0 || y === void 0) {
|
|
841
|
+
throw new Error(`Position were undefined for commit ${commit2.id}`);
|
|
842
|
+
}
|
|
843
|
+
return { x, y, posWithOffset };
|
|
844
|
+
}, "getCommitPosition");
|
|
845
|
+
var drawCommits = /* @__PURE__ */ __name((svg, commits, modifyGraph) => {
|
|
846
|
+
if (!DEFAULT_GITGRAPH_CONFIG2) {
|
|
847
|
+
throw new Error("GitGraph config not found");
|
|
848
|
+
}
|
|
849
|
+
const gBullets = svg.append("g").attr("class", "commit-bullets");
|
|
850
|
+
const gLabels = svg.append("g").attr("class", "commit-labels");
|
|
851
|
+
let pos = dir === "TB" || dir === "BT" ? defaultPos : 0;
|
|
852
|
+
const keys = [...commits.keys()];
|
|
853
|
+
const isParallelCommits = (DEFAULT_GITGRAPH_CONFIG2 == null ? void 0 : DEFAULT_GITGRAPH_CONFIG2.parallelCommits) ?? false;
|
|
854
|
+
const sortKeys = /* @__PURE__ */ __name((a, b) => {
|
|
855
|
+
var _a, _b;
|
|
856
|
+
const seqA = (_a = commits.get(a)) == null ? void 0 : _a.seq;
|
|
857
|
+
const seqB = (_b = commits.get(b)) == null ? void 0 : _b.seq;
|
|
858
|
+
return seqA !== void 0 && seqB !== void 0 ? seqA - seqB : 0;
|
|
859
|
+
}, "sortKeys");
|
|
860
|
+
let sortedKeys = keys.sort(sortKeys);
|
|
861
|
+
if (dir === "BT") {
|
|
862
|
+
if (isParallelCommits) {
|
|
863
|
+
setParallelBTPos(sortedKeys, commits, pos);
|
|
864
|
+
}
|
|
865
|
+
sortedKeys = sortedKeys.reverse();
|
|
866
|
+
}
|
|
867
|
+
sortedKeys.forEach((key) => {
|
|
868
|
+
var _a;
|
|
869
|
+
const commit2 = commits.get(key);
|
|
870
|
+
if (!commit2) {
|
|
871
|
+
throw new Error(`Commit not found for key ${key}`);
|
|
872
|
+
}
|
|
873
|
+
if (isParallelCommits) {
|
|
874
|
+
pos = calculatePosition(commit2, dir, pos, commitPos);
|
|
875
|
+
}
|
|
876
|
+
const commitPosition = getCommitPosition(commit2, pos, isParallelCommits);
|
|
877
|
+
if (modifyGraph) {
|
|
878
|
+
const typeClass = getCommitClassType(commit2);
|
|
879
|
+
const commitSymbolType = commit2.customType ?? commit2.type;
|
|
880
|
+
const branchIndex = ((_a = branchPos.get(commit2.branch)) == null ? void 0 : _a.index) ?? 0;
|
|
881
|
+
drawCommitBullet(gBullets, commit2, commitPosition, typeClass, branchIndex, commitSymbolType);
|
|
882
|
+
drawCommitLabel(gLabels, commit2, commitPosition, pos);
|
|
883
|
+
drawCommitTags(gLabels, commit2, commitPosition, pos);
|
|
884
|
+
}
|
|
885
|
+
if (dir === "TB" || dir === "BT") {
|
|
886
|
+
commitPos.set(commit2.id, { x: commitPosition.x, y: commitPosition.posWithOffset });
|
|
887
|
+
} else {
|
|
888
|
+
commitPos.set(commit2.id, { x: commitPosition.posWithOffset, y: commitPosition.y });
|
|
889
|
+
}
|
|
890
|
+
pos = dir === "BT" && isParallelCommits ? pos + COMMIT_STEP : pos + COMMIT_STEP + LAYOUT_OFFSET;
|
|
891
|
+
if (pos > maxPos) {
|
|
892
|
+
maxPos = pos;
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
}, "drawCommits");
|
|
896
|
+
var shouldRerouteArrow = /* @__PURE__ */ __name((commitA, commitB, p1, p2, allCommits) => {
|
|
897
|
+
const commitBIsFurthest = dir === "TB" || dir === "BT" ? p1.x < p2.x : p1.y < p2.y;
|
|
898
|
+
const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch;
|
|
899
|
+
const isOnBranchToGetCurve = /* @__PURE__ */ __name((x) => x.branch === branchToGetCurve, "isOnBranchToGetCurve");
|
|
900
|
+
const isBetweenCommits = /* @__PURE__ */ __name((x) => x.seq > commitA.seq && x.seq < commitB.seq, "isBetweenCommits");
|
|
901
|
+
return [...allCommits.values()].some((commitX) => {
|
|
902
|
+
return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX);
|
|
903
|
+
});
|
|
904
|
+
}, "shouldRerouteArrow");
|
|
905
|
+
var findLane = /* @__PURE__ */ __name((y1, y2, depth = 0) => {
|
|
906
|
+
const candidate = y1 + Math.abs(y1 - y2) / 2;
|
|
907
|
+
if (depth > 5) {
|
|
908
|
+
return candidate;
|
|
909
|
+
}
|
|
910
|
+
const ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10);
|
|
911
|
+
if (ok) {
|
|
912
|
+
lanes.push(candidate);
|
|
913
|
+
return candidate;
|
|
914
|
+
}
|
|
915
|
+
const diff = Math.abs(y1 - y2);
|
|
916
|
+
return findLane(y1, y2 - diff / 5, depth + 1);
|
|
917
|
+
}, "findLane");
|
|
918
|
+
var drawArrow = /* @__PURE__ */ __name((svg, commitA, commitB, allCommits) => {
|
|
919
|
+
var _a, _b, _c, _d, _e;
|
|
920
|
+
const p1 = commitPos.get(commitA.id);
|
|
921
|
+
const p2 = commitPos.get(commitB.id);
|
|
922
|
+
if (p1 === void 0 || p2 === void 0) {
|
|
923
|
+
throw new Error(`Commit positions not found for commits ${commitA.id} and ${commitB.id}`);
|
|
924
|
+
}
|
|
925
|
+
const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits);
|
|
926
|
+
let arc = "";
|
|
927
|
+
let arc2 = "";
|
|
928
|
+
let radius = 0;
|
|
929
|
+
let offset = 0;
|
|
930
|
+
let colorClassNum = (_a = branchPos.get(commitB.branch)) == null ? void 0 : _a.index;
|
|
931
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
932
|
+
colorClassNum = (_b = branchPos.get(commitA.branch)) == null ? void 0 : _b.index;
|
|
933
|
+
}
|
|
934
|
+
let lineDef;
|
|
935
|
+
if (arrowNeedsRerouting) {
|
|
936
|
+
arc = "A 10 10, 0, 0, 0,";
|
|
937
|
+
arc2 = "A 10 10, 0, 0, 1,";
|
|
938
|
+
radius = 10;
|
|
939
|
+
offset = 10;
|
|
940
|
+
const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);
|
|
941
|
+
const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x);
|
|
942
|
+
if (dir === "TB") {
|
|
943
|
+
if (p1.x < p2.x) {
|
|
944
|
+
lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
945
|
+
} else {
|
|
946
|
+
colorClassNum = (_c = branchPos.get(commitA.branch)) == null ? void 0 : _c.index;
|
|
947
|
+
lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
948
|
+
}
|
|
949
|
+
} else if (dir === "BT") {
|
|
950
|
+
if (p1.x < p2.x) {
|
|
951
|
+
lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc2} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
952
|
+
} else {
|
|
953
|
+
colorClassNum = (_d = branchPos.get(commitA.branch)) == null ? void 0 : _d.index;
|
|
954
|
+
lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc2} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
955
|
+
}
|
|
956
|
+
} else {
|
|
957
|
+
if (p1.y < p2.y) {
|
|
958
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;
|
|
959
|
+
} else {
|
|
960
|
+
colorClassNum = (_e = branchPos.get(commitA.branch)) == null ? void 0 : _e.index;
|
|
961
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
} else {
|
|
965
|
+
arc = "A 20 20, 0, 0, 0,";
|
|
966
|
+
arc2 = "A 20 20, 0, 0, 1,";
|
|
967
|
+
radius = 20;
|
|
968
|
+
offset = 20;
|
|
969
|
+
if (dir === "TB") {
|
|
970
|
+
if (p1.x < p2.x) {
|
|
971
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
972
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
973
|
+
} else {
|
|
974
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
if (p1.x > p2.x) {
|
|
978
|
+
arc = "A 20 20, 0, 0, 0,";
|
|
979
|
+
arc2 = "A 20 20, 0, 0, 1,";
|
|
980
|
+
radius = 20;
|
|
981
|
+
offset = 20;
|
|
982
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
983
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
984
|
+
} else {
|
|
985
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
if (p1.x === p2.x) {
|
|
989
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
|
|
990
|
+
}
|
|
991
|
+
} else if (dir === "BT") {
|
|
992
|
+
if (p1.x < p2.x) {
|
|
993
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
994
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
995
|
+
} else {
|
|
996
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if (p1.x > p2.x) {
|
|
1000
|
+
arc = "A 20 20, 0, 0, 0,";
|
|
1001
|
+
arc2 = "A 20 20, 0, 0, 1,";
|
|
1002
|
+
radius = 20;
|
|
1003
|
+
offset = 20;
|
|
1004
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
1005
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
1006
|
+
} else {
|
|
1007
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if (p1.x === p2.x) {
|
|
1011
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
|
|
1012
|
+
}
|
|
1013
|
+
} else {
|
|
1014
|
+
if (p1.y < p2.y) {
|
|
1015
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
1016
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`;
|
|
1017
|
+
} else {
|
|
1018
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
if (p1.y > p2.y) {
|
|
1022
|
+
if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {
|
|
1023
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`;
|
|
1024
|
+
} else {
|
|
1025
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
if (p1.y === p2.y) {
|
|
1029
|
+
lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
if (lineDef === void 0) {
|
|
1034
|
+
throw new Error("Line definition not found");
|
|
1035
|
+
}
|
|
1036
|
+
svg.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT);
|
|
1037
|
+
}, "drawArrow");
|
|
1038
|
+
var drawArrows = /* @__PURE__ */ __name((svg, commits) => {
|
|
1039
|
+
const gArrows = svg.append("g").attr("class", "commit-arrows");
|
|
1040
|
+
[...commits.keys()].forEach((key) => {
|
|
1041
|
+
const commit2 = commits.get(key);
|
|
1042
|
+
if (commit2.parents && commit2.parents.length > 0) {
|
|
1043
|
+
commit2.parents.forEach((parent) => {
|
|
1044
|
+
drawArrow(gArrows, commits.get(parent), commit2, commits);
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
}, "drawArrows");
|
|
1049
|
+
var drawBranches = /* @__PURE__ */ __name((svg, branches) => {
|
|
1050
|
+
const g = svg.append("g");
|
|
1051
|
+
branches.forEach((branch2, index) => {
|
|
1052
|
+
var _a;
|
|
1053
|
+
const adjustIndexForTheme = index % THEME_COLOR_LIMIT;
|
|
1054
|
+
const pos = (_a = branchPos.get(branch2.name)) == null ? void 0 : _a.pos;
|
|
1055
|
+
if (pos === void 0) {
|
|
1056
|
+
throw new Error(`Position not found for branch ${branch2.name}`);
|
|
1057
|
+
}
|
|
1058
|
+
const line = g.append("line");
|
|
1059
|
+
line.attr("x1", 0);
|
|
1060
|
+
line.attr("y1", pos);
|
|
1061
|
+
line.attr("x2", maxPos);
|
|
1062
|
+
line.attr("y2", pos);
|
|
1063
|
+
line.attr("class", "branch branch" + adjustIndexForTheme);
|
|
1064
|
+
if (dir === "TB") {
|
|
1065
|
+
line.attr("y1", defaultPos);
|
|
1066
|
+
line.attr("x1", pos);
|
|
1067
|
+
line.attr("y2", maxPos);
|
|
1068
|
+
line.attr("x2", pos);
|
|
1069
|
+
} else if (dir === "BT") {
|
|
1070
|
+
line.attr("y1", maxPos);
|
|
1071
|
+
line.attr("x1", pos);
|
|
1072
|
+
line.attr("y2", defaultPos);
|
|
1073
|
+
line.attr("x2", pos);
|
|
1074
|
+
}
|
|
1075
|
+
lanes.push(pos);
|
|
1076
|
+
const name = branch2.name;
|
|
1077
|
+
const labelElement = drawText(name);
|
|
1078
|
+
const bkg = g.insert("rect");
|
|
1079
|
+
const branchLabel = g.insert("g").attr("class", "branchLabel");
|
|
1080
|
+
const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme);
|
|
1081
|
+
label.node().appendChild(labelElement);
|
|
1082
|
+
const bbox = labelElement.getBBox();
|
|
1083
|
+
bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - ((DEFAULT_GITGRAPH_CONFIG2 == null ? void 0 : DEFAULT_GITGRAPH_CONFIG2.rotateCommitLabel) === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4);
|
|
1084
|
+
label.attr(
|
|
1085
|
+
"transform",
|
|
1086
|
+
"translate(" + (-bbox.width - 14 - ((DEFAULT_GITGRAPH_CONFIG2 == null ? void 0 : DEFAULT_GITGRAPH_CONFIG2.rotateCommitLabel) === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")"
|
|
1087
|
+
);
|
|
1088
|
+
if (dir === "TB") {
|
|
1089
|
+
bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0);
|
|
1090
|
+
label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)");
|
|
1091
|
+
} else if (dir === "BT") {
|
|
1092
|
+
bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", maxPos);
|
|
1093
|
+
label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", " + maxPos + ")");
|
|
1094
|
+
} else {
|
|
1095
|
+
bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")");
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
}, "drawBranches");
|
|
1099
|
+
var setBranchPosition = /* @__PURE__ */ __name(function(name, pos, index, bbox, rotateCommitLabel) {
|
|
1100
|
+
branchPos.set(name, { pos, index });
|
|
1101
|
+
pos += 50 + (rotateCommitLabel ? 40 : 0) + (dir === "TB" || dir === "BT" ? bbox.width / 2 : 0);
|
|
1102
|
+
return pos;
|
|
1103
|
+
}, "setBranchPosition");
|
|
1104
|
+
var draw = /* @__PURE__ */ __name(function(txt, id, ver, diagObj) {
|
|
1105
|
+
clear3();
|
|
1106
|
+
log.debug("in gitgraph renderer", txt + "\n", "id:", id, ver);
|
|
1107
|
+
if (!DEFAULT_GITGRAPH_CONFIG2) {
|
|
1108
|
+
throw new Error("GitGraph config not found");
|
|
1109
|
+
}
|
|
1110
|
+
const rotateCommitLabel = DEFAULT_GITGRAPH_CONFIG2.rotateCommitLabel ?? false;
|
|
1111
|
+
const db2 = diagObj.db;
|
|
1112
|
+
allCommitsDict = db2.getCommits();
|
|
1113
|
+
const branches = db2.getBranchesAsObjArray();
|
|
1114
|
+
dir = db2.getDirection();
|
|
1115
|
+
const diagram2 = select(`[id="${id}"]`);
|
|
1116
|
+
let pos = 0;
|
|
1117
|
+
branches.forEach((branch2, index) => {
|
|
1118
|
+
var _a;
|
|
1119
|
+
const labelElement = drawText(branch2.name);
|
|
1120
|
+
const g = diagram2.append("g");
|
|
1121
|
+
const branchLabel = g.insert("g").attr("class", "branchLabel");
|
|
1122
|
+
const label = branchLabel.insert("g").attr("class", "label branch-label");
|
|
1123
|
+
(_a = label.node()) == null ? void 0 : _a.appendChild(labelElement);
|
|
1124
|
+
const bbox = labelElement.getBBox();
|
|
1125
|
+
pos = setBranchPosition(branch2.name, pos, index, bbox, rotateCommitLabel);
|
|
1126
|
+
label.remove();
|
|
1127
|
+
branchLabel.remove();
|
|
1128
|
+
g.remove();
|
|
1129
|
+
});
|
|
1130
|
+
drawCommits(diagram2, allCommitsDict, false);
|
|
1131
|
+
if (DEFAULT_GITGRAPH_CONFIG2.showBranches) {
|
|
1132
|
+
drawBranches(diagram2, branches);
|
|
1133
|
+
}
|
|
1134
|
+
drawArrows(diagram2, allCommitsDict);
|
|
1135
|
+
drawCommits(diagram2, allCommitsDict, true);
|
|
1136
|
+
utils_default.insertTitle(
|
|
1137
|
+
diagram2,
|
|
1138
|
+
"gitTitleText",
|
|
1139
|
+
DEFAULT_GITGRAPH_CONFIG2.titleTopMargin ?? 0,
|
|
1140
|
+
db2.getDiagramTitle()
|
|
1141
|
+
);
|
|
1142
|
+
setupGraphViewbox2(
|
|
1143
|
+
void 0,
|
|
1144
|
+
diagram2,
|
|
1145
|
+
DEFAULT_GITGRAPH_CONFIG2.diagramPadding,
|
|
1146
|
+
DEFAULT_GITGRAPH_CONFIG2.useMaxWidth
|
|
1147
|
+
);
|
|
1148
|
+
}, "draw");
|
|
1149
|
+
var gitGraphRenderer_default = {
|
|
1150
|
+
draw
|
|
1151
|
+
};
|
|
1152
|
+
var getStyles = /* @__PURE__ */ __name((options) => `
|
|
1153
|
+
.commit-id,
|
|
1154
|
+
.commit-msg,
|
|
1155
|
+
.branch-label {
|
|
1156
|
+
fill: lightgrey;
|
|
1157
|
+
color: lightgrey;
|
|
1158
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
1159
|
+
font-family: var(--mermaid-font-family);
|
|
1160
|
+
}
|
|
1161
|
+
${[0, 1, 2, 3, 4, 5, 6, 7].map(
|
|
1162
|
+
(i) => `
|
|
1163
|
+
.branch-label${i} { fill: ${options["gitBranchLabel" + i]}; }
|
|
1164
|
+
.commit${i} { stroke: ${options["git" + i]}; fill: ${options["git" + i]}; }
|
|
1165
|
+
.commit-highlight${i} { stroke: ${options["gitInv" + i]}; fill: ${options["gitInv" + i]}; }
|
|
1166
|
+
.label${i} { fill: ${options["git" + i]}; }
|
|
1167
|
+
.arrow${i} { stroke: ${options["git" + i]}; }
|
|
1168
|
+
`
|
|
1169
|
+
).join("\n")}
|
|
1170
|
+
|
|
1171
|
+
.branch {
|
|
1172
|
+
stroke-width: 1;
|
|
1173
|
+
stroke: ${options.lineColor};
|
|
1174
|
+
stroke-dasharray: 2;
|
|
1175
|
+
}
|
|
1176
|
+
.commit-label { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelColor};}
|
|
1177
|
+
.commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelBackground}; opacity: 0.5; }
|
|
1178
|
+
.tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};}
|
|
1179
|
+
.tag-label-bkg { fill: ${options.tagLabelBackground}; stroke: ${options.tagLabelBorder}; }
|
|
1180
|
+
.tag-hole { fill: ${options.textColor}; }
|
|
1181
|
+
|
|
1182
|
+
.commit-merge {
|
|
1183
|
+
stroke: ${options.primaryColor};
|
|
1184
|
+
fill: ${options.primaryColor};
|
|
1185
|
+
}
|
|
1186
|
+
.commit-reverse {
|
|
1187
|
+
stroke: ${options.primaryColor};
|
|
1188
|
+
fill: ${options.primaryColor};
|
|
1189
|
+
stroke-width: 3;
|
|
1190
|
+
}
|
|
1191
|
+
.commit-highlight-outer {
|
|
1192
|
+
}
|
|
1193
|
+
.commit-highlight-inner {
|
|
1194
|
+
stroke: ${options.primaryColor};
|
|
1195
|
+
fill: ${options.primaryColor};
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
1199
|
+
.gitTitleText {
|
|
1200
|
+
text-anchor: middle;
|
|
1201
|
+
font-size: 18px;
|
|
1202
|
+
fill: ${options.textColor};
|
|
1203
|
+
}
|
|
1204
|
+
`, "getStyles");
|
|
1205
|
+
var styles_default = getStyles;
|
|
1206
|
+
var diagram = {
|
|
1207
|
+
parser,
|
|
1208
|
+
db,
|
|
1209
|
+
renderer: gitGraphRenderer_default,
|
|
1210
|
+
styles: styles_default
|
|
1211
|
+
};
|
|
1212
|
+
export {
|
|
1213
|
+
diagram
|
|
1214
|
+
};
|
|
1215
|
+
//# sourceMappingURL=gitGraphDiagram-V2S2FVAM-B5dByD3_.js.map
|