github-issue-tower-defence-management 1.160.0 → 1.161.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-DT98Xk6Y.js → index-CbEryCNT.js} +5 -5
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-BbUBeonj.css → index-U8I8ESZj.css} +1 -1
- package/bin/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/bin/domain/entities/WorkflowStatus.js +5 -1
- package/bin/domain/entities/WorkflowStatus.js.map +1 -1
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js +3 -2
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMermaidDiagram.test.tsx +37 -1
- package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMermaidDiagram.tsx +20 -1
- package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMermaidDiagramModalScreen.stories.tsx +27 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMermaidDiagramModalScreen.test.tsx +85 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMermaidDiagramModalScreen.tsx +97 -0
- package/src/adapter/entry-points/console/ui/src/features/console/lib/mermaidZoom.test.ts +88 -0
- package/src/adapter/entry-points/console/ui/src/features/console/lib/mermaidZoom.ts +34 -0
- package/src/adapter/entry-points/console/ui/src/index.css +65 -0
- package/src/adapter/entry-points/console/ui-dist/assets/{index-DT98Xk6Y.js → index-CbEryCNT.js} +5 -5
- package/src/adapter/entry-points/console/ui-dist/assets/{index-BbUBeonj.css → index-U8I8ESZj.css} +1 -1
- package/src/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/src/domain/entities/WorkflowStatus.ts +5 -0
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.test.ts +31 -0
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.ts +8 -2
- package/types/domain/entities/WorkflowStatus.d.ts +1 -0
- package/types/domain/entities/WorkflowStatus.d.ts.map +1 -1
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts +1 -0
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts.map +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const MERMAID_ZOOM_MIN_SCALE = 1;
|
|
2
|
+
export const MERMAID_ZOOM_MAX_SCALE = 6;
|
|
3
|
+
export const MERMAID_ZOOM_SCALE_STEP = 0.5;
|
|
4
|
+
|
|
5
|
+
export const clampMermaidZoomScale = (scale: number): number => {
|
|
6
|
+
if (Number.isNaN(scale)) {
|
|
7
|
+
return MERMAID_ZOOM_MIN_SCALE;
|
|
8
|
+
}
|
|
9
|
+
if (scale < MERMAID_ZOOM_MIN_SCALE) {
|
|
10
|
+
return MERMAID_ZOOM_MIN_SCALE;
|
|
11
|
+
}
|
|
12
|
+
if (scale > MERMAID_ZOOM_MAX_SCALE) {
|
|
13
|
+
return MERMAID_ZOOM_MAX_SCALE;
|
|
14
|
+
}
|
|
15
|
+
return scale;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const mermaidZoomScaleIn = (scale: number): number =>
|
|
19
|
+
clampMermaidZoomScale(clampMermaidZoomScale(scale) + MERMAID_ZOOM_SCALE_STEP);
|
|
20
|
+
|
|
21
|
+
export const mermaidZoomScaleOut = (scale: number): number =>
|
|
22
|
+
clampMermaidZoomScale(clampMermaidZoomScale(scale) - MERMAID_ZOOM_SCALE_STEP);
|
|
23
|
+
|
|
24
|
+
export const isMermaidZoomScaleAtMinimum = (scale: number): boolean =>
|
|
25
|
+
clampMermaidZoomScale(scale) <= MERMAID_ZOOM_MIN_SCALE;
|
|
26
|
+
|
|
27
|
+
export const isMermaidZoomScaleAtMaximum = (scale: number): boolean =>
|
|
28
|
+
clampMermaidZoomScale(scale) >= MERMAID_ZOOM_MAX_SCALE;
|
|
29
|
+
|
|
30
|
+
export const formatMermaidZoomScale = (scale: number): string =>
|
|
31
|
+
`${Math.round(clampMermaidZoomScale(scale) * 100)}%`;
|
|
32
|
+
|
|
33
|
+
export const mermaidZoomCanvasWidth = (scale: number): string =>
|
|
34
|
+
`${clampMermaidZoomScale(scale) * 100}%`;
|
|
@@ -610,6 +610,71 @@ body {
|
|
|
610
610
|
font-size: 0.8125rem;
|
|
611
611
|
}
|
|
612
612
|
|
|
613
|
+
.console-mermaid-enlarge {
|
|
614
|
+
display: block;
|
|
615
|
+
width: 100%;
|
|
616
|
+
margin-top: 6px;
|
|
617
|
+
padding: 10px 12px;
|
|
618
|
+
background: #21262d;
|
|
619
|
+
color: #e6edf3;
|
|
620
|
+
border: 1px solid #30363d;
|
|
621
|
+
border-radius: 6px;
|
|
622
|
+
font-size: 0.8125rem;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.console-mermaid-modal {
|
|
626
|
+
position: fixed;
|
|
627
|
+
inset: 0;
|
|
628
|
+
z-index: 1000;
|
|
629
|
+
display: flex;
|
|
630
|
+
flex-direction: column;
|
|
631
|
+
background: #0d1117;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.console-mermaid-modal-bar {
|
|
635
|
+
display: flex;
|
|
636
|
+
align-items: center;
|
|
637
|
+
gap: 8px;
|
|
638
|
+
padding: 8px 12px;
|
|
639
|
+
border-bottom: 1px solid #30363d;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.console-mermaid-modal-button,
|
|
643
|
+
.console-mermaid-modal-close {
|
|
644
|
+
min-width: 44px;
|
|
645
|
+
min-height: 44px;
|
|
646
|
+
background: #21262d;
|
|
647
|
+
color: #e6edf3;
|
|
648
|
+
border: 1px solid #30363d;
|
|
649
|
+
border-radius: 6px;
|
|
650
|
+
font-size: 1.125rem;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.console-mermaid-modal-button:disabled {
|
|
654
|
+
opacity: 0.4;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.console-mermaid-modal-close {
|
|
658
|
+
margin-left: auto;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.console-mermaid-modal-scale {
|
|
662
|
+
min-width: 4.5rem;
|
|
663
|
+
text-align: center;
|
|
664
|
+
color: #8b949e;
|
|
665
|
+
font-size: 0.875rem;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.console-mermaid-modal-viewport {
|
|
669
|
+
flex: 1;
|
|
670
|
+
overflow: auto;
|
|
671
|
+
-webkit-overflow-scrolling: touch;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.console-mermaid-modal-canvas {
|
|
675
|
+
min-width: 100%;
|
|
676
|
+
}
|
|
677
|
+
|
|
613
678
|
.console-comment {
|
|
614
679
|
padding: 12px 16px;
|
|
615
680
|
margin-bottom: 10px;
|