@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,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,
|
|
@@ -19,14 +20,16 @@ import {
|
|
|
19
20
|
createCircularPyramidGeometry,
|
|
20
21
|
DEFAULT_CIRCULAR_PYRAMID_COLOR,
|
|
21
22
|
DEFAULT_CIRCULAR_PYRAMID_STACK_COLORS,
|
|
22
|
-
darkenColor,
|
|
23
|
-
lightenColor,
|
|
24
23
|
resolveCircularPyramidPalette,
|
|
25
24
|
} from '../../../utils/pyramid/circular-pyramid';
|
|
26
|
-
import {
|
|
25
|
+
import { darkenColor, lightenColor } from '../../../utils/colors';
|
|
26
|
+
import {
|
|
27
|
+
PYRAMID_CONTENT_WIDTH_PX,
|
|
28
|
+
PYRAMID_TITLE_WIDTH_PX,
|
|
29
|
+
resolvePyramidCardPositions,
|
|
30
|
+
} from '../../../utils/pyramid/shared';
|
|
27
31
|
import { useDiagramAutoScale } from '../../../utils/useDiagramAutoScale';
|
|
28
32
|
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
29
|
-
import CircularPyramidStack from './CircularPyramidStack.vue';
|
|
30
33
|
|
|
31
34
|
defineOptions({
|
|
32
35
|
inheritAttrs: false,
|
|
@@ -103,7 +106,7 @@ export interface ICircularPyramidProps {
|
|
|
103
106
|
const props = withDefaults(defineProps<ICircularPyramidProps>(), {
|
|
104
107
|
count: undefined,
|
|
105
108
|
activeIndex: -1,
|
|
106
|
-
color: DEFAULT_CIRCULAR_PYRAMID_COLOR
|
|
109
|
+
color: `var(--alpha-circular-pyramid-accent, ${DEFAULT_CIRCULAR_PYRAMID_COLOR})`,
|
|
107
110
|
colors: undefined,
|
|
108
111
|
width: undefined,
|
|
109
112
|
height: undefined,
|
|
@@ -177,7 +180,10 @@ interface INamedComponent {
|
|
|
177
180
|
}
|
|
178
181
|
|
|
179
182
|
function countSlottedStacks(slotNodes: VNode[] | undefined): number {
|
|
180
|
-
if (!slotNodes)
|
|
183
|
+
if (!slotNodes) {
|
|
184
|
+
return 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
181
187
|
let count = 0;
|
|
182
188
|
for (const node of slotNodes) {
|
|
183
189
|
if (typeof node.type === 'object' && node.type !== null) {
|
|
@@ -194,12 +200,16 @@ function countSlottedStacks(slotNodes: VNode[] | undefined): number {
|
|
|
194
200
|
count += countSlottedStacks(node.children as VNode[]);
|
|
195
201
|
}
|
|
196
202
|
}
|
|
203
|
+
|
|
197
204
|
return count;
|
|
198
205
|
}
|
|
199
206
|
|
|
200
207
|
const slottedStackCount = computed(() => {
|
|
201
208
|
const defaultSlotNodes = slots.default?.();
|
|
202
|
-
if (!defaultSlotNodes)
|
|
209
|
+
if (!defaultSlotNodes) {
|
|
210
|
+
return 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
203
213
|
let count = 0;
|
|
204
214
|
for (const node of defaultSlotNodes) {
|
|
205
215
|
if (typeof node.type === 'object' && node.type !== null) {
|
|
@@ -216,6 +226,7 @@ const slottedStackCount = computed(() => {
|
|
|
216
226
|
count += countSlottedStacks(node.children as VNode[]);
|
|
217
227
|
}
|
|
218
228
|
}
|
|
229
|
+
|
|
219
230
|
return count;
|
|
220
231
|
});
|
|
221
232
|
|
|
@@ -230,6 +241,7 @@ function registerStack(
|
|
|
230
241
|
if (!registeredStackTokens.value.includes(token)) {
|
|
231
242
|
registeredStackTokens.value.push(token);
|
|
232
243
|
}
|
|
244
|
+
|
|
233
245
|
let stopWatch: (() => void) | undefined;
|
|
234
246
|
if (colorRef) {
|
|
235
247
|
stopWatch = watch(
|
|
@@ -244,6 +256,7 @@ function registerStack(
|
|
|
244
256
|
{ immediate: true },
|
|
245
257
|
);
|
|
246
258
|
}
|
|
259
|
+
|
|
247
260
|
const index = computed(() => registeredStackTokens.value.indexOf(token));
|
|
248
261
|
return {
|
|
249
262
|
index,
|
|
@@ -273,12 +286,13 @@ function getLayerColor(index: number): string {
|
|
|
273
286
|
return customPaletteColor;
|
|
274
287
|
}
|
|
275
288
|
|
|
276
|
-
const
|
|
277
|
-
DEFAULT_CIRCULAR_PYRAMID_STACK_COLORS
|
|
278
|
-
|
|
279
|
-
];
|
|
289
|
+
const stackIndex =
|
|
290
|
+
Math.abs(index) % DEFAULT_CIRCULAR_PYRAMID_STACK_COLORS.length;
|
|
291
|
+
const stackColor = DEFAULT_CIRCULAR_PYRAMID_STACK_COLORS[stackIndex];
|
|
280
292
|
|
|
281
|
-
return
|
|
293
|
+
return (
|
|
294
|
+
stackColor ?? `var(--alpha-circular-pyramid-stack-${stackIndex + 1}-color)`
|
|
295
|
+
);
|
|
282
296
|
}
|
|
283
297
|
|
|
284
298
|
const activeLayerColor = computed<string>(() => {
|
|
@@ -293,12 +307,15 @@ const resolvedCount = computed(() => {
|
|
|
293
307
|
if (props.count !== undefined) {
|
|
294
308
|
return clampCircularCount(props.count);
|
|
295
309
|
}
|
|
310
|
+
|
|
296
311
|
if (slottedStackCount.value > 0) {
|
|
297
312
|
return clampCircularCount(slottedStackCount.value);
|
|
298
313
|
}
|
|
314
|
+
|
|
299
315
|
if (registeredStackTokens.value.length > 0) {
|
|
300
316
|
return clampCircularCount(registeredStackTokens.value.length);
|
|
301
317
|
}
|
|
318
|
+
|
|
302
319
|
return 4;
|
|
303
320
|
});
|
|
304
321
|
|
|
@@ -337,14 +354,8 @@ function setActiveIndex(index: number): void {
|
|
|
337
354
|
emit('select', index);
|
|
338
355
|
}
|
|
339
356
|
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
// Content card extends to the right boundary limit (0px offset from right edge)
|
|
343
|
-
const CONTENT_RIGHT_OFFSET_PX = 0;
|
|
344
|
-
|
|
345
|
-
const titleWidthPx = computed(() => TITLE_WIDTH_PX);
|
|
346
|
-
const contentWidthPx = computed(() => CONTENT_WIDTH_PX);
|
|
347
|
-
const contentRightOffsetPx = computed(() => CONTENT_RIGHT_OFFSET_PX);
|
|
357
|
+
const titleWidthPx = computed(() => PYRAMID_TITLE_WIDTH_PX);
|
|
358
|
+
const contentWidthPx = computed(() => PYRAMID_CONTENT_WIDTH_PX);
|
|
348
359
|
|
|
349
360
|
const cardHeights = ref<number[]>([]);
|
|
350
361
|
const cardDeltaYList = ref<number[]>([]);
|
|
@@ -366,6 +377,7 @@ function getCardDeltaY(index: number): number {
|
|
|
366
377
|
if (cardDeltaYList.value[index] !== undefined) {
|
|
367
378
|
return cardDeltaYList.value[index] ?? 0;
|
|
368
379
|
}
|
|
380
|
+
|
|
369
381
|
return initialDeltaYList.value[index] ?? 0;
|
|
370
382
|
}
|
|
371
383
|
|
|
@@ -375,6 +387,7 @@ function updateCardPositions(): void {
|
|
|
375
387
|
if (typeof window === 'undefined' || !rootRef.value) {
|
|
376
388
|
return;
|
|
377
389
|
}
|
|
390
|
+
|
|
378
391
|
const cardEls = rootRef.value.querySelectorAll<HTMLElement>(
|
|
379
392
|
'.alpha-circular-pyramid-stack-content',
|
|
380
393
|
);
|
|
@@ -404,9 +417,11 @@ function scheduleCardUpdate(): void {
|
|
|
404
417
|
if (typeof window === 'undefined') {
|
|
405
418
|
return;
|
|
406
419
|
}
|
|
420
|
+
|
|
407
421
|
if (cardAnimationFrame !== undefined) {
|
|
408
422
|
cancelAnimationFrame(cardAnimationFrame);
|
|
409
423
|
}
|
|
424
|
+
|
|
410
425
|
cardAnimationFrame = requestAnimationFrame(() => {
|
|
411
426
|
cardAnimationFrame = undefined;
|
|
412
427
|
updateCardPositions();
|
|
@@ -422,6 +437,7 @@ onMounted(() => {
|
|
|
422
437
|
cardResizeObserver = new ResizeObserver(scheduleCardUpdate);
|
|
423
438
|
cardResizeObserver.observe(rootRef.value);
|
|
424
439
|
}
|
|
440
|
+
|
|
425
441
|
if (typeof MutationObserver !== 'undefined' && rootRef.value) {
|
|
426
442
|
cardMutationObserver = new MutationObserver(scheduleCardUpdate);
|
|
427
443
|
cardMutationObserver.observe(rootRef.value, {
|
|
@@ -436,6 +452,7 @@ onUnmounted(() => {
|
|
|
436
452
|
if (cardAnimationFrame !== undefined) {
|
|
437
453
|
cancelAnimationFrame(cardAnimationFrame);
|
|
438
454
|
}
|
|
455
|
+
|
|
439
456
|
cardResizeObserver?.disconnect();
|
|
440
457
|
cardMutationObserver?.disconnect();
|
|
441
458
|
});
|
|
@@ -450,7 +467,6 @@ provide(CIRCULAR_PYRAMID_ROOT_KEY, {
|
|
|
450
467
|
interactive: computed(() => props.interactive),
|
|
451
468
|
titleWidthPx,
|
|
452
469
|
contentWidthPx,
|
|
453
|
-
contentRightOffsetPx,
|
|
454
470
|
registerStack,
|
|
455
471
|
getLayerColor,
|
|
456
472
|
setActiveIndex,
|
|
@@ -468,7 +484,6 @@ const lowestLayer = computed(() => {
|
|
|
468
484
|
});
|
|
469
485
|
|
|
470
486
|
const uid = Math.random().toString(36).slice(2, 8);
|
|
471
|
-
const filterBlurId = `alpha-circular-pyramid-blur-${uid}`;
|
|
472
487
|
const filterActiveShadowId = `alpha-circular-pyramid-shadow-${uid}`;
|
|
473
488
|
const filterAmbientShadowId = `alpha-circular-pyramid-ambient-${uid}`;
|
|
474
489
|
|
|
@@ -497,7 +512,7 @@ function getActiveShadowId(index: number): string {
|
|
|
497
512
|
return `alpha-circ-shadow-${uid}-${index}`;
|
|
498
513
|
}
|
|
499
514
|
|
|
500
|
-
const { resolvedScale
|
|
515
|
+
const { resolvedScale } = useDiagramAutoScale({
|
|
501
516
|
rootRef,
|
|
502
517
|
baseWidth: props.viewBoxWidth,
|
|
503
518
|
baseHeight: props.viewBoxHeight,
|
|
@@ -533,6 +548,7 @@ const resolvedHeightStyle = computed(() => {
|
|
|
533
548
|
if (resolvedCount.value >= 6) {
|
|
534
549
|
return '480px';
|
|
535
550
|
}
|
|
551
|
+
|
|
536
552
|
if (resolvedCount.value >= 5) {
|
|
537
553
|
return '450px';
|
|
538
554
|
}
|
|
@@ -555,13 +571,14 @@ function handleContainerClick(event: MouseEvent): void {
|
|
|
555
571
|
}
|
|
556
572
|
|
|
557
573
|
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
558
|
-
'alpha-circular-pyramid w-full flex items-center justify-center select-none relative',
|
|
574
|
+
'alpha-circular-pyramid w-full flex items-center justify-center select-none relative border-0 p-0 m-0 min-w-0 bg-transparent',
|
|
559
575
|
);
|
|
560
576
|
</script>
|
|
561
577
|
|
|
562
578
|
<template>
|
|
563
|
-
<
|
|
579
|
+
<fieldset
|
|
564
580
|
ref="rootRef"
|
|
581
|
+
aria-label="Circular pyramid diagram"
|
|
565
582
|
v-bind="forwardedAttrs()"
|
|
566
583
|
:class="className()"
|
|
567
584
|
:data-count="resolvedCount"
|
|
@@ -569,14 +586,15 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
569
586
|
:style="{
|
|
570
587
|
width: resolvedWidthStyle,
|
|
571
588
|
height: resolvedHeightStyle,
|
|
572
|
-
'--circular-pyramid-start-delay': `${resolvedStartDelay}ms`,
|
|
573
|
-
'--circular-pyramid-
|
|
574
|
-
'--circular-pyramid-content-width': `${contentWidthPx}px`,
|
|
589
|
+
'--alpha-circular-pyramid-start-delay': `${resolvedStartDelay}ms`,
|
|
590
|
+
'--alpha-circular-pyramid-stack-heading-width': `${titleWidthPx}px`,
|
|
591
|
+
'--alpha-circular-pyramid-stack-content-width': `${contentWidthPx}px`,
|
|
575
592
|
}"
|
|
576
593
|
@click="handleContainerClick"
|
|
594
|
+
@keydown="activateOnKeyboard"
|
|
577
595
|
>
|
|
578
596
|
<div
|
|
579
|
-
class="alpha-circular-pyramid__stage relative flex items-center justify-center overflow-visible
|
|
597
|
+
class="alpha-circular-pyramid__stage relative flex items-center justify-center overflow-visible shrink-0"
|
|
580
598
|
:style="{
|
|
581
599
|
width: `${props.viewBoxWidth ?? 960}px`,
|
|
582
600
|
height: `${geo.viewBoxHeight}px`,
|
|
@@ -595,33 +613,151 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
595
613
|
preserveAspectRatio="xMidYMid meet"
|
|
596
614
|
xmlns="http://www.w3.org/2000/svg"
|
|
597
615
|
>
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
616
|
+
<title>Circular pyramid diagram</title>
|
|
617
|
+
<defs>
|
|
618
|
+
<!-- Per-layer Gradients: Inactive Frosted Glass & Active Luminous -->
|
|
619
|
+
<template v-for="layer in geo.layers" :key="layer.index">
|
|
620
|
+
<!-- Inactive Frosted Glass Top Face Gradient (Exact formula matching Image 1 & 2) -->
|
|
621
|
+
<linearGradient
|
|
622
|
+
:id="getInactiveTopGradId(layer.index)"
|
|
623
|
+
x1="90%"
|
|
624
|
+
y1="10%"
|
|
625
|
+
x2="10%"
|
|
626
|
+
y2="90%"
|
|
627
|
+
>
|
|
628
|
+
<stop
|
|
629
|
+
offset="0%"
|
|
630
|
+
stop-color="var(--alpha-circular-pyramid-highlight)"
|
|
631
|
+
stop-opacity="0.9"
|
|
632
|
+
/>
|
|
633
|
+
<stop
|
|
634
|
+
offset="45%"
|
|
635
|
+
stop-color="var(--alpha-circular-pyramid-highlight)"
|
|
636
|
+
stop-opacity="0.7"
|
|
637
|
+
/>
|
|
638
|
+
<stop
|
|
639
|
+
offset="80%"
|
|
640
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.88 })"
|
|
641
|
+
stop-opacity="0.5"
|
|
642
|
+
/>
|
|
643
|
+
<stop
|
|
644
|
+
offset="100%"
|
|
645
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.78 })"
|
|
646
|
+
stop-opacity="0.35"
|
|
647
|
+
/>
|
|
648
|
+
</linearGradient>
|
|
649
|
+
<!-- Inactive Frosted Glass Rim Gradient (Exact formula matching Image 1 & 2) -->
|
|
650
|
+
<linearGradient
|
|
651
|
+
:id="getInactiveSideGradId(layer.index)"
|
|
652
|
+
x1="0%"
|
|
653
|
+
y1="0%"
|
|
654
|
+
x2="100%"
|
|
655
|
+
y2="0%"
|
|
656
|
+
>
|
|
657
|
+
<stop
|
|
658
|
+
offset="0%"
|
|
659
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.65 })"
|
|
660
|
+
stop-opacity="0.65"
|
|
661
|
+
/>
|
|
662
|
+
<stop
|
|
663
|
+
offset="50%"
|
|
664
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.75 })"
|
|
665
|
+
stop-opacity="0.5"
|
|
666
|
+
/>
|
|
667
|
+
<stop
|
|
668
|
+
offset="100%"
|
|
669
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.88 })"
|
|
670
|
+
stop-opacity="0.75"
|
|
671
|
+
/>
|
|
672
|
+
</linearGradient>
|
|
673
|
+
<!-- Active Luminous Top Face Gradient -->
|
|
674
|
+
<linearGradient
|
|
675
|
+
:id="getActiveTopGradId(layer.index)"
|
|
676
|
+
x1="90%"
|
|
677
|
+
y1="10%"
|
|
678
|
+
x2="15%"
|
|
679
|
+
y2="90%"
|
|
680
|
+
>
|
|
681
|
+
<stop
|
|
682
|
+
offset="0%"
|
|
683
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.92 })"
|
|
684
|
+
stop-opacity="1"
|
|
685
|
+
/>
|
|
686
|
+
<stop
|
|
687
|
+
offset="28%"
|
|
688
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.55 })"
|
|
689
|
+
stop-opacity="1"
|
|
690
|
+
/>
|
|
691
|
+
<stop
|
|
692
|
+
offset="65%"
|
|
693
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.15 })"
|
|
694
|
+
stop-opacity="1"
|
|
695
|
+
/>
|
|
696
|
+
<stop
|
|
697
|
+
offset="100%"
|
|
698
|
+
:stop-color="darkenColor({ hex: getLayerColor(layer.index), ratio: 0.18 })"
|
|
699
|
+
stop-opacity="1"
|
|
700
|
+
/>
|
|
701
|
+
</linearGradient>
|
|
702
|
+
<!-- Active 3D Rim Gradient -->
|
|
703
|
+
<linearGradient
|
|
704
|
+
:id="getActiveSideGradId(layer.index)"
|
|
705
|
+
x1="0%"
|
|
706
|
+
y1="0%"
|
|
707
|
+
x2="100%"
|
|
708
|
+
y2="0%"
|
|
709
|
+
>
|
|
710
|
+
<stop
|
|
711
|
+
offset="0%"
|
|
712
|
+
:stop-color="darkenColor({ hex: getLayerColor(layer.index), ratio: 0.25 })"
|
|
713
|
+
/>
|
|
714
|
+
<stop
|
|
715
|
+
offset="50%"
|
|
716
|
+
:stop-color="darkenColor({ hex: getLayerColor(layer.index), ratio: 0.08 })"
|
|
717
|
+
/>
|
|
718
|
+
<stop
|
|
719
|
+
offset="100%"
|
|
720
|
+
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.45 })"
|
|
721
|
+
/>
|
|
722
|
+
</linearGradient>
|
|
723
|
+
<!-- Active Drop Shadow / Glow Filter -->
|
|
724
|
+
<filter
|
|
725
|
+
:id="getActiveShadowId(layer.index)"
|
|
726
|
+
x="-40%"
|
|
727
|
+
y="-40%"
|
|
728
|
+
width="180%"
|
|
729
|
+
height="200%"
|
|
730
|
+
>
|
|
731
|
+
<feDropShadow
|
|
732
|
+
dx="0"
|
|
733
|
+
dy="8"
|
|
734
|
+
stdDeviation="10"
|
|
735
|
+
:flood-color="getLayerColor(layer.index)"
|
|
736
|
+
flood-opacity="0.35"
|
|
737
|
+
/>
|
|
738
|
+
</filter>
|
|
739
|
+
</template>
|
|
740
|
+
<!-- Fallback Global Gradients for Test Spec Compatibility -->
|
|
602
741
|
<linearGradient
|
|
603
|
-
:id="
|
|
742
|
+
:id="activeTopGradId"
|
|
604
743
|
x1="90%"
|
|
605
744
|
y1="10%"
|
|
606
|
-
x2="
|
|
745
|
+
x2="15%"
|
|
607
746
|
y2="90%"
|
|
608
747
|
>
|
|
609
|
-
<stop offset="0%" stop-color="#ffffff" stop-opacity="0.9" />
|
|
610
|
-
<stop offset="45%" stop-color="#ffffff" stop-opacity="0.7" />
|
|
611
748
|
<stop
|
|
612
|
-
offset="
|
|
613
|
-
:stop-color="lightenColor({ hex:
|
|
614
|
-
stop-opacity="
|
|
749
|
+
offset="0%"
|
|
750
|
+
:stop-color="lightenColor({ hex: activeLayerColor, ratio: 0.92 })"
|
|
751
|
+
stop-opacity="1"
|
|
615
752
|
/>
|
|
616
753
|
<stop
|
|
617
754
|
offset="100%"
|
|
618
|
-
:stop-color="
|
|
619
|
-
stop-opacity="
|
|
755
|
+
:stop-color="darkenColor({ hex: activeLayerColor, ratio: 0.18 })"
|
|
756
|
+
stop-opacity="1"
|
|
620
757
|
/>
|
|
621
758
|
</linearGradient>
|
|
622
|
-
<!-- Inactive Frosted Glass Rim Gradient (Exact formula matching Image 1 & 2) -->
|
|
623
759
|
<linearGradient
|
|
624
|
-
:id="
|
|
760
|
+
:id="activeSideGradId"
|
|
625
761
|
x1="0%"
|
|
626
762
|
y1="0%"
|
|
627
763
|
x2="100%"
|
|
@@ -629,52 +765,33 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
629
765
|
>
|
|
630
766
|
<stop
|
|
631
767
|
offset="0%"
|
|
632
|
-
:stop-color="
|
|
633
|
-
stop-opacity="0.65"
|
|
634
|
-
/>
|
|
635
|
-
<stop
|
|
636
|
-
offset="50%"
|
|
637
|
-
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.75 })"
|
|
638
|
-
stop-opacity="0.5"
|
|
768
|
+
:stop-color="darkenColor({ hex: activeLayerColor, ratio: 0.25 })"
|
|
639
769
|
/>
|
|
640
770
|
<stop
|
|
641
771
|
offset="100%"
|
|
642
|
-
:stop-color="lightenColor({ hex:
|
|
643
|
-
stop-opacity="0.75"
|
|
772
|
+
:stop-color="lightenColor({ hex: activeLayerColor, ratio: 0.45 })"
|
|
644
773
|
/>
|
|
645
774
|
</linearGradient>
|
|
646
|
-
<!-- Active Luminous Top Face Gradient -->
|
|
647
775
|
<linearGradient
|
|
648
|
-
:id="
|
|
776
|
+
:id="defaultTopGradId"
|
|
649
777
|
x1="90%"
|
|
650
778
|
y1="10%"
|
|
651
|
-
x2="
|
|
779
|
+
x2="10%"
|
|
652
780
|
y2="90%"
|
|
653
781
|
>
|
|
654
782
|
<stop
|
|
655
783
|
offset="0%"
|
|
656
|
-
|
|
657
|
-
stop-opacity="
|
|
658
|
-
/>
|
|
659
|
-
<stop
|
|
660
|
-
offset="28%"
|
|
661
|
-
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.55 })"
|
|
662
|
-
stop-opacity="1"
|
|
663
|
-
/>
|
|
664
|
-
<stop
|
|
665
|
-
offset="65%"
|
|
666
|
-
:stop-color="lightenColor({ hex: getLayerColor(layer.index), ratio: 0.15 })"
|
|
667
|
-
stop-opacity="1"
|
|
784
|
+
stop-color="var(--alpha-circular-pyramid-highlight)"
|
|
785
|
+
stop-opacity="0.9"
|
|
668
786
|
/>
|
|
669
787
|
<stop
|
|
670
788
|
offset="100%"
|
|
671
|
-
:stop-color="
|
|
672
|
-
stop-opacity="
|
|
789
|
+
:stop-color="lightenColor({ hex: props.color, ratio: 0.78 })"
|
|
790
|
+
stop-opacity="0.35"
|
|
673
791
|
/>
|
|
674
792
|
</linearGradient>
|
|
675
|
-
<!-- Active 3D Rim Gradient -->
|
|
676
793
|
<linearGradient
|
|
677
|
-
:id="
|
|
794
|
+
:id="defaultSideGradId"
|
|
678
795
|
x1="0%"
|
|
679
796
|
y1="0%"
|
|
680
797
|
x2="100%"
|
|
@@ -682,20 +799,17 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
682
799
|
>
|
|
683
800
|
<stop
|
|
684
801
|
offset="0%"
|
|
685
|
-
:stop-color="
|
|
686
|
-
|
|
687
|
-
<stop
|
|
688
|
-
offset="50%"
|
|
689
|
-
:stop-color="darkenColor({ hex: getLayerColor(layer.index), ratio: 0.08 })"
|
|
802
|
+
:stop-color="lightenColor({ hex: props.color, ratio: 0.65 })"
|
|
803
|
+
stop-opacity="0.65"
|
|
690
804
|
/>
|
|
691
805
|
<stop
|
|
692
806
|
offset="100%"
|
|
693
|
-
:stop-color="lightenColor({ hex:
|
|
807
|
+
:stop-color="lightenColor({ hex: props.color, ratio: 0.88 })"
|
|
808
|
+
stop-opacity="0.75"
|
|
694
809
|
/>
|
|
695
810
|
</linearGradient>
|
|
696
|
-
<!-- Active Drop Shadow / Glow Filter -->
|
|
697
811
|
<filter
|
|
698
|
-
:id="
|
|
812
|
+
:id="filterActiveShadowId"
|
|
699
813
|
x="-40%"
|
|
700
814
|
y="-40%"
|
|
701
815
|
width="180%"
|
|
@@ -705,123 +819,103 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
705
819
|
dx="0"
|
|
706
820
|
dy="8"
|
|
707
821
|
stdDeviation="10"
|
|
708
|
-
:flood-color="
|
|
822
|
+
:flood-color="activeLayerColor"
|
|
709
823
|
flood-opacity="0.35"
|
|
710
824
|
/>
|
|
711
825
|
</filter>
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
:id="filterAmbientShadowId"
|
|
736
|
-
x="-30%"
|
|
737
|
-
y="-30%"
|
|
738
|
-
width="160%"
|
|
739
|
-
height="160%"
|
|
740
|
-
>
|
|
741
|
-
<feGaussianBlur stdDeviation="14" />
|
|
742
|
-
</filter>
|
|
743
|
-
</defs>
|
|
744
|
-
<!-- Ambient Ground Shadow (under the lowest pyramid disc) -->
|
|
745
|
-
<ellipse
|
|
746
|
-
v-if="lowestLayer"
|
|
747
|
-
:cx="geo.viewBoxWidth / 2"
|
|
748
|
-
:cy="lowestLayer.cy + lowestLayer.cylinderHeight + 14"
|
|
749
|
-
:rx="lowestLayer.rx * 0.92"
|
|
750
|
-
:ry="lowestLayer.ry * 0.28"
|
|
751
|
-
fill="#0f172a"
|
|
752
|
-
opacity="0.1"
|
|
753
|
-
:filter="`url(#${filterAmbientShadowId})`"
|
|
754
|
-
/>
|
|
755
|
-
<!-- Stacked Floating Circular Discs (Rendered from bottom to top) -->
|
|
756
|
-
<g
|
|
757
|
-
class="alpha-circular-pyramid__stack"
|
|
758
|
-
:class="{ 'alpha-circular-pyramid--animated': isAnimated }"
|
|
759
|
-
>
|
|
826
|
+
<!-- Ambient Bottom Surface Shadow -->
|
|
827
|
+
<filter
|
|
828
|
+
:id="filterAmbientShadowId"
|
|
829
|
+
x="-30%"
|
|
830
|
+
y="-30%"
|
|
831
|
+
width="160%"
|
|
832
|
+
height="160%"
|
|
833
|
+
>
|
|
834
|
+
<feGaussianBlur stdDeviation="14" />
|
|
835
|
+
</filter>
|
|
836
|
+
</defs>
|
|
837
|
+
<!-- Ambient Ground Shadow (under the lowest pyramid disc) -->
|
|
838
|
+
<ellipse
|
|
839
|
+
v-if="lowestLayer"
|
|
840
|
+
:cx="geo.viewBoxWidth / 2"
|
|
841
|
+
:cy="lowestLayer.cy + lowestLayer.cylinderHeight + 14"
|
|
842
|
+
:rx="lowestLayer.rx * 0.92"
|
|
843
|
+
:ry="lowestLayer.ry * 0.28"
|
|
844
|
+
fill="var(--alpha-circular-pyramid-center)"
|
|
845
|
+
opacity="0.1"
|
|
846
|
+
:filter="`url(#${filterAmbientShadowId})`"
|
|
847
|
+
/>
|
|
848
|
+
<!-- Stacked Floating Circular Discs (Rendered from bottom to top) -->
|
|
760
849
|
<g
|
|
761
|
-
|
|
762
|
-
:
|
|
763
|
-
|
|
764
|
-
|
|
850
|
+
class="alpha-circular-pyramid__stack"
|
|
851
|
+
:class="{ 'alpha-circular-pyramid--animated': isAnimated }"
|
|
852
|
+
>
|
|
853
|
+
<g
|
|
854
|
+
v-for="layer in stackedLayers"
|
|
855
|
+
:key="layer.index"
|
|
856
|
+
class="alpha-circular-pyramid__layer transition-all duration-300 ease-out pointer-events-none"
|
|
857
|
+
:class="[
|
|
765
858
|
layer.index === currentActiveIndex
|
|
766
859
|
? 'alpha-circular-pyramid__layer--active'
|
|
767
860
|
: 'alpha-circular-pyramid__layer--default',
|
|
768
861
|
`alpha-circular-pyramid__layer--${layer.index}`,
|
|
769
|
-
{ 'cursor-pointer': props.interactive },
|
|
770
862
|
]"
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
863
|
+
:data-layer-index="layer.index"
|
|
864
|
+
:data-is-active="layer.index === currentActiveIndex"
|
|
865
|
+
:filter="
|
|
774
866
|
layer.index === currentActiveIndex
|
|
775
867
|
? `url(#${getActiveShadowId(layer.index)})`
|
|
776
868
|
: undefined
|
|
777
869
|
"
|
|
778
|
-
|
|
870
|
+
:style="{
|
|
779
871
|
'--layer-order': layer.index,
|
|
780
|
-
'--layer-delay': `calc(var(--circular-pyramid-start-delay, 0ms) + ${layer.index * 320 + 10}ms)`,
|
|
872
|
+
'--layer-delay': `calc(var(--alpha-circular-pyramid-start-delay, 0ms) + ${layer.index * 320 + 10}ms)`,
|
|
781
873
|
}"
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
:fill="
|
|
874
|
+
>
|
|
875
|
+
<!-- 1. 3D Cylindrical Rim (Mantle) -->
|
|
876
|
+
<path
|
|
877
|
+
class="alpha-circular-pyramid__rim transition-all duration-300"
|
|
878
|
+
:d="layer.cylinderPath"
|
|
879
|
+
:fill="
|
|
789
880
|
layer.index === currentActiveIndex
|
|
790
881
|
? `url(#${getActiveSideGradId(layer.index)})`
|
|
791
882
|
: `url(#${getInactiveSideGradId(layer.index)})`
|
|
792
883
|
"
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
884
|
+
/>
|
|
885
|
+
<!-- 2. Disc Top Face Ellipse -->
|
|
886
|
+
<path
|
|
887
|
+
class="alpha-circular-pyramid__face transition-all duration-300"
|
|
888
|
+
:d="layer.topEllipsePath"
|
|
889
|
+
:fill="
|
|
799
890
|
layer.index === currentActiveIndex
|
|
800
891
|
? `url(#${getActiveTopGradId(layer.index)})`
|
|
801
892
|
: `url(#${getInactiveTopGradId(layer.index)})`
|
|
802
893
|
"
|
|
803
|
-
|
|
894
|
+
:stroke="
|
|
804
895
|
layer.index === currentActiveIndex
|
|
805
896
|
? 'none'
|
|
806
|
-
: '
|
|
897
|
+
: 'var(--alpha-circular-pyramid-connector-highlight)'
|
|
807
898
|
"
|
|
808
|
-
|
|
809
|
-
|
|
899
|
+
stroke-width="0.5"
|
|
900
|
+
/>
|
|
901
|
+
</g>
|
|
810
902
|
</g>
|
|
811
|
-
</
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
903
|
+
</svg>
|
|
904
|
+
<template v-if="props.interactive">
|
|
905
|
+
<button
|
|
906
|
+
v-for="layer in stackedLayers"
|
|
907
|
+
:key="layer.index"
|
|
908
|
+
type="button"
|
|
909
|
+
class="alpha-interaction-control"
|
|
910
|
+
:aria-label="`Select layer ${layer.index + 1}`"
|
|
911
|
+
:style="{ clipPath: `path('${layer.cylinderPath}')` }"
|
|
912
|
+
@click.stop="handleLayerClick(layer.index, $event)"
|
|
913
|
+
/>
|
|
914
|
+
</template>
|
|
915
|
+
</div>
|
|
916
|
+
<slot />
|
|
823
917
|
</div>
|
|
824
|
-
</
|
|
918
|
+
</fieldset>
|
|
825
919
|
</template>
|
|
826
920
|
|
|
827
921
|
<style scoped>
|
|
@@ -839,7 +933,12 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
839
933
|
}
|
|
840
934
|
|
|
841
935
|
.alpha-circular-pyramid--animated .alpha-circular-pyramid__layer {
|
|
842
|
-
animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
936
|
+
animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
937
|
+
var(
|
|
938
|
+
--layer-delay,
|
|
939
|
+
calc(var(--alpha-circular-pyramid-start-delay, 0ms) + 10ms)
|
|
940
|
+
)
|
|
941
|
+
both;
|
|
843
942
|
}
|
|
844
943
|
|
|
845
944
|
@keyframes alpha-pyramid-layer-enter {
|