@alphacifer/slidev-addon-theme 0.0.10 → 0.0.11
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 +133 -75
- 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 +17 -97
- 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/QnA.vue +1 -1
- package/components/core/Quote.vue +3 -6
- package/components/core/ReflectedTitle.vue +2 -6
- package/components/core/Speaker.vue +5 -10
- 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 +30 -32
- 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 +89 -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} +62 -48
- 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/style.css +17 -0
- package/layouts/shifting-heading/shifting-intro.vue +4 -13
- package/layouts/thanks/thanks.vue +5 -5
- package/package.json +8 -6
- 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,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { activateOnKeyboard } from '../../../utils/activateOnKeyboard';
|
|
2
3
|
import {
|
|
3
4
|
type ComputedRef,
|
|
4
5
|
computed,
|
|
@@ -13,34 +14,32 @@ import {
|
|
|
13
14
|
|
|
14
15
|
import {
|
|
15
16
|
ARC_DID_ROOT_KEY,
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
} from '../../../utils/
|
|
19
|
-
import {
|
|
17
|
+
type IArcDefenseInDepthRegisteredLayerData,
|
|
18
|
+
type IArcDefenseInDepthRootContext,
|
|
19
|
+
} from '../../../utils/defense-in-depth/arc-defense-in-depth/context';
|
|
20
|
+
import { createArcDefenseInDepthGeometry } from '../../../utils/defense-in-depth/arc-defense-in-depth/createArcDefenseInDepthGeometry';
|
|
20
21
|
import type {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} from '../../../utils/
|
|
28
|
-
import { DEFAULT_DID_COLOR } from '../../../utils/defenseInDepth/shared/constants';
|
|
22
|
+
IArcDefenseInDepthLayerItem,
|
|
23
|
+
IArcDefenseInDepthPartGeometry,
|
|
24
|
+
TArcDefenseInDepthOrder,
|
|
25
|
+
} from '../../../utils/defense-in-depth/arc-defense-in-depth/types';
|
|
26
|
+
import { lightenColor } from '../../../utils/colors';
|
|
27
|
+
import { resolveArcDefenseInDepthPalette } from '../../../utils/defense-in-depth/shared/colors';
|
|
28
|
+
import { DEFAULT_DID_COLOR } from '../../../utils/defense-in-depth/shared/constants';
|
|
29
29
|
import { useDiagramAutoScale } from '../../../utils/useDiagramAutoScale';
|
|
30
30
|
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
31
31
|
|
|
32
32
|
defineOptions({
|
|
33
|
-
name: '
|
|
33
|
+
name: 'ArcDefenseInDepth',
|
|
34
34
|
inheritAttrs: false,
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
export interface
|
|
38
|
-
readonly order?:
|
|
37
|
+
export interface IArcDefenseInDepthProps {
|
|
38
|
+
readonly order?: TArcDefenseInDepthOrder;
|
|
39
39
|
readonly count?: number;
|
|
40
40
|
readonly activeIndex?: number;
|
|
41
41
|
readonly color?: string;
|
|
42
42
|
readonly colors?: readonly string[] | string[];
|
|
43
|
-
readonly layers?: readonly IArcDiDLayerItem[];
|
|
44
43
|
readonly width?: number | string;
|
|
45
44
|
readonly height?: number | string;
|
|
46
45
|
readonly scale?: number;
|
|
@@ -60,14 +59,13 @@ export interface IArcDiDProps {
|
|
|
60
59
|
readonly activePart?: string | number;
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
const props = withDefaults(defineProps<
|
|
62
|
+
const props = withDefaults(defineProps<IArcDefenseInDepthProps>(), {
|
|
64
63
|
order: 'outer-to-inner',
|
|
65
64
|
count: undefined,
|
|
66
65
|
activeIndex: -1,
|
|
67
66
|
activePart: undefined,
|
|
68
67
|
color: DEFAULT_DID_COLOR,
|
|
69
68
|
colors: undefined,
|
|
70
|
-
layers: undefined,
|
|
71
69
|
width: 720,
|
|
72
70
|
height: undefined,
|
|
73
71
|
scale: undefined,
|
|
@@ -90,7 +88,7 @@ const emit = defineEmits<{
|
|
|
90
88
|
(e: 'update:activeIndex', index: number): void;
|
|
91
89
|
(e: 'update:activePart', part: string | number | undefined): void;
|
|
92
90
|
(e: 'select', index: number): void;
|
|
93
|
-
(e: 'part-click', part:
|
|
91
|
+
(e: 'part-click', part: IArcDefenseInDepthPartGeometry): void;
|
|
94
92
|
(e: 'click', event: MouseEvent): void;
|
|
95
93
|
}>();
|
|
96
94
|
|
|
@@ -109,9 +107,11 @@ const isAnimated = computed(() => {
|
|
|
109
107
|
if (!props.animation) {
|
|
110
108
|
return false;
|
|
111
109
|
}
|
|
110
|
+
|
|
112
111
|
if (shiftingIntro) {
|
|
113
112
|
return shiftingIntro.active.value;
|
|
114
113
|
}
|
|
114
|
+
|
|
115
115
|
return true;
|
|
116
116
|
});
|
|
117
117
|
|
|
@@ -119,9 +119,11 @@ const resolvedStartDelay = computed(() => {
|
|
|
119
119
|
if (props.startDelay !== undefined) {
|
|
120
120
|
return props.startDelay;
|
|
121
121
|
}
|
|
122
|
+
|
|
122
123
|
if (shiftingIntro?.isShifting?.value) {
|
|
123
124
|
return 500;
|
|
124
125
|
}
|
|
126
|
+
|
|
125
127
|
return 0;
|
|
126
128
|
});
|
|
127
129
|
|
|
@@ -142,14 +144,18 @@ function hasComponentName(type: unknown, targetName: string): boolean {
|
|
|
142
144
|
comp?.__name === targetName
|
|
143
145
|
);
|
|
144
146
|
}
|
|
147
|
+
|
|
145
148
|
return false;
|
|
146
149
|
}
|
|
147
150
|
|
|
148
151
|
function countSlottedLayers(slotNodes?: VNode[]): number {
|
|
149
|
-
if (!slotNodes)
|
|
152
|
+
if (!slotNodes) {
|
|
153
|
+
return 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
150
156
|
let count = 0;
|
|
151
157
|
for (const node of slotNodes) {
|
|
152
|
-
if (hasComponentName(node.type, '
|
|
158
|
+
if (hasComponentName(node.type, 'ArcDefenseInDepthLayer')) {
|
|
153
159
|
count++;
|
|
154
160
|
continue;
|
|
155
161
|
}
|
|
@@ -157,6 +163,7 @@ function countSlottedLayers(slotNodes?: VNode[]): number {
|
|
|
157
163
|
count += countSlottedLayers(node.children as VNode[]);
|
|
158
164
|
}
|
|
159
165
|
}
|
|
166
|
+
|
|
160
167
|
return count;
|
|
161
168
|
}
|
|
162
169
|
|
|
@@ -166,13 +173,13 @@ const slottedLayerCount = computed(() => {
|
|
|
166
173
|
});
|
|
167
174
|
|
|
168
175
|
const registeredLayerTokens = ref<symbol[]>([]);
|
|
169
|
-
const registeredLayerData = ref<
|
|
170
|
-
|
|
171
|
-
);
|
|
176
|
+
const registeredLayerData = ref<
|
|
177
|
+
Map<symbol, IArcDefenseInDepthRegisteredLayerData>
|
|
178
|
+
>(new Map());
|
|
172
179
|
|
|
173
180
|
function registerLayer(
|
|
174
181
|
token?: symbol,
|
|
175
|
-
dataRef?: ComputedRef<
|
|
182
|
+
dataRef?: ComputedRef<IArcDefenseInDepthRegisteredLayerData | undefined>,
|
|
176
183
|
) {
|
|
177
184
|
const lToken = token ?? Symbol();
|
|
178
185
|
if (!registeredLayerTokens.value.includes(lToken)) {
|
|
@@ -216,27 +223,30 @@ const resolvedCount = computed<number>(() => {
|
|
|
216
223
|
if (props.count !== undefined && props.count > 0) {
|
|
217
224
|
return Math.max(1, Math.min(props.count, 6));
|
|
218
225
|
}
|
|
219
|
-
|
|
220
|
-
return Math.max(1, Math.min(props.layers.length, 6));
|
|
221
|
-
}
|
|
226
|
+
|
|
222
227
|
if (slottedLayerCount.value > 0) {
|
|
223
228
|
return Math.max(1, Math.min(slottedLayerCount.value, 6));
|
|
224
229
|
}
|
|
230
|
+
|
|
225
231
|
if (registeredLayerTokens.value.length > 0) {
|
|
226
232
|
return Math.max(1, Math.min(registeredLayerTokens.value.length, 6));
|
|
227
233
|
}
|
|
234
|
+
|
|
228
235
|
return 0;
|
|
229
236
|
});
|
|
230
237
|
|
|
231
|
-
const resolvedLayers = computed<
|
|
232
|
-
const indexed: (
|
|
233
|
-
const unindexed:
|
|
238
|
+
const resolvedLayers = computed<IArcDefenseInDepthLayerItem[]>(() => {
|
|
239
|
+
const indexed: (IArcDefenseInDepthLayerItem | undefined)[] = [];
|
|
240
|
+
const unindexed: IArcDefenseInDepthLayerItem[] = [];
|
|
234
241
|
|
|
235
242
|
for (let i = 0; i < registeredLayerTokens.value.length; i++) {
|
|
236
243
|
const token = registeredLayerTokens.value[i];
|
|
237
|
-
if (!token)
|
|
244
|
+
if (!token) {
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
|
|
238
248
|
const data = registeredLayerData.value.get(token);
|
|
239
|
-
const item:
|
|
249
|
+
const item: IArcDefenseInDepthLayerItem = {
|
|
240
250
|
title: data?.title ?? '',
|
|
241
251
|
color: data?.color,
|
|
242
252
|
parts: data?.parts ?? [],
|
|
@@ -252,7 +262,7 @@ const resolvedLayers = computed<IArcDiDLayerItem[]>(() => {
|
|
|
252
262
|
}
|
|
253
263
|
|
|
254
264
|
let unindexedIdx = 0;
|
|
255
|
-
const result:
|
|
265
|
+
const result: IArcDefenseInDepthLayerItem[] = [];
|
|
256
266
|
const total = Math.max(indexed.length, registeredLayerTokens.value.length);
|
|
257
267
|
for (let i = 0; i < total; i++) {
|
|
258
268
|
const item = indexed[i];
|
|
@@ -265,18 +275,12 @@ const resolvedLayers = computed<IArcDiDLayerItem[]>(() => {
|
|
|
265
275
|
}
|
|
266
276
|
}
|
|
267
277
|
}
|
|
268
|
-
return result;
|
|
269
|
-
});
|
|
270
278
|
|
|
271
|
-
|
|
272
|
-
if (props.layers && props.layers.length > 0) {
|
|
273
|
-
return props.layers;
|
|
274
|
-
}
|
|
275
|
-
return resolvedLayers.value;
|
|
279
|
+
return result;
|
|
276
280
|
});
|
|
277
281
|
|
|
278
282
|
const palette = computed(() =>
|
|
279
|
-
|
|
283
|
+
resolveArcDefenseInDepthPalette(props.color, resolvedCount.value),
|
|
280
284
|
);
|
|
281
285
|
|
|
282
286
|
function getLayerColor(index: number): string {
|
|
@@ -327,21 +331,23 @@ function setActivePart(part: string | number | undefined): void {
|
|
|
327
331
|
emit('update:activePart', part);
|
|
328
332
|
}
|
|
329
333
|
|
|
330
|
-
function isPartActive(part:
|
|
334
|
+
function isPartActive(part: IArcDefenseInDepthPartGeometry): boolean {
|
|
331
335
|
if (part.active) {
|
|
332
336
|
return true;
|
|
333
337
|
}
|
|
338
|
+
|
|
334
339
|
if (internalActivePart.value !== undefined) {
|
|
335
340
|
return (
|
|
336
341
|
internalActivePart.value === part.label ||
|
|
337
342
|
internalActivePart.value === part.index
|
|
338
343
|
);
|
|
339
344
|
}
|
|
345
|
+
|
|
340
346
|
return false;
|
|
341
347
|
}
|
|
342
348
|
|
|
343
349
|
const geo = computed(() => {
|
|
344
|
-
return
|
|
350
|
+
return createArcDefenseInDepthGeometry({
|
|
345
351
|
viewBoxWidth: props.viewBoxWidth,
|
|
346
352
|
viewBoxHeight: props.viewBoxHeight,
|
|
347
353
|
innerRadius: props.innerRadius,
|
|
@@ -350,7 +356,7 @@ const geo = computed(() => {
|
|
|
350
356
|
gap: props.gap,
|
|
351
357
|
order: props.order,
|
|
352
358
|
titleAngleSpan: props.titleAngleSpan,
|
|
353
|
-
layers:
|
|
359
|
+
layers: resolvedLayers.value,
|
|
354
360
|
});
|
|
355
361
|
});
|
|
356
362
|
|
|
@@ -358,6 +364,7 @@ const hasAnyActivePart = computed<boolean>(() => {
|
|
|
358
364
|
if (internalActivePart.value !== undefined) {
|
|
359
365
|
return true;
|
|
360
366
|
}
|
|
367
|
+
|
|
361
368
|
for (const layer of geo.value.layers) {
|
|
362
369
|
for (const part of layer.parts) {
|
|
363
370
|
if (part.active) {
|
|
@@ -365,6 +372,7 @@ const hasAnyActivePart = computed<boolean>(() => {
|
|
|
365
372
|
}
|
|
366
373
|
}
|
|
367
374
|
}
|
|
375
|
+
|
|
368
376
|
return false;
|
|
369
377
|
});
|
|
370
378
|
|
|
@@ -380,17 +388,25 @@ function getPartOpacity(layerIndex: number, isActive: boolean): number {
|
|
|
380
388
|
if (hasAnyActivePart.value) {
|
|
381
389
|
return isActive ? 1 : 0.28;
|
|
382
390
|
}
|
|
391
|
+
|
|
383
392
|
if (
|
|
384
393
|
internalActiveIndex.value === -1 ||
|
|
385
394
|
internalActiveIndex.value === layerIndex
|
|
386
395
|
) {
|
|
387
396
|
return 1;
|
|
388
397
|
}
|
|
398
|
+
|
|
389
399
|
return 0.45;
|
|
390
400
|
}
|
|
391
401
|
|
|
392
|
-
function handlePartClick(
|
|
393
|
-
|
|
402
|
+
function handlePartClick(
|
|
403
|
+
part: IArcDefenseInDepthPartGeometry,
|
|
404
|
+
layerIndex: number,
|
|
405
|
+
): void {
|
|
406
|
+
if (!props.interactive) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
|
|
394
410
|
emit('part-click', part);
|
|
395
411
|
if (isPartActive(part)) {
|
|
396
412
|
setActivePart(undefined);
|
|
@@ -405,7 +421,7 @@ function handlePartClick(part: IArcDiDPartGeometry, layerIndex: number): void {
|
|
|
405
421
|
}
|
|
406
422
|
}
|
|
407
423
|
|
|
408
|
-
const rootContext:
|
|
424
|
+
const rootContext: IArcDefenseInDepthRootContext = {
|
|
409
425
|
geo,
|
|
410
426
|
count: resolvedCount,
|
|
411
427
|
activeIndex: internalActiveIndex,
|
|
@@ -414,7 +430,10 @@ const rootContext: IArcDiDRootContext = {
|
|
|
414
430
|
setActivePart,
|
|
415
431
|
hasAnyActivePart,
|
|
416
432
|
isPartActive: (label, index, activeProp) => {
|
|
417
|
-
if (activeProp)
|
|
433
|
+
if (activeProp) {
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
436
|
+
|
|
418
437
|
if (internalActivePart.value !== undefined) {
|
|
419
438
|
return (
|
|
420
439
|
internalActivePart.value === label || internalActivePart.value === index
|
|
@@ -449,6 +468,7 @@ const stageTransform = computed(() => {
|
|
|
449
468
|
if (resolvedScale.value !== 1) {
|
|
450
469
|
return `scale(${resolvedScale.value})`;
|
|
451
470
|
}
|
|
471
|
+
|
|
452
472
|
return undefined;
|
|
453
473
|
});
|
|
454
474
|
|
|
@@ -456,6 +476,7 @@ const resolvedWidthStyle = computed(() => {
|
|
|
456
476
|
if (props.width !== undefined) {
|
|
457
477
|
return typeof props.width === 'number' ? `${props.width}px` : props.width;
|
|
458
478
|
}
|
|
479
|
+
|
|
459
480
|
return '100%';
|
|
460
481
|
});
|
|
461
482
|
|
|
@@ -465,9 +486,11 @@ const resolvedHeightStyle = computed(() => {
|
|
|
465
486
|
? `${props.height}px`
|
|
466
487
|
: props.height;
|
|
467
488
|
}
|
|
489
|
+
|
|
468
490
|
if (containerHeight.value > 0) {
|
|
469
491
|
return `${containerHeight.value}px`;
|
|
470
492
|
}
|
|
493
|
+
|
|
471
494
|
return `${props.viewBoxHeight}px`;
|
|
472
495
|
});
|
|
473
496
|
|
|
@@ -485,17 +508,15 @@ function handleContainerClick(event: MouseEvent): void {
|
|
|
485
508
|
emit('click', event);
|
|
486
509
|
}
|
|
487
510
|
|
|
488
|
-
const uid = Math.random().toString(36).slice(2, 8);
|
|
489
|
-
const gradIdPrefix = `alpha-arc-did-grad-${uid}`;
|
|
490
|
-
|
|
491
511
|
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
492
|
-
'alpha-arc-
|
|
512
|
+
'alpha-arc-defense-in-depth w-full flex items-center justify-center select-none relative border-0 p-0 m-0 min-w-0 bg-transparent',
|
|
493
513
|
);
|
|
494
514
|
</script>
|
|
495
515
|
|
|
496
516
|
<template>
|
|
497
|
-
<
|
|
517
|
+
<fieldset
|
|
498
518
|
ref="rootRef"
|
|
519
|
+
aria-label="Defense in depth diagram"
|
|
499
520
|
v-bind="forwardedAttrs()"
|
|
500
521
|
:class="className()"
|
|
501
522
|
:data-count="resolvedCount"
|
|
@@ -504,13 +525,14 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
504
525
|
:style="{
|
|
505
526
|
width: resolvedWidthStyle,
|
|
506
527
|
height: resolvedHeightStyle,
|
|
507
|
-
'--arc-
|
|
528
|
+
'--alpha-arc-defense-in-depth-start-delay': `${resolvedStartDelay}ms`,
|
|
508
529
|
}"
|
|
509
530
|
@click="handleContainerClick"
|
|
531
|
+
@keydown="activateOnKeyboard"
|
|
510
532
|
>
|
|
511
533
|
<!-- Stage Container with diagram auto-scale -->
|
|
512
534
|
<div
|
|
513
|
-
class="alpha-arc-
|
|
535
|
+
class="alpha-arc-defense-in-depth__stage relative flex items-center justify-center overflow-visible shrink-0"
|
|
514
536
|
:style="{
|
|
515
537
|
width: `${props.viewBoxWidth}px`,
|
|
516
538
|
height: `${props.viewBoxHeight}px`,
|
|
@@ -520,23 +542,30 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
520
542
|
>
|
|
521
543
|
<!-- Base SVG Layer: Concentric Arcs and Decorative Flairs -->
|
|
522
544
|
<svg
|
|
523
|
-
class="alpha-arc-
|
|
545
|
+
class="alpha-arc-defense-in-depth__svg absolute inset-0 w-full h-full overflow-visible pointer-events-none"
|
|
524
546
|
:viewBox="`0 0 ${props.viewBoxWidth} ${props.viewBoxHeight}`"
|
|
525
547
|
xmlns="http://www.w3.org/2000/svg"
|
|
526
548
|
>
|
|
549
|
+
<title>Defense in depth diagram</title>
|
|
527
550
|
<defs>
|
|
528
|
-
<filter
|
|
551
|
+
<filter
|
|
552
|
+
id="alpha-arc-defense-in-depth-glow"
|
|
553
|
+
x="-20%"
|
|
554
|
+
y="-20%"
|
|
555
|
+
width="140%"
|
|
556
|
+
height="140%"
|
|
557
|
+
>
|
|
529
558
|
<feGaussianBlur stdDeviation="3" result="blur" />
|
|
530
559
|
<feComposite in="SourceGraphic" in2="blur" operator="over" />
|
|
531
560
|
</filter>
|
|
532
561
|
</defs>
|
|
533
562
|
|
|
534
563
|
<!-- Concentric Arc Bands (Seamless with zero spacing) -->
|
|
535
|
-
<g class="alpha-arc-
|
|
564
|
+
<g class="alpha-arc-defense-in-depth__layers">
|
|
536
565
|
<g
|
|
537
566
|
v-for="layer in geo.layers"
|
|
538
567
|
:key="layer.index"
|
|
539
|
-
class="alpha-arc-
|
|
568
|
+
class="alpha-arc-defense-in-depth__layer-group"
|
|
540
569
|
>
|
|
541
570
|
<!-- Full base band -->
|
|
542
571
|
<path
|
|
@@ -545,10 +574,9 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
545
574
|
:stroke="props.showPartBoundaries ? palette.strokeColor : 'none'"
|
|
546
575
|
:stroke-width="props.showPartBoundaries ? 1.5 : 0"
|
|
547
576
|
stroke-linejoin="round"
|
|
548
|
-
class="alpha-arc-
|
|
577
|
+
class="alpha-arc-defense-in-depth__band transition-all duration-300 ease-out pointer-events-none"
|
|
549
578
|
:class="[
|
|
550
|
-
{ 'alpha-arc-
|
|
551
|
-
props.interactive ? 'cursor-pointer pointer-events-auto' : 'pointer-events-none',
|
|
579
|
+
{ 'alpha-arc-defense-in-depth__band--animated': isAnimated },
|
|
552
580
|
]"
|
|
553
581
|
:style="{
|
|
554
582
|
opacity: hasAnyActivePart
|
|
@@ -556,11 +584,10 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
556
584
|
: (internalActiveIndex === -1 || internalActiveIndex === layer.index ? 1 : 0.45),
|
|
557
585
|
filter:
|
|
558
586
|
internalActiveIndex === layer.index && !hasAnyActivePart
|
|
559
|
-
? '
|
|
587
|
+
? 'var(--alpha-arc-defense-in-depth-layer-glow)'
|
|
560
588
|
: undefined,
|
|
561
589
|
'--layer-anim-delay': `${resolvedStartDelay + layer.index * 100}ms`,
|
|
562
590
|
}"
|
|
563
|
-
@click="handleLayerClick(layer.index)"
|
|
564
591
|
/>
|
|
565
592
|
|
|
566
593
|
<!-- Title Sector Boundary/Area (when layer has parts) -->
|
|
@@ -571,10 +598,9 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
571
598
|
:stroke="palette.strokeColor"
|
|
572
599
|
stroke-width="1.5"
|
|
573
600
|
stroke-linejoin="round"
|
|
574
|
-
class="alpha-arc-
|
|
601
|
+
class="alpha-arc-defense-in-depth__band alpha-arc-defense-in-depth__sector alpha-arc-defense-in-depth__sector--title transition-all duration-300 ease-out hover:brightness-105 pointer-events-none"
|
|
575
602
|
:class="[
|
|
576
|
-
{ 'alpha-arc-
|
|
577
|
-
props.interactive ? 'cursor-pointer pointer-events-auto' : 'pointer-events-none',
|
|
603
|
+
{ 'alpha-arc-defense-in-depth__band--animated': isAnimated },
|
|
578
604
|
]"
|
|
579
605
|
:style="{
|
|
580
606
|
opacity: hasAnyActivePart
|
|
@@ -582,7 +608,6 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
582
608
|
: (internalActiveIndex === -1 || internalActiveIndex === layer.index ? 1 : 0.45),
|
|
583
609
|
'--layer-anim-delay': `${resolvedStartDelay + layer.index * 100}ms`,
|
|
584
610
|
}"
|
|
585
|
-
@click="handleLayerClick(layer.index)"
|
|
586
611
|
/>
|
|
587
612
|
|
|
588
613
|
<!-- Interactive Part Sector Areas on top with visible boundaries -->
|
|
@@ -595,23 +620,21 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
595
620
|
:key="part.index"
|
|
596
621
|
:d="part.path"
|
|
597
622
|
:fill="isPartActive(part) ? getActivePartFill(part.color || sector.color, getLayerColor(layer.index)) : (part.color || sector.color || getLayerColor(layer.index))"
|
|
598
|
-
:stroke="isPartActive(part) ? '
|
|
623
|
+
:stroke="isPartActive(part) ? 'var(--alpha-arc-defense-in-depth-active-stroke)' : (props.showPartBoundaries ? palette.strokeColor : 'none')"
|
|
599
624
|
:stroke-width="isPartActive(part) ? 3.5 : (props.showPartBoundaries ? 1.5 : 0)"
|
|
600
625
|
stroke-linejoin="round"
|
|
601
|
-
class="alpha-arc-
|
|
626
|
+
class="alpha-arc-defense-in-depth__band alpha-arc-defense-in-depth__sector alpha-arc-defense-in-depth__sector--part transition-all duration-300 ease-out hover:brightness-110 pointer-events-none"
|
|
602
627
|
:class="[
|
|
603
|
-
{ 'alpha-arc-
|
|
604
|
-
{ 'alpha-arc-
|
|
605
|
-
props.interactive ? 'cursor-pointer pointer-events-auto' : 'pointer-events-none',
|
|
628
|
+
{ 'alpha-arc-defense-in-depth__band--animated': isAnimated },
|
|
629
|
+
{ 'alpha-arc-defense-in-depth__sector--active': isPartActive(part) },
|
|
606
630
|
]"
|
|
607
631
|
:style="{
|
|
608
632
|
opacity: getPartOpacity(layer.index, isPartActive(part)),
|
|
609
633
|
filter: isPartActive(part)
|
|
610
|
-
? '
|
|
634
|
+
? 'var(--alpha-arc-defense-in-depth-active-glow)'
|
|
611
635
|
: undefined,
|
|
612
636
|
'--layer-anim-delay': `${resolvedStartDelay + layer.index * 100}ms`,
|
|
613
637
|
}"
|
|
614
|
-
@click.stop="handlePartClick(part, layer.index)"
|
|
615
638
|
/>
|
|
616
639
|
</template>
|
|
617
640
|
<!-- If sector is NOT split: render the entire sector band -->
|
|
@@ -619,28 +642,28 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
619
642
|
<path
|
|
620
643
|
:d="sector.path"
|
|
621
644
|
:fill="sector.parts[0] && isPartActive(sector.parts[0]) ? getActivePartFill(sector.color, getLayerColor(layer.index)) : (sector.color || getLayerColor(layer.index))"
|
|
622
|
-
:stroke="sector.parts[0] && isPartActive(sector.parts[0]) ? '
|
|
645
|
+
:stroke="sector.parts[0] && isPartActive(sector.parts[0]) ? 'var(--alpha-arc-defense-in-depth-active-stroke)' : (props.showPartBoundaries ? palette.strokeColor : 'none')"
|
|
623
646
|
:stroke-width="sector.parts[0] && isPartActive(sector.parts[0]) ? 3.5 : (props.showPartBoundaries ? 1.5 : 0)"
|
|
624
647
|
stroke-linejoin="round"
|
|
625
|
-
class="alpha-arc-
|
|
648
|
+
class="alpha-arc-defense-in-depth__band alpha-arc-defense-in-depth__sector alpha-arc-defense-in-depth__sector--part transition-all duration-300 ease-out hover:brightness-110 pointer-events-none"
|
|
626
649
|
:class="[
|
|
627
|
-
{ 'alpha-arc-
|
|
628
|
-
{ 'alpha-arc-
|
|
629
|
-
props.interactive ? 'cursor-pointer pointer-events-auto' : 'pointer-events-none',
|
|
650
|
+
{ 'alpha-arc-defense-in-depth__band--animated': isAnimated },
|
|
651
|
+
{ 'alpha-arc-defense-in-depth__sector--active': sector.parts[0] && isPartActive(sector.parts[0]) },
|
|
630
652
|
]"
|
|
631
653
|
:style="{
|
|
632
654
|
opacity: getPartOpacity(layer.index, !!(sector.parts[0] && isPartActive(sector.parts[0]))),
|
|
633
655
|
filter: sector.parts[0] && isPartActive(sector.parts[0])
|
|
634
|
-
? '
|
|
656
|
+
? 'var(--alpha-arc-defense-in-depth-active-glow)'
|
|
635
657
|
: undefined,
|
|
636
658
|
'--layer-anim-delay': `${resolvedStartDelay + layer.index * 100}ms`,
|
|
637
659
|
}"
|
|
638
|
-
@click.stop="sector.parts[0] ? handlePartClick(sector.parts[0], layer.index) : handleLayerClick(layer.index)"
|
|
639
660
|
/>
|
|
640
661
|
</template>
|
|
641
662
|
|
|
642
663
|
<!-- Divider concentric lines when sector is split -->
|
|
643
|
-
<template
|
|
664
|
+
<template
|
|
665
|
+
v-if="props.showPartBoundaries && sector.split && sector.dividerPaths.length > 0"
|
|
666
|
+
>
|
|
644
667
|
<path
|
|
645
668
|
v-for="(dPath, dIdx) in sector.dividerPaths"
|
|
646
669
|
:key="dIdx"
|
|
@@ -658,7 +681,10 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
658
681
|
</g>
|
|
659
682
|
|
|
660
683
|
<!-- Active Sector Highlight Overlay (rendered on top of all layers and dividers so stroke & glow are never clipped) -->
|
|
661
|
-
<g
|
|
684
|
+
<g
|
|
685
|
+
v-if="hasAnyActivePart"
|
|
686
|
+
class="alpha-arc-defense-in-depth__active-sectors pointer-events-none"
|
|
687
|
+
>
|
|
662
688
|
<template v-for="layer in geo.layers" :key="layer.index">
|
|
663
689
|
<template v-for="sector in layer.sectors" :key="sector.index">
|
|
664
690
|
<template v-if="sector.split">
|
|
@@ -667,12 +693,12 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
667
693
|
v-if="isPartActive(part) && part.path"
|
|
668
694
|
:d="part.path"
|
|
669
695
|
:fill="getActivePartFill(part.color || sector.color, getLayerColor(layer.index))"
|
|
670
|
-
stroke="
|
|
696
|
+
stroke="var(--alpha-arc-defense-in-depth-active-stroke)"
|
|
671
697
|
stroke-width="3.5"
|
|
672
698
|
stroke-linejoin="round"
|
|
673
|
-
class="alpha-arc-
|
|
699
|
+
class="alpha-arc-defense-in-depth__band alpha-arc-defense-in-depth__sector alpha-arc-defense-in-depth__sector--active pointer-events-none"
|
|
674
700
|
:style="{
|
|
675
|
-
filter: '
|
|
701
|
+
filter: 'var(--alpha-arc-defense-in-depth-active-glow)',
|
|
676
702
|
}"
|
|
677
703
|
/>
|
|
678
704
|
</template>
|
|
@@ -682,12 +708,12 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
682
708
|
v-if="sector.parts[0] && isPartActive(sector.parts[0]) && sector.path"
|
|
683
709
|
:d="sector.path"
|
|
684
710
|
:fill="getActivePartFill(sector.color, getLayerColor(layer.index))"
|
|
685
|
-
stroke="
|
|
711
|
+
stroke="var(--alpha-arc-defense-in-depth-active-stroke)"
|
|
686
712
|
stroke-width="3.5"
|
|
687
713
|
stroke-linejoin="round"
|
|
688
|
-
class="alpha-arc-
|
|
714
|
+
class="alpha-arc-defense-in-depth__band alpha-arc-defense-in-depth__sector alpha-arc-defense-in-depth__sector--active pointer-events-none"
|
|
689
715
|
:style="{
|
|
690
|
-
filter: '
|
|
716
|
+
filter: 'var(--alpha-arc-defense-in-depth-active-glow)',
|
|
691
717
|
}"
|
|
692
718
|
/>
|
|
693
719
|
</template>
|
|
@@ -699,27 +725,71 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
699
725
|
<path
|
|
700
726
|
v-if="geo.innerCutoutPath"
|
|
701
727
|
:d="geo.innerCutoutPath"
|
|
702
|
-
fill="
|
|
728
|
+
fill="var(--alpha-arc-defense-in-depth-center-fill)"
|
|
703
729
|
stroke="none"
|
|
704
730
|
class="pointer-events-none"
|
|
705
731
|
/>
|
|
706
732
|
</svg>
|
|
707
733
|
|
|
734
|
+
<template v-if="props.interactive">
|
|
735
|
+
<template v-for="layer in geo.layers" :key="`layer-${layer.index}`">
|
|
736
|
+
<button
|
|
737
|
+
type="button"
|
|
738
|
+
class="alpha-interaction-control"
|
|
739
|
+
:aria-label="`Select layer ${layer.index + 1}`"
|
|
740
|
+
:style="{ clipPath: `path('${layer.path}')` }"
|
|
741
|
+
@click="handleLayerClick(layer.index)"
|
|
742
|
+
/>
|
|
743
|
+
<button
|
|
744
|
+
v-if="props.showPartBoundaries && layer.titlePath && layer.parts.length > 0"
|
|
745
|
+
type="button"
|
|
746
|
+
class="alpha-interaction-control"
|
|
747
|
+
:aria-label="`Select layer ${layer.index + 1}`"
|
|
748
|
+
:style="{ clipPath: `path('${layer.titlePath}')` }"
|
|
749
|
+
@click="handleLayerClick(layer.index)"
|
|
750
|
+
/>
|
|
751
|
+
<template v-for="sector in layer.sectors" :key="sector.index">
|
|
752
|
+
<template v-if="sector.split">
|
|
753
|
+
<button
|
|
754
|
+
v-for="part in sector.parts"
|
|
755
|
+
:key="part.index"
|
|
756
|
+
type="button"
|
|
757
|
+
class="alpha-interaction-control"
|
|
758
|
+
:aria-label="`Select part ${part.index + 1}`"
|
|
759
|
+
:style="{ clipPath: `path('${part.path}')` }"
|
|
760
|
+
@click.stop="handlePartClick(part, layer.index)"
|
|
761
|
+
/>
|
|
762
|
+
</template>
|
|
763
|
+
<button
|
|
764
|
+
v-else
|
|
765
|
+
type="button"
|
|
766
|
+
class="alpha-interaction-control"
|
|
767
|
+
:aria-label="`Select sector ${sector.index + 1}`"
|
|
768
|
+
:style="{ clipPath: `path('${sector.path}')` }"
|
|
769
|
+
@click.stop="sector.parts[0] ? handlePartClick(sector.parts[0], layer.index) : handleLayerClick(layer.index)"
|
|
770
|
+
/>
|
|
771
|
+
</template>
|
|
772
|
+
</template>
|
|
773
|
+
</template>
|
|
774
|
+
|
|
708
775
|
<!-- Stage Overlays: Slotted Layers -->
|
|
709
|
-
<div
|
|
776
|
+
<div
|
|
777
|
+
class="alpha-arc-defense-in-depth__stage-overlay absolute inset-0 w-full h-full pointer-events-none"
|
|
778
|
+
>
|
|
710
779
|
<slot />
|
|
711
780
|
</div>
|
|
712
781
|
</div>
|
|
713
|
-
</
|
|
782
|
+
</fieldset>
|
|
714
783
|
</template>
|
|
715
784
|
|
|
716
785
|
<style scoped>
|
|
717
|
-
.alpha-arc-
|
|
718
|
-
animation: arc-
|
|
786
|
+
.alpha-arc-defense-in-depth__band--animated {
|
|
787
|
+
animation: arc-defense-in-depth-band-in 600ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
788
|
+
var(--layer-anim-delay, 0ms) both;
|
|
719
789
|
transform-origin: 50% 90%;
|
|
720
790
|
}
|
|
721
791
|
|
|
722
|
-
@keyframes arc-
|
|
792
|
+
@keyframes arc-defense-in-depth-band-in {
|
|
723
793
|
0% {
|
|
724
794
|
opacity: 0;
|
|
725
795
|
transform: scale(0.92);
|