@spteck/react-controls-v2 2.3.7 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LocalizationProvider-B6NxHbu2.cjs +2 -0
- package/dist/LocalizationProvider-te5iu_6z.js +363 -0
- package/dist/_arrayEach-BuSFKyFt.js +54 -0
- package/dist/_arrayEach-ChR-TejB.cjs +2 -0
- package/dist/_getTag-BRuLtYrv.js +28 -0
- package/dist/_getTag-D6VVyrEu.cjs +2 -0
- package/dist/abstractions/IApplicationContext.d.ts +0 -1
- package/dist/abstractions/IAuthenticationProvider.d.ts +0 -1
- package/dist/abstractions/ILocalizationProvider.d.ts +0 -1
- package/dist/abstractions/providers/ConsoleLoggingProvider.d.ts +0 -1
- package/dist/abstractions/providers/DefaultGraphClient.d.ts +0 -1
- package/dist/abstractions/providers/DefaultLocalizationProvider.d.ts +0 -1
- package/dist/abstractions/providers/LocalStorageProvider.d.ts +0 -1
- package/dist/abstractions/providers/LocalizationProvider.d.ts +0 -1
- package/dist/ar-Blifx2MN.js +210 -0
- package/dist/ar-ip3bGOX3.cjs +2 -0
- package/dist/arc-4yb49ncY.js +82 -0
- package/dist/arc-djsA8IT0.cjs +2 -0
- package/dist/architecture-PBZL5I3N-CvTfVLFi.js +3 -0
- package/dist/architecture-PBZL5I3N-wZIE3ggH.cjs +1 -0
- package/dist/architectureDiagram-2XIMDMQ5-DFEvJNx1.cjs +37 -0
- package/dist/architectureDiagram-2XIMDMQ5-g-HotzpG.js +4047 -0
- package/dist/array-BNB_vRFv.cjs +2 -0
- package/dist/array-DP0duYiO.js +8 -0
- package/dist/az-CMhDjtnj.js +210 -0
- package/dist/az-CyVLdUDz.cjs +2 -0
- package/dist/bg-Bexoz3hL.cjs +2 -0
- package/dist/bg-C96WirSv.js +210 -0
- package/dist/blockDiagram-WCTKOSBZ-DWgb5Ghz.js +3165 -0
- package/dist/blockDiagram-WCTKOSBZ-Dl04FBAy.cjs +133 -0
- package/dist/bs-MMcvhwLv.cjs +2 -0
- package/dist/bs-_St1wBE_.js +210 -0
- package/dist/c4Diagram-IC4MRINW-ClZvialQ.js +2966 -0
- package/dist/c4Diagram-IC4MRINW-ZFE2cGZP.cjs +11 -0
- package/dist/ca-BspMSeHN.cjs +2 -0
- package/dist/ca-QlLcV4wf.js +210 -0
- package/dist/channel-2Bqnb1FY.js +7 -0
- package/dist/channel-5_aP1EVB.cjs +2 -0
- package/dist/chunk-4BX2VUAB-B5Va_oZz.js +10 -0
- package/dist/chunk-4BX2VUAB-BWDW-gYk.cjs +2 -0
- package/dist/chunk-55IACEB6-4ind_ByS.cjs +2 -0
- package/dist/chunk-55IACEB6-Pcyz_aR_.js +10 -0
- package/dist/chunk-7E7YKBS2-Sw9_w4gt.cjs +2 -0
- package/dist/chunk-7E7YKBS2-VHdgsed6.js +25 -0
- package/dist/chunk-7R4GIKGN-BKoqTTU_.cjs +81 -0
- package/dist/chunk-7R4GIKGN-CaQJ0QBF.js +2598 -0
- package/dist/chunk-C72U2L5F-CCvi6jiy.cjs +2 -0
- package/dist/chunk-C72U2L5F-MjJQTOMh.js +25 -0
- package/dist/chunk-D-IZpNpi.cjs +1 -0
- package/dist/chunk-EGIJ26TM-Bffl84Wq.cjs +2 -0
- package/dist/chunk-EGIJ26TM-DLMAfvpZ.js +25 -0
- package/dist/{chunk-FMBD7UC4-DD0xIF4q.js → chunk-FMBD7UC4-BvqqU04Z.cjs} +3 -7
- package/dist/chunk-FMBD7UC4-xjRtkFXe.js +7 -0
- package/dist/chunk-GEFDOKGD-BNgT40Ex.js +1302 -0
- package/dist/chunk-GEFDOKGD-BOwd6Jqp.cjs +3 -0
- package/dist/chunk-GLR3WWYH-DdNAJNRC.cjs +2 -0
- package/dist/chunk-GLR3WWYH-kyo6BUtq.js +43 -0
- package/dist/chunk-HHEYEP7N-DO1AYIZw.js +11 -0
- package/dist/chunk-HHEYEP7N-pdmgQZzP.cjs +2 -0
- package/dist/chunk-JSJVCQXG-Ci0seBb4.cjs +2 -0
- package/dist/chunk-JSJVCQXG-DowfYWcD.js +62 -0
- package/dist/chunk-KX2RTZJC-BJeOHReu.cjs +2 -0
- package/dist/chunk-KX2RTZJC-D-bUTSNy.js +27 -0
- package/dist/chunk-KYZI473N-DEPuSXaW.js +3436 -0
- package/dist/chunk-KYZI473N-DzBMFOER.cjs +54 -0
- package/dist/chunk-L3YUKLVL-BDGCTzmy.js +25 -0
- package/dist/chunk-L3YUKLVL-BZ17sqh5.cjs +2 -0
- package/dist/chunk-MX3YWQON-CAsnAj2e.js +82 -0
- package/dist/chunk-MX3YWQON-DulrBJdn.cjs +2 -0
- package/dist/chunk-NBPlniwU.js +23 -0
- package/dist/chunk-NQ4KR5QH-BJBAT2kM.cjs +221 -0
- package/dist/chunk-NQ4KR5QH-DFem-ORD.js +2004 -0
- package/dist/chunk-O4XLMI2P-BQF7MAo7.cjs +8 -0
- package/dist/chunk-O4XLMI2P-DA4TPzPG.js +513 -0
- package/dist/chunk-OZEHJAEY-CAiiXJUP.cjs +2 -0
- package/dist/chunk-OZEHJAEY-D7SX2SbR.js +66 -0
- package/dist/chunk-PQ6SQG4A-BZnW4-Sd.cjs +2 -0
- package/dist/chunk-PQ6SQG4A-ObFGkauo.js +69 -0
- package/dist/chunk-PU5JKC2W-BM5NPS-q.js +1887 -0
- package/dist/chunk-PU5JKC2W-eRU8wnTH.cjs +71 -0
- package/dist/chunk-QZHKN3VN-Dhli_tM0.cjs +2 -0
- package/dist/chunk-QZHKN3VN-x258g6EH.js +17 -0
- package/dist/chunk-R5LLSJPH-CNTEucEd.cjs +2 -0
- package/dist/chunk-R5LLSJPH-Gt27ml2m.js +37 -0
- package/dist/chunk-WL4C6EOR-CQXw6d0l.cjs +190 -0
- package/dist/chunk-WL4C6EOR-DuM6QmqM.js +3196 -0
- package/dist/chunk-XIRO2GV7-CswC9CO8.cjs +2 -0
- package/dist/chunk-XIRO2GV7-DXlO8X82.js +32 -0
- package/dist/chunk-XPW4576I-Bpsr4SZJ.js +1148 -0
- package/dist/chunk-XPW4576I-C68T-WIW.cjs +33 -0
- package/dist/chunk-XZSTWKYB-DJv9rEVU.cjs +95 -0
- package/dist/chunk-XZSTWKYB-jD9M1izK.js +16132 -0
- package/dist/chunk-YBOYWFTD-B6CeuteH.js +34 -0
- package/dist/chunk-YBOYWFTD-CiLW6HW_.cjs +2 -0
- package/dist/classDiagram-VBA2DB6C-Us0kuDfz.cjs +2 -0
- package/dist/classDiagram-VBA2DB6C-VOsE3gN0.js +31 -0
- package/dist/classDiagram-v2-RAHNMMFH-BWsm3ea6.cjs +2 -0
- package/dist/classDiagram-v2-RAHNMMFH-DPqMNfOz.js +31 -0
- package/dist/components/AISearchControl/useAISearchControlStyles.d.ts +0 -1
- package/dist/components/AspectRatio/AspectRatio.d.ts +0 -1
- package/dist/components/AspectRatio/IAspectRationProps.d.ts +0 -1
- package/dist/components/Card/ICardProps.d.ts +0 -1
- package/dist/components/Carousel/ICarouselProps.d.ts +0 -1
- package/dist/components/Carousel/useCarouselButton.d.ts +0 -1
- package/dist/components/Carousel/useCarouselStyles.d.ts +0 -1
- package/dist/components/Center/ICenterProps.d.ts +0 -1
- package/dist/components/ContentRenderer/IContentRendererProps.d.ts +0 -1
- package/dist/components/DataGridV2/DataGridV2.d.ts +2 -1
- package/dist/components/DataGridV2/IDataGridV2ExtraProps.d.ts +0 -1
- package/dist/components/Grid/IGridProps.d.ts +0 -1
- package/dist/components/ItemPicker/IItemPickerProps.d.ts +0 -1
- package/dist/components/KPIControl/IKpiCardProps.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/IActivity.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/IActivityMessageProps.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/IActor.d.ts +0 -1
- package/dist/components/ListItemActivityMessage/useSharePointActivities.d.ts +0 -1
- package/dist/components/ListToolbar/FlatItem.d.ts +0 -1
- package/dist/components/ListToolbar/IListToolbarProps.d.ts +0 -1
- package/dist/components/ListToolbar/IToolbarItem.d.ts +0 -1
- package/dist/components/ListToolbar/IToolbarItemRendererProps.d.ts +0 -1
- package/dist/components/ListToolbar/helpers.d.ts +0 -1
- package/dist/components/MermaidDiagram/useMermaidDiagramStyles.d.ts +0 -1
- package/dist/components/Navigation/Navigation.d.ts +0 -1
- package/dist/components/Popup/Popup.d.ts +0 -1
- package/dist/components/Provider/UniversalProvider.d.ts +0 -1
- package/dist/components/Space/ISpaceProps.d.ts +0 -1
- package/dist/components/SplitPane/ISplitPaneProps.d.ts +0 -1
- package/dist/components/SplitPane/useSplitPaneStyles.d.ts +0 -1
- package/dist/components/Stack/IStackProps.d.ts +0 -1
- package/dist/components/StackedUsers/IStackedUsersProps.d.ts +0 -1
- package/dist/components/StackedUsers/StackedUsers.d.ts +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.HostConfig.d.ts +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.Utilities.d.ts +0 -1
- package/dist/components/adaptiveCardHost/AdaptiveCardHost.d.ts +0 -1
- package/dist/components/adaptiveCardHost/IAdaptiveCardHostProps.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Elements.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIChoiceSetInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIDateInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUINumberInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUITextInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/FluentUIToggleInput.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/HostCapability.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/HostConfig.d.ts +0 -1
- package/dist/components/adaptiveCardHost/fluentUI/Styles.d.ts +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostConfigResult.d.ts +0 -1
- package/dist/components/adaptiveCardHost/models/IAdaptiveCardHostEvaluationContext.d.ts +0 -1
- package/dist/components/aiAssistant/ChatAction.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputProps.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensions.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsProps.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsV1.d.ts +0 -1
- package/dist/components/aiAssistant/ChatInputWithMensionsV2.d.ts +0 -1
- package/dist/components/aiAssistant/ChatState.d.ts +0 -1
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts +0 -1
- package/dist/components/aiAssistant/chatReducer.d.ts +0 -1
- package/dist/components/aiAssistant/useChatInputStyles.d.ts +0 -1
- package/dist/components/aiAssistant/useChatInputWithMensionsStyles.d.ts +0 -1
- package/dist/components/aiAssistant/useStyles.d.ts +0 -1
- package/dist/components/appDashboard/AppDashboard.d.ts +0 -1
- package/dist/components/appDashboard/IAppDashboardProps.d.ts +0 -1
- package/dist/components/baseComponentProps/IBaseProps.d.ts +0 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -1
- package/dist/components/breadcrumb/IBreadcrumProps.d.ts +0 -1
- package/dist/components/breadcrumb/OverflowMenu.d.ts +0 -1
- package/dist/components/breadcrumb/useBreadcrumStyles.d.ts +0 -1
- package/dist/components/calendarControl/hooks/useCalendar.d.ts +0 -1
- package/dist/components/calendarControl/hooks/useUtils.d.ts +0 -1
- package/dist/components/calendarControl/models/ICalendarControlProps.d.ts +0 -1
- package/dist/components/calendarControl/models/IEvents.d.ts +0 -1
- package/dist/components/customControlBar/ICustomControlBarProps.d.ts +0 -1
- package/dist/components/dataGrid/DataGrid.d.ts +0 -1
- package/dist/components/dataGrid/IDataGridProps.d.ts +0 -1
- package/dist/components/dataGrid/ISortState.d.ts +0 -1
- package/dist/components/dataGrid/stack/IStackProps.d.ts +0 -1
- package/dist/components/dataGrid/stack/Stack.d.ts +0 -1
- package/dist/components/dataGrid/useDataGridStyles.d.ts +0 -1
- package/dist/components/dropDownField/IDropDownFieldProps.d.ts +0 -1
- package/dist/components/fluentUIProvider/FluentUIProvider.d.ts +0 -1
- package/dist/components/iconButton/IconButton.d.ts +0 -1
- package/dist/components/iconButton/IconButtonProps.d.ts +0 -1
- package/dist/components/mensions/IMensionsProps.d.ts +0 -1
- package/dist/components/mensions/Mensions.d.ts +0 -1
- package/dist/components/mensions/MensionsExample.d.ts +0 -1
- package/dist/components/renderAdaptiveCard/RenderAdaptiveCard.d.ts +0 -1
- package/dist/components/searchControl/useSearchControlStyles.d.ts +0 -1
- package/dist/components/selectView/SelectView.d.ts +0 -1
- package/dist/components/showError/ShowError.d.ts +0 -1
- package/dist/components/stackv2/IStackV2Props.d.ts +0 -1
- package/dist/components/stackv2/StackV2.d.ts +0 -1
- package/dist/components/userCard/IUserCardProps.d.ts +0 -1
- package/dist/components/userCard/IUserInfo.d.ts +0 -1
- package/dist/components/userCard/UserCard.d.ts +0 -1
- package/dist/components/userCard/constants.d.ts +0 -1
- package/dist/components/userCard/useUserProfile.d.ts +0 -1
- package/dist/components/videoPlayer/VideoPlayer.d.ts +0 -1
- package/dist/components/videoPlayer/useVideoStyles.d.ts +0 -1
- package/dist/components/worldMap/IWorldMapProps.d.ts +0 -1
- package/dist/components/worldMap/MaplibreWorldMapProps.d.ts +0 -1
- package/dist/components/worldMap/WorldMap.d.ts +0 -1
- package/dist/components/worldMap/WorldMapControl.d.ts +0 -1
- package/dist/components/worldMap/useCleanMapStyle.d.ts +0 -1
- package/dist/components/worldMap/useGeocodedCountries.d.ts +0 -1
- package/dist/cose-bilkent-S5V4N54A-CKhwzobJ.js +2252 -0
- package/dist/cose-bilkent-S5V4N54A-DmyaRQ6l.cjs +2 -0
- package/dist/cs-FZSeHYld.cjs +2 -0
- package/dist/cs-MrS2bH7F.js +210 -0
- package/dist/cy-BX97Tgwk.js +210 -0
- package/dist/cy-CzQmM2lQ.cjs +2 -0
- package/dist/cytoscape.esm-CcJAI0wG.cjs +322 -0
- package/dist/cytoscape.esm-D9EjU25_.js +18102 -0
- package/dist/da-BnewPPrh.js +210 -0
- package/dist/da-CexFt-Oj.cjs +2 -0
- package/dist/dagre-CpEPaL3r.cjs +2 -0
- package/dist/dagre-Dd8wCGc6.js +1305 -0
- package/dist/dagre-KLK3FWXG-BpxkjvB3.js +294 -0
- package/dist/dagre-KLK3FWXG-DIznPQl_.cjs +5 -0
- package/dist/de-B68HwuYu.cjs +2 -0
- package/dist/de-BSZuzGTL.js +210 -0
- package/dist/defaultLocale-CYOzCjwh.js +203 -0
- package/dist/defaultLocale-DSgylVA1.cjs +2 -0
- package/dist/diagram-E7M64L7V-dXqTi77U.cjs +25 -0
- package/dist/diagram-E7M64L7V-oX07GVAD.js +529 -0
- package/dist/diagram-IFDJBPK2-CriVAAmI.cjs +44 -0
- package/dist/diagram-IFDJBPK2-lCNF06_S.js +215 -0
- package/dist/diagram-P4PSJMXO-TfwVJh4S.js +135 -0
- package/dist/diagram-P4PSJMXO-k7F0lH6Q.cjs +25 -0
- package/dist/dist-CV9Ez7cn.js +52 -0
- package/dist/dist-DVthN7lF.cjs +2 -0
- package/dist/el-DQc4jSMd.cjs +2 -0
- package/dist/el-DrOk3N7-.js +210 -0
- package/dist/erDiagram-INFDFZHY-CDt3mOSU.cjs +71 -0
- package/dist/erDiagram-INFDFZHY-Ds_R2Ds4.js +1668 -0
- package/dist/es-CGqzubZ2.js +210 -0
- package/dist/es-DI8Y4Bv1.cjs +2 -0
- package/dist/et-DGqkocuq.js +210 -0
- package/dist/et-DfaryKvp.cjs +2 -0
- package/dist/eu-BVOSXciF.cjs +2 -0
- package/dist/eu-DEo7fdTW.js +210 -0
- package/dist/fi-C5L-OzaI.cjs +2 -0
- package/dist/fi-DxErwnd5.js +210 -0
- package/dist/flowDiagram-PKNHOUZH-7XJG07fo.cjs +163 -0
- package/dist/flowDiagram-PKNHOUZH-CkeYebJ5.js +4163 -0
- package/dist/fr-yFvjqx8B.cjs +2 -0
- package/dist/fr-zrtSZX0o.js +210 -0
- package/dist/ga-6mVQhlWi.cjs +2 -0
- package/dist/ga-CbHxGc9_.js +210 -0
- package/dist/ganttDiagram-A5KZAMGK-Bbck1pyM.cjs +293 -0
- package/dist/ganttDiagram-A5KZAMGK-CFT3Xn_r.js +3074 -0
- package/dist/gitGraph-HDMCJU4V-BKE04oIl.js +3 -0
- package/dist/gitGraph-HDMCJU4V-C9GYfOYb.cjs +1 -0
- package/dist/gitGraphDiagram-K3NZZRJ6-CXz9SHBX.js +627 -0
- package/dist/gitGraphDiagram-K3NZZRJ6-Dt4D-ig1.cjs +66 -0
- package/dist/gl--w0P3RY4.js +210 -0
- package/dist/gl-BJzJe1sq.cjs +2 -0
- package/dist/graphlib-CPo7oIsu.js +223 -0
- package/dist/graphlib-CmUS4Qin.cjs +2 -0
- package/dist/he-B3Bw3qr0.cjs +2 -0
- package/dist/he-DY19lzWp.js +210 -0
- package/dist/hi-CFSsoO_8.js +210 -0
- package/dist/hi-kofL-mD8.cjs +2 -0
- package/dist/hooks/useBrandCenterFonts.d.ts +0 -1
- package/dist/hooks/useGraphAPI.d.ts +0 -1
- package/dist/hooks/useLocalizationStrings.d.ts +0 -1
- package/dist/hooks/useLogging.d.ts +0 -1
- package/dist/hr-CDxqA9Jm.cjs +2 -0
- package/dist/hr-DIRJ1Z8e.js +210 -0
- package/dist/hu-Defen_75.cjs +2 -0
- package/dist/hu-DqYPRWZh.js +210 -0
- package/dist/id-DcwMRgmX.cjs +2 -0
- package/dist/id-Dgj7SUCi.js +210 -0
- package/dist/identity-6JlhFhuM.cjs +2 -0
- package/dist/identity-C1jKsMoW.js +395 -0
- package/dist/index.cjs +453 -2
- package/dist/index.js +22828 -168
- package/dist/info-3K5VOQVL-DfN_3mKd.js +3 -0
- package/dist/info-3K5VOQVL-d6J9FY0_.cjs +1 -0
- package/dist/infoDiagram-LFFYTUFH-Bp9btqnA.cjs +3 -0
- package/dist/infoDiagram-LFFYTUFH-DnvgRFnx.js +21 -0
- package/dist/init-BAFZAp9S.cjs +2 -0
- package/dist/init-m0TwgR4W.js +17 -0
- package/dist/isEmpty-BTp1uKIj.cjs +2 -0
- package/dist/isEmpty-uXVYZZYe.js +17 -0
- package/dist/ishikawaDiagram-PHBUUO56-DLaOkz38.js +719 -0
- package/dist/ishikawaDiagram-PHBUUO56-DmqObwMZ.cjs +71 -0
- package/dist/it-D5nM6KCi.cjs +2 -0
- package/dist/it-QdChHqVN.js +210 -0
- package/dist/ja-BNS0BbY-.js +210 -0
- package/dist/ja-BtuHirv7.cjs +2 -0
- package/dist/journeyDiagram-4ABVD52K-Cv0DbLMi.cjs +140 -0
- package/dist/journeyDiagram-4ABVD52K-DYmmcNK4.js +885 -0
- package/dist/kanban-definition-K7BYSVSG-BdQLAMeB.cjs +90 -0
- package/dist/kanban-definition-K7BYSVSG-CLEYqSz5.js +973 -0
- package/dist/katex-B-Nju2J8.js +22002 -0
- package/dist/katex-WY67Rp7A.cjs +266 -0
- package/dist/kk-BSl8IqgQ.cjs +2 -0
- package/dist/kk-Dhkax68h.js +210 -0
- package/dist/ko-eplb1GD0.cjs +2 -0
- package/dist/ko-heRMHZWp.js +210 -0
- package/dist/line-CbEBKCYr.js +36 -0
- package/dist/line-DqSdvtRR.cjs +2 -0
- package/dist/linear-DvLDpS6A.cjs +2 -0
- package/dist/linear-Eb79THx6.js +291 -0
- package/dist/localization/ILibraryStrings.d.ts +0 -1
- package/dist/localization/defaults/ar.d.ts +0 -1
- package/dist/localization/defaults/az.d.ts +0 -1
- package/dist/localization/defaults/bg.d.ts +0 -1
- package/dist/localization/defaults/bs.d.ts +0 -1
- package/dist/localization/defaults/ca.d.ts +0 -1
- package/dist/localization/defaults/cs.d.ts +0 -1
- package/dist/localization/defaults/cy.d.ts +0 -1
- package/dist/localization/defaults/da.d.ts +0 -1
- package/dist/localization/defaults/de.d.ts +0 -1
- package/dist/localization/defaults/el.d.ts +0 -1
- package/dist/localization/defaults/en.d.ts +0 -1
- package/dist/localization/defaults/es.d.ts +0 -1
- package/dist/localization/defaults/et.d.ts +0 -1
- package/dist/localization/defaults/eu.d.ts +0 -1
- package/dist/localization/defaults/fi.d.ts +0 -1
- package/dist/localization/defaults/fr.d.ts +0 -1
- package/dist/localization/defaults/ga.d.ts +0 -1
- package/dist/localization/defaults/gl.d.ts +0 -1
- package/dist/localization/defaults/he.d.ts +0 -1
- package/dist/localization/defaults/hi.d.ts +0 -1
- package/dist/localization/defaults/hr.d.ts +0 -1
- package/dist/localization/defaults/hu.d.ts +0 -1
- package/dist/localization/defaults/id.d.ts +0 -1
- package/dist/localization/defaults/it.d.ts +0 -1
- package/dist/localization/defaults/ja.d.ts +0 -1
- package/dist/localization/defaults/kk.d.ts +0 -1
- package/dist/localization/defaults/ko.d.ts +0 -1
- package/dist/localization/defaults/lt.d.ts +0 -1
- package/dist/localization/defaults/lv.d.ts +0 -1
- package/dist/localization/defaults/mk.d.ts +0 -1
- package/dist/localization/defaults/ms.d.ts +0 -1
- package/dist/localization/defaults/nb.d.ts +0 -1
- package/dist/localization/defaults/nl.d.ts +0 -1
- package/dist/localization/defaults/pl.d.ts +0 -1
- package/dist/localization/defaults/pt.d.ts +0 -1
- package/dist/localization/defaults/ro.d.ts +0 -1
- package/dist/localization/defaults/ru.d.ts +0 -1
- package/dist/localization/defaults/sk.d.ts +0 -1
- package/dist/localization/defaults/sl.d.ts +0 -1
- package/dist/localization/defaults/sr.d.ts +0 -1
- package/dist/localization/defaults/sv.d.ts +0 -1
- package/dist/localization/defaults/th.d.ts +0 -1
- package/dist/localization/defaults/tr.d.ts +0 -1
- package/dist/localization/defaults/uk.d.ts +0 -1
- package/dist/localization/defaults/vi.d.ts +0 -1
- package/dist/localization/defaults/zh.d.ts +0 -1
- package/dist/lt-Decqbo8S.js +210 -0
- package/dist/lt-DsYAWFbF.cjs +2 -0
- package/dist/lv-DHmTjCb8.cjs +2 -0
- package/dist/lv-wZASv0Lw.js +210 -0
- package/dist/maplibre-gl-qSrG75fp.js +33003 -0
- package/dist/maplibre-gl-tm_pVdmb.cjs +757 -0
- package/dist/math-DR9t6ixc.cjs +2 -0
- package/dist/math-DyURnvXC.js +12 -0
- package/dist/mermaid-parser.core-BdTB9qx-.js +61 -0
- package/dist/mermaid-parser.core-BlzF5RRD.cjs +4 -0
- package/dist/mindmap-definition-YRQLILUH-CzcVgr-U.js +966 -0
- package/dist/mindmap-definition-YRQLILUH-zWN_YXC3.cjs +69 -0
- package/dist/mk-BTsLGTJT.js +210 -0
- package/dist/mk-CCV_308U.cjs +2 -0
- package/dist/ms-C0cVNwky.js +210 -0
- package/dist/ms-CH83xVYN.cjs +2 -0
- package/dist/nb-DGX4q4tS.js +210 -0
- package/dist/nb-DZ-DlwcL.cjs +2 -0
- package/dist/nl-CnXZa8tZ.js +210 -0
- package/dist/nl-Xdf-A19i.cjs +2 -0
- package/dist/ordinal-BAWGEQkf.js +67 -0
- package/dist/ordinal-CL2X4e2C.cjs +2 -0
- package/dist/packet-RMMSAZCW-Bek1stRX.cjs +1 -0
- package/dist/packet-RMMSAZCW-DUN6t9lN.js +3 -0
- package/dist/path-Bt6guLtL.cjs +2 -0
- package/dist/path-DSzKK8fH.js +87 -0
- package/dist/pie-UPGHQEXC-DjqNO54R.js +3 -0
- package/dist/pie-UPGHQEXC-pJq6_YgE.cjs +1 -0
- package/dist/pieDiagram-SKSYHLDU-Ba-c0fRA.cjs +31 -0
- package/dist/pieDiagram-SKSYHLDU-ya07MTY-.js +167 -0
- package/dist/pl-BStql1S-.cjs +2 -0
- package/dist/pl-DbIdTNpg.js +210 -0
- package/dist/providers.cjs +2 -2
- package/dist/providers.d.ts +1 -0
- package/dist/providers.js +188 -252
- package/dist/pt-CcKYweQk.js +210 -0
- package/dist/pt-Dk4jELuZ.cjs +2 -0
- package/dist/quadrantDiagram-337W2JSQ-CQQEVC49.cjs +8 -0
- package/dist/quadrantDiagram-337W2JSQ-Dp_QyIEO.js +1976 -0
- package/dist/radar-KQ55EAFF-Bid2hXXI.cjs +1 -0
- package/dist/radar-KQ55EAFF-C6zhEkCz.js +3 -0
- package/dist/requirementDiagram-Z7DCOOCP-CRl2914V.js +2203 -0
- package/dist/requirementDiagram-Z7DCOOCP-CeMYhXEm.cjs +74 -0
- package/dist/ro-BvhMyTKh.cjs +2 -0
- package/dist/ro-C-8tiqgA.js +210 -0
- package/dist/rough.esm-BjJ_weyP.cjs +2 -0
- package/dist/rough.esm-DBHP55VQ.js +1354 -0
- package/dist/ru-BQosng8l.cjs +2 -0
- package/dist/ru-Dhnz96q2.js +210 -0
- package/dist/sankeyDiagram-WA2Y5GQK-BFrF47Iv.js +922 -0
- package/dist/sankeyDiagram-WA2Y5GQK-DDfjtQ4G.cjs +11 -0
- package/dist/sequenceDiagram-2WXFIKYE-B-zWyr9f.cjs +146 -0
- package/dist/sequenceDiagram-2WXFIKYE-BAd8OVlz.js +4111 -0
- package/dist/sk-BU-Z5EsC.js +210 -0
- package/dist/sk-BhA7UeAk.cjs +2 -0
- package/dist/sl-6Mczv4jG.cjs +2 -0
- package/dist/sl-CcfjJFxo.js +210 -0
- package/dist/sr-CxObZdu0.cjs +2 -0
- package/dist/sr-S53unrLA.js +210 -0
- package/dist/src-DFxq-N5I.cjs +2 -0
- package/dist/src-Dm6r9c7l.js +2148 -0
- package/dist/stateDiagram-RAJIS63D-C-tfqeC-.js +219 -0
- package/dist/stateDiagram-RAJIS63D-C1Aj8vJQ.cjs +2 -0
- package/dist/stateDiagram-v2-FVOUBMTO-C-w53gXL.js +29 -0
- package/dist/stateDiagram-v2-FVOUBMTO-VoIE_KVn.cjs +2 -0
- package/dist/sv-BfiunVuX.cjs +2 -0
- package/dist/sv-BiJrVfZr.js +210 -0
- package/dist/th-BqLGltZi.cjs +2 -0
- package/dist/th-vQ7LQ7nD.js +210 -0
- package/dist/timeline-definition-YZTLITO2-CE1y2S_r.js +832 -0
- package/dist/timeline-definition-YZTLITO2-D8aFfnYE.cjs +62 -0
- package/dist/tr-Brwl4o_Z.cjs +2 -0
- package/dist/tr-C5RrNGLz.js +210 -0
- package/dist/treemap-KZPCXAKY-D2v0uStP.cjs +1 -0
- package/dist/treemap-KZPCXAKY-DLE_f1Bk.js +3 -0
- package/dist/types/THorizontalSpacing.d.ts +0 -1
- package/dist/types/THorizontalSpacingBreakPoints.d.ts +0 -1
- package/dist/types/TPaddingBreakPoints.d.ts +0 -1
- package/dist/types/TPading.d.ts +0 -1
- package/dist/types/TVerticalSpacing.d.ts +0 -1
- package/dist/types/TVerticalSpacingBreakPoints.d.ts +0 -1
- package/dist/uk-CV49TRvS.cjs +2 -0
- package/dist/uk-WGCFH0fY.js +210 -0
- package/dist/vennDiagram-LZ73GAT5-BSpVMORX.js +1860 -0
- package/dist/vennDiagram-LZ73GAT5-DvnB0e7u.cjs +35 -0
- package/dist/vi-JzM7bjn_.cjs +2 -0
- package/dist/vi-Waa7HkXq.js +210 -0
- package/dist/xychartDiagram-JWTSCODW-0qbVGrDs.cjs +8 -0
- package/dist/xychartDiagram-JWTSCODW-DpIry-th.js +2043 -0
- package/dist/zh-BmUS7Wn_.js +210 -0
- package/dist/zh-DEm0SGzZ.cjs +2 -0
- package/package.json +7 -7
- package/dist/LocalizationProvider-BLjmybBa.cjs +0 -2
- package/dist/LocalizationProvider-BSlUf0tp.js +0 -497
- package/dist/_arrayEach-Cje_jmPk.cjs +0 -2
- package/dist/_arrayEach-FofefpDi.js +0 -61
- package/dist/ar-C1pLt8fa.js +0 -219
- package/dist/ar-Jzw7PLrc.cjs +0 -2
- package/dist/arc-5Gjtja_I.js +0 -132
- package/dist/arc-DJHyDr2O.cjs +0 -2
- package/dist/architecture-7HQA4BMR-B3tJE43W.js +0 -6
- package/dist/architecture-7HQA4BMR-gT33-zCB.cjs +0 -2
- package/dist/architectureDiagram-VXUJARFQ-2JSYYGtM.js +0 -8680
- package/dist/architectureDiagram-VXUJARFQ-DXZHHpiT.cjs +0 -2
- package/dist/az-C0Ow5Hxa.cjs +0 -2
- package/dist/az-C3-F9ybX.js +0 -219
- package/dist/bg-YB0TmpRF.cjs +0 -2
- package/dist/bg-w2e_udiK.js +0 -219
- package/dist/blockDiagram-VD42YOAC-B6nGrskI.js +0 -3756
- package/dist/blockDiagram-VD42YOAC-quPSWMXj.cjs +0 -2
- package/dist/bs-BoW04lRb.cjs +0 -2
- package/dist/bs-CEe_gjEx.js +0 -219
- package/dist/c4Diagram-YG6GDRKO-CvSU_nSb.js +0 -2483
- package/dist/c4Diagram-YG6GDRKO-yrm6z9xI.cjs +0 -2
- package/dist/ca-Bsy2Y5pS.cjs +0 -2
- package/dist/ca-CKpd72XI.js +0 -219
- package/dist/channel-BGx_PGej.cjs +0 -2
- package/dist/channel-Dx_x_I-e.js +0 -8
- package/dist/chunk-4BX2VUAB-DE7Tf1KJ.js +0 -18
- package/dist/chunk-4BX2VUAB-hg2h7y7T.cjs +0 -2
- package/dist/chunk-55IACEB6-5VDRE5b9.js +0 -14
- package/dist/chunk-55IACEB6-DQzh2BFT.cjs +0 -2
- package/dist/chunk-B4BG7PRW-BONACuKe.cjs +0 -2
- package/dist/chunk-B4BG7PRW-ClXZOBBj.js +0 -1828
- package/dist/chunk-DI55MBZ5-CnX_pntz.cjs +0 -2
- package/dist/chunk-DI55MBZ5-Cw4AXuM5.js +0 -1928
- package/dist/chunk-FMBD7UC4-vGLXIanH.cjs +0 -2
- package/dist/chunk-QN33PNHL-Bi6cNSdZ.cjs +0 -2
- package/dist/chunk-QN33PNHL-NyikcZce.js +0 -26
- package/dist/chunk-QZHKN3VN-Cj-nkoY3.cjs +0 -2
- package/dist/chunk-QZHKN3VN-DRpbGzBX.js +0 -18
- package/dist/chunk-TZMSLE5B-Dbk2wKaP.cjs +0 -2
- package/dist/chunk-TZMSLE5B-DiEITu_i.js +0 -109
- package/dist/classDiagram-2ON5EDUG-CZ8qM-r0.js +0 -20
- package/dist/classDiagram-2ON5EDUG-GEqVHOl4.cjs +0 -2
- package/dist/classDiagram-v2-WZHVMYZB-CZ8qM-r0.js +0 -20
- package/dist/classDiagram-v2-WZHVMYZB-GEqVHOl4.cjs +0 -2
- package/dist/cose-bilkent-S5V4N54A-Bk5UrOC6.cjs +0 -2
- package/dist/cose-bilkent-S5V4N54A-D9POuI1b.js +0 -4934
- package/dist/cs-D-801PIR.cjs +0 -2
- package/dist/cs-DQvRPciB.js +0 -219
- package/dist/cy-BxyJCM05.js +0 -219
- package/dist/cy-aUPUcn-S.cjs +0 -2
- package/dist/cytoscape.esm-BS1owLay.js +0 -30250
- package/dist/cytoscape.esm-BxB3woZB.cjs +0 -10
- package/dist/da-B05ad5Iq.js +0 -219
- package/dist/da-CTiLOqut.cjs +0 -2
- package/dist/dagre-6UL2VRFP-BGgMwKrx.cjs +0 -2
- package/dist/dagre-6UL2VRFP-D1VXYHDk.js +0 -696
- package/dist/de-DJ5iwpd7.js +0 -219
- package/dist/de-Dm204UMA.cjs +0 -2
- package/dist/defaultLocale-7NeEK7SF.cjs +0 -2
- package/dist/defaultLocale-DVr69WTU.js +0 -207
- package/dist/diagram-PSM6KHXK-BnJ6u90U.cjs +0 -2
- package/dist/diagram-PSM6KHXK-MkySzwCw.js +0 -848
- package/dist/diagram-QEK2KX5R-7oJbO__T.js +0 -305
- package/dist/diagram-QEK2KX5R-CQjADuvs.cjs +0 -2
- package/dist/diagram-S2PKOQOG-AFF7RL6D.cjs +0 -2
- package/dist/diagram-S2PKOQOG-t6d3dY_R.js +0 -212
- package/dist/el-CBS9mHS3.js +0 -219
- package/dist/el-DbtZj-ph.cjs +0 -2
- package/dist/erDiagram-Q2GNP2WA-BY5cfs21.js +0 -1160
- package/dist/erDiagram-Q2GNP2WA-CsdjPSsg.cjs +0 -2
- package/dist/es-Bo08apQr.js +0 -219
- package/dist/es-Cc-4Vqf7.cjs +0 -2
- package/dist/et-D5pQ66eY.cjs +0 -2
- package/dist/et-pRL0Tmle.js +0 -219
- package/dist/eu-Br68gaf7.js +0 -219
- package/dist/eu-RZ-27koK.cjs +0 -2
- package/dist/fi-BCXB-k_X.js +0 -219
- package/dist/fi-Dqa9mgnW.cjs +0 -2
- package/dist/flowDiagram-NV44I4VS-BcaW6-_t.cjs +0 -2
- package/dist/flowDiagram-NV44I4VS-DoSHOTLX.js +0 -2339
- package/dist/fr-B7fhkle4.cjs +0 -2
- package/dist/fr-gKE1SSIF.js +0 -219
- package/dist/ga-4Hf7vKvr.cjs +0 -2
- package/dist/ga-C1SpITZy.js +0 -219
- package/dist/ganttDiagram-JELNMOA3-C8aHKsjy.js +0 -3652
- package/dist/ganttDiagram-JELNMOA3-YuzFUWYN.cjs +0 -2
- package/dist/gitGraph-G5XIXVHT-DN5M1zzB.cjs +0 -2
- package/dist/gitGraph-G5XIXVHT-kJP_icZ5.js +0 -6
- package/dist/gitGraphDiagram-V2S2FVAM-Bl2LJ6uK.js +0 -1215
- package/dist/gitGraphDiagram-V2S2FVAM-DI5S_ure.cjs +0 -2
- package/dist/gl-COSpsMSK.cjs +0 -2
- package/dist/gl-CSzCeu2L.js +0 -219
- package/dist/graph-C7xixGrW.cjs +0 -2
- package/dist/graph-DH3cnEko.js +0 -421
- package/dist/he-BrkfqoIm.js +0 -219
- package/dist/he-C7Wi6-EL.cjs +0 -2
- package/dist/hi-C1RGDPzn.js +0 -219
- package/dist/hi-ojklJj-a.cjs +0 -2
- package/dist/hr-CsO_h2VT.js +0 -219
- package/dist/hr-DkEwOCGU.cjs +0 -2
- package/dist/hu-CVtbM-V2.js +0 -219
- package/dist/hu-D8uAAzvN.cjs +0 -2
- package/dist/id-18yPGK2f.cjs +0 -2
- package/dist/id-CARSN0W8.js +0 -219
- package/dist/index-BMfuEpa-.cjs +0 -428
- package/dist/index-BiWHWaTZ.js +0 -55588
- package/dist/info-VBDWY6EO-0yZ4VJNq.cjs +0 -2
- package/dist/info-VBDWY6EO-CcLNynBA.js +0 -6
- package/dist/infoDiagram-HS3SLOUP-Bp0yOoLT.js +0 -32
- package/dist/infoDiagram-HS3SLOUP-C0Zno052.cjs +0 -2
- package/dist/init-DZ96s0AS.cjs +0 -2
- package/dist/init-ZxktEp_H.js +0 -17
- package/dist/it-BVq911RW.cjs +0 -2
- package/dist/it-ClWGK7XT.js +0 -219
- package/dist/ja-BgcKuKZ4.cjs +0 -2
- package/dist/ja-DGL12HwE.js +0 -219
- package/dist/journeyDiagram-XKPGCS4Q-0OiMrl1O.cjs +0 -2
- package/dist/journeyDiagram-XKPGCS4Q-Ci2gigtu.js +0 -1255
- package/dist/kanban-definition-3W4ZIXB7-DTLYV2yk.js +0 -1049
- package/dist/kanban-definition-3W4ZIXB7-DbJAXyvr.cjs +0 -2
- package/dist/katex-DPu4QpBP.cjs +0 -2
- package/dist/katex-Dd1-wdX2.js +0 -14523
- package/dist/kk-CkKXbKso.js +0 -219
- package/dist/kk-Dn3FBkOR.cjs +0 -2
- package/dist/ko-CKAbV25b.cjs +0 -2
- package/dist/ko-QYvDV2aw.js +0 -219
- package/dist/layout-D6yO7DzL.cjs +0 -2
- package/dist/layout-bxkZz7Cm.js +0 -1919
- package/dist/linear-CmvLp6xX.js +0 -341
- package/dist/linear-d_werDwb.cjs +0 -2
- package/dist/lt-BKnFyiLV.js +0 -219
- package/dist/lt-BnGNEsIS.cjs +0 -2
- package/dist/lv-Clqo0Ogm.js +0 -219
- package/dist/lv-D3rJQRhc.cjs +0 -2
- package/dist/maplibre-gl-B3PlRf6V.js +0 -23511
- package/dist/maplibre-gl-Cc1i9T04.cjs +0 -6
- package/dist/mermaid-parser.core-CNPkkUbW.cjs +0 -2
- package/dist/mermaid-parser.core-CnjbJ8mb.js +0 -23791
- package/dist/mindmap-definition-VGOIOE7T-D4S37eSG.cjs +0 -2
- package/dist/mindmap-definition-VGOIOE7T-z7i6md6S.js +0 -1129
- package/dist/mk-EhcD0RzW.js +0 -219
- package/dist/mk-hVxJgrE0.cjs +0 -2
- package/dist/ms-CJACwjo7.js +0 -219
- package/dist/ms-D0txYckK.cjs +0 -2
- package/dist/nb-BfKRl99z.cjs +0 -2
- package/dist/nb-NCgnP0Pu.js +0 -219
- package/dist/nl-EgsNCunP.js +0 -219
- package/dist/nl-ZXiLkBj_.cjs +0 -2
- package/dist/ordinal-BZdahNih.cjs +0 -2
- package/dist/ordinal-DSZU4PqD.js +0 -77
- package/dist/packet-DYOGHKS2-8TxNXRiu.js +0 -6
- package/dist/packet-DYOGHKS2-T2_NOyn2.cjs +0 -2
- package/dist/pie-VRWISCQL-CVgwt5hn.cjs +0 -2
- package/dist/pie-VRWISCQL-Cw5ps4Uc.js +0 -6
- package/dist/pieDiagram-ADFJNKIX-9tCdDAIz.cjs +0 -2
- package/dist/pieDiagram-ADFJNKIX-BLMaZqln.js +0 -238
- package/dist/pl-H28GVtiG.js +0 -219
- package/dist/pl-tVjdYTB9.cjs +0 -2
- package/dist/pt-1k62N9F3.cjs +0 -2
- package/dist/pt-BSPZhWKl.js +0 -211
- package/dist/quadrantDiagram-AYHSOK5B-B_5PU35F.cjs +0 -2
- package/dist/quadrantDiagram-AYHSOK5B-Njb3KunW.js +0 -1338
- package/dist/radar-ZZBFDIW7-B5WKe_gp.js +0 -6
- package/dist/radar-ZZBFDIW7-DGwkdfQQ.cjs +0 -2
- package/dist/requirementDiagram-UZGBJVZJ-BOgHmi8B.cjs +0 -2
- package/dist/requirementDiagram-UZGBJVZJ-wkSzPa52.js +0 -1164
- package/dist/ro-9Qt1qDDA.cjs +0 -2
- package/dist/ro-BpaZLre_.js +0 -219
- package/dist/ru-4WxRouIU.cjs +0 -2
- package/dist/ru-CUZzD-Tx.js +0 -219
- package/dist/sankeyDiagram-TZEHDZUN-p1th2H-P.js +0 -1194
- package/dist/sankeyDiagram-TZEHDZUN-wNi-DuI_.cjs +0 -2
- package/dist/sequenceDiagram-WL72ISMW-CZsA3nl_.js +0 -3882
- package/dist/sequenceDiagram-WL72ISMW-DHsfFVVL.cjs +0 -2
- package/dist/sk-CoQ6XiCY.js +0 -219
- package/dist/sk-uWukDQab.cjs +0 -2
- package/dist/sl-B6DVbKg6.cjs +0 -2
- package/dist/sl-CHW-ZGol.js +0 -219
- package/dist/sr-BOD8Tc-D.cjs +0 -2
- package/dist/sr-EQGjIBJE.js +0 -219
- package/dist/stateDiagram-FKZM4ZOC-CZDqf83I.js +0 -449
- package/dist/stateDiagram-FKZM4ZOC-uCSdqeo_.cjs +0 -2
- package/dist/stateDiagram-v2-4FDKWEC3-Ard7BOGd.js +0 -20
- package/dist/stateDiagram-v2-4FDKWEC3-LQ3nCDHa.cjs +0 -2
- package/dist/sv-B6nLuQr7.cjs +0 -2
- package/dist/sv-DTxWN6ED.js +0 -219
- package/dist/th-BVPzHvBf.js +0 -219
- package/dist/th-DmULV6uT.cjs +0 -2
- package/dist/timeline-definition-IT6M3QCI-5Kl_f6ac.cjs +0 -2
- package/dist/timeline-definition-IT6M3QCI-DOIExRzF.js +0 -1227
- package/dist/tr-BE5geTUC.cjs +0 -2
- package/dist/tr-BHR1QA-D.js +0 -219
- package/dist/treemap-GDKQZRPO-BsGYh-La.cjs +0 -2
- package/dist/treemap-GDKQZRPO-DQPba0Eh.js +0 -6
- package/dist/uk-Bc5TwelE.js +0 -219
- package/dist/uk-DS5ukB_-.cjs +0 -2
- package/dist/vi-D9FF4kkG.cjs +0 -2
- package/dist/vi-DC0eQZb7.js +0 -219
- package/dist/xychartDiagram-PRI3JC2R-DkaIeov2.cjs +0 -2
- package/dist/xychartDiagram-PRI3JC2R-DyqZd9yp.js +0 -1887
- package/dist/zh-CGcOiJ3s.cjs +0 -2
- package/dist/zh-GsCLn8OE.js +0 -219
|
@@ -1,1215 +0,0 @@
|
|
|
1
|
-
import { p as populateCommonDb } from "./chunk-4BX2VUAB-DE7Tf1KJ.js";
|
|
2
|
-
import { I as ImperativeState } from "./chunk-QZHKN3VN-DRpbGzBX.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-BiWHWaTZ.js";
|
|
4
|
-
import { p as parse } from "./mermaid-parser.core-CnjbJ8mb.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-Bl2LJ6uK.js.map
|