@pb33f/cowboy-components 0.7.17 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_basePickBy-DtTwxTrV.js +151 -0
- package/dist/_baseUniq-C5Y4WFmx.js +614 -0
- package/dist/arc-a-7w7y90.js +83 -0
- package/dist/architecture-U656AL7Q-c_zxypEp.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ-CIhQJ6xS.js +4661 -0
- package/dist/assets/elk-layout.worker-B71_NI2D.js +1 -0
- package/dist/assets/equalizer.worker-A8HFNy4g.js +1 -0
- package/dist/assets/graph-dependent.worker-BgWuMZsb.js +1 -0
- package/dist/assets/rule-documentation.worker-BCKuwSgZ.js +1 -0
- package/dist/assets/search-graph.worker-Cwqb-ecv.js +1 -0
- package/dist/assets/search-problems.worker-60kZqr0h.js +1 -0
- package/dist/blockDiagram-VD42YOAC-BLl5ID-l.js +2261 -0
- package/dist/c4Diagram-YG6GDRKO-BOGfb13x.js +1580 -0
- package/dist/channel-DYeI56io.js +5 -0
- package/dist/chunk-4BX2VUAB-BeHGB7ON.js +8 -0
- package/dist/chunk-55IACEB6-DgHUzWsw.js +8 -0
- package/dist/chunk-B4BG7PRW-Vs7GiQMf.js +1375 -0
- package/dist/chunk-DI55MBZ5-CHjdGXx0.js +1370 -0
- package/dist/chunk-FMBD7UC4-D-H9-bHN.js +19 -0
- package/dist/chunk-QN33PNHL-D7uE2r1Y.js +19 -0
- package/dist/chunk-QZHKN3VN-Cp3sUp7e.js +15 -0
- package/dist/chunk-TZMSLE5B-BmXGcXo9.js +64 -0
- package/dist/classDiagram-2ON5EDUG-9ilqiDEi.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-9ilqiDEi.js +16 -0
- package/dist/clone-CybyMoa0.js +8 -0
- package/dist/components/attention-box/attention-box.css.js +8 -0
- package/dist/components/auth/login-button.js +1 -1
- package/dist/components/auth/login-panel.d.ts +4 -0
- package/dist/components/auth/login-panel.js +12 -4
- package/dist/components/auth/oauth-login.css.js +4 -0
- package/dist/components/auth/oauth-login.d.ts +2 -0
- package/dist/components/auth/oauth-login.js +12 -3
- package/dist/components/brokerable.d.ts +21 -0
- package/dist/components/brokerable.js +39 -0
- package/dist/components/bundle-toolbar/bundle-toolbar.css.js +110 -0
- package/dist/components/bundle-toolbar/bundle-toolbar.d.ts +21 -0
- package/dist/components/bundle-toolbar/bundle-toolbar.js +93 -0
- package/dist/components/changelog/changelog.css.js +2 -0
- package/dist/components/changelog/changelog.d.ts +2 -0
- package/dist/components/changelog/changelog.js +10 -1
- package/dist/components/changelog/release.css.js +5 -1
- package/dist/components/charts/beefy-chart.js +0 -2
- package/dist/components/charts/doughnut-chart.d.ts +5 -1
- package/dist/components/charts/doughnut-chart.js +20 -1
- package/dist/components/credit-ticker/credit-ticker.d.ts +3 -0
- package/dist/components/credit-ticker/credit-ticker.js +20 -4
- package/dist/components/details-drawer/details-drawer.css.d.ts +2 -0
- package/dist/components/{problem-list → details-drawer}/details-drawer.css.js +18 -3
- package/dist/components/details-drawer/generic-details-drawer.css.d.ts +1 -0
- package/dist/components/details-drawer/generic-details-drawer.css.js +219 -0
- package/dist/components/details-drawer/generic-details-drawer.d.ts +38 -0
- package/dist/components/details-drawer/generic-details-drawer.js +245 -0
- package/dist/components/details-drawer/handlers/diagram-handler.d.ts +35 -0
- package/dist/components/details-drawer/handlers/diagram-handler.js +248 -0
- package/dist/components/details-drawer/handlers/documentation-handler.d.ts +11 -0
- package/dist/components/details-drawer/handlers/documentation-handler.js +46 -0
- package/dist/components/details-drawer/handlers/example-handler.d.ts +18 -0
- package/dist/components/details-drawer/handlers/example-handler.js +146 -0
- package/dist/components/details-drawer/handlers/howto-handler.d.ts +11 -0
- package/dist/components/details-drawer/handlers/howto-handler.js +36 -0
- package/dist/components/details-drawer/handlers/markdown-handler.d.ts +12 -0
- package/dist/components/details-drawer/handlers/markdown-handler.js +54 -0
- package/dist/components/editor/editor-breadcrumb.css.js +1 -1
- package/dist/components/editor/editor.css.js +42 -0
- package/dist/components/editor/editor.d.ts +29 -3
- package/dist/components/editor/editor.js +495 -73
- package/dist/components/github/github-workspace-view.css.d.ts +2 -0
- package/dist/components/github/github-workspace-view.css.js +165 -0
- package/dist/components/github/github-workspace-view.d.ts +59 -0
- package/dist/components/github/github-workspace-view.js +525 -0
- package/dist/components/global-task/global-task-view.css.d.ts +2 -0
- package/dist/components/global-task/global-task-view.css.js +392 -0
- package/dist/components/global-task/global-task-view.d.ts +48 -0
- package/dist/components/global-task/global-task-view.js +359 -0
- package/dist/components/header/header.css.js +9 -1
- package/dist/components/http-method/http-method.css.js +5 -1
- package/dist/components/indeterminate-loader/indeterminate-loader.css.d.ts +2 -0
- package/dist/components/indeterminate-loader/indeterminate-loader.css.js +135 -0
- package/dist/components/indeterminate-loader/indeterminate-loader.d.ts +35 -0
- package/dist/components/indeterminate-loader/indeterminate-loader.js +201 -0
- package/dist/components/kv-view/kv-view.css.js +2 -0
- package/dist/components/kv-view/kv-view.js +0 -1
- package/dist/components/logo-wall/logo-wall.css.js +9 -0
- package/dist/components/manage-ruleset/manage-ruleset.css.js +14 -1
- package/dist/components/manage-ruleset/manage-ruleset.d.ts +1 -0
- package/dist/components/manage-ruleset/manage-ruleset.js +54 -22
- package/dist/components/manage-ruleset/rule-action.css.js +2 -0
- package/dist/components/manage-ruleset/rule-action.d.ts +10 -3
- package/dist/components/manage-ruleset/rule-action.js +118 -129
- package/dist/components/manage-ruleset/rule-input.d.ts +3 -1
- package/dist/components/manage-ruleset/rule-input.js +38 -34
- package/dist/components/manage-ruleset/rule.css.js +15 -1
- package/dist/components/manage-ruleset/rule.d.ts +4 -1
- package/dist/components/manage-ruleset/rule.js +44 -17
- package/dist/components/mermaid/mermaid-renderer.css.d.ts +1 -0
- package/dist/components/mermaid/mermaid-renderer.css.js +121 -0
- package/dist/components/mermaid/mermaid-renderer.d.ts +75 -0
- package/dist/components/mermaid/mermaid-renderer.js +485 -0
- package/dist/components/model-icon/doctor-icon.d.ts +9 -0
- package/dist/components/model-icon/doctor-icon.js +60 -0
- package/dist/components/model-icon/model-icon.d.ts +2 -1
- package/dist/components/model-icon/model-icon.js +13 -1
- package/dist/components/model-renderer/change.css.js +22 -8
- package/dist/components/model-renderer/changes.d.ts +1 -0
- package/dist/components/model-renderer/changes.js +47 -32
- package/dist/components/model-renderer/clickable-ref.d.ts +9 -3
- package/dist/components/model-renderer/clickable-ref.js +49 -10
- package/dist/components/model-renderer/components.d.ts +2 -0
- package/dist/components/model-renderer/components.js +196 -116
- package/dist/components/model-renderer/contact.js +2 -2
- package/dist/components/model-renderer/description.css.js +2 -0
- package/dist/components/model-renderer/document.d.ts +1 -0
- package/dist/components/model-renderer/document.js +14 -9
- package/dist/components/model-renderer/encoding.d.ts +2 -0
- package/dist/components/model-renderer/encoding.js +16 -7
- package/dist/components/model-renderer/example.css.js +5 -1
- package/dist/components/model-renderer/example.d.ts +4 -1
- package/dist/components/model-renderer/example.js +72 -118
- package/dist/components/model-renderer/extensions.d.ts +2 -0
- package/dist/components/model-renderer/extensions.js +11 -2
- package/dist/components/model-renderer/external-docs.d.ts +2 -0
- package/dist/components/model-renderer/external-docs.js +13 -4
- package/dist/components/model-renderer/has-changes.js +3 -3
- package/dist/components/model-renderer/header.d.ts +2 -0
- package/dist/components/model-renderer/header.js +27 -14
- package/dist/components/model-renderer/info.d.ts +2 -0
- package/dist/components/model-renderer/info.js +20 -7
- package/dist/components/model-renderer/link.d.ts +2 -0
- package/dist/components/model-renderer/link.js +27 -10
- package/dist/components/model-renderer/media-type.js +2 -2
- package/dist/components/model-renderer/model-badge.d.ts +11 -0
- package/dist/components/model-renderer/model-badge.js +59 -0
- package/dist/components/model-renderer/model-shared.css.js +14 -2
- package/dist/components/model-renderer/oauth-flows.js +4 -4
- package/dist/components/model-renderer/operation.d.ts +2 -1
- package/dist/components/model-renderer/operation.js +37 -16
- package/dist/components/model-renderer/param-location.js +3 -3
- package/dist/components/model-renderer/parameter.d.ts +2 -0
- package/dist/components/model-renderer/parameter.js +28 -15
- package/dist/components/model-renderer/path-item.d.ts +3 -0
- package/dist/components/model-renderer/path-item.js +52 -80
- package/dist/components/model-renderer/paths.d.ts +2 -0
- package/dist/components/model-renderer/paths.js +10 -3
- package/dist/components/model-renderer/problem-node.js +10 -10
- package/dist/components/model-renderer/rendered-node.css.js +35 -6
- package/dist/components/model-renderer/rendered-node.d.ts +14 -4
- package/dist/components/model-renderer/rendered-node.js +121 -58
- package/dist/components/model-renderer/rendered-property.js +4 -4
- package/dist/components/model-renderer/request-body.d.ts +2 -0
- package/dist/components/model-renderer/request-body.js +16 -9
- package/dist/components/model-renderer/response.d.ts +2 -0
- package/dist/components/model-renderer/response.js +35 -17
- package/dist/components/model-renderer/schema.css.js +10 -1
- package/dist/components/model-renderer/schema.d.ts +3 -2
- package/dist/components/model-renderer/schema.js +127 -129
- package/dist/components/model-renderer/security-scheme.js +3 -3
- package/dist/components/model-renderer/server.js +18 -8
- package/dist/components/model-renderer/tag.js +1 -1
- package/dist/components/model-tree/tree.css.js +21 -10
- package/dist/components/model-tree/tree.d.ts +39 -22
- package/dist/components/model-tree/tree.js +230 -167
- package/dist/components/paginator/paginator-navigator.css.js +9 -5
- package/dist/components/paginator/paginator-navigator.js +6 -6
- package/dist/components/paginator/paginator.css.js +2 -0
- package/dist/components/paginator/paginator.js +5 -8
- package/dist/components/percent-bar/percent-bar.css.js +133 -13
- package/dist/components/percent-bar/percent-bar.d.ts +2 -0
- package/dist/components/percent-bar/percent-bar.js +28 -24
- package/dist/components/premium-gate/premium-gate.css.d.ts +1 -0
- package/dist/components/premium-gate/premium-gate.css.js +117 -0
- package/dist/components/premium-gate/premium-gate.d.ts +49 -0
- package/dist/components/premium-gate/premium-gate.js +336 -0
- package/dist/components/problem-list/problem-list.css.js +72 -1
- package/dist/components/problem-list/problem-list.d.ts +17 -9
- package/dist/components/problem-list/problem-list.js +222 -226
- package/dist/components/problem-list/problem-mainview.css.js +12 -2
- package/dist/components/problem-list/problem-mainview.d.ts +3 -0
- package/dist/components/problem-list/problem-mainview.js +37 -17
- package/dist/components/problem-list/problem-toolbar.css.js +10 -7
- package/dist/components/problems-overview/diagnostic-evaluation.css.js +11 -1
- package/dist/components/problems-overview/diagnostic-evaluation.js +6 -7
- package/dist/components/problems-overview/document-statistic.css.js +6 -0
- package/dist/components/problems-overview/document-statistic.js +1 -1
- package/dist/components/problems-overview/problem-overview-group.js +5 -5
- package/dist/components/problems-overview/problem-statistic.css.js +24 -5
- package/dist/components/problems-overview/problem-statistic.js +15 -6
- package/dist/components/problems-overview/problem-statistics.css.js +4 -4
- package/dist/components/problems-overview/problem-statistics.js +29 -25
- package/dist/components/problems-overview/problems-overview.css.js +2 -2
- package/dist/components/property-view/property-view.css.js +2 -0
- package/dist/components/render-json-path/render-json-path.css.js +11 -3
- package/dist/components/render-json-path/render-json-path.js +3 -0
- package/dist/components/render-operation-path/render-operation-path.css.js +9 -0
- package/dist/components/render-operation-path/render-operation-path.js +7 -22
- package/dist/components/rodeo/rodeo.d.ts +1 -0
- package/dist/components/rodeo/rodeo.js +5 -0
- package/dist/components/rodeo/roundup.js +2 -2
- package/dist/components/rodeo/statistic.css.js +25 -2
- package/dist/components/rodeo/statistic.js +0 -4
- package/dist/components/shader-canvas/shader-canvas.css.d.ts +2 -0
- package/dist/components/shader-canvas/shader-canvas.css.js +66 -0
- package/dist/components/shader-canvas/shader-canvas.d.ts +36 -0
- package/dist/components/shader-canvas/shader-canvas.js +363 -0
- package/dist/components/shaders/flowing-waves-shader.d.ts +2 -0
- package/dist/components/shaders/flowing-waves-shader.js +70 -0
- package/dist/components/shaders/neon-canyon-shader.d.ts +2 -0
- package/dist/components/shaders/neon-canyon-shader.js +265 -0
- package/dist/components/shaders/neon-lines-shader.d.ts +2 -0
- package/dist/components/shaders/neon-lines-shader.js +181 -0
- package/dist/components/shaders/neon-squircles-shader.d.ts +2 -0
- package/dist/components/shaders/neon-squircles-shader.js +56 -0
- package/dist/components/shaders/retro-grid-shader.d.ts +2 -0
- package/dist/components/shaders/retro-grid-shader.js +53 -0
- package/dist/components/shaders/shader-base.d.ts +9 -0
- package/dist/components/shaders/shader-base.js +11 -0
- package/dist/components/terminal/terminal-example.css.js +4 -0
- package/dist/components/terminal/terminal-example.js +2 -3
- package/dist/components/terminal-emulator/terminal-emulator.css.js +12 -2
- package/dist/components/terminal-emulator/terminal-emulator.d.ts +7 -1
- package/dist/components/terminal-emulator/terminal-emulator.js +10 -5
- package/dist/components/the-doctor/doctor-controls-panel.css.d.ts +2 -0
- package/dist/components/the-doctor/doctor-controls-panel.css.js +53 -0
- package/dist/components/the-doctor/doctor-controls-panel.d.ts +20 -0
- package/dist/components/the-doctor/doctor-controls-panel.js +78 -0
- package/dist/components/the-doctor/doctor-editor-panel.css.d.ts +2 -0
- package/dist/components/the-doctor/doctor-editor-panel.css.js +209 -0
- package/dist/components/the-doctor/doctor-editor-panel.d.ts +41 -0
- package/dist/components/the-doctor/doctor-editor-panel.js +188 -0
- package/dist/components/the-doctor/doctor-navigator-panel.css.d.ts +2 -0
- package/dist/components/the-doctor/doctor-navigator-panel.css.js +134 -0
- package/dist/components/the-doctor/doctor-navigator-panel.d.ts +35 -0
- package/dist/components/the-doctor/doctor-navigator-panel.js +117 -0
- package/dist/components/the-doctor/doctor-sidebar-panel.css.d.ts +2 -0
- package/dist/components/the-doctor/doctor-sidebar-panel.css.js +143 -0
- package/dist/components/the-doctor/doctor-sidebar-panel.d.ts +31 -0
- package/dist/components/the-doctor/doctor-sidebar-panel.js +131 -0
- package/dist/components/the-doctor/doctor-url-overlay.css.d.ts +2 -0
- package/dist/components/the-doctor/doctor-url-overlay.css.js +59 -0
- package/dist/components/the-doctor/doctor-url-overlay.d.ts +23 -0
- package/dist/components/the-doctor/doctor-url-overlay.js +82 -0
- package/dist/components/the-doctor/nuke-workspace.js +4 -3
- package/dist/components/the-doctor/settings.css.js +2 -0
- package/dist/components/the-doctor/settings.js +5 -8
- package/dist/components/the-doctor/status-bar.d.ts +2 -2
- package/dist/components/the-doctor/status-bar.js +32 -31
- package/dist/components/the-doctor/the-doctor.css.js +47 -238
- package/dist/components/the-doctor/the-doctor.d.ts +149 -37
- package/dist/components/the-doctor/the-doctor.js +958 -528
- package/dist/components/the-doctor/upload-archive.css.js +8 -2
- package/dist/components/the-doctor/upload-archive.js +2 -2
- package/dist/components/theme-switcher/theme-switcher.js +5 -1
- package/dist/components/time-vortex/change-list-item.css.js +18 -4
- package/dist/components/time-vortex/change-list-item.d.ts +1 -0
- package/dist/components/time-vortex/change-list-item.js +4 -3
- package/dist/components/time-vortex/history-picker.css.js +60 -1
- package/dist/components/time-vortex/history-picker.d.ts +7 -1
- package/dist/components/time-vortex/history-picker.js +109 -5
- package/dist/components/time-vortex/tardis-control.css.js +339 -14
- package/dist/components/time-vortex/tardis-control.d.ts +31 -3
- package/dist/components/time-vortex/tardis-control.js +296 -58
- package/dist/components/time-vortex/time-vortex.d.ts +8 -2
- package/dist/components/time-vortex/time-vortex.js +54 -13
- package/dist/components/toast/toast-component.css.js +1 -0
- package/dist/components/toast/toast-component.d.ts +1 -0
- package/dist/components/toast/toast-component.js +23 -8
- package/dist/components/toast/toast-manager.d.ts +5 -0
- package/dist/components/toast/toast-manager.js +29 -7
- package/dist/components/visualizer/edge.d.ts +11 -1
- package/dist/components/visualizer/edge.js +27 -22
- package/dist/components/visualizer/equalizer.css.js +118 -76
- package/dist/components/visualizer/equalizer.d.ts +24 -45
- package/dist/components/visualizer/equalizer.js +262 -363
- package/dist/components/visualizer/explorer.d.ts +94 -14
- package/dist/components/visualizer/explorer.js +580 -393
- package/dist/components/visualizer/foreign-object.d.ts +12 -2
- package/dist/components/visualizer/foreign-object.js +21 -10
- package/dist/components/visualizer/key.js +12 -1
- package/dist/components/visualizer/nodes/callback.d.ts +2 -1
- package/dist/components/visualizer/nodes/callback.js +2 -2
- package/dist/components/visualizer/nodes/components.d.ts +2 -1
- package/dist/components/visualizer/nodes/components.js +2 -2
- package/dist/components/visualizer/nodes/contact.d.ts +2 -1
- package/dist/components/visualizer/nodes/contact.js +2 -2
- package/dist/components/visualizer/nodes/document.d.ts +2 -1
- package/dist/components/visualizer/nodes/document.js +2 -2
- package/dist/components/visualizer/nodes/graph-node.d.ts +14 -3
- package/dist/components/visualizer/nodes/graph-node.js +94 -43
- package/dist/components/visualizer/nodes/header.d.ts +2 -1
- package/dist/components/visualizer/nodes/header.js +2 -2
- package/dist/components/visualizer/nodes/info.d.ts +2 -1
- package/dist/components/visualizer/nodes/info.js +2 -2
- package/dist/components/visualizer/nodes/license.d.ts +2 -1
- package/dist/components/visualizer/nodes/license.js +2 -2
- package/dist/components/visualizer/nodes/link.d.ts +2 -1
- package/dist/components/visualizer/nodes/link.js +2 -2
- package/dist/components/visualizer/nodes/media-type.d.ts +2 -1
- package/dist/components/visualizer/nodes/media-type.js +2 -2
- package/dist/components/visualizer/nodes/operation.d.ts +2 -1
- package/dist/components/visualizer/nodes/operation.js +3 -4
- package/dist/components/visualizer/nodes/parameter.d.ts +3 -1
- package/dist/components/visualizer/nodes/parameter.js +3 -4
- package/dist/components/visualizer/nodes/path-item.d.ts +2 -1
- package/dist/components/visualizer/nodes/path-item.js +2 -2
- package/dist/components/visualizer/nodes/request-body.d.ts +2 -1
- package/dist/components/visualizer/nodes/request-body.js +2 -2
- package/dist/components/visualizer/nodes/response.d.ts +2 -1
- package/dist/components/visualizer/nodes/response.js +2 -2
- package/dist/components/visualizer/nodes/schema.d.ts +2 -1
- package/dist/components/visualizer/nodes/schema.js +64 -9
- package/dist/components/visualizer/nodes/security-scheme.d.ts +2 -1
- package/dist/components/visualizer/nodes/security-scheme.js +2 -2
- package/dist/components/visualizer/nodes/server.d.ts +2 -1
- package/dist/components/visualizer/nodes/server.js +3 -4
- package/dist/components/visualizer/nodes/tag.d.ts +2 -1
- package/dist/components/visualizer/nodes/tag.js +4 -5
- package/dist/components/visualizer/nodes/xml.d.ts +2 -1
- package/dist/components/visualizer/nodes/xml.js +2 -2
- package/dist/components/visualizer/orientation-controls.d.ts +6 -1
- package/dist/components/visualizer/orientation-controls.js +65 -7
- package/dist/components/visualizer/search.d.ts +2 -1
- package/dist/components/visualizer/search.js +22 -29
- package/dist/components/visualizer/shared.css.js +55 -18
- package/dist/components/visualizer/templates/svg-markers.d.ts +2 -0
- package/dist/components/visualizer/templates/svg-markers.js +73 -0
- package/dist/components/waiting-line/waiting-line.css.d.ts +2 -0
- package/dist/components/waiting-line/waiting-line.css.js +26 -0
- package/dist/components/waiting-line/waiting-line.d.ts +30 -0
- package/dist/components/waiting-line/waiting-line.js +424 -0
- package/dist/components/workspaces/workspace-view.css.js +89 -8
- package/dist/components/workspaces/workspace-view.d.ts +8 -1
- package/dist/components/workspaces/workspace-view.js +77 -25
- package/dist/controllers/auth-controller.d.ts +9 -0
- package/dist/controllers/auth-controller.js +12 -5
- package/dist/controllers/broker-controller.d.ts +30 -4
- package/dist/controllers/broker-controller.js +148 -25
- package/dist/controllers/bundle-controller.d.ts +21 -0
- package/dist/controllers/bundle-controller.js +122 -0
- package/dist/controllers/countdown-controller.d.ts +17 -0
- package/dist/controllers/countdown-controller.js +59 -0
- package/dist/controllers/diagnostic-controller.d.ts +18 -5
- package/dist/controllers/diagnostic-controller.js +206 -218
- package/dist/controllers/diagramatron-controller.d.ts +33 -0
- package/dist/controllers/diagramatron-controller.js +128 -0
- package/dist/controllers/docs-controller.d.ts +11 -5
- package/dist/controllers/docs-controller.js +97 -97
- package/dist/controllers/github-controller.d.ts +47 -0
- package/dist/controllers/github-controller.js +494 -0
- package/dist/controllers/global-task-controller.d.ts +46 -0
- package/dist/controllers/global-task-controller.js +352 -0
- package/dist/controllers/model-controller.d.ts +26 -4
- package/dist/controllers/model-controller.js +98 -62
- package/dist/controllers/node-clicker-controller.d.ts +121 -4
- package/dist/controllers/node-clicker-controller.js +526 -253
- package/dist/controllers/problem-controller.d.ts +11 -4
- package/dist/controllers/problem-controller.js +98 -39
- package/dist/controllers/rolodex-controller.d.ts +8 -3
- package/dist/controllers/rolodex-controller.js +117 -83
- package/dist/controllers/rule-controller.d.ts +12 -5
- package/dist/controllers/rule-controller.js +154 -161
- package/dist/controllers/spec-controller.d.ts +16 -4
- package/dist/controllers/spec-controller.js +91 -62
- package/dist/controllers/state-controller.d.ts +4 -3
- package/dist/controllers/state-controller.js +201 -154
- package/dist/controllers/tab-cache-controller.d.ts +29 -0
- package/dist/controllers/tab-cache-controller.js +68 -0
- package/dist/controllers/timeline-controller.d.ts +18 -0
- package/dist/controllers/timeline-controller.js +129 -0
- package/dist/controllers/wallet-controller.d.ts +3 -3
- package/dist/controllers/wallet-controller.js +22 -41
- package/dist/controllers/workspace-controller.d.ts +10 -4
- package/dist/controllers/workspace-controller.js +67 -22
- package/dist/cose-bilkent-S5V4N54A-2TG-C-n3.js +2608 -0
- package/dist/cowboy-components-BcyXo9oX.js +68425 -0
- package/dist/cowboy-components.css +1 -0
- package/dist/cowboy-components.umd.cjs +14050 -6577
- package/dist/css/alerts.css.js +2 -0
- package/dist/css/badges.css.js +2 -0
- package/dist/css/button.css.js +34 -1
- package/dist/css/cowboy-components.css +34 -0
- package/dist/css/dialog.css.js +11 -2
- package/dist/css/filter.css.js +17 -5
- package/dist/css/forms.css.js +14 -0
- package/dist/css/pb33f-theme.css +87 -16
- package/dist/css/syntax.css.js +5 -0
- package/dist/css/tabs.css.js +19 -2
- package/dist/css/tooltip.css.js +4 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/dagre-6UL2VRFP-BIlmTbhO.js +444 -0
- package/dist/defaultLocale-D7EN2tov.js +171 -0
- package/dist/diagram-PSM6KHXK-CeWby24E.js +531 -0
- package/dist/diagram-QEK2KX5R-DGonyVCK.js +217 -0
- package/dist/diagram-S2PKOQOG-mGn-y1uX.js +142 -0
- package/dist/erDiagram-Q2GNP2WA-BlBBw4Mz.js +841 -0
- package/dist/events/doctor.d.ts +63 -9
- package/dist/events/doctor.js +29 -1
- package/dist/events/drawer-events.d.ts +7 -0
- package/dist/events/drawer-events.js +3 -0
- package/dist/events/theme.d.ts +4 -0
- package/dist/events/theme.js +1 -0
- package/dist/factories/explorer-component-factory.d.ts +49 -0
- package/dist/factories/explorer-component-factory.js +205 -0
- package/dist/factories/state-controller-deps.factory.d.ts +88 -0
- package/dist/factories/state-controller-deps.factory.js +116 -0
- package/dist/flowDiagram-NV44I4VS-BlLzzy1C.js +1620 -0
- package/dist/ganttDiagram-LVOFAZNH-BoQtPC8k.js +2505 -0
- package/dist/gitGraph-F6HP7TQM-CShNSlrW.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX-BdpWBgHy.js +699 -0
- package/dist/graph-D9HS4Ahd.js +247 -0
- package/dist/helpers/event-wiring.d.ts +72 -0
- package/dist/helpers/event-wiring.js +58 -0
- package/dist/helpers/file-size-formatter.d.ts +3 -0
- package/dist/helpers/file-size-formatter.js +15 -0
- package/dist/helpers/filename-colorizer.d.ts +5 -0
- package/dist/helpers/filename-colorizer.js +30 -0
- package/dist/helpers/navigation-helper.d.ts +54 -0
- package/dist/helpers/navigation-helper.js +159 -0
- package/dist/helpers/typed-events.d.ts +1 -0
- package/dist/helpers/typed-events.js +3 -0
- package/dist/info-NVLQJR56-Bpi6I8up.js +5 -0
- package/dist/infoDiagram-F6ZHWCRC-DmhhbuMJ.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/interfaces/bundle-interfaces.d.ts +7 -0
- package/dist/interfaces/bundle-interfaces.js +1 -0
- package/dist/interfaces/doctor-interfaces.d.ts +506 -0
- package/dist/interfaces/doctor-interfaces.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-CpkhK8vl.js +834 -0
- package/dist/kanban-definition-3W4ZIXB7-BFbucfYE.js +719 -0
- package/dist/katex-SsTUIUTC.js +11688 -0
- package/dist/layout-B8H1_UrM.js +1324 -0
- package/dist/linear-Bo0rJUSQ.js +259 -0
- package/dist/managers/drag-handler.d.ts +28 -0
- package/dist/managers/drag-handler.js +64 -0
- package/dist/managers/event-registration-manager.d.ts +17 -0
- package/dist/managers/event-registration-manager.js +34 -0
- package/dist/managers/expansion-manager.d.ts +58 -0
- package/dist/managers/expansion-manager.js +189 -0
- package/dist/managers/layout-filter-manager.d.ts +31 -0
- package/dist/managers/layout-filter-manager.js +109 -0
- package/dist/managers/panel-divider-manager.d.ts +33 -0
- package/dist/managers/panel-divider-manager.js +71 -0
- package/dist/managers/view-state-manager.d.ts +48 -0
- package/dist/managers/view-state-manager.js +101 -0
- package/dist/managers/viewport-manager.d.ts +53 -0
- package/dist/managers/viewport-manager.js +198 -0
- package/dist/mermaid-parser.core-BPror82d.js +12966 -0
- package/dist/mindmap-definition-VGOIOE7T-VAn-EShH.js +784 -0
- package/dist/mocks/task-mock-generator.d.ts +13 -0
- package/dist/mocks/task-mock-generator.js +200 -0
- package/dist/model/api-response.d.ts +2 -7
- package/dist/model/api-response.js +0 -2
- package/dist/model/bundle.d.ts +35 -0
- package/dist/model/bundle.js +1 -0
- package/dist/model/channels.d.ts +8 -1
- package/dist/model/channels.js +7 -0
- package/dist/model/drawer-content.d.ts +80 -0
- package/dist/model/drawer-content.js +14 -0
- package/dist/model/formable.js +22 -11
- package/dist/model/github.d.ts +125 -0
- package/dist/model/github.js +1 -0
- package/dist/model/graph.d.ts +15 -15
- package/dist/model/graph.js +24 -4
- package/dist/model/media-type.js +2 -2
- package/dist/model/node_type.d.ts +4 -0
- package/dist/model/node_type.js +4 -0
- package/dist/model/panel-state.d.ts +1 -0
- package/dist/model/rolodex.d.ts +3 -0
- package/dist/model/task.d.ts +50 -0
- package/dist/model/task.js +22 -0
- package/dist/model/timeline.d.ts +107 -1
- package/dist/model/tree-icon-config.d.ts +11 -0
- package/dist/model/tree-icon-config.js +46 -0
- package/dist/model/workspace.d.ts +2 -0
- package/dist/monacoeditorwork/css.worker.bundle.js +9 -7
- package/dist/monacoeditorwork/editor.worker.bundle.js +2 -0
- package/dist/monacoeditorwork/html.worker.bundle.js +9 -7
- package/dist/monacoeditorwork/json.worker.bundle.js +9 -7
- package/dist/monacoeditorwork/yaml.worker..bundle.js +72 -48
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-BFZMPI3H-CXPCK9Q2.js +5 -0
- package/dist/pie-7BOR55EZ-CMcuUZ_S.js +5 -0
- package/dist/pieDiagram-ADFJNKIX-C0kdlQqn.js +161 -0
- package/dist/quadrantDiagram-AYHSOK5B-CRVq6wY3.js +1022 -0
- package/dist/radar-NHE76QYJ-CX_Gyp4h.js +5 -0
- package/dist/requirementDiagram-UZGBJVZJ-B8ZGgMKn.js +850 -0
- package/dist/sankeyDiagram-TZEHDZUN-CWAUJJue.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-nz81a4Cq.js +2511 -0
- package/dist/services/diagramatron-service.d.ts +20 -0
- package/dist/services/diagramatron-service.js +48 -0
- package/dist/services/doctor-events.d.ts +58 -0
- package/dist/services/doctor-events.js +33 -0
- package/dist/services/drawer-content-registry.d.ts +9 -0
- package/dist/services/drawer-content-registry.js +37 -0
- package/dist/services/github-service.d.ts +9 -0
- package/dist/services/github-service.js +166 -0
- package/dist/services/global-task-service.d.ts +6 -0
- package/dist/services/global-task-service.js +27 -0
- package/dist/services/header-service.d.ts +5 -3
- package/dist/services/header-service.js +13 -0
- package/dist/services/linting-service.d.ts +2 -0
- package/dist/services/linting-service.js +19 -2
- package/dist/services/mermaid-config-service.d.ts +53 -0
- package/dist/services/mermaid-config-service.js +519 -0
- package/dist/services/model-service.d.ts +12 -7
- package/dist/services/model-service.js +64 -11
- package/dist/services/rodeo-service.js +12 -12
- package/dist/services/timeline-service.d.ts +12 -2
- package/dist/services/timeline-service.js +329 -0
- package/dist/services/wallet-service.d.ts +1 -1
- package/dist/services/wallet-service.js +4 -1
- package/dist/services/workspace-service.js +16 -2
- package/dist/stateDiagram-FKZM4ZOC-3PFzJlcG.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-Bp46vM6_.js +16 -0
- package/dist/timeline-definition-IT6M3QCI-utm7jTLb.js +795 -0
- package/dist/treemap-KMMF4GRG-BvEKHn43.js +5 -0
- package/dist/utils/language-utils.d.ts +1 -0
- package/dist/utils/language-utils.js +23 -0
- package/dist/utils/lru-cache.d.ts +11 -0
- package/dist/utils/lru-cache.js +38 -0
- package/dist/utils/node-helpers.d.ts +6 -0
- package/dist/utils/node-helpers.js +62 -0
- package/dist/utils/path-utils.d.ts +5 -0
- package/dist/utils/path-utils.js +22 -0
- package/dist/workers/elk-layout.worker.d.ts +2 -0
- package/dist/workers/elk-layout.worker.js +31 -0
- package/dist/workers/equalizer.worker.d.ts +6 -1
- package/dist/workers/equalizer.worker.js +144 -195
- package/dist/workers/graph-dependent.worker.js +6 -6
- package/dist/workers/rule-documentation.worker.js +12 -48
- package/dist/workers/search-graph.worker.js +8 -23
- package/dist/xychartDiagram-PRI3JC2R-twqDKWMX.js +1340 -0
- package/package.json +17 -10
- package/dist/assets/equalizer.worker-DyLD5JTU.js +0 -1
- package/dist/assets/graph-dependent.worker-CpVhp0-T.js +0 -1
- package/dist/assets/rule-documentation.worker-B7xOWY5M.js +0 -1
- package/dist/assets/search-graph.worker-B9zqINrO.js +0 -1
- package/dist/assets/search-problems.worker-BAF8L2rX.js +0 -1
- package/dist/components/problem-list/details-drawer.d.ts +0 -34
- package/dist/components/problem-list/details-drawer.js +0 -200
- package/dist/style.css +0 -1
- /package/dist/components/{problem-list/details-drawer.css.d.ts → bundle-toolbar/bundle-toolbar.css.d.ts} +0 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import { p as Y } from "./chunk-4BX2VUAB-BeHGB7ON.js";
|
|
2
|
+
import { I as K } from "./chunk-QZHKN3VN-Cp3sUp7e.js";
|
|
3
|
+
import { _ as l, q as U, p as V, s as X, g as J, a as Q, b as Z, l as m, c as rr, d as er, u as tr, C as ar, y as sr, k as C, D as nr, E as or, F as cr, G as ir } from "./cowboy-components-BcyXo9oX.js";
|
|
4
|
+
import { p as dr } from "./mermaid-parser.core-BPror82d.js";
|
|
5
|
+
var p = {
|
|
6
|
+
NORMAL: 0,
|
|
7
|
+
REVERSE: 1,
|
|
8
|
+
HIGHLIGHT: 2,
|
|
9
|
+
MERGE: 3,
|
|
10
|
+
CHERRY_PICK: 4
|
|
11
|
+
}, hr = cr.gitGraph, I = /* @__PURE__ */ l(() => nr({
|
|
12
|
+
...hr,
|
|
13
|
+
...or().gitGraph
|
|
14
|
+
}), "getConfig"), c = new K(() => {
|
|
15
|
+
const t = I(), r = t.mainBranchName, s = t.mainBranchOrder;
|
|
16
|
+
return {
|
|
17
|
+
mainBranchName: r,
|
|
18
|
+
commits: /* @__PURE__ */ new Map(),
|
|
19
|
+
head: null,
|
|
20
|
+
branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: s }]]),
|
|
21
|
+
branches: /* @__PURE__ */ new Map([[r, null]]),
|
|
22
|
+
currBranch: r,
|
|
23
|
+
direction: "LR",
|
|
24
|
+
seq: 0,
|
|
25
|
+
options: {}
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
function A() {
|
|
29
|
+
return ir({ length: 7 });
|
|
30
|
+
}
|
|
31
|
+
l(A, "getID");
|
|
32
|
+
function F(t, r) {
|
|
33
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
34
|
+
return t.reduce((n, e) => {
|
|
35
|
+
const a = r(e);
|
|
36
|
+
return s[a] || (s[a] = !0, n.push(e)), n;
|
|
37
|
+
}, []);
|
|
38
|
+
}
|
|
39
|
+
l(F, "uniqBy");
|
|
40
|
+
var lr = /* @__PURE__ */ l(function(t) {
|
|
41
|
+
c.records.direction = t;
|
|
42
|
+
}, "setDirection"), $r = /* @__PURE__ */ l(function(t) {
|
|
43
|
+
m.debug("options str", t), t = t?.trim(), t = t || "{}";
|
|
44
|
+
try {
|
|
45
|
+
c.records.options = JSON.parse(t);
|
|
46
|
+
} catch (r) {
|
|
47
|
+
m.error("error while parsing gitGraph options", r.message);
|
|
48
|
+
}
|
|
49
|
+
}, "setOptions"), fr = /* @__PURE__ */ l(function() {
|
|
50
|
+
return c.records.options;
|
|
51
|
+
}, "getOptions"), gr = /* @__PURE__ */ l(function(t) {
|
|
52
|
+
let r = t.msg, s = t.id;
|
|
53
|
+
const n = t.type;
|
|
54
|
+
let e = t.tags;
|
|
55
|
+
m.info("commit", r, s, n, e), m.debug("Entering commit:", r, s, n, e);
|
|
56
|
+
const a = I();
|
|
57
|
+
s = C.sanitizeText(s, a), r = C.sanitizeText(r, a), e = e?.map((o) => C.sanitizeText(o, a));
|
|
58
|
+
const d = {
|
|
59
|
+
id: s || c.records.seq + "-" + A(),
|
|
60
|
+
message: r,
|
|
61
|
+
seq: c.records.seq++,
|
|
62
|
+
type: n ?? p.NORMAL,
|
|
63
|
+
tags: e ?? [],
|
|
64
|
+
parents: c.records.head == null ? [] : [c.records.head.id],
|
|
65
|
+
branch: c.records.currBranch
|
|
66
|
+
};
|
|
67
|
+
c.records.head = d, m.info("main branch", a.mainBranchName), c.records.commits.has(d.id) && m.warn(`Commit ID ${d.id} already exists`), c.records.commits.set(d.id, d), c.records.branches.set(c.records.currBranch, d.id), m.debug("in pushCommit " + d.id);
|
|
68
|
+
}, "commit"), yr = /* @__PURE__ */ l(function(t) {
|
|
69
|
+
let r = t.name;
|
|
70
|
+
const s = t.order;
|
|
71
|
+
if (r = C.sanitizeText(r, I()), c.records.branches.has(r))
|
|
72
|
+
throw new Error(
|
|
73
|
+
`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
|
|
74
|
+
);
|
|
75
|
+
c.records.branches.set(r, c.records.head != null ? c.records.head.id : null), c.records.branchConfig.set(r, { name: r, order: s }), z(r), m.debug("in createBranch");
|
|
76
|
+
}, "branch"), ur = /* @__PURE__ */ l((t) => {
|
|
77
|
+
let r = t.branch, s = t.id;
|
|
78
|
+
const n = t.type, e = t.tags, a = I();
|
|
79
|
+
r = C.sanitizeText(r, a), s && (s = C.sanitizeText(s, a));
|
|
80
|
+
const d = c.records.branches.get(c.records.currBranch), o = c.records.branches.get(r), f = d ? c.records.commits.get(d) : void 0, h = o ? c.records.commits.get(o) : void 0;
|
|
81
|
+
if (f && h && f.branch === r)
|
|
82
|
+
throw new Error(`Cannot merge branch '${r}' into itself.`);
|
|
83
|
+
if (c.records.currBranch === r) {
|
|
84
|
+
const i = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
|
|
85
|
+
throw i.hash = {
|
|
86
|
+
text: `merge ${r}`,
|
|
87
|
+
token: `merge ${r}`,
|
|
88
|
+
expected: ["branch abc"]
|
|
89
|
+
}, i;
|
|
90
|
+
}
|
|
91
|
+
if (f === void 0 || !f) {
|
|
92
|
+
const i = new Error(
|
|
93
|
+
`Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`
|
|
94
|
+
);
|
|
95
|
+
throw i.hash = {
|
|
96
|
+
text: `merge ${r}`,
|
|
97
|
+
token: `merge ${r}`,
|
|
98
|
+
expected: ["commit"]
|
|
99
|
+
}, i;
|
|
100
|
+
}
|
|
101
|
+
if (!c.records.branches.has(r)) {
|
|
102
|
+
const i = new Error(
|
|
103
|
+
'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
|
|
104
|
+
);
|
|
105
|
+
throw i.hash = {
|
|
106
|
+
text: `merge ${r}`,
|
|
107
|
+
token: `merge ${r}`,
|
|
108
|
+
expected: [`branch ${r}`]
|
|
109
|
+
}, i;
|
|
110
|
+
}
|
|
111
|
+
if (h === void 0 || !h) {
|
|
112
|
+
const i = new Error(
|
|
113
|
+
'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
|
|
114
|
+
);
|
|
115
|
+
throw i.hash = {
|
|
116
|
+
text: `merge ${r}`,
|
|
117
|
+
token: `merge ${r}`,
|
|
118
|
+
expected: ['"commit"']
|
|
119
|
+
}, i;
|
|
120
|
+
}
|
|
121
|
+
if (f === h) {
|
|
122
|
+
const i = new Error('Incorrect usage of "merge". Both branches have same head');
|
|
123
|
+
throw i.hash = {
|
|
124
|
+
text: `merge ${r}`,
|
|
125
|
+
token: `merge ${r}`,
|
|
126
|
+
expected: ["branch abc"]
|
|
127
|
+
}, i;
|
|
128
|
+
}
|
|
129
|
+
if (s && c.records.commits.has(s)) {
|
|
130
|
+
const i = new Error(
|
|
131
|
+
'Incorrect usage of "merge". Commit with id:' + s + " already exists, use different custom id"
|
|
132
|
+
);
|
|
133
|
+
throw i.hash = {
|
|
134
|
+
text: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
|
|
135
|
+
token: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
|
|
136
|
+
expected: [
|
|
137
|
+
`merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`
|
|
138
|
+
]
|
|
139
|
+
}, i;
|
|
140
|
+
}
|
|
141
|
+
const $ = o || "", g = {
|
|
142
|
+
id: s || `${c.records.seq}-${A()}`,
|
|
143
|
+
message: `merged branch ${r} into ${c.records.currBranch}`,
|
|
144
|
+
seq: c.records.seq++,
|
|
145
|
+
parents: c.records.head == null ? [] : [c.records.head.id, $],
|
|
146
|
+
branch: c.records.currBranch,
|
|
147
|
+
type: p.MERGE,
|
|
148
|
+
customType: n,
|
|
149
|
+
customId: !!s,
|
|
150
|
+
tags: e ?? []
|
|
151
|
+
};
|
|
152
|
+
c.records.head = g, c.records.commits.set(g.id, g), c.records.branches.set(c.records.currBranch, g.id), m.debug(c.records.branches), m.debug("in mergeBranch");
|
|
153
|
+
}, "merge"), xr = /* @__PURE__ */ l(function(t) {
|
|
154
|
+
let r = t.id, s = t.targetId, n = t.tags, e = t.parent;
|
|
155
|
+
m.debug("Entering cherryPick:", r, s, n);
|
|
156
|
+
const a = I();
|
|
157
|
+
if (r = C.sanitizeText(r, a), s = C.sanitizeText(s, a), n = n?.map((f) => C.sanitizeText(f, a)), e = C.sanitizeText(e, a), !r || !c.records.commits.has(r)) {
|
|
158
|
+
const f = new Error(
|
|
159
|
+
'Incorrect usage of "cherryPick". Source commit id should exist and provided'
|
|
160
|
+
);
|
|
161
|
+
throw f.hash = {
|
|
162
|
+
text: `cherryPick ${r} ${s}`,
|
|
163
|
+
token: `cherryPick ${r} ${s}`,
|
|
164
|
+
expected: ["cherry-pick abc"]
|
|
165
|
+
}, f;
|
|
166
|
+
}
|
|
167
|
+
const d = c.records.commits.get(r);
|
|
168
|
+
if (d === void 0 || !d)
|
|
169
|
+
throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
|
|
170
|
+
if (e && !(Array.isArray(d.parents) && d.parents.includes(e)))
|
|
171
|
+
throw new Error(
|
|
172
|
+
"Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
|
|
173
|
+
);
|
|
174
|
+
const o = d.branch;
|
|
175
|
+
if (d.type === p.MERGE && !e)
|
|
176
|
+
throw new Error(
|
|
177
|
+
"Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
|
|
178
|
+
);
|
|
179
|
+
if (!s || !c.records.commits.has(s)) {
|
|
180
|
+
if (o === c.records.currBranch) {
|
|
181
|
+
const g = new Error(
|
|
182
|
+
'Incorrect usage of "cherryPick". Source commit is already on current branch'
|
|
183
|
+
);
|
|
184
|
+
throw g.hash = {
|
|
185
|
+
text: `cherryPick ${r} ${s}`,
|
|
186
|
+
token: `cherryPick ${r} ${s}`,
|
|
187
|
+
expected: ["cherry-pick abc"]
|
|
188
|
+
}, g;
|
|
189
|
+
}
|
|
190
|
+
const f = c.records.branches.get(c.records.currBranch);
|
|
191
|
+
if (f === void 0 || !f) {
|
|
192
|
+
const g = new Error(
|
|
193
|
+
`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
|
|
194
|
+
);
|
|
195
|
+
throw g.hash = {
|
|
196
|
+
text: `cherryPick ${r} ${s}`,
|
|
197
|
+
token: `cherryPick ${r} ${s}`,
|
|
198
|
+
expected: ["cherry-pick abc"]
|
|
199
|
+
}, g;
|
|
200
|
+
}
|
|
201
|
+
const h = c.records.commits.get(f);
|
|
202
|
+
if (h === void 0 || !h) {
|
|
203
|
+
const g = new Error(
|
|
204
|
+
`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
|
|
205
|
+
);
|
|
206
|
+
throw g.hash = {
|
|
207
|
+
text: `cherryPick ${r} ${s}`,
|
|
208
|
+
token: `cherryPick ${r} ${s}`,
|
|
209
|
+
expected: ["cherry-pick abc"]
|
|
210
|
+
}, g;
|
|
211
|
+
}
|
|
212
|
+
const $ = {
|
|
213
|
+
id: c.records.seq + "-" + A(),
|
|
214
|
+
message: `cherry-picked ${d?.message} into ${c.records.currBranch}`,
|
|
215
|
+
seq: c.records.seq++,
|
|
216
|
+
parents: c.records.head == null ? [] : [c.records.head.id, d.id],
|
|
217
|
+
branch: c.records.currBranch,
|
|
218
|
+
type: p.CHERRY_PICK,
|
|
219
|
+
tags: n ? n.filter(Boolean) : [
|
|
220
|
+
`cherry-pick:${d.id}${d.type === p.MERGE ? `|parent:${e}` : ""}`
|
|
221
|
+
]
|
|
222
|
+
};
|
|
223
|
+
c.records.head = $, c.records.commits.set($.id, $), c.records.branches.set(c.records.currBranch, $.id), m.debug(c.records.branches), m.debug("in cherryPick");
|
|
224
|
+
}
|
|
225
|
+
}, "cherryPick"), z = /* @__PURE__ */ l(function(t) {
|
|
226
|
+
if (t = C.sanitizeText(t, I()), c.records.branches.has(t)) {
|
|
227
|
+
c.records.currBranch = t;
|
|
228
|
+
const r = c.records.branches.get(c.records.currBranch);
|
|
229
|
+
r === void 0 || !r ? c.records.head = null : c.records.head = c.records.commits.get(r) ?? null;
|
|
230
|
+
} else {
|
|
231
|
+
const r = new Error(
|
|
232
|
+
`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
|
|
233
|
+
);
|
|
234
|
+
throw r.hash = {
|
|
235
|
+
text: `checkout ${t}`,
|
|
236
|
+
token: `checkout ${t}`,
|
|
237
|
+
expected: [`branch ${t}`]
|
|
238
|
+
}, r;
|
|
239
|
+
}
|
|
240
|
+
}, "checkout");
|
|
241
|
+
function H(t, r, s) {
|
|
242
|
+
const n = t.indexOf(r);
|
|
243
|
+
n === -1 ? t.push(s) : t.splice(n, 1, s);
|
|
244
|
+
}
|
|
245
|
+
l(H, "upsert");
|
|
246
|
+
function P(t) {
|
|
247
|
+
const r = t.reduce((e, a) => e.seq > a.seq ? e : a, t[0]);
|
|
248
|
+
let s = "";
|
|
249
|
+
t.forEach(function(e) {
|
|
250
|
+
e === r ? s += " *" : s += " |";
|
|
251
|
+
});
|
|
252
|
+
const n = [s, r.id, r.seq];
|
|
253
|
+
for (const e in c.records.branches)
|
|
254
|
+
c.records.branches.get(e) === r.id && n.push(e);
|
|
255
|
+
if (m.debug(n.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
|
|
256
|
+
const e = c.records.commits.get(r.parents[0]);
|
|
257
|
+
H(t, r, e), r.parents[1] && t.push(c.records.commits.get(r.parents[1]));
|
|
258
|
+
} else {
|
|
259
|
+
if (r.parents.length == 0)
|
|
260
|
+
return;
|
|
261
|
+
if (r.parents[0]) {
|
|
262
|
+
const e = c.records.commits.get(r.parents[0]);
|
|
263
|
+
H(t, r, e);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
t = F(t, (e) => e.id), P(t);
|
|
267
|
+
}
|
|
268
|
+
l(P, "prettyPrintCommitHistory");
|
|
269
|
+
var pr = /* @__PURE__ */ l(function() {
|
|
270
|
+
m.debug(c.records.commits);
|
|
271
|
+
const t = N()[0];
|
|
272
|
+
P([t]);
|
|
273
|
+
}, "prettyPrint"), mr = /* @__PURE__ */ l(function() {
|
|
274
|
+
c.reset(), sr();
|
|
275
|
+
}, "clear"), br = /* @__PURE__ */ l(function() {
|
|
276
|
+
return [...c.records.branchConfig.values()].map((r, s) => r.order !== null && r.order !== void 0 ? r : {
|
|
277
|
+
...r,
|
|
278
|
+
order: parseFloat(`0.${s}`)
|
|
279
|
+
}).sort((r, s) => (r.order ?? 0) - (s.order ?? 0)).map(({ name: r }) => ({ name: r }));
|
|
280
|
+
}, "getBranchesAsObjArray"), wr = /* @__PURE__ */ l(function() {
|
|
281
|
+
return c.records.branches;
|
|
282
|
+
}, "getBranches"), vr = /* @__PURE__ */ l(function() {
|
|
283
|
+
return c.records.commits;
|
|
284
|
+
}, "getCommits"), N = /* @__PURE__ */ l(function() {
|
|
285
|
+
const t = [...c.records.commits.values()];
|
|
286
|
+
return t.forEach(function(r) {
|
|
287
|
+
m.debug(r.id);
|
|
288
|
+
}), t.sort((r, s) => r.seq - s.seq), t;
|
|
289
|
+
}, "getCommitsArray"), Cr = /* @__PURE__ */ l(function() {
|
|
290
|
+
return c.records.currBranch;
|
|
291
|
+
}, "getCurrentBranch"), Er = /* @__PURE__ */ l(function() {
|
|
292
|
+
return c.records.direction;
|
|
293
|
+
}, "getDirection"), Tr = /* @__PURE__ */ l(function() {
|
|
294
|
+
return c.records.head;
|
|
295
|
+
}, "getHead"), S = {
|
|
296
|
+
commitType: p,
|
|
297
|
+
getConfig: I,
|
|
298
|
+
setDirection: lr,
|
|
299
|
+
setOptions: $r,
|
|
300
|
+
getOptions: fr,
|
|
301
|
+
commit: gr,
|
|
302
|
+
branch: yr,
|
|
303
|
+
merge: ur,
|
|
304
|
+
cherryPick: xr,
|
|
305
|
+
checkout: z,
|
|
306
|
+
//reset,
|
|
307
|
+
prettyPrint: pr,
|
|
308
|
+
clear: mr,
|
|
309
|
+
getBranchesAsObjArray: br,
|
|
310
|
+
getBranches: wr,
|
|
311
|
+
getCommits: vr,
|
|
312
|
+
getCommitsArray: N,
|
|
313
|
+
getCurrentBranch: Cr,
|
|
314
|
+
getDirection: Er,
|
|
315
|
+
getHead: Tr,
|
|
316
|
+
setAccTitle: Z,
|
|
317
|
+
getAccTitle: Q,
|
|
318
|
+
getAccDescription: J,
|
|
319
|
+
setAccDescription: X,
|
|
320
|
+
setDiagramTitle: V,
|
|
321
|
+
getDiagramTitle: U
|
|
322
|
+
}, Br = /* @__PURE__ */ l((t, r) => {
|
|
323
|
+
Y(t, r), t.dir && r.setDirection(t.dir);
|
|
324
|
+
for (const s of t.statements)
|
|
325
|
+
Lr(s, r);
|
|
326
|
+
}, "populate"), Lr = /* @__PURE__ */ l((t, r) => {
|
|
327
|
+
const n = {
|
|
328
|
+
Commit: /* @__PURE__ */ l((e) => r.commit(kr(e)), "Commit"),
|
|
329
|
+
Branch: /* @__PURE__ */ l((e) => r.branch(Mr(e)), "Branch"),
|
|
330
|
+
Merge: /* @__PURE__ */ l((e) => r.merge(Ir(e)), "Merge"),
|
|
331
|
+
Checkout: /* @__PURE__ */ l((e) => r.checkout(Rr(e)), "Checkout"),
|
|
332
|
+
CherryPicking: /* @__PURE__ */ l((e) => r.cherryPick(Gr(e)), "CherryPicking")
|
|
333
|
+
}[t.$type];
|
|
334
|
+
n ? n(t) : m.error(`Unknown statement type: ${t.$type}`);
|
|
335
|
+
}, "parseStatement"), kr = /* @__PURE__ */ l((t) => ({
|
|
336
|
+
id: t.id,
|
|
337
|
+
msg: t.message ?? "",
|
|
338
|
+
type: t.type !== void 0 ? p[t.type] : p.NORMAL,
|
|
339
|
+
tags: t.tags ?? void 0
|
|
340
|
+
}), "parseCommit"), Mr = /* @__PURE__ */ l((t) => ({
|
|
341
|
+
name: t.name,
|
|
342
|
+
order: t.order ?? 0
|
|
343
|
+
}), "parseBranch"), Ir = /* @__PURE__ */ l((t) => ({
|
|
344
|
+
branch: t.branch,
|
|
345
|
+
id: t.id ?? "",
|
|
346
|
+
type: t.type !== void 0 ? p[t.type] : void 0,
|
|
347
|
+
tags: t.tags ?? void 0
|
|
348
|
+
}), "parseMerge"), Rr = /* @__PURE__ */ l((t) => t.branch, "parseCheckout"), Gr = /* @__PURE__ */ l((t) => ({
|
|
349
|
+
id: t.id,
|
|
350
|
+
targetId: "",
|
|
351
|
+
tags: t.tags?.length === 0 ? void 0 : t.tags,
|
|
352
|
+
parent: t.parent
|
|
353
|
+
}), "parseCherryPicking"), Or = {
|
|
354
|
+
parse: /* @__PURE__ */ l(async (t) => {
|
|
355
|
+
const r = await dr("gitGraph", t);
|
|
356
|
+
m.debug(r), Br(r, S);
|
|
357
|
+
}, "parse")
|
|
358
|
+
}, qr = rr(), v = qr?.gitGraph, L = 10, k = 40, E = 4, T = 2, M = 8, b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), O = 30, R = /* @__PURE__ */ new Map(), q = [], B = 0, u = "LR", Ar = /* @__PURE__ */ l(() => {
|
|
359
|
+
b.clear(), w.clear(), R.clear(), B = 0, q = [], u = "LR";
|
|
360
|
+
}, "clear"), W = /* @__PURE__ */ l((t) => {
|
|
361
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
362
|
+
return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((n) => {
|
|
363
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
364
|
+
e.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), e.setAttribute("dy", "1em"), e.setAttribute("x", "0"), e.setAttribute("class", "row"), e.textContent = n.trim(), r.appendChild(e);
|
|
365
|
+
}), r;
|
|
366
|
+
}, "drawText"), j = /* @__PURE__ */ l((t) => {
|
|
367
|
+
let r, s, n;
|
|
368
|
+
return u === "BT" ? (s = /* @__PURE__ */ l((e, a) => e <= a, "comparisonFunc"), n = 1 / 0) : (s = /* @__PURE__ */ l((e, a) => e >= a, "comparisonFunc"), n = 0), t.forEach((e) => {
|
|
369
|
+
const a = u === "TB" || u == "BT" ? w.get(e)?.y : w.get(e)?.x;
|
|
370
|
+
a !== void 0 && s(a, n) && (r = e, n = a);
|
|
371
|
+
}), r;
|
|
372
|
+
}, "findClosestParent"), _r = /* @__PURE__ */ l((t) => {
|
|
373
|
+
let r = "", s = 1 / 0;
|
|
374
|
+
return t.forEach((n) => {
|
|
375
|
+
const e = w.get(n).y;
|
|
376
|
+
e <= s && (r = n, s = e);
|
|
377
|
+
}), r || void 0;
|
|
378
|
+
}, "findClosestParentBT"), Hr = /* @__PURE__ */ l((t, r, s) => {
|
|
379
|
+
let n = s, e = s;
|
|
380
|
+
const a = [];
|
|
381
|
+
t.forEach((d) => {
|
|
382
|
+
const o = r.get(d);
|
|
383
|
+
if (!o)
|
|
384
|
+
throw new Error(`Commit not found for key ${d}`);
|
|
385
|
+
o.parents.length ? (n = Dr(o), e = Math.max(n, e)) : a.push(o), Fr(o, n);
|
|
386
|
+
}), n = e, a.forEach((d) => {
|
|
387
|
+
zr(d, n, s);
|
|
388
|
+
}), t.forEach((d) => {
|
|
389
|
+
const o = r.get(d);
|
|
390
|
+
if (o?.parents.length) {
|
|
391
|
+
const f = _r(o.parents);
|
|
392
|
+
n = w.get(f).y - k, n <= e && (e = n);
|
|
393
|
+
const h = b.get(o.branch).pos, $ = n - L;
|
|
394
|
+
w.set(o.id, { x: h, y: $ });
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
}, "setParallelBTPos"), Pr = /* @__PURE__ */ l((t) => {
|
|
398
|
+
const r = j(t.parents.filter((n) => n !== null));
|
|
399
|
+
if (!r)
|
|
400
|
+
throw new Error(`Closest parent not found for commit ${t.id}`);
|
|
401
|
+
const s = w.get(r)?.y;
|
|
402
|
+
if (s === void 0)
|
|
403
|
+
throw new Error(`Closest parent position not found for commit ${t.id}`);
|
|
404
|
+
return s;
|
|
405
|
+
}, "findClosestParentPos"), Dr = /* @__PURE__ */ l((t) => Pr(t) + k, "calculateCommitPosition"), Fr = /* @__PURE__ */ l((t, r) => {
|
|
406
|
+
const s = b.get(t.branch);
|
|
407
|
+
if (!s)
|
|
408
|
+
throw new Error(`Branch not found for commit ${t.id}`);
|
|
409
|
+
const n = s.pos, e = r + L;
|
|
410
|
+
return w.set(t.id, { x: n, y: e }), { x: n, y: e };
|
|
411
|
+
}, "setCommitPosition"), zr = /* @__PURE__ */ l((t, r, s) => {
|
|
412
|
+
const n = b.get(t.branch);
|
|
413
|
+
if (!n)
|
|
414
|
+
throw new Error(`Branch not found for commit ${t.id}`);
|
|
415
|
+
const e = r + s, a = n.pos;
|
|
416
|
+
w.set(t.id, { x: a, y: e });
|
|
417
|
+
}, "setRootPosition"), Nr = /* @__PURE__ */ l((t, r, s, n, e, a) => {
|
|
418
|
+
if (a === p.HIGHLIGHT)
|
|
419
|
+
t.append("rect").attr("x", s.x - 10).attr("y", s.y - 10).attr("width", 20).attr("height", 20).attr(
|
|
420
|
+
"class",
|
|
421
|
+
`commit ${r.id} commit-highlight${e % M} ${n}-outer`
|
|
422
|
+
), t.append("rect").attr("x", s.x - 6).attr("y", s.y - 6).attr("width", 12).attr("height", 12).attr(
|
|
423
|
+
"class",
|
|
424
|
+
`commit ${r.id} commit${e % M} ${n}-inner`
|
|
425
|
+
);
|
|
426
|
+
else if (a === p.CHERRY_PICK)
|
|
427
|
+
t.append("circle").attr("cx", s.x).attr("cy", s.y).attr("r", 10).attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x - 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x + 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x + 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x - 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`);
|
|
428
|
+
else {
|
|
429
|
+
const d = t.append("circle");
|
|
430
|
+
if (d.attr("cx", s.x), d.attr("cy", s.y), d.attr("r", r.type === p.MERGE ? 9 : 10), d.attr("class", `commit ${r.id} commit${e % M}`), a === p.MERGE) {
|
|
431
|
+
const o = t.append("circle");
|
|
432
|
+
o.attr("cx", s.x), o.attr("cy", s.y), o.attr("r", 6), o.attr(
|
|
433
|
+
"class",
|
|
434
|
+
`commit ${n} ${r.id} commit${e % M}`
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
a === p.REVERSE && t.append("path").attr(
|
|
438
|
+
"d",
|
|
439
|
+
`M ${s.x - 5},${s.y - 5}L${s.x + 5},${s.y + 5}M${s.x - 5},${s.y + 5}L${s.x + 5},${s.y - 5}`
|
|
440
|
+
).attr("class", `commit ${n} ${r.id} commit${e % M}`);
|
|
441
|
+
}
|
|
442
|
+
}, "drawCommitBullet"), Sr = /* @__PURE__ */ l((t, r, s, n) => {
|
|
443
|
+
if (r.type !== p.CHERRY_PICK && (r.customId && r.type === p.MERGE || r.type !== p.MERGE) && v?.showCommitLabel) {
|
|
444
|
+
const e = t.append("g"), a = e.insert("rect").attr("class", "commit-label-bkg"), d = e.append("text").attr("x", n).attr("y", s.y + 25).attr("class", "commit-label").text(r.id), o = d.node()?.getBBox();
|
|
445
|
+
if (o && (a.attr("x", s.posWithOffset - o.width / 2 - T).attr("y", s.y + 13.5).attr("width", o.width + 2 * T).attr("height", o.height + 2 * T), u === "TB" || u === "BT" ? (a.attr("x", s.x - (o.width + 4 * E + 5)).attr("y", s.y - 12), d.attr("x", s.x - (o.width + 4 * E)).attr("y", s.y + o.height - 12)) : d.attr("x", s.posWithOffset - o.width / 2), v.rotateCommitLabel))
|
|
446
|
+
if (u === "TB" || u === "BT")
|
|
447
|
+
d.attr(
|
|
448
|
+
"transform",
|
|
449
|
+
"rotate(-45, " + s.x + ", " + s.y + ")"
|
|
450
|
+
), a.attr(
|
|
451
|
+
"transform",
|
|
452
|
+
"rotate(-45, " + s.x + ", " + s.y + ")"
|
|
453
|
+
);
|
|
454
|
+
else {
|
|
455
|
+
const f = -7.5 - (o.width + 10) / 25 * 9.5, h = 10 + o.width / 25 * 8.5;
|
|
456
|
+
e.attr(
|
|
457
|
+
"transform",
|
|
458
|
+
"translate(" + f + ", " + h + ") rotate(-45, " + n + ", " + s.y + ")"
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}, "drawCommitLabel"), Wr = /* @__PURE__ */ l((t, r, s, n) => {
|
|
463
|
+
if (r.tags.length > 0) {
|
|
464
|
+
let e = 0, a = 0, d = 0;
|
|
465
|
+
const o = [];
|
|
466
|
+
for (const f of r.tags.reverse()) {
|
|
467
|
+
const h = t.insert("polygon"), $ = t.append("circle"), g = t.append("text").attr("y", s.y - 16 - e).attr("class", "tag-label").text(f), i = g.node()?.getBBox();
|
|
468
|
+
if (!i)
|
|
469
|
+
throw new Error("Tag bbox not found");
|
|
470
|
+
a = Math.max(a, i.width), d = Math.max(d, i.height), g.attr("x", s.posWithOffset - i.width / 2), o.push({
|
|
471
|
+
tag: g,
|
|
472
|
+
hole: $,
|
|
473
|
+
rect: h,
|
|
474
|
+
yOffset: e
|
|
475
|
+
}), e += 20;
|
|
476
|
+
}
|
|
477
|
+
for (const { tag: f, hole: h, rect: $, yOffset: g } of o) {
|
|
478
|
+
const i = d / 2, y = s.y - 19.2 - g;
|
|
479
|
+
if ($.attr("class", "tag-label-bkg").attr(
|
|
480
|
+
"points",
|
|
481
|
+
`
|
|
482
|
+
${n - a / 2 - E / 2},${y + T}
|
|
483
|
+
${n - a / 2 - E / 2},${y - T}
|
|
484
|
+
${s.posWithOffset - a / 2 - E},${y - i - T}
|
|
485
|
+
${s.posWithOffset + a / 2 + E},${y - i - T}
|
|
486
|
+
${s.posWithOffset + a / 2 + E},${y + i + T}
|
|
487
|
+
${s.posWithOffset - a / 2 - E},${y + i + T}`
|
|
488
|
+
), h.attr("cy", y).attr("cx", n - a / 2 + E / 2).attr("r", 1.5).attr("class", "tag-hole"), u === "TB" || u === "BT") {
|
|
489
|
+
const x = n + g;
|
|
490
|
+
$.attr("class", "tag-label-bkg").attr(
|
|
491
|
+
"points",
|
|
492
|
+
`
|
|
493
|
+
${s.x},${x + 2}
|
|
494
|
+
${s.x},${x - 2}
|
|
495
|
+
${s.x + L},${x - i - 2}
|
|
496
|
+
${s.x + L + a + 4},${x - i - 2}
|
|
497
|
+
${s.x + L + a + 4},${x + i + 2}
|
|
498
|
+
${s.x + L},${x + i + 2}`
|
|
499
|
+
).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), h.attr("cx", s.x + E / 2).attr("cy", x).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), f.attr("x", s.x + 5).attr("y", x + 3).attr("transform", "translate(14,14) rotate(45, " + s.x + "," + n + ")");
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}, "drawCommitTags"), jr = /* @__PURE__ */ l((t) => {
|
|
504
|
+
switch (t.customType ?? t.type) {
|
|
505
|
+
case p.NORMAL:
|
|
506
|
+
return "commit-normal";
|
|
507
|
+
case p.REVERSE:
|
|
508
|
+
return "commit-reverse";
|
|
509
|
+
case p.HIGHLIGHT:
|
|
510
|
+
return "commit-highlight";
|
|
511
|
+
case p.MERGE:
|
|
512
|
+
return "commit-merge";
|
|
513
|
+
case p.CHERRY_PICK:
|
|
514
|
+
return "commit-cherry-pick";
|
|
515
|
+
default:
|
|
516
|
+
return "commit-normal";
|
|
517
|
+
}
|
|
518
|
+
}, "getCommitClassType"), Yr = /* @__PURE__ */ l((t, r, s, n) => {
|
|
519
|
+
const e = { x: 0, y: 0 };
|
|
520
|
+
if (t.parents.length > 0) {
|
|
521
|
+
const a = j(t.parents);
|
|
522
|
+
if (a) {
|
|
523
|
+
const d = n.get(a) ?? e;
|
|
524
|
+
return r === "TB" ? d.y + k : r === "BT" ? (n.get(t.id) ?? e).y - k : d.x + k;
|
|
525
|
+
}
|
|
526
|
+
} else
|
|
527
|
+
return r === "TB" ? O : r === "BT" ? (n.get(t.id) ?? e).y - k : 0;
|
|
528
|
+
return 0;
|
|
529
|
+
}, "calculatePosition"), Kr = /* @__PURE__ */ l((t, r, s) => {
|
|
530
|
+
const n = u === "BT" && s ? r : r + L, e = u === "TB" || u === "BT" ? n : b.get(t.branch)?.pos, a = u === "TB" || u === "BT" ? b.get(t.branch)?.pos : n;
|
|
531
|
+
if (a === void 0 || e === void 0)
|
|
532
|
+
throw new Error(`Position were undefined for commit ${t.id}`);
|
|
533
|
+
return { x: a, y: e, posWithOffset: n };
|
|
534
|
+
}, "getCommitPosition"), D = /* @__PURE__ */ l((t, r, s) => {
|
|
535
|
+
if (!v)
|
|
536
|
+
throw new Error("GitGraph config not found");
|
|
537
|
+
const n = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
|
|
538
|
+
let a = u === "TB" || u === "BT" ? O : 0;
|
|
539
|
+
const d = [...r.keys()], o = v?.parallelCommits ?? !1, f = /* @__PURE__ */ l(($, g) => {
|
|
540
|
+
const i = r.get($)?.seq, y = r.get(g)?.seq;
|
|
541
|
+
return i !== void 0 && y !== void 0 ? i - y : 0;
|
|
542
|
+
}, "sortKeys");
|
|
543
|
+
let h = d.sort(f);
|
|
544
|
+
u === "BT" && (o && Hr(h, r, a), h = h.reverse()), h.forEach(($) => {
|
|
545
|
+
const g = r.get($);
|
|
546
|
+
if (!g)
|
|
547
|
+
throw new Error(`Commit not found for key ${$}`);
|
|
548
|
+
o && (a = Yr(g, u, a, w));
|
|
549
|
+
const i = Kr(g, a, o);
|
|
550
|
+
if (s) {
|
|
551
|
+
const y = jr(g), x = g.customType ?? g.type, _ = b.get(g.branch)?.index ?? 0;
|
|
552
|
+
Nr(n, g, i, y, _, x), Sr(e, g, i, a), Wr(e, g, i, a);
|
|
553
|
+
}
|
|
554
|
+
u === "TB" || u === "BT" ? w.set(g.id, { x: i.x, y: i.posWithOffset }) : w.set(g.id, { x: i.posWithOffset, y: i.y }), a = u === "BT" && o ? a + k : a + k + L, a > B && (B = a);
|
|
555
|
+
});
|
|
556
|
+
}, "drawCommits"), Ur = /* @__PURE__ */ l((t, r, s, n, e) => {
|
|
557
|
+
const d = (u === "TB" || u === "BT" ? s.x < n.x : s.y < n.y) ? r.branch : t.branch, o = /* @__PURE__ */ l((h) => h.branch === d, "isOnBranchToGetCurve"), f = /* @__PURE__ */ l((h) => h.seq > t.seq && h.seq < r.seq, "isBetweenCommits");
|
|
558
|
+
return [...e.values()].some((h) => f(h) && o(h));
|
|
559
|
+
}, "shouldRerouteArrow"), G = /* @__PURE__ */ l((t, r, s = 0) => {
|
|
560
|
+
const n = t + Math.abs(t - r) / 2;
|
|
561
|
+
if (s > 5)
|
|
562
|
+
return n;
|
|
563
|
+
if (q.every((d) => Math.abs(d - n) >= 10))
|
|
564
|
+
return q.push(n), n;
|
|
565
|
+
const a = Math.abs(t - r);
|
|
566
|
+
return G(t, r - a / 5, s + 1);
|
|
567
|
+
}, "findLane"), Vr = /* @__PURE__ */ l((t, r, s, n) => {
|
|
568
|
+
const e = w.get(r.id), a = w.get(s.id);
|
|
569
|
+
if (e === void 0 || a === void 0)
|
|
570
|
+
throw new Error(`Commit positions not found for commits ${r.id} and ${s.id}`);
|
|
571
|
+
const d = Ur(r, s, e, a, n);
|
|
572
|
+
let o = "", f = "", h = 0, $ = 0, g = b.get(s.branch)?.index;
|
|
573
|
+
s.type === p.MERGE && r.id !== s.parents[0] && (g = b.get(r.branch)?.index);
|
|
574
|
+
let i;
|
|
575
|
+
if (d) {
|
|
576
|
+
o = "A 10 10, 0, 0, 0,", f = "A 10 10, 0, 0, 1,", h = 10, $ = 10;
|
|
577
|
+
const y = e.y < a.y ? G(e.y, a.y) : G(a.y, e.y), x = e.x < a.x ? G(e.x, a.x) : G(a.x, e.x);
|
|
578
|
+
u === "TB" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${x - h} ${e.y} ${f} ${x} ${e.y + $} L ${x} ${a.y - h} ${o} ${x + $} ${a.y} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${x + h} ${e.y} ${o} ${x} ${e.y + $} L ${x} ${a.y - h} ${f} ${x - $} ${a.y} L ${a.x} ${a.y}`) : u === "BT" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${x - h} ${e.y} ${o} ${x} ${e.y - $} L ${x} ${a.y + h} ${f} ${x + $} ${a.y} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${x + h} ${e.y} ${f} ${x} ${e.y - $} L ${x} ${a.y + h} ${o} ${x - $} ${a.y} L ${a.x} ${a.y}`) : e.y < a.y ? i = `M ${e.x} ${e.y} L ${e.x} ${y - h} ${o} ${e.x + $} ${y} L ${a.x - h} ${y} ${f} ${a.x} ${y + $} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${e.x} ${y + h} ${f} ${e.x + $} ${y} L ${a.x - h} ${y} ${o} ${a.x} ${y - $} L ${a.x} ${a.y}`);
|
|
579
|
+
} else
|
|
580
|
+
o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, u === "TB" ? (e.x < a.x && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${f} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x + h} ${e.y} ${o} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : u === "BT" ? (e.x < a.x && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${o} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : (e.y < a.y && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y > a.y && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y === a.y && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`));
|
|
581
|
+
if (i === void 0)
|
|
582
|
+
throw new Error("Line definition not found");
|
|
583
|
+
t.append("path").attr("d", i).attr("class", "arrow arrow" + g % M);
|
|
584
|
+
}, "drawArrow"), Xr = /* @__PURE__ */ l((t, r) => {
|
|
585
|
+
const s = t.append("g").attr("class", "commit-arrows");
|
|
586
|
+
[...r.keys()].forEach((n) => {
|
|
587
|
+
const e = r.get(n);
|
|
588
|
+
e.parents && e.parents.length > 0 && e.parents.forEach((a) => {
|
|
589
|
+
Vr(s, r.get(a), e, r);
|
|
590
|
+
});
|
|
591
|
+
});
|
|
592
|
+
}, "drawArrows"), Jr = /* @__PURE__ */ l((t, r) => {
|
|
593
|
+
const s = t.append("g");
|
|
594
|
+
r.forEach((n, e) => {
|
|
595
|
+
const a = e % M, d = b.get(n.name)?.pos;
|
|
596
|
+
if (d === void 0)
|
|
597
|
+
throw new Error(`Position not found for branch ${n.name}`);
|
|
598
|
+
const o = s.append("line");
|
|
599
|
+
o.attr("x1", 0), o.attr("y1", d), o.attr("x2", B), o.attr("y2", d), o.attr("class", "branch branch" + a), u === "TB" ? (o.attr("y1", O), o.attr("x1", d), o.attr("y2", B), o.attr("x2", d)) : u === "BT" && (o.attr("y1", B), o.attr("x1", d), o.attr("y2", O), o.attr("x2", d)), q.push(d);
|
|
600
|
+
const f = n.name, h = W(f), $ = s.insert("rect"), i = s.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
|
|
601
|
+
i.node().appendChild(h);
|
|
602
|
+
const y = h.getBBox();
|
|
603
|
+
$.attr("class", "branchLabelBkg label" + a).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - (v?.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), i.attr(
|
|
604
|
+
"transform",
|
|
605
|
+
"translate(" + (-y.width - 14 - (v?.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (d - y.height / 2 - 1) + ")"
|
|
606
|
+
), u === "TB" ? ($.attr("x", d - y.width / 2 - 10).attr("y", 0), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", 0)")) : u === "BT" ? ($.attr("x", d - y.width / 2 - 10).attr("y", B), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", " + B + ")")) : $.attr("transform", "translate(-19, " + (d - y.height / 2) + ")");
|
|
607
|
+
});
|
|
608
|
+
}, "drawBranches"), Qr = /* @__PURE__ */ l(function(t, r, s, n, e) {
|
|
609
|
+
return b.set(t, { pos: r, index: s }), r += 50 + (e ? 40 : 0) + (u === "TB" || u === "BT" ? n.width / 2 : 0), r;
|
|
610
|
+
}, "setBranchPosition"), Zr = /* @__PURE__ */ l(function(t, r, s, n) {
|
|
611
|
+
if (Ar(), m.debug("in gitgraph renderer", t + `
|
|
612
|
+
`, "id:", r, s), !v)
|
|
613
|
+
throw new Error("GitGraph config not found");
|
|
614
|
+
const e = v.rotateCommitLabel ?? !1, a = n.db;
|
|
615
|
+
R = a.getCommits();
|
|
616
|
+
const d = a.getBranchesAsObjArray();
|
|
617
|
+
u = a.getDirection();
|
|
618
|
+
const o = er(`[id="${r}"]`);
|
|
619
|
+
let f = 0;
|
|
620
|
+
d.forEach((h, $) => {
|
|
621
|
+
const g = W(h.name), i = o.append("g"), y = i.insert("g").attr("class", "branchLabel"), x = y.insert("g").attr("class", "label branch-label");
|
|
622
|
+
x.node()?.appendChild(g);
|
|
623
|
+
const _ = g.getBBox();
|
|
624
|
+
f = Qr(h.name, f, $, _, e), x.remove(), y.remove(), i.remove();
|
|
625
|
+
}), D(o, R, !1), v.showBranches && Jr(o, d), Xr(o, R), D(o, R, !0), tr.insertTitle(
|
|
626
|
+
o,
|
|
627
|
+
"gitTitleText",
|
|
628
|
+
v.titleTopMargin ?? 0,
|
|
629
|
+
a.getDiagramTitle()
|
|
630
|
+
), ar(
|
|
631
|
+
void 0,
|
|
632
|
+
o,
|
|
633
|
+
v.diagramPadding,
|
|
634
|
+
v.useMaxWidth
|
|
635
|
+
);
|
|
636
|
+
}, "draw"), re = {
|
|
637
|
+
draw: Zr
|
|
638
|
+
}, ee = /* @__PURE__ */ l((t) => `
|
|
639
|
+
.commit-id,
|
|
640
|
+
.commit-msg,
|
|
641
|
+
.branch-label {
|
|
642
|
+
fill: lightgrey;
|
|
643
|
+
color: lightgrey;
|
|
644
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
645
|
+
font-family: var(--mermaid-font-family);
|
|
646
|
+
}
|
|
647
|
+
${[0, 1, 2, 3, 4, 5, 6, 7].map(
|
|
648
|
+
(r) => `
|
|
649
|
+
.branch-label${r} { fill: ${t["gitBranchLabel" + r]}; }
|
|
650
|
+
.commit${r} { stroke: ${t["git" + r]}; fill: ${t["git" + r]}; }
|
|
651
|
+
.commit-highlight${r} { stroke: ${t["gitInv" + r]}; fill: ${t["gitInv" + r]}; }
|
|
652
|
+
.label${r} { fill: ${t["git" + r]}; }
|
|
653
|
+
.arrow${r} { stroke: ${t["git" + r]}; }
|
|
654
|
+
`
|
|
655
|
+
).join(`
|
|
656
|
+
`)}
|
|
657
|
+
|
|
658
|
+
.branch {
|
|
659
|
+
stroke-width: 1;
|
|
660
|
+
stroke: ${t.lineColor};
|
|
661
|
+
stroke-dasharray: 2;
|
|
662
|
+
}
|
|
663
|
+
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
|
664
|
+
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
|
665
|
+
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
|
666
|
+
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
|
667
|
+
.tag-hole { fill: ${t.textColor}; }
|
|
668
|
+
|
|
669
|
+
.commit-merge {
|
|
670
|
+
stroke: ${t.primaryColor};
|
|
671
|
+
fill: ${t.primaryColor};
|
|
672
|
+
}
|
|
673
|
+
.commit-reverse {
|
|
674
|
+
stroke: ${t.primaryColor};
|
|
675
|
+
fill: ${t.primaryColor};
|
|
676
|
+
stroke-width: 3;
|
|
677
|
+
}
|
|
678
|
+
.commit-highlight-outer {
|
|
679
|
+
}
|
|
680
|
+
.commit-highlight-inner {
|
|
681
|
+
stroke: ${t.primaryColor};
|
|
682
|
+
fill: ${t.primaryColor};
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
686
|
+
.gitTitleText {
|
|
687
|
+
text-anchor: middle;
|
|
688
|
+
font-size: 18px;
|
|
689
|
+
fill: ${t.textColor};
|
|
690
|
+
}
|
|
691
|
+
`, "getStyles"), te = ee, ce = {
|
|
692
|
+
parser: Or,
|
|
693
|
+
db: S,
|
|
694
|
+
renderer: re,
|
|
695
|
+
styles: te
|
|
696
|
+
};
|
|
697
|
+
export {
|
|
698
|
+
ce as diagram
|
|
699
|
+
};
|