@alphacifer/slidev-addon-theme 0.0.10 → 0.0.12
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/README.md +134 -76
- package/components/card/chevron-card/ChevronCard.vue +44 -32
- package/components/card/chevron-card/ChevronCardBadge.vue +14 -8
- package/components/card/chevron-card/ChevronCardContent.vue +15 -13
- package/components/card/chevron-card/style.css +12 -0
- package/components/card/{horiz-card/HorizCard.vue → horizontal-card/HorizontalCard.vue} +78 -85
- package/components/card/{horiz-card/HorizCardBadge.vue → horizontal-card/HorizontalCardBadge.vue} +15 -10
- package/components/card/{horiz-card/HorizCardContent.vue → horizontal-card/HorizontalCardContent.vue} +11 -11
- package/components/card/{horiz-card/HorizCardIcon.vue → horizontal-card/HorizontalCardIcon.vue} +24 -38
- package/components/card/horizontal-card/style.css +17 -0
- package/components/card/{vert-card/VertCard.vue → vertical-card/VerticalCard.vue} +80 -103
- package/components/card/{vert-card/VertCardBadge.vue → vertical-card/VerticalCardBadge.vue} +15 -10
- package/components/card/{vert-card/VertCardContent.vue → vertical-card/VerticalCardContent.vue} +13 -12
- package/components/card/{vert-card/VertCardIcon.vue → vertical-card/VerticalCardIcon.vue} +15 -33
- package/components/card/vertical-card/style.css +19 -0
- package/components/comparisons/arc-comparison/ArcComparison.vue +376 -80
- package/components/comparisons/arc-comparison/ArcComparisonBadge.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonContent.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonHeading.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonLeft.vue +39 -63
- package/components/comparisons/arc-comparison/ArcComparisonOrbit.vue +9 -8
- package/components/comparisons/arc-comparison/ArcComparisonRight.vue +39 -63
- package/components/comparisons/arc-comparison/style.css +27 -0
- package/components/comparisons/table-comparison/TableComparison.vue +8 -90
- package/components/comparisons/table-comparison/TableComparisonCell.vue +22 -20
- package/components/comparisons/table-comparison/{TableComparisonCol.vue → TableComparisonColumn.vue} +16 -14
- package/components/comparisons/table-comparison/{TableComparisonCols.vue → TableComparisonColumns.vue} +5 -8
- package/components/comparisons/table-comparison/TableComparisonRow.vue +10 -14
- package/components/comparisons/table-comparison/TableComparisonRows.vue +1 -4
- package/components/comparisons/table-comparison/style.css +15 -0
- package/components/core/Date.vue +2 -5
- package/components/core/MetaList.vue +50 -0
- package/components/core/QnA.vue +1 -1
- package/components/core/Quote.vue +3 -6
- package/components/core/ReflectedTitle.vue +2 -6
- package/components/core/Speaker.vue +6 -11
- package/components/core/TransitionHeading.vue +2 -5
- package/components/core/arc-orbit/ArcOrbit.vue +65 -84
- package/components/core/arc-orbit/ArcOrbitBadge.vue +9 -11
- package/components/core/arc-orbit/ArcOrbitCallout.vue +19 -23
- package/components/core/arc-orbit/ArcOrbitContent.vue +6 -12
- package/components/core/arc-orbit/ArcOrbitHeading.vue +13 -11
- package/components/core/arc-orbit/style.css +20 -0
- package/components/core/style.css +9 -0
- package/components/core/thanks/{ThanksContent.vue → SquareThanks.vue} +36 -31
- package/components/core/thanks/SquareThanksContent.vue +87 -0
- package/components/core/thanks/ThanksOutlineSquare.vue +2 -5
- package/components/core/thanks/ThanksSquare.vue +2 -5
- package/components/core/thanks/style.css +30 -0
- package/components/defense-in-depth/{arc-did/ArcDiD.vue → arc-defense-in-depth/ArcDefenseInDepth.vue} +167 -97
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayer.vue +240 -0
- package/components/defense-in-depth/{arc-did/ArcDiDLayerTitle.vue → arc-defense-in-depth/ArcDefenseInDepthLayerHeading.vue} +27 -29
- package/components/defense-in-depth/{arc-did/ArcDiDLayerPart.vue → arc-defense-in-depth/ArcDefenseInDepthLayerPart.vue} +91 -39
- package/components/defense-in-depth/{arc-did/ArcDiDLayerSector.vue → arc-defense-in-depth/ArcDefenseInDepthLayerSector.vue} +37 -23
- package/components/defense-in-depth/arc-defense-in-depth/style.css +38 -0
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetrad.vue → rectangle-orbit-tetrad/RectangleOrbitTetrad.vue} +66 -63
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetradCallout.vue → rectangle-orbit-tetrad/RectangleOrbitTetradCallout.vue} +58 -46
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradCenter.vue +54 -0
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradContent.vue +44 -0
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradHeading.vue +27 -0
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetradIcon.vue → rectangle-orbit-tetrad/RectangleOrbitTetradIcon.vue} +23 -13
- package/components/facets/tetrad/rectangle-orbit-tetrad/style.css +22 -0
- package/components/facets/triad/arrow-triad/ArrowTriad.vue +99 -109
- package/components/facets/triad/arrow-triad/ArrowTriadCallout.vue +31 -59
- package/components/facets/triad/arrow-triad/ArrowTriadContent.vue +18 -13
- package/components/facets/triad/arrow-triad/ArrowTriadHeading.vue +20 -13
- package/components/facets/triad/arrow-triad/ArrowTriadIcon.vue +14 -9
- package/components/facets/triad/arrow-triad/style.css +15 -0
- package/components/facets/triad/gear-triad/GearTriad.vue +73 -64
- package/components/facets/triad/gear-triad/GearTriadCallout.vue +58 -53
- package/components/facets/triad/gear-triad/GearTriadCenter.vue +9 -4
- package/components/facets/triad/gear-triad/GearTriadContent.vue +21 -36
- package/components/facets/triad/gear-triad/GearTriadDetail.vue +92 -0
- package/components/facets/triad/gear-triad/GearTriadDetails.vue +169 -0
- package/components/facets/triad/gear-triad/GearTriadDetailsContent.vue +18 -0
- package/components/facets/triad/gear-triad/GearTriadDetailsHeading.vue +60 -0
- package/components/facets/triad/gear-triad/GearTriadHeading.vue +19 -13
- package/components/facets/triad/gear-triad/GearTriadIcon.vue +22 -9
- package/components/facets/triad/gear-triad/style.css +26 -0
- package/components/facets/triad/{hex-triad/HexTriad.vue → hexagon-triad/HexagonTriad.vue} +81 -63
- package/components/facets/triad/{hex-triad/HexTriadBadge.vue → hexagon-triad/HexagonTriadBadge.vue} +38 -12
- package/components/facets/triad/{hex-triad/HexTriadCallout.vue → hexagon-triad/HexagonTriadCallout.vue} +35 -31
- package/components/facets/triad/hexagon-triad/HexagonTriadCenterBadge.vue +74 -0
- package/components/facets/triad/hexagon-triad/HexagonTriadContent.vue +34 -0
- package/components/facets/triad/hexagon-triad/HexagonTriadHeading.vue +44 -0
- package/components/facets/triad/{hex-triad/HexTriadLayer.vue → hexagon-triad/HexagonTriadLayer.vue} +12 -4
- package/components/facets/triad/hexagon-triad/style.css +22 -0
- package/components/process/arc-arrow-process/ArcArrowProcess.vue +13 -35
- package/components/process/arc-arrow-process/ArcArrowProcessArrow.vue +20 -21
- package/components/process/arc-arrow-process/ArcArrowProcessCallout.vue +30 -71
- package/components/process/arc-arrow-process/ArcArrowProcessContent.vue +18 -13
- package/components/process/arc-arrow-process/ArcArrowProcessHeading.vue +18 -18
- package/components/process/arc-arrow-process/ArcArrowProcessIcon.vue +23 -11
- package/components/process/arc-arrow-process/style.css +20 -0
- package/components/pyramid/circular-pyramid/CircularPyramid.vue +269 -170
- package/components/pyramid/circular-pyramid/CircularPyramidStack.vue +70 -52
- package/components/pyramid/circular-pyramid/CircularPyramidStackContent.vue +47 -37
- package/components/pyramid/circular-pyramid/{CircularPyramidStackTitle.vue → CircularPyramidStackHeading.vue} +49 -45
- package/components/pyramid/circular-pyramid/style.css +26 -0
- package/components/pyramid/square-pyramid/SquarePyramid.vue +191 -62
- package/components/pyramid/square-pyramid/SquarePyramidStack.vue +74 -49
- package/components/pyramid/square-pyramid/SquarePyramidStackContent.vue +47 -33
- package/components/pyramid/square-pyramid/{SquarePyramidStackTitle.vue → SquarePyramidStackHeading.vue} +49 -41
- package/components/pyramid/square-pyramid/style.css +48 -0
- package/components/style.css +35 -0
- package/layouts/core/arc-toc.vue +40 -45
- package/layouts/core/bg-center.vue +7 -6
- package/layouts/core/references.vue +84 -0
- package/layouts/core/style.css +47 -0
- package/layouts/shifting-heading/shifting-intro.vue +4 -13
- package/layouts/thanks/thanks.vue +5 -5
- package/package.json +7 -5
- package/style.css +17 -0
- package/uno.config.ts +1 -0
- package/utils/activateOnKeyboard.ts +14 -0
- package/utils/{chevronCard → card/chevron-card}/context.ts +1 -1
- package/utils/card/chevron-card/index.ts +1 -0
- package/utils/card/horizontal-card/context.ts +12 -0
- package/utils/{horizCard/createHorizCardGeometry.ts → card/horizontal-card/createHorizontalCardGeometry.ts} +10 -45
- package/utils/card/horizontal-card/index.ts +2 -0
- package/utils/card/vertical-card/context.ts +19 -0
- package/utils/{vertCard/createVertCardGeometry.ts → card/vertical-card/createVerticalCardGeometry.ts} +9 -130
- package/utils/card/vertical-card/index.ts +2 -0
- package/utils/colors.ts +93 -0
- package/utils/{arcComparison → comparisons/arc-comparison}/context.ts +0 -11
- package/utils/{arcComparison → comparisons/arc-comparison}/createArcComparisonGeometry.ts +1 -1
- package/utils/comparisons/arc-comparison/resolveArcComparisonItems.ts +33 -0
- package/utils/comparisons/table-comparison/constants.ts +47 -0
- package/utils/{tableComparison → comparisons/table-comparison}/context.ts +2 -2
- package/utils/{arcOrbit → core/arc-orbit}/resolveArcOrbitItems.ts +11 -15
- package/utils/{defenseInDepth/arcDid → defense-in-depth/arc-defense-in-depth}/context.ts +34 -31
- package/utils/{defenseInDepth/arcDid/createArcDiDGeometry.ts → defense-in-depth/arc-defense-in-depth/createArcDefenseInDepthGeometry.ts} +69 -39
- package/utils/{defenseInDepth/arcDid → defense-in-depth/arc-defense-in-depth}/types.ts +39 -35
- package/utils/defense-in-depth/shared/colors.ts +51 -0
- package/utils/defense-in-depth/shared/constants.ts +22 -0
- package/utils/{defenseInDepth → defense-in-depth}/shared/types.ts +0 -5
- package/utils/facets/tetrad/rectangle-orbit-tetrad/context.ts +31 -0
- package/utils/{rectOrbitTetrad/createRectOrbitTetradGeometry.ts → facets/tetrad/rectangle-orbit-tetrad/createRectangleOrbitTetradGeometry.ts} +5 -104
- package/utils/facets/tetrad/rectangle-orbit-tetrad/index.ts +3 -0
- package/utils/{rectOrbitTetrad/resolveRectOrbitTetradItems.ts → facets/tetrad/rectangle-orbit-tetrad/resolveRectangleOrbitTetradItems.ts} +41 -49
- package/utils/{arrowTriad → facets/triad/arrow-triad}/resolveArrowTriadItems.ts +27 -28
- package/utils/{gearTriad → facets/triad/gear-triad}/context.ts +5 -5
- package/utils/{gearTriad → facets/triad/gear-triad}/createGearTriadGeometry.ts +2 -0
- package/utils/{gearTriad → facets/triad/gear-triad}/resolveGearTriadItems.ts +23 -24
- package/utils/facets/triad/hexagon-triad/context.ts +25 -0
- package/utils/{hexTriad/createHexTriadGeometry.ts → facets/triad/hexagon-triad/createHexagonTriadGeometry.ts} +11 -27
- package/utils/facets/triad/hexagon-triad/index.ts +3 -0
- package/utils/facets/triad/hexagon-triad/resolveHexagonTriadItems.ts +60 -0
- package/utils/{shiftingHeading → layouts/shifting-heading}/collectShiftingIntroNodes.ts +1 -0
- package/utils/layouts/table-of-contents/calculateTocCenterAlignmentOffset.ts +17 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/calculateTocMarkerPositions.ts +0 -12
- package/utils/{tableOfContents → layouts/table-of-contents}/createTocConnectorPath.ts +11 -5
- package/utils/{mergeUno → merge-uno}/classifyVisual.ts +1 -1
- package/utils/{mergeUno → merge-uno}/collectClassNames.ts +9 -3
- package/utils/process/arc-arrow-process/resolveArcArrowProcessItems.ts +180 -0
- package/utils/pyramid/circular-pyramid/context.ts +1 -4
- package/utils/pyramid/circular-pyramid/createCircularPyramidGeometry.ts +6 -10
- package/utils/pyramid/shared/colors.ts +33 -83
- package/utils/pyramid/shared/constants.ts +2 -2
- package/utils/pyramid/shared/types.ts +0 -5
- package/utils/pyramid/square-pyramid/context.ts +1 -4
- package/utils/pyramid/square-pyramid/createSquarePyramidGeometry.ts +6 -10
- package/utils/useDiagramAutoScale.ts +8 -6
- package/utils/useMergedUnoAttrs.ts +9 -5
- package/components/card/chevron-card/ChevronCardHeading.vue +0 -39
- package/components/card/horiz-card/HorizCardHeading.vue +0 -47
- package/components/card/vert-card/VertCardHeading.vue +0 -68
- package/components/card/vert-card/VertCardTitle.vue +0 -76
- package/components/comparisons/arc-comparison/ArcComparisonContents.vue +0 -17
- package/components/comparisons/arc-comparison/ArcComparisonTitle.vue +0 -29
- package/components/core/arc-orbit/ArcOrbitContents.vue +0 -18
- package/components/core/arc-orbit/ArcOrbitTitle.vue +0 -50
- package/components/defense-in-depth/arc-did/ArcDiDLayer.vue +0 -321
- package/components/defense-in-depth/arc-did/ArcDiDLayerParts.vue +0 -11
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCenter.vue +0 -53
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradContent.vue +0 -39
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradHeading.vue +0 -44
- package/components/facets/triad/gear-triad/GearTriadContents.vue +0 -111
- package/components/facets/triad/gear-triad/GearTriadDescription.vue +0 -38
- package/components/facets/triad/hex-triad/HexTriadCenterBadge.vue +0 -51
- package/components/facets/triad/hex-triad/HexTriadContent.vue +0 -20
- package/components/facets/triad/hex-triad/HexTriadHeading.vue +0 -28
- package/layouts/core/table-of-contents.vue +0 -30
- package/utils/arcArrowProcess/resolveArcArrowProcessItems.ts +0 -189
- package/utils/arcComparison/resolveArcComparisonItems.ts +0 -102
- package/utils/chevronCard/createChevronCardGeometry.ts +0 -48
- package/utils/chevronCard/index.ts +0 -2
- package/utils/defenseInDepth/arcDid/index.ts +0 -3
- package/utils/defenseInDepth/index.ts +0 -2
- package/utils/defenseInDepth/shared/colors.ts +0 -121
- package/utils/defenseInDepth/shared/constants.ts +0 -14
- package/utils/defenseInDepth/shared/index.ts +0 -3
- package/utils/hexTriad/context.ts +0 -25
- package/utils/hexTriad/index.ts +0 -3
- package/utils/hexTriad/resolveHexTriadItems.ts +0 -63
- package/utils/horizCard/context.ts +0 -13
- package/utils/horizCard/index.ts +0 -2
- package/utils/pyramid/index.ts +0 -3
- package/utils/rectOrbitTetrad/context.ts +0 -31
- package/utils/rectOrbitTetrad/index.ts +0 -3
- package/utils/tableComparison/constants.ts +0 -72
- package/utils/tableOfContents/calculateTocCenterAlignmentOffset.ts +0 -11
- package/utils/vertCard/context.ts +0 -18
- package/utils/vertCard/index.ts +0 -2
- package/utils/{arcComparison → comparisons/arc-comparison}/index.ts +0 -0
- package/utils/{tableComparison → comparisons/table-comparison}/index.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/context.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/createArcOrbitGeometry.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/index.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/context.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/createArrowTriadGeometry.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/index.ts +0 -0
- package/utils/{gearTriad → facets/triad/gear-triad}/index.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/calculateUniformTocArticleWidth.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/createTocArcPath.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/index.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyLayout.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifySimple.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyTypography.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyUtility.ts +0 -0
- package/utils/{mergeUno → merge-uno}/index.ts +0 -0
- package/utils/{mergeUno → merge-uno}/mergeClassValues.ts +0 -0
- package/utils/{mergeUno → merge-uno}/splitVariantScope.ts +1 -1
- package/utils/{mergeUno → merge-uno}/types.ts +0 -0
- package/utils/{arcArrowProcess → process/arc-arrow-process}/context.ts +1 -1
- /package/utils/{arcArrowProcess → process/arc-arrow-process}/createArcArrowProcessGeometry.ts +0 -0
- /package/utils/{arcArrowProcess → process/arc-arrow-process}/index.ts +0 -0
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type
|
|
3
|
-
|
|
1
|
+
export type TArcDefenseInDepthOrder = 'outer-to-inner' | 'inner-to-outer';
|
|
2
|
+
export type TArcDefenseInDepthPartPosition =
|
|
3
|
+
| 'top'
|
|
4
|
+
| 'middle'
|
|
5
|
+
| 'bottom'
|
|
6
|
+
| 'center';
|
|
7
|
+
export type TArcDefenseInDepthOrientation =
|
|
4
8
|
| boolean
|
|
5
9
|
| number
|
|
6
10
|
| 'tangent'
|
|
7
11
|
| 'auto'
|
|
8
12
|
| (string & {});
|
|
9
13
|
|
|
10
|
-
export interface
|
|
14
|
+
export interface IArcDefenseInDepthPoint {
|
|
11
15
|
readonly x: number;
|
|
12
16
|
readonly y: number;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
|
-
export interface
|
|
19
|
+
export interface IArcDefenseInDepthPartItem {
|
|
16
20
|
readonly label: string;
|
|
17
21
|
readonly angle?: number;
|
|
18
22
|
readonly radius?: number;
|
|
@@ -20,29 +24,29 @@ export interface IArcDiDPartItem {
|
|
|
20
24
|
readonly color?: string;
|
|
21
25
|
readonly icon?: string;
|
|
22
26
|
readonly span?: number;
|
|
23
|
-
readonly position?:
|
|
27
|
+
readonly position?: TArcDefenseInDepthPartPosition;
|
|
24
28
|
readonly maxWidth?: number | string;
|
|
25
|
-
readonly rotate?:
|
|
26
|
-
readonly skew?:
|
|
29
|
+
readonly rotate?: TArcDefenseInDepthOrientation;
|
|
30
|
+
readonly skew?: TArcDefenseInDepthOrientation;
|
|
27
31
|
readonly active?: boolean;
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
export interface
|
|
31
|
-
readonly parts: readonly (string |
|
|
34
|
+
export interface IArcDefenseInDepthSectorItem {
|
|
35
|
+
readonly parts: readonly (string | IArcDefenseInDepthPartItem)[];
|
|
32
36
|
readonly split?: boolean;
|
|
33
37
|
readonly angle?: number;
|
|
34
38
|
readonly span?: number;
|
|
35
39
|
readonly color?: string;
|
|
36
|
-
readonly rotate?:
|
|
37
|
-
readonly skew?:
|
|
40
|
+
readonly rotate?: TArcDefenseInDepthOrientation;
|
|
41
|
+
readonly skew?: TArcDefenseInDepthOrientation;
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
export interface
|
|
44
|
+
export interface IArcDefenseInDepthLayerItem {
|
|
41
45
|
readonly title?: string;
|
|
42
|
-
readonly parts?: readonly (string |
|
|
46
|
+
readonly parts?: readonly (string | IArcDefenseInDepthPartItem)[];
|
|
43
47
|
readonly sectors?: readonly (
|
|
44
|
-
|
|
|
45
|
-
| readonly (string |
|
|
48
|
+
| IArcDefenseInDepthSectorItem
|
|
49
|
+
| readonly (string | IArcDefenseInDepthPartItem)[]
|
|
46
50
|
)[];
|
|
47
51
|
readonly color?: string;
|
|
48
52
|
readonly textColor?: string;
|
|
@@ -50,11 +54,11 @@ export interface IArcDiDLayerItem {
|
|
|
50
54
|
readonly titleWidth?: number;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
export interface
|
|
57
|
+
export interface IArcDefenseInDepthPartGeometry {
|
|
54
58
|
readonly index: number;
|
|
55
59
|
readonly sectorIndex?: number;
|
|
56
60
|
readonly trackIndex?: number;
|
|
57
|
-
readonly position?:
|
|
61
|
+
readonly position?: TArcDefenseInDepthPartPosition;
|
|
58
62
|
readonly label: string;
|
|
59
63
|
readonly angle: number;
|
|
60
64
|
readonly radius: number;
|
|
@@ -69,13 +73,13 @@ export interface IArcDiDPartGeometry {
|
|
|
69
73
|
readonly innerRadius?: number;
|
|
70
74
|
readonly outerRadius?: number;
|
|
71
75
|
readonly maxContentWidth?: number;
|
|
72
|
-
readonly rotate?:
|
|
73
|
-
readonly skew?:
|
|
76
|
+
readonly rotate?: TArcDefenseInDepthOrientation;
|
|
77
|
+
readonly skew?: TArcDefenseInDepthOrientation;
|
|
74
78
|
readonly rotationAngle?: number;
|
|
75
79
|
readonly active?: boolean;
|
|
76
80
|
}
|
|
77
81
|
|
|
78
|
-
export interface
|
|
82
|
+
export interface IArcDefenseInDepthSectorGeometry {
|
|
79
83
|
readonly index: number;
|
|
80
84
|
readonly startAngle: number;
|
|
81
85
|
readonly endAngle: number;
|
|
@@ -85,33 +89,33 @@ export interface IArcDiDSectorGeometry {
|
|
|
85
89
|
readonly split: boolean;
|
|
86
90
|
readonly dividerPaths: readonly string[];
|
|
87
91
|
readonly color?: string;
|
|
88
|
-
readonly rotate?:
|
|
89
|
-
readonly skew?:
|
|
90
|
-
readonly parts: readonly
|
|
92
|
+
readonly rotate?: TArcDefenseInDepthOrientation;
|
|
93
|
+
readonly skew?: TArcDefenseInDepthOrientation;
|
|
94
|
+
readonly parts: readonly IArcDefenseInDepthPartGeometry[];
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
export interface
|
|
97
|
+
export interface IArcDefenseInDepthLayerGeometry {
|
|
94
98
|
readonly index: number;
|
|
95
99
|
readonly innerRadius: number;
|
|
96
100
|
readonly outerRadius: number;
|
|
97
101
|
readonly midRadius: number;
|
|
98
102
|
readonly thickness: number;
|
|
99
103
|
readonly path: string;
|
|
100
|
-
readonly titlePosition:
|
|
104
|
+
readonly titlePosition: IArcDefenseInDepthPoint;
|
|
101
105
|
readonly titlePath?: string;
|
|
102
106
|
readonly titleLeft?: number;
|
|
103
107
|
readonly titleRight?: number;
|
|
104
|
-
readonly sectors: readonly
|
|
105
|
-
readonly parts: readonly
|
|
108
|
+
readonly sectors: readonly IArcDefenseInDepthSectorGeometry[];
|
|
109
|
+
readonly parts: readonly IArcDefenseInDepthPartGeometry[];
|
|
106
110
|
}
|
|
107
111
|
|
|
108
|
-
export interface
|
|
112
|
+
export interface IArcDefenseInDepthDecorativeArc {
|
|
109
113
|
readonly path: string;
|
|
110
114
|
readonly strokeWidth: number;
|
|
111
115
|
readonly opacity: number;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
|
-
export interface
|
|
118
|
+
export interface IArcDefenseInDepthGeometry {
|
|
115
119
|
readonly viewBoxWidth: number;
|
|
116
120
|
readonly viewBoxHeight: number;
|
|
117
121
|
readonly cx: number;
|
|
@@ -119,12 +123,12 @@ export interface IArcDiDGeometry {
|
|
|
119
123
|
readonly innerRadius: number;
|
|
120
124
|
readonly outerRadius: number;
|
|
121
125
|
readonly count: number;
|
|
122
|
-
readonly layers: readonly
|
|
123
|
-
readonly decorativeArcs: readonly
|
|
126
|
+
readonly layers: readonly IArcDefenseInDepthLayerGeometry[];
|
|
127
|
+
readonly decorativeArcs: readonly IArcDefenseInDepthDecorativeArc[];
|
|
124
128
|
readonly innerCutoutPath?: string;
|
|
125
129
|
}
|
|
126
130
|
|
|
127
|
-
export interface
|
|
131
|
+
export interface ICreateArcDefenseInDepthOptions {
|
|
128
132
|
readonly viewBoxWidth?: number;
|
|
129
133
|
readonly viewBoxHeight?: number;
|
|
130
134
|
readonly cx?: number;
|
|
@@ -133,8 +137,8 @@ export interface ICreateArcDiDOptions {
|
|
|
133
137
|
readonly outerRadius?: number;
|
|
134
138
|
readonly count?: number;
|
|
135
139
|
readonly gap?: number;
|
|
136
|
-
readonly order?:
|
|
140
|
+
readonly order?: TArcDefenseInDepthOrder;
|
|
137
141
|
readonly titleAngleSpan?: number;
|
|
138
142
|
readonly titleWidth?: number;
|
|
139
|
-
readonly layers?: readonly
|
|
143
|
+
readonly layers?: readonly IArcDefenseInDepthLayerItem[];
|
|
140
144
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { darkenColor, lightenColor } from '../../colors';
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_DID_COLOR,
|
|
4
|
+
DEFAULT_DID_DOT_COLOR,
|
|
5
|
+
DEFAULT_DID_DOT_GLOW_COLOR,
|
|
6
|
+
DEFAULT_DID_LAYER_COLORS,
|
|
7
|
+
DEFAULT_DID_STROKE_COLOR,
|
|
8
|
+
} from './constants';
|
|
9
|
+
import type { IDefenseInDepthPalette } from './types';
|
|
10
|
+
|
|
11
|
+
export function resolveArcDefenseInDepthPalette(
|
|
12
|
+
baseColor: string = DEFAULT_DID_COLOR,
|
|
13
|
+
count = 3,
|
|
14
|
+
): IDefenseInDepthPalette {
|
|
15
|
+
if (baseColor === DEFAULT_DID_COLOR && count === 3) {
|
|
16
|
+
return {
|
|
17
|
+
layerColors: DEFAULT_DID_LAYER_COLORS,
|
|
18
|
+
dotColor: DEFAULT_DID_DOT_COLOR,
|
|
19
|
+
dotGlowColor: DEFAULT_DID_DOT_GLOW_COLOR,
|
|
20
|
+
strokeColor: DEFAULT_DID_STROKE_COLOR,
|
|
21
|
+
decorativeStrokeColor: lightenColor({ hex: baseColor, ratio: 0.65 }),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const layerColors: string[] = [];
|
|
26
|
+
const safeCount = Math.max(1, count);
|
|
27
|
+
|
|
28
|
+
for (let i = 0; i < safeCount; i++) {
|
|
29
|
+
// 0 = outermost (lightest, ratio ~0.35), count - 1 = innermost (deepest, ratio ~0.25 darken)
|
|
30
|
+
if (safeCount === 1) {
|
|
31
|
+
layerColors.push(baseColor);
|
|
32
|
+
} else {
|
|
33
|
+
const t = i / (safeCount - 1);
|
|
34
|
+
if (t < 0.5) {
|
|
35
|
+
const lightenRatio = 0.35 * (1 - t * 2);
|
|
36
|
+
layerColors.push(lightenColor({ hex: baseColor, ratio: lightenRatio }));
|
|
37
|
+
} else {
|
|
38
|
+
const darkenRatio = 0.25 * ((t - 0.5) * 2);
|
|
39
|
+
layerColors.push(darkenColor({ hex: baseColor, ratio: darkenRatio }));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
layerColors,
|
|
46
|
+
dotColor: darkenColor({ hex: baseColor, ratio: 0.2 }),
|
|
47
|
+
dotGlowColor: lightenColor({ hex: baseColor, ratio: 0.7 }),
|
|
48
|
+
strokeColor: DEFAULT_DID_STROKE_COLOR,
|
|
49
|
+
decorativeStrokeColor: lightenColor({ hex: baseColor, ratio: 0.65 }),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const DEFAULT_DID_COLOR =
|
|
2
|
+
'var(--alpha-arc-defense-in-depth-layer-accent)';
|
|
3
|
+
|
|
4
|
+
const DEFAULT_DID_OUTER_COLOR =
|
|
5
|
+
'var(--alpha-arc-defense-in-depth-layer-1-color)';
|
|
6
|
+
const DEFAULT_DID_MIDDLE_COLOR =
|
|
7
|
+
'var(--alpha-arc-defense-in-depth-layer-2-color)';
|
|
8
|
+
const DEFAULT_DID_INNER_COLOR =
|
|
9
|
+
'var(--alpha-arc-defense-in-depth-layer-3-color)';
|
|
10
|
+
|
|
11
|
+
export const DEFAULT_DID_LAYER_COLORS: readonly string[] = [
|
|
12
|
+
DEFAULT_DID_OUTER_COLOR,
|
|
13
|
+
DEFAULT_DID_MIDDLE_COLOR,
|
|
14
|
+
DEFAULT_DID_INNER_COLOR,
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export const DEFAULT_DID_DOT_COLOR =
|
|
18
|
+
'var(--alpha-arc-defense-in-depth-part-dot)';
|
|
19
|
+
export const DEFAULT_DID_DOT_GLOW_COLOR =
|
|
20
|
+
'var(--alpha-arc-defense-in-depth-part-dot-glow)';
|
|
21
|
+
export const DEFAULT_DID_STROKE_COLOR =
|
|
22
|
+
'var(--alpha-arc-defense-in-depth-stroke)';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
IRectangleOrbitTetradItem,
|
|
5
|
+
IResolvedRectangleOrbitTetradItem,
|
|
6
|
+
} from './resolveRectangleOrbitTetradItems';
|
|
7
|
+
|
|
8
|
+
export interface IRectangleOrbitTetradRegistration {
|
|
9
|
+
readonly index: number;
|
|
10
|
+
readonly item: ComputedRef<IResolvedRectangleOrbitTetradItem>;
|
|
11
|
+
readonly setCustomBadge?: (text: string | number) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IRectangleOrbitTetradRootContext {
|
|
15
|
+
readonly animation?: ComputedRef<boolean>;
|
|
16
|
+
readonly registerCallout: (
|
|
17
|
+
props?: IRectangleOrbitTetradItem,
|
|
18
|
+
) => IRectangleOrbitTetradRegistration;
|
|
19
|
+
readonly items: ComputedRef<readonly IResolvedRectangleOrbitTetradItem[]>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IRectangleOrbitTetradCalloutContext {
|
|
23
|
+
readonly index: number;
|
|
24
|
+
readonly item: ComputedRef<IResolvedRectangleOrbitTetradItem>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const RECT_ORBIT_TETRAD_ROOT_KEY: InjectionKey<IRectangleOrbitTetradRootContext> =
|
|
28
|
+
Symbol('RECT_ORBIT_TETRAD_ROOT_KEY');
|
|
29
|
+
|
|
30
|
+
export const RECT_ORBIT_TETRAD_CALLOUT_KEY: InjectionKey<IRectangleOrbitTetradCalloutContext> =
|
|
31
|
+
Symbol('RECT_ORBIT_TETRAD_CALLOUT_KEY');
|
|
@@ -11,7 +11,7 @@ export interface IRectOrbitBox {
|
|
|
11
11
|
readonly height: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export interface
|
|
14
|
+
export interface IRectangleOrbitTetradCoordinates {
|
|
15
15
|
readonly centerX: number;
|
|
16
16
|
readonly centerY: number;
|
|
17
17
|
readonly arcPaths: readonly [string, string, string, string];
|
|
@@ -59,7 +59,7 @@ function createArcPath(
|
|
|
59
59
|
return `M ${x1} ${y1} A ${radius} ${radius} 0 ${largeArcFlag} 1 ${x2} ${y2}`;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export interface
|
|
62
|
+
export interface ICalculateRectangleOrbitTetradCoordinatesParams {
|
|
63
63
|
readonly gap?: number;
|
|
64
64
|
readonly width?: number;
|
|
65
65
|
readonly height?: number;
|
|
@@ -74,14 +74,14 @@ export interface ICalculateRectOrbitTetradCoordinatesParams {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Calculates geometric coordinates for the
|
|
77
|
+
* Calculates geometric coordinates for the RectangleOrbitTetrad layout.
|
|
78
78
|
* Indices (Clockwise starting Top-Left):
|
|
79
79
|
* 0: Top-Left (01)
|
|
80
80
|
* 1: Top-Right (02)
|
|
81
81
|
* 2: Bottom-Right (03)
|
|
82
82
|
* 3: Bottom-Left (04)
|
|
83
83
|
*/
|
|
84
|
-
export function
|
|
84
|
+
export function calculateRectangleOrbitTetradCoordinates({
|
|
85
85
|
gap = 14,
|
|
86
86
|
width = 136,
|
|
87
87
|
height = 150,
|
|
@@ -93,7 +93,7 @@ export function calculateRectOrbitTetradCoordinates({
|
|
|
93
93
|
iconPaddingX = 30,
|
|
94
94
|
iconPaddingY = 32,
|
|
95
95
|
arcBorderWidth = 5,
|
|
96
|
-
}:
|
|
96
|
+
}: ICalculateRectangleOrbitTetradCoordinatesParams = {}): IRectangleOrbitTetradCoordinates {
|
|
97
97
|
const centerX = viewBoxSize / 2;
|
|
98
98
|
const centerY = viewBoxSize / 2;
|
|
99
99
|
const halfGap = gap / 2;
|
|
@@ -235,102 +235,3 @@ export function calculateRectOrbitTetradCoordinates({
|
|
|
235
235
|
numberPositions: [num0, num1, num2, num3],
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
export interface ILightenColorParams {
|
|
240
|
-
readonly hex: string;
|
|
241
|
-
readonly ratio?: number;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Automatically lightens a base hex color by mixing it with white.
|
|
246
|
-
* ratio: 0 = original color, 1 = pure white.
|
|
247
|
-
*/
|
|
248
|
-
export function lightenColor({
|
|
249
|
-
hex,
|
|
250
|
-
ratio = 0.5,
|
|
251
|
-
}: ILightenColorParams): string {
|
|
252
|
-
const raw = hex.trim().replace(/^#/, '');
|
|
253
|
-
const sanitized =
|
|
254
|
-
raw.length === 3
|
|
255
|
-
? raw
|
|
256
|
-
.split('')
|
|
257
|
-
.map((char) => {
|
|
258
|
-
return char + char;
|
|
259
|
-
})
|
|
260
|
-
.join('')
|
|
261
|
-
: raw;
|
|
262
|
-
|
|
263
|
-
if (sanitized.length !== 6) {
|
|
264
|
-
return hex;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const r = Number.parseInt(sanitized.slice(0, 2), 16);
|
|
268
|
-
const g = Number.parseInt(sanitized.slice(2, 4), 16);
|
|
269
|
-
const b = Number.parseInt(sanitized.slice(4, 6), 16);
|
|
270
|
-
|
|
271
|
-
if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
|
|
272
|
-
return hex;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const clamp = (val: number): number => {
|
|
276
|
-
return Math.min(255, Math.max(0, Math.round(val)));
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
const lr = clamp(r + (255 - r) * ratio);
|
|
280
|
-
const lg = clamp(g + (255 - g) * ratio);
|
|
281
|
-
const lb = clamp(b + (255 - b) * ratio);
|
|
282
|
-
|
|
283
|
-
const toHex = (n: number): string => {
|
|
284
|
-
return n.toString(16).padStart(2, '0');
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
return `#${toHex(lr)}${toHex(lg)}${toHex(lb)}`;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export interface IDarkenColorParams {
|
|
291
|
-
readonly hex: string;
|
|
292
|
-
readonly ratio?: number;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Automatically darkens a base hex color by mixing it with black.
|
|
297
|
-
* ratio: 0 = original color, 1 = pure black.
|
|
298
|
-
*/
|
|
299
|
-
export function darkenColor({ hex, ratio = 0.18 }: IDarkenColorParams): string {
|
|
300
|
-
const raw = hex.trim().replace(/^#/, '');
|
|
301
|
-
const sanitized =
|
|
302
|
-
raw.length === 3
|
|
303
|
-
? raw
|
|
304
|
-
.split('')
|
|
305
|
-
.map((char) => {
|
|
306
|
-
return char + char;
|
|
307
|
-
})
|
|
308
|
-
.join('')
|
|
309
|
-
: raw;
|
|
310
|
-
|
|
311
|
-
if (sanitized.length !== 6) {
|
|
312
|
-
return hex;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
const r = Number.parseInt(sanitized.slice(0, 2), 16);
|
|
316
|
-
const g = Number.parseInt(sanitized.slice(2, 4), 16);
|
|
317
|
-
const b = Number.parseInt(sanitized.slice(4, 6), 16);
|
|
318
|
-
|
|
319
|
-
if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
|
|
320
|
-
return hex;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
const clamp = (val: number): number => {
|
|
324
|
-
return Math.min(255, Math.max(0, Math.round(val)));
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
const dr = clamp(r * (1 - ratio));
|
|
328
|
-
const dg = clamp(g * (1 - ratio));
|
|
329
|
-
const db = clamp(b * (1 - ratio));
|
|
330
|
-
|
|
331
|
-
const toHex = (n: number): string => {
|
|
332
|
-
return n.toString(16).padStart(2, '0');
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
return `#${toHex(dr)}${toHex(dg)}${toHex(db)}`;
|
|
336
|
-
}
|
|
@@ -1,57 +1,55 @@
|
|
|
1
|
-
import { lightenColor } from '
|
|
1
|
+
import { lightenColor } from '../../../colors';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type TRectangleOrbitTetradIcon = string | object | boolean;
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface IRectangleOrbitTetradItem {
|
|
6
6
|
readonly id?: string | number;
|
|
7
7
|
/**
|
|
8
8
|
* Optional icon: icon class (e.g. 'i-lucide-user'), component object,
|
|
9
9
|
* built-in name ('user' | 'academic' | 'briefcase' | 'target'), or false to hide.
|
|
10
10
|
*/
|
|
11
|
-
readonly icon?:
|
|
11
|
+
readonly icon?: TRectangleOrbitTetradIcon;
|
|
12
12
|
readonly color?: string;
|
|
13
13
|
readonly cardBg?: string;
|
|
14
14
|
readonly arcColor?: string;
|
|
15
15
|
readonly arcRatio?: number;
|
|
16
16
|
readonly textColor?: string;
|
|
17
|
-
readonly titleColor?: string;
|
|
18
17
|
readonly arcBorderColor?: string;
|
|
19
18
|
readonly arcBorderRatio?: number;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
export interface
|
|
21
|
+
export interface IResolvedRectangleOrbitTetradItem
|
|
22
|
+
extends IRectangleOrbitTetradItem {
|
|
23
23
|
readonly id: string | number;
|
|
24
24
|
readonly color: string;
|
|
25
25
|
readonly cardBg: string;
|
|
26
26
|
readonly arcColor: string;
|
|
27
27
|
readonly textColor: string;
|
|
28
|
-
readonly titleColor: string;
|
|
29
28
|
readonly arcBorderColor: string;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
IResolvedRectangleOrbitTetradItem,
|
|
33
|
+
IResolvedRectangleOrbitTetradItem,
|
|
34
|
+
IResolvedRectangleOrbitTetradItem,
|
|
35
|
+
IResolvedRectangleOrbitTetradItem,
|
|
37
36
|
] = [
|
|
38
37
|
// 0: Top-Left (01) - Golden Orange
|
|
39
38
|
{
|
|
40
39
|
id: '01',
|
|
41
40
|
icon: 'user',
|
|
42
|
-
color: '
|
|
41
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
43
42
|
cardBg: lightenColor({
|
|
44
|
-
hex: '
|
|
43
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
45
44
|
ratio: 0.9,
|
|
46
45
|
}),
|
|
47
46
|
arcColor: lightenColor({
|
|
48
|
-
hex: '
|
|
47
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
49
48
|
ratio: 0.55,
|
|
50
49
|
}),
|
|
51
|
-
textColor: '
|
|
52
|
-
titleColor: '#e6882c',
|
|
50
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
53
51
|
arcBorderColor: lightenColor({
|
|
54
|
-
hex: '
|
|
52
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
55
53
|
ratio: 0.8,
|
|
56
54
|
}),
|
|
57
55
|
},
|
|
@@ -59,19 +57,18 @@ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
|
59
57
|
{
|
|
60
58
|
id: '02',
|
|
61
59
|
icon: 'academic',
|
|
62
|
-
color: '
|
|
60
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
63
61
|
cardBg: lightenColor({
|
|
64
|
-
hex: '
|
|
62
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
65
63
|
ratio: 0.9,
|
|
66
64
|
}),
|
|
67
65
|
arcColor: lightenColor({
|
|
68
|
-
hex: '
|
|
66
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
69
67
|
ratio: 0.55,
|
|
70
68
|
}),
|
|
71
|
-
textColor: '
|
|
72
|
-
titleColor: '#8bb863',
|
|
69
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
73
70
|
arcBorderColor: lightenColor({
|
|
74
|
-
hex: '
|
|
71
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
75
72
|
ratio: 0.8,
|
|
76
73
|
}),
|
|
77
74
|
},
|
|
@@ -79,19 +76,18 @@ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
|
79
76
|
{
|
|
80
77
|
id: '03',
|
|
81
78
|
icon: 'briefcase',
|
|
82
|
-
color: '
|
|
79
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
83
80
|
cardBg: lightenColor({
|
|
84
|
-
hex: '
|
|
81
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
85
82
|
ratio: 0.9,
|
|
86
83
|
}),
|
|
87
84
|
arcColor: lightenColor({
|
|
88
|
-
hex: '
|
|
85
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
89
86
|
ratio: 0.55,
|
|
90
87
|
}),
|
|
91
|
-
textColor: '
|
|
92
|
-
titleColor: '#4ea798',
|
|
88
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
93
89
|
arcBorderColor: lightenColor({
|
|
94
|
-
hex: '
|
|
90
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
95
91
|
ratio: 0.8,
|
|
96
92
|
}),
|
|
97
93
|
},
|
|
@@ -99,30 +95,29 @@ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
|
99
95
|
{
|
|
100
96
|
id: '04',
|
|
101
97
|
icon: 'target',
|
|
102
|
-
color: '
|
|
98
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
103
99
|
cardBg: lightenColor({
|
|
104
|
-
hex: '
|
|
100
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
105
101
|
ratio: 0.9,
|
|
106
102
|
}),
|
|
107
103
|
arcColor: lightenColor({
|
|
108
|
-
hex: '
|
|
104
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
109
105
|
ratio: 0.55,
|
|
110
106
|
}),
|
|
111
|
-
textColor: '
|
|
112
|
-
titleColor: '#e45b65',
|
|
107
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
113
108
|
arcBorderColor: lightenColor({
|
|
114
|
-
hex: '
|
|
109
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
115
110
|
ratio: 0.8,
|
|
116
111
|
}),
|
|
117
112
|
},
|
|
118
113
|
] as const;
|
|
119
114
|
|
|
120
115
|
export function resolveSingleItem(
|
|
121
|
-
defaultItem:
|
|
122
|
-
userItem?:
|
|
116
|
+
defaultItem: IResolvedRectangleOrbitTetradItem,
|
|
117
|
+
userItem?: IRectangleOrbitTetradItem,
|
|
123
118
|
defaultArcRatio = 0.55,
|
|
124
119
|
defaultArcBorderRatio = 0.8,
|
|
125
|
-
):
|
|
120
|
+
): IResolvedRectangleOrbitTetradItem {
|
|
126
121
|
const merged = {
|
|
127
122
|
...defaultItem,
|
|
128
123
|
...(userItem ?? {}),
|
|
@@ -155,9 +150,6 @@ export function resolveSingleItem(
|
|
|
155
150
|
})
|
|
156
151
|
: defaultItem.arcColor),
|
|
157
152
|
textColor: merged.textColor ?? defaultItem.textColor,
|
|
158
|
-
titleColor:
|
|
159
|
-
merged.titleColor ??
|
|
160
|
-
(isColorChanged ? baseColor : defaultItem.titleColor),
|
|
161
153
|
arcBorderColor:
|
|
162
154
|
userItem?.arcBorderColor ??
|
|
163
155
|
(isColorChanged || userItem?.arcBorderRatio !== undefined
|
|
@@ -169,21 +161,21 @@ export function resolveSingleItem(
|
|
|
169
161
|
};
|
|
170
162
|
}
|
|
171
163
|
|
|
172
|
-
export interface
|
|
173
|
-
readonly items?: readonly
|
|
164
|
+
export interface IResolveRectangleOrbitTetradItemsParams {
|
|
165
|
+
readonly items?: readonly IRectangleOrbitTetradItem[];
|
|
174
166
|
readonly arcRatio?: number;
|
|
175
167
|
readonly arcBorderRatio?: number;
|
|
176
168
|
}
|
|
177
169
|
|
|
178
|
-
export function
|
|
170
|
+
export function resolveRectangleOrbitTetradItems({
|
|
179
171
|
items = [],
|
|
180
172
|
arcRatio = 0.55,
|
|
181
173
|
arcBorderRatio = 0.8,
|
|
182
|
-
}:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
174
|
+
}: IResolveRectangleOrbitTetradItemsParams = {}): readonly [
|
|
175
|
+
IResolvedRectangleOrbitTetradItem,
|
|
176
|
+
IResolvedRectangleOrbitTetradItem,
|
|
177
|
+
IResolvedRectangleOrbitTetradItem,
|
|
178
|
+
IResolvedRectangleOrbitTetradItem,
|
|
187
179
|
] {
|
|
188
180
|
return [
|
|
189
181
|
resolveSingleItem(
|