@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
|
@@ -16,18 +16,16 @@ import {
|
|
|
16
16
|
SQUARE_PYRAMID_ROOT_KEY,
|
|
17
17
|
SQUARE_PYRAMID_STACK_KEY,
|
|
18
18
|
} from '../../../utils/pyramid/square-pyramid';
|
|
19
|
-
import
|
|
20
|
-
import SquarePyramidStackTitle from './SquarePyramidStackTitle.vue';
|
|
19
|
+
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
21
20
|
|
|
22
21
|
defineOptions({
|
|
23
22
|
name: 'SquarePyramidStack',
|
|
23
|
+
inheritAttrs: false,
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export interface ISquarePyramidStackProps {
|
|
27
27
|
readonly index?: number;
|
|
28
28
|
readonly step?: string | number;
|
|
29
|
-
readonly title?: string;
|
|
30
|
-
readonly content?: string;
|
|
31
29
|
readonly color?: string;
|
|
32
30
|
readonly active?: boolean;
|
|
33
31
|
readonly connectorWidth?: number;
|
|
@@ -36,8 +34,6 @@ export interface ISquarePyramidStackProps {
|
|
|
36
34
|
const props = withDefaults(defineProps<ISquarePyramidStackProps>(), {
|
|
37
35
|
index: undefined,
|
|
38
36
|
step: undefined,
|
|
39
|
-
title: undefined,
|
|
40
|
-
content: undefined,
|
|
41
37
|
color: undefined,
|
|
42
38
|
active: undefined,
|
|
43
39
|
connectorWidth: undefined,
|
|
@@ -56,13 +52,16 @@ interface INamedComponent {
|
|
|
56
52
|
function hasComponentName(type: unknown, targetName: string): boolean {
|
|
57
53
|
if (typeof type === 'object' && type !== null) {
|
|
58
54
|
const comp = type as INamedComponent['type'];
|
|
55
|
+
|
|
59
56
|
return comp?.name === targetName || comp?.displayName === targetName;
|
|
60
57
|
}
|
|
58
|
+
|
|
61
59
|
return false;
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
function flattenVNodes(nodes: VNode[]): VNode[] {
|
|
65
63
|
const result: VNode[] = [];
|
|
64
|
+
|
|
66
65
|
for (const node of nodes) {
|
|
67
66
|
if (node.type === Fragment && Array.isArray(node.children)) {
|
|
68
67
|
result.push(...flattenVNodes(node.children as VNode[]));
|
|
@@ -70,6 +69,7 @@ function flattenVNodes(nodes: VNode[]): VNode[] {
|
|
|
70
69
|
result.push(node);
|
|
71
70
|
}
|
|
72
71
|
}
|
|
72
|
+
|
|
73
73
|
return result;
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -77,19 +77,20 @@ const defaultNodes = computed(() => {
|
|
|
77
77
|
if (!slots.default) {
|
|
78
78
|
return [];
|
|
79
79
|
}
|
|
80
|
+
|
|
80
81
|
return flattenVNodes(slots.default());
|
|
81
82
|
});
|
|
82
83
|
|
|
83
84
|
const slottedTitle = computed(() => {
|
|
84
|
-
return defaultNodes.value.find((node) =>
|
|
85
|
-
hasComponentName(node.type, '
|
|
86
|
-
);
|
|
85
|
+
return defaultNodes.value.find((node) => {
|
|
86
|
+
return hasComponentName(node.type, 'SquarePyramidStackHeading');
|
|
87
|
+
});
|
|
87
88
|
});
|
|
88
89
|
|
|
89
90
|
const slottedContent = computed(() => {
|
|
90
|
-
return defaultNodes.value.find((node) =>
|
|
91
|
-
hasComponentName(node.type, 'SquarePyramidStackContent')
|
|
92
|
-
);
|
|
91
|
+
return defaultNodes.value.find((node) => {
|
|
92
|
+
return hasComponentName(node.type, 'SquarePyramidStackContent');
|
|
93
|
+
});
|
|
93
94
|
});
|
|
94
95
|
|
|
95
96
|
const stackToken = Symbol();
|
|
@@ -108,6 +109,7 @@ const resolvedIndex = computed<number>(() => {
|
|
|
108
109
|
if (props.index !== undefined) {
|
|
109
110
|
return Number(props.index);
|
|
110
111
|
}
|
|
112
|
+
|
|
111
113
|
return registration?.index.value ?? 0;
|
|
112
114
|
});
|
|
113
115
|
|
|
@@ -115,9 +117,11 @@ const isActive = computed<boolean>(() => {
|
|
|
115
117
|
if (props.active !== undefined) {
|
|
116
118
|
return props.active;
|
|
117
119
|
}
|
|
120
|
+
|
|
118
121
|
if (!rootContext) {
|
|
119
122
|
return false;
|
|
120
123
|
}
|
|
124
|
+
|
|
121
125
|
return rootContext.activeIndex.value === resolvedIndex.value;
|
|
122
126
|
});
|
|
123
127
|
|
|
@@ -125,6 +129,7 @@ const resolvedStep = computed(() => {
|
|
|
125
129
|
if (props.step !== undefined) {
|
|
126
130
|
return props.step;
|
|
127
131
|
}
|
|
132
|
+
|
|
128
133
|
return String(resolvedIndex.value + 1).padStart(2, '0');
|
|
129
134
|
});
|
|
130
135
|
|
|
@@ -132,6 +137,7 @@ const layerGeometry = computed(() => {
|
|
|
132
137
|
if (!rootContext) {
|
|
133
138
|
return undefined;
|
|
134
139
|
}
|
|
140
|
+
|
|
135
141
|
return rootContext.geo.value.layers[resolvedIndex.value];
|
|
136
142
|
});
|
|
137
143
|
|
|
@@ -139,7 +145,9 @@ const posY = computed(() => {
|
|
|
139
145
|
if (!layerGeometry.value) {
|
|
140
146
|
return 0;
|
|
141
147
|
}
|
|
148
|
+
|
|
142
149
|
const geo = layerGeometry.value;
|
|
150
|
+
|
|
143
151
|
return (
|
|
144
152
|
geo.slabCenterY ?? Number((geo.cy + (geo.slabHeight ?? 0) / 2).toFixed(2))
|
|
145
153
|
);
|
|
@@ -151,8 +159,10 @@ const leftWidth = computed(() => {
|
|
|
151
159
|
if (layerGeometry.value) {
|
|
152
160
|
const rx = layerGeometry.value.rx;
|
|
153
161
|
const cx = 465;
|
|
162
|
+
|
|
154
163
|
return Math.max(180, Math.round(cx - rx - PYRAMID_DOT_GAP_PX));
|
|
155
164
|
}
|
|
165
|
+
|
|
156
166
|
return DOT_POSITION_X;
|
|
157
167
|
});
|
|
158
168
|
|
|
@@ -164,25 +174,27 @@ const rightWingWidth = computed(() => {
|
|
|
164
174
|
const cx = 465;
|
|
165
175
|
const dotRightX = cx + rx + PYRAMID_DOT_GAP_PX;
|
|
166
176
|
const containerW = 960;
|
|
177
|
+
|
|
167
178
|
return Math.max(rightWidth.value + 20, Math.round(containerW - dotRightX));
|
|
168
179
|
}
|
|
180
|
+
|
|
169
181
|
return rightWidth.value + PYRAMID_DOT_GAP_PX;
|
|
170
182
|
});
|
|
171
183
|
|
|
172
|
-
const rightOffset = computed(
|
|
173
|
-
() => rootContext?.contentRightOffsetPx.value ?? 0,
|
|
174
|
-
);
|
|
175
|
-
|
|
176
184
|
const resolvedColor = computed<string>(() => {
|
|
177
185
|
if (effectiveColor.value) {
|
|
178
186
|
return effectiveColor.value;
|
|
179
187
|
}
|
|
188
|
+
|
|
189
|
+
const stackIndex =
|
|
190
|
+
Math.abs(resolvedIndex.value) % DEFAULT_SQUARE_PYRAMID_STACK_COLORS.length;
|
|
191
|
+
const stackColor =
|
|
192
|
+
DEFAULT_SQUARE_PYRAMID_STACK_COLORS[stackIndex] ??
|
|
193
|
+
DEFAULT_SQUARE_PYRAMID_COLOR;
|
|
194
|
+
|
|
180
195
|
return (
|
|
181
196
|
rootContext?.getLayerColor(resolvedIndex.value) ??
|
|
182
|
-
|
|
183
|
-
Math.abs(resolvedIndex.value) % DEFAULT_SQUARE_PYRAMID_STACK_COLORS.length
|
|
184
|
-
] ??
|
|
185
|
-
DEFAULT_SQUARE_PYRAMID_COLOR
|
|
197
|
+
`var(--alpha-square-pyramid-stack-${stackIndex + 1}-color, ${stackColor})`
|
|
186
198
|
);
|
|
187
199
|
});
|
|
188
200
|
|
|
@@ -222,17 +234,23 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
222
234
|
connectorWidth,
|
|
223
235
|
setActive: handleStackClick,
|
|
224
236
|
});
|
|
237
|
+
|
|
238
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
239
|
+
'alpha-square-pyramid-stack absolute inset-x-0 pointer-events-none select-none flex items-center justify-between',
|
|
240
|
+
);
|
|
225
241
|
</script>
|
|
226
242
|
|
|
227
243
|
<template>
|
|
228
244
|
<div
|
|
229
|
-
|
|
230
|
-
:class="
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
245
|
+
v-bind="forwardedAttrs()"
|
|
246
|
+
:class="
|
|
247
|
+
className([
|
|
248
|
+
isActive
|
|
249
|
+
? 'alpha-square-pyramid-stack--active'
|
|
250
|
+
: 'alpha-square-pyramid-stack--inactive',
|
|
251
|
+
`alpha-square-pyramid-stack--${resolvedIndex}`,
|
|
252
|
+
])
|
|
253
|
+
"
|
|
236
254
|
:data-index="resolvedIndex"
|
|
237
255
|
:data-active="isActive"
|
|
238
256
|
:style="{
|
|
@@ -241,14 +259,17 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
241
259
|
}"
|
|
242
260
|
>
|
|
243
261
|
<!-- Left Wing: Title Pill (150px) -->
|
|
244
|
-
<
|
|
245
|
-
|
|
262
|
+
<button
|
|
263
|
+
type="button"
|
|
264
|
+
class="alpha-square-pyramid-stack__left shrink-0 flex items-center justify-start pointer-events-auto cursor-pointer bg-transparent border-0 p-0 m-0 appearance-none"
|
|
265
|
+
:disabled="!rootContext?.interactive.value"
|
|
266
|
+
:aria-label="`Select stage ${resolvedStep}`"
|
|
246
267
|
:class="[
|
|
247
268
|
`alpha-square-pyramid-stack__left--${resolvedIndex}`,
|
|
248
269
|
{ 'alpha-square-pyramid-stack--animated': rootContext?.animation.value },
|
|
249
270
|
]"
|
|
250
271
|
:style="{
|
|
251
|
-
'--wing-delay': `calc(var(--square-pyramid-start-delay, 0ms) + ${460 + stepIndex * 320}ms)`,
|
|
272
|
+
'--wing-delay': `calc(var(--alpha-square-pyramid-start-delay, 0ms) + ${460 + stepIndex * 320}ms)`,
|
|
252
273
|
width: `${leftWidth}px`,
|
|
253
274
|
minWidth: `${leftWidth}px`,
|
|
254
275
|
maxWidth: `${leftWidth}px`,
|
|
@@ -257,36 +278,28 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
257
278
|
@click="handleStackClick"
|
|
258
279
|
>
|
|
259
280
|
<component :is="slottedTitle" v-if="slottedTitle" />
|
|
260
|
-
|
|
261
|
-
v-else
|
|
262
|
-
:step="resolvedStep"
|
|
263
|
-
:title="props.title || `Stage ${resolvedStep}`"
|
|
264
|
-
:connector-width="props.connectorWidth"
|
|
265
|
-
/>
|
|
266
|
-
</div>
|
|
281
|
+
</button>
|
|
267
282
|
<!-- Right Wing: Dot + Connector + Content Card (10px from slab) -->
|
|
268
|
-
<
|
|
269
|
-
|
|
283
|
+
<button
|
|
284
|
+
type="button"
|
|
285
|
+
class="alpha-square-pyramid-stack__right shrink-0 flex items-center justify-end pointer-events-auto cursor-pointer bg-transparent border-0 p-0 m-0 appearance-none"
|
|
286
|
+
:disabled="!rootContext?.interactive.value"
|
|
287
|
+
:aria-label="`Select stage ${resolvedStep}`"
|
|
270
288
|
:class="[
|
|
271
289
|
`alpha-square-pyramid-stack__right--${resolvedIndex}`,
|
|
272
290
|
{ 'alpha-square-pyramid-stack--animated': rootContext?.animation.value },
|
|
273
291
|
]"
|
|
274
292
|
:style="{
|
|
275
|
-
'--wing-delay': `calc(var(--square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
|
|
293
|
+
'--wing-delay': `calc(var(--alpha-square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
|
|
276
294
|
width: `${rightWingWidth}px`,
|
|
277
295
|
minWidth: `${rightWidth}px`,
|
|
278
296
|
maxWidth: `${rightWingWidth}px`,
|
|
279
|
-
marginRight: rightOffset ? `${rightOffset}px` : undefined,
|
|
280
297
|
opacity: !hasActiveStack || isActive ? 1 : 0.65,
|
|
281
298
|
}"
|
|
282
299
|
@click="handleStackClick"
|
|
283
300
|
>
|
|
284
301
|
<component :is="slottedContent" v-if="slottedContent" />
|
|
285
|
-
|
|
286
|
-
v-else
|
|
287
|
-
:content="props.content || 'Layer details and operational description.'"
|
|
288
|
-
/>
|
|
289
|
-
</div>
|
|
302
|
+
</button>
|
|
290
303
|
</div>
|
|
291
304
|
</template>
|
|
292
305
|
|
|
@@ -298,11 +311,18 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
298
311
|
|
|
299
312
|
.alpha-square-pyramid-stack__left,
|
|
300
313
|
.alpha-square-pyramid-stack__right {
|
|
301
|
-
transition:
|
|
314
|
+
transition:
|
|
315
|
+
opacity 0.3s ease,
|
|
316
|
+
transform 0.3s ease;
|
|
302
317
|
}
|
|
303
318
|
|
|
304
319
|
.alpha-square-pyramid-stack--animated .alpha-square-pyramid-stack__left {
|
|
305
|
-
animation: alpha-pyramid-left-in 140ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
320
|
+
animation: alpha-pyramid-left-in 140ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
321
|
+
var(
|
|
322
|
+
--wing-delay,
|
|
323
|
+
calc(var(--alpha-square-pyramid-start-delay, 0ms) + 460ms)
|
|
324
|
+
)
|
|
325
|
+
both;
|
|
306
326
|
}
|
|
307
327
|
|
|
308
328
|
@keyframes alpha-pyramid-left-in {
|
|
@@ -317,7 +337,12 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
|
|
|
317
337
|
}
|
|
318
338
|
|
|
319
339
|
.alpha-square-pyramid-stack--animated .alpha-square-pyramid-stack__right {
|
|
320
|
-
animation: alpha-pyramid-right-in 140ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
340
|
+
animation: alpha-pyramid-right-in 140ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
341
|
+
var(
|
|
342
|
+
--wing-delay,
|
|
343
|
+
calc(var(--alpha-square-pyramid-start-delay, 0ms) + 470ms)
|
|
344
|
+
)
|
|
345
|
+
both;
|
|
321
346
|
}
|
|
322
347
|
|
|
323
348
|
@keyframes alpha-pyramid-right-in {
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
SQUARE_PYRAMID_ROOT_KEY,
|
|
7
7
|
SQUARE_PYRAMID_STACK_KEY,
|
|
8
8
|
} from '../../../utils/pyramid/square-pyramid';
|
|
9
|
+
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
9
10
|
|
|
10
11
|
defineOptions({
|
|
11
12
|
name: 'SquarePyramidStackContent',
|
|
13
|
+
inheritAttrs: false,
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
export interface ISquarePyramidStackContentProps {
|
|
15
|
-
readonly content?: string;
|
|
16
17
|
readonly color?: string;
|
|
17
18
|
readonly connectorWidth?: number;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
const props = withDefaults(defineProps<ISquarePyramidStackContentProps>(), {
|
|
21
|
-
content: undefined,
|
|
22
22
|
color: undefined,
|
|
23
23
|
connectorWidth: undefined,
|
|
24
24
|
});
|
|
@@ -67,7 +67,9 @@ const deltaY = computed(() => {
|
|
|
67
67
|
if (stackContext?.deltaY?.value !== undefined) {
|
|
68
68
|
return stackContext.deltaY.value;
|
|
69
69
|
}
|
|
70
|
+
|
|
70
71
|
const idx = stackContext?.index.value ?? 0;
|
|
72
|
+
|
|
71
73
|
return rootContext?.getCardDeltaY?.(idx) ?? 0;
|
|
72
74
|
});
|
|
73
75
|
|
|
@@ -77,9 +79,11 @@ const connectorWidth = computed(() => {
|
|
|
77
79
|
if (props.connectorWidth !== undefined) {
|
|
78
80
|
return props.connectorWidth;
|
|
79
81
|
}
|
|
82
|
+
|
|
80
83
|
if (stackContext?.connectorWidth?.value !== undefined) {
|
|
81
84
|
return stackContext.connectorWidth.value;
|
|
82
85
|
}
|
|
86
|
+
|
|
83
87
|
return measuredConnectorWidth.value || 40;
|
|
84
88
|
});
|
|
85
89
|
|
|
@@ -98,9 +102,16 @@ const svgTop = computed(() => {
|
|
|
98
102
|
|
|
99
103
|
const connectorPath = computed(() => {
|
|
100
104
|
const w = connectorWidth.value;
|
|
105
|
+
|
|
101
106
|
return createPyramidConnectorPath(
|
|
102
|
-
{
|
|
103
|
-
|
|
107
|
+
{
|
|
108
|
+
x: 0,
|
|
109
|
+
y: 0,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
x: w,
|
|
113
|
+
y: effectiveDeltaY.value,
|
|
114
|
+
},
|
|
104
115
|
);
|
|
105
116
|
});
|
|
106
117
|
|
|
@@ -109,25 +120,32 @@ const stackColor = computed(() => {
|
|
|
109
120
|
props.color ??
|
|
110
121
|
stackContext?.color?.value ??
|
|
111
122
|
rootContext?.color.value ??
|
|
112
|
-
'
|
|
123
|
+
'var(--alpha-square-pyramid-stack-content-accent)'
|
|
113
124
|
);
|
|
114
125
|
});
|
|
126
|
+
|
|
127
|
+
const { className, forwardedAttrs } = useMergedUnoAttrs(() => [
|
|
128
|
+
'alpha-square-pyramid-stack-content rounded-xl p-2 px-2.5 text-[10px] leading-snug transition-all duration-300 border select-none box-border shrink-0',
|
|
129
|
+
isActive.value
|
|
130
|
+
? 'alpha-square-pyramid-stack-content--active bg-(--alpha-square-pyramid-stack-content-border-active) text-(--alpha-square-pyramid-stack-content-active)'
|
|
131
|
+
: 'alpha-square-pyramid-stack-content--default bg-(--alpha-square-pyramid-stack-content-border) text-(--alpha-square-pyramid-stack-content)',
|
|
132
|
+
]);
|
|
115
133
|
</script>
|
|
116
134
|
|
|
117
135
|
<template>
|
|
118
136
|
<div
|
|
119
137
|
class="alpha-square-pyramid-stack-content-wrapper relative w-full flex items-center select-none overflow-visible"
|
|
120
138
|
:style="{
|
|
121
|
-
'--content-delay': `calc(var(--square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
|
|
139
|
+
'--content-delay': `calc(var(--alpha-square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
|
|
122
140
|
}"
|
|
123
141
|
>
|
|
124
142
|
<!-- Scalable Line between Dot and Content Card (always at least 20px) -->
|
|
125
143
|
<div
|
|
126
144
|
ref="connectorRef"
|
|
127
|
-
class="alpha-square-pyramid-stack-content__connector flex-1 flex items-center min-w-
|
|
145
|
+
class="alpha-square-pyramid-stack-content__connector flex-1 flex items-center min-w-5 pointer-events-none relative overflow-visible h-0"
|
|
128
146
|
>
|
|
129
147
|
<div
|
|
130
|
-
class="alpha-square-pyramid-stack-content__dot absolute left-0 top-0 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full
|
|
148
|
+
class="alpha-square-pyramid-stack-content__dot absolute left-0 top-0 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full shrink-0 transition-all duration-300 pointer-events-auto"
|
|
131
149
|
:class="{
|
|
132
150
|
'alpha-square-pyramid-stack-content__dot--animated': isAnimated,
|
|
133
151
|
}"
|
|
@@ -135,13 +153,13 @@ const stackColor = computed(() => {
|
|
|
135
153
|
backgroundColor: stackColor,
|
|
136
154
|
boxShadow: isActive
|
|
137
155
|
? `0 0 6px ${stackColor}`
|
|
138
|
-
: `0 0 2px ${stackColor}
|
|
156
|
+
: `0 0 2px color-mix(in srgb, ${stackColor} 50%, transparent)`,
|
|
139
157
|
}"
|
|
140
158
|
/>
|
|
141
159
|
<!-- Straight horizontal line when deltaY is 0 -->
|
|
142
160
|
<div
|
|
143
161
|
v-if="!effectiveDeltaY"
|
|
144
|
-
class="alpha-square-pyramid-stack-content__line absolute left-0 top-0 w-full h-
|
|
162
|
+
class="alpha-square-pyramid-stack-content__line absolute left-0 top-0 w-full h-px -translate-y-1/2 pointer-events-none transition-colors duration-300"
|
|
145
163
|
:class="{
|
|
146
164
|
'alpha-square-pyramid-stack-content__line--animated': isAnimated,
|
|
147
165
|
}"
|
|
@@ -152,6 +170,7 @@ const stackColor = computed(() => {
|
|
|
152
170
|
/>
|
|
153
171
|
<!-- Zigzag SVG connector when deltaY !== 0 -->
|
|
154
172
|
<svg
|
|
173
|
+
aria-hidden="true"
|
|
155
174
|
v-else
|
|
156
175
|
class="alpha-square-pyramid-stack-content__line-svg absolute left-0 pointer-events-none overflow-visible"
|
|
157
176
|
:width="connectorWidth"
|
|
@@ -183,39 +202,30 @@ const stackColor = computed(() => {
|
|
|
183
202
|
</div>
|
|
184
203
|
<!-- Content Card -->
|
|
185
204
|
<div
|
|
186
|
-
|
|
187
|
-
:class="
|
|
188
|
-
|
|
189
|
-
? 'alpha-square-pyramid-stack-content--active'
|
|
190
|
-
: 'alpha-square-pyramid-stack-content--default',
|
|
191
|
-
{
|
|
205
|
+
v-bind="forwardedAttrs()"
|
|
206
|
+
:class="
|
|
207
|
+
className({
|
|
192
208
|
'alpha-square-pyramid-stack-content--animated': isAnimated,
|
|
193
|
-
}
|
|
194
|
-
|
|
209
|
+
})
|
|
210
|
+
"
|
|
195
211
|
:style="{
|
|
196
212
|
width: `${contentWidth}px`,
|
|
197
213
|
minWidth: `${contentWidth}px`,
|
|
198
214
|
maxWidth: `${contentWidth}px`,
|
|
199
215
|
boxSizing: 'border-box',
|
|
200
216
|
borderColor: stackColor,
|
|
201
|
-
backgroundColor: isActive
|
|
202
|
-
? 'rgba(255, 255, 255, 0.95)'
|
|
203
|
-
: 'rgba(255, 255, 255, 0.85)',
|
|
204
217
|
boxShadow: isActive
|
|
205
|
-
? `0 4px 14px ${stackColor}
|
|
218
|
+
? `0 4px 14px color-mix(in srgb, ${stackColor} 15%, transparent)`
|
|
206
219
|
: 'none',
|
|
207
220
|
'--card-transform': deltaY ? `translateY(${deltaY}px)` : 'none',
|
|
208
221
|
transform: deltaY ? `translateY(${deltaY}px)` : undefined,
|
|
209
222
|
}"
|
|
210
223
|
>
|
|
211
|
-
<
|
|
212
|
-
class="text-[10px]
|
|
213
|
-
:style="{
|
|
214
|
-
color: isActive ? '#0f172a' : '#475569',
|
|
215
|
-
}"
|
|
224
|
+
<p
|
|
225
|
+
class="text-[10px] transition-colors duration-300 wrap-break-word line-clamp-3"
|
|
216
226
|
>
|
|
217
|
-
<slot
|
|
218
|
-
</
|
|
227
|
+
<slot />
|
|
228
|
+
</p>
|
|
219
229
|
</div>
|
|
220
230
|
</div>
|
|
221
231
|
</template>
|
|
@@ -230,7 +240,8 @@ const stackColor = computed(() => {
|
|
|
230
240
|
}
|
|
231
241
|
|
|
232
242
|
.alpha-square-pyramid-stack-content__dot--animated {
|
|
233
|
-
animation: alpha-pyramid-dot-pop 120ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
243
|
+
animation: alpha-pyramid-dot-pop 120ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
244
|
+
var(--content-delay) both;
|
|
234
245
|
}
|
|
235
246
|
|
|
236
247
|
@keyframes alpha-pyramid-dot-pop {
|
|
@@ -246,7 +257,8 @@ const stackColor = computed(() => {
|
|
|
246
257
|
|
|
247
258
|
.alpha-square-pyramid-stack-content__line--animated {
|
|
248
259
|
transform-origin: left center;
|
|
249
|
-
animation: alpha-pyramid-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
260
|
+
animation: alpha-pyramid-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
261
|
+
calc(var(--content-delay) + 120ms) both;
|
|
250
262
|
}
|
|
251
263
|
|
|
252
264
|
@keyframes alpha-pyramid-line-draw {
|
|
@@ -266,7 +278,8 @@ const stackColor = computed(() => {
|
|
|
266
278
|
|
|
267
279
|
.alpha-square-pyramid-stack-content__line--svg-animated {
|
|
268
280
|
stroke-dasharray: 1;
|
|
269
|
-
animation: alpha-pyramid-svg-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
281
|
+
animation: alpha-pyramid-svg-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
282
|
+
calc(var(--content-delay) + 120ms) both;
|
|
270
283
|
}
|
|
271
284
|
|
|
272
285
|
@keyframes alpha-pyramid-svg-line-draw {
|
|
@@ -285,7 +298,8 @@ const stackColor = computed(() => {
|
|
|
285
298
|
}
|
|
286
299
|
|
|
287
300
|
.alpha-square-pyramid-stack-content--animated {
|
|
288
|
-
animation: alpha-pyramid-card-in 240ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
301
|
+
animation: alpha-pyramid-card-in 240ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
302
|
+
calc(var(--content-delay) + 380ms) both;
|
|
289
303
|
}
|
|
290
304
|
|
|
291
305
|
@keyframes alpha-pyramid-card-in {
|