@alphacifer/slidev-addon-theme 0.0.9 → 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-defense-in-depth/ArcDefenseInDepth.vue +802 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayer.vue +240 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayerHeading.vue +96 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayerPart.vue +501 -0
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayerSector.vue +162 -0
- 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 +276 -190
- package/components/pyramid/circular-pyramid/CircularPyramidStack.vue +83 -98
- package/components/pyramid/circular-pyramid/CircularPyramidStackContent.vue +136 -29
- package/components/pyramid/circular-pyramid/CircularPyramidStackHeading.vue +212 -0
- package/components/pyramid/circular-pyramid/style.css +26 -0
- package/components/pyramid/square-pyramid/SquarePyramid.vue +199 -83
- package/components/pyramid/square-pyramid/SquarePyramidStack.vue +87 -95
- package/components/pyramid/square-pyramid/SquarePyramidStackContent.vue +138 -27
- package/components/pyramid/square-pyramid/SquarePyramidStackHeading.vue +212 -0
- 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/defense-in-depth/arc-defense-in-depth/context.ts +113 -0
- package/utils/defense-in-depth/arc-defense-in-depth/createArcDefenseInDepthGeometry.ts +600 -0
- package/utils/defense-in-depth/arc-defense-in-depth/types.ts +144 -0
- package/utils/defense-in-depth/shared/colors.ts +51 -0
- package/utils/defense-in-depth/shared/constants.ts +22 -0
- package/utils/defense-in-depth/shared/types.ts +7 -0
- 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 +3 -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 +64 -16
- 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/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/components/pyramid/circular-pyramid/CircularPyramidStackTitle.vue +0 -138
- package/components/pyramid/square-pyramid/SquarePyramidStackTitle.vue +0 -134
- 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/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,138 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
CIRCULAR_PYRAMID_ROOT_KEY,
|
|
6
|
-
CIRCULAR_PYRAMID_STACK_KEY,
|
|
7
|
-
} from '../../../utils/pyramid/circular-pyramid';
|
|
8
|
-
|
|
9
|
-
defineOptions({
|
|
10
|
-
name: 'CircularPyramidStackTitle',
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export interface ICircularPyramidStackTitleProps {
|
|
14
|
-
readonly step?: string | number;
|
|
15
|
-
readonly title?: string;
|
|
16
|
-
readonly color?: string;
|
|
17
|
-
readonly minWidth?: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const props = withDefaults(defineProps<ICircularPyramidStackTitleProps>(), {
|
|
21
|
-
step: undefined,
|
|
22
|
-
title: undefined,
|
|
23
|
-
color: undefined,
|
|
24
|
-
minWidth: 150,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const rootContext = inject(CIRCULAR_PYRAMID_ROOT_KEY, undefined);
|
|
28
|
-
const stackContext = inject(CIRCULAR_PYRAMID_STACK_KEY, undefined);
|
|
29
|
-
|
|
30
|
-
const isActive = computed(() => {
|
|
31
|
-
return stackContext?.isActive.value ?? false;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const resolvedStep = computed(() => {
|
|
35
|
-
if (props.step !== undefined) {
|
|
36
|
-
return props.step;
|
|
37
|
-
}
|
|
38
|
-
if (stackContext?.step.value !== undefined) {
|
|
39
|
-
return stackContext.step.value;
|
|
40
|
-
}
|
|
41
|
-
return '01';
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const palette = computed(() => {
|
|
45
|
-
return rootContext?.palette.value;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const minPillWidth = computed(() => props.minWidth ?? 150);
|
|
49
|
-
|
|
50
|
-
const stackColor = computed(() => {
|
|
51
|
-
return (
|
|
52
|
-
props.color ??
|
|
53
|
-
stackContext?.color?.value ??
|
|
54
|
-
rootContext?.color.value ??
|
|
55
|
-
'#3b82f6'
|
|
56
|
-
);
|
|
57
|
-
});
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<template>
|
|
61
|
-
<div
|
|
62
|
-
class="alpha-circular-pyramid-stack-title relative w-full flex items-center select-none"
|
|
63
|
-
:class="[
|
|
64
|
-
isActive
|
|
65
|
-
? 'alpha-circular-pyramid-stack-title--active'
|
|
66
|
-
: 'alpha-circular-pyramid-stack-title--default',
|
|
67
|
-
]"
|
|
68
|
-
>
|
|
69
|
-
<!-- Pill Badge Container (min-width: 150px, max-width: whole spacing left leaving at least 30px before dot) -->
|
|
70
|
-
<div
|
|
71
|
-
class="alpha-circular-pyramid-stack-title__pill flex items-center gap-2 px-2.5 py-1 rounded-full transition-all duration-300 border flex-shrink-0"
|
|
72
|
-
:style="{
|
|
73
|
-
minWidth: `${minPillWidth}px`,
|
|
74
|
-
maxWidth: 'calc(100% - 30px)',
|
|
75
|
-
width: 'fit-content',
|
|
76
|
-
boxSizing: 'border-box',
|
|
77
|
-
borderColor: stackColor,
|
|
78
|
-
backgroundColor: isActive
|
|
79
|
-
? 'rgba(255, 255, 255, 0.95)'
|
|
80
|
-
: 'rgba(255, 255, 255, 0.85)',
|
|
81
|
-
boxShadow: isActive
|
|
82
|
-
? `0 4px 14px ${stackColor}26`
|
|
83
|
-
: 'none',
|
|
84
|
-
}"
|
|
85
|
-
>
|
|
86
|
-
<!-- Circular Step Indicator (Badge using stack color) -->
|
|
87
|
-
<div
|
|
88
|
-
class="w-5.5 h-5.5 rounded-full flex items-center justify-center text-[10px] font-bold tracking-tight transition-all duration-300 flex-shrink-0"
|
|
89
|
-
:style="{
|
|
90
|
-
backgroundColor: stackColor,
|
|
91
|
-
color: '#ffffff',
|
|
92
|
-
}"
|
|
93
|
-
>
|
|
94
|
-
<slot name="step">{{ resolvedStep }}</slot>
|
|
95
|
-
</div>
|
|
96
|
-
<!-- Title Text -->
|
|
97
|
-
<span
|
|
98
|
-
class="text-xs font-semibold tracking-tight transition-colors duration-300 pr-1 truncate flex-1 leading-tight"
|
|
99
|
-
:style="{
|
|
100
|
-
color: isActive ? '#0f172a' : '#334155',
|
|
101
|
-
}"
|
|
102
|
-
>
|
|
103
|
-
<slot>{{ props.title }}</slot>
|
|
104
|
-
</span>
|
|
105
|
-
</div>
|
|
106
|
-
<!-- Scalable Line between Title and Dot (always at least 30px) -->
|
|
107
|
-
<div
|
|
108
|
-
class="alpha-circular-pyramid-stack-title__connector flex-1 flex items-center min-w-[30px] pointer-events-none"
|
|
109
|
-
>
|
|
110
|
-
<div
|
|
111
|
-
class="alpha-circular-pyramid-stack-title__line flex-1 h-[1px] transition-colors duration-300"
|
|
112
|
-
:style="{
|
|
113
|
-
backgroundColor: stackColor,
|
|
114
|
-
opacity: isActive ? 1 : 0.65,
|
|
115
|
-
}"
|
|
116
|
-
/>
|
|
117
|
-
<div
|
|
118
|
-
class="alpha-circular-pyramid-stack-title__dot w-1.5 h-1.5 rounded-full flex-shrink-0 -ml-1 transition-all duration-300"
|
|
119
|
-
:style="{
|
|
120
|
-
backgroundColor: stackColor,
|
|
121
|
-
boxShadow: isActive
|
|
122
|
-
? `0 0 6px ${stackColor}`
|
|
123
|
-
: `0 0 2px ${stackColor}80`,
|
|
124
|
-
}"
|
|
125
|
-
/>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
<style scoped>
|
|
131
|
-
.alpha-circular-pyramid-stack-title {
|
|
132
|
-
box-sizing: border-box;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.alpha-circular-pyramid-stack-title--active .alpha-circular-pyramid-stack-title__pill {
|
|
136
|
-
backdrop-filter: blur(8px);
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
SQUARE_PYRAMID_ROOT_KEY,
|
|
6
|
-
SQUARE_PYRAMID_STACK_KEY,
|
|
7
|
-
} from '../../../utils/pyramid/square-pyramid';
|
|
8
|
-
|
|
9
|
-
defineOptions({
|
|
10
|
-
name: 'SquarePyramidStackTitle',
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export interface ISquarePyramidStackTitleProps {
|
|
14
|
-
readonly step?: string | number;
|
|
15
|
-
readonly title?: string;
|
|
16
|
-
readonly color?: string;
|
|
17
|
-
readonly minWidth?: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const props = withDefaults(defineProps<ISquarePyramidStackTitleProps>(), {
|
|
21
|
-
step: undefined,
|
|
22
|
-
title: undefined,
|
|
23
|
-
color: undefined,
|
|
24
|
-
minWidth: 150,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const rootContext = inject(SQUARE_PYRAMID_ROOT_KEY, undefined);
|
|
28
|
-
const stackContext = inject(SQUARE_PYRAMID_STACK_KEY, undefined);
|
|
29
|
-
|
|
30
|
-
const isActive = computed(() => {
|
|
31
|
-
return stackContext?.isActive.value ?? false;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const resolvedStep = computed(() => {
|
|
35
|
-
if (props.step !== undefined) {
|
|
36
|
-
return props.step;
|
|
37
|
-
}
|
|
38
|
-
if (stackContext?.step.value !== undefined) {
|
|
39
|
-
return stackContext.step.value;
|
|
40
|
-
}
|
|
41
|
-
return '01';
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const minPillWidth = computed(() => props.minWidth ?? 150);
|
|
45
|
-
|
|
46
|
-
const stackColor = computed(() => {
|
|
47
|
-
return (
|
|
48
|
-
props.color ??
|
|
49
|
-
stackContext?.color?.value ??
|
|
50
|
-
rootContext?.color.value ??
|
|
51
|
-
'#3b82f6'
|
|
52
|
-
);
|
|
53
|
-
});
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<div
|
|
58
|
-
class="alpha-square-pyramid-stack-title relative w-full flex items-center select-none"
|
|
59
|
-
:class="[
|
|
60
|
-
isActive
|
|
61
|
-
? 'alpha-square-pyramid-stack-title--active'
|
|
62
|
-
: 'alpha-square-pyramid-stack-title--default',
|
|
63
|
-
]"
|
|
64
|
-
>
|
|
65
|
-
<!-- Pill Badge Container -->
|
|
66
|
-
<div
|
|
67
|
-
class="alpha-square-pyramid-stack-title__pill flex items-center gap-2 px-2.5 py-1 rounded-full transition-all duration-300 border flex-shrink-0"
|
|
68
|
-
:style="{
|
|
69
|
-
minWidth: `${minPillWidth}px`,
|
|
70
|
-
maxWidth: 'calc(100% - 30px)',
|
|
71
|
-
width: 'fit-content',
|
|
72
|
-
boxSizing: 'border-box',
|
|
73
|
-
borderColor: stackColor,
|
|
74
|
-
backgroundColor: isActive
|
|
75
|
-
? 'rgba(255, 255, 255, 0.95)'
|
|
76
|
-
: 'rgba(255, 255, 255, 0.85)',
|
|
77
|
-
boxShadow: isActive
|
|
78
|
-
? `0 4px 14px ${stackColor}26`
|
|
79
|
-
: 'none',
|
|
80
|
-
}"
|
|
81
|
-
>
|
|
82
|
-
<!-- Circular Step Indicator -->
|
|
83
|
-
<div
|
|
84
|
-
class="w-5.5 h-5.5 rounded-full flex items-center justify-center text-[10px] font-bold tracking-tight transition-all duration-300 flex-shrink-0"
|
|
85
|
-
:style="{
|
|
86
|
-
backgroundColor: stackColor,
|
|
87
|
-
color: '#ffffff',
|
|
88
|
-
}"
|
|
89
|
-
>
|
|
90
|
-
<slot name="step">{{ resolvedStep }}</slot>
|
|
91
|
-
</div>
|
|
92
|
-
<!-- Title Text -->
|
|
93
|
-
<span
|
|
94
|
-
class="text-xs font-semibold tracking-tight transition-colors duration-300 pr-1 truncate flex-1 leading-tight"
|
|
95
|
-
:style="{
|
|
96
|
-
color: isActive ? '#0f172a' : '#334155',
|
|
97
|
-
}"
|
|
98
|
-
>
|
|
99
|
-
<slot>{{ props.title }}</slot>
|
|
100
|
-
</span>
|
|
101
|
-
</div>
|
|
102
|
-
<!-- Scalable Line between Title and Dot -->
|
|
103
|
-
<div
|
|
104
|
-
class="alpha-square-pyramid-stack-title__connector flex-1 flex items-center min-w-[30px] pointer-events-none"
|
|
105
|
-
>
|
|
106
|
-
<div
|
|
107
|
-
class="alpha-square-pyramid-stack-title__line flex-1 h-[1px] transition-colors duration-300"
|
|
108
|
-
:style="{
|
|
109
|
-
backgroundColor: stackColor,
|
|
110
|
-
opacity: isActive ? 1 : 0.65,
|
|
111
|
-
}"
|
|
112
|
-
/>
|
|
113
|
-
<div
|
|
114
|
-
class="alpha-square-pyramid-stack-title__dot w-1.5 h-1.5 rounded-full flex-shrink-0 -ml-1 transition-all duration-300"
|
|
115
|
-
:style="{
|
|
116
|
-
backgroundColor: stackColor,
|
|
117
|
-
boxShadow: isActive
|
|
118
|
-
? `0 0 6px ${stackColor}`
|
|
119
|
-
: `0 0 2px ${stackColor}80`,
|
|
120
|
-
}"
|
|
121
|
-
/>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</template>
|
|
125
|
-
|
|
126
|
-
<style scoped>
|
|
127
|
-
.alpha-square-pyramid-stack-title {
|
|
128
|
-
box-sizing: border-box;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.alpha-square-pyramid-stack-title--active .alpha-square-pyramid-stack-title__pill {
|
|
132
|
-
backdrop-filter: blur(8px);
|
|
133
|
-
}
|
|
134
|
-
</style>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
|
|
3
|
-
|
|
4
|
-
defineOptions({
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
defineProps({
|
|
9
|
-
maxDepth: {
|
|
10
|
-
type: [Number, String],
|
|
11
|
-
default: 1,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
16
|
-
'alpha-table-of-contents slidev-layout default toc-layout',
|
|
17
|
-
);
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div
|
|
22
|
-
v-bind="forwardedAttrs()"
|
|
23
|
-
:class="className()"
|
|
24
|
-
>
|
|
25
|
-
<slot>
|
|
26
|
-
<h1>Table of Contents</h1>
|
|
27
|
-
</slot>
|
|
28
|
-
<Toc :maxDepth="maxDepth" />
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
export interface IArcArrowProcessItem {
|
|
2
|
-
readonly id?: string | number;
|
|
3
|
-
readonly color?: string;
|
|
4
|
-
readonly gradientEnd?: string;
|
|
5
|
-
readonly title?: string;
|
|
6
|
-
readonly description?: string;
|
|
7
|
-
readonly icon?: string | object | false;
|
|
8
|
-
readonly titleColor?: string;
|
|
9
|
-
readonly textColor?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface IResolvedArcArrowProcessItem {
|
|
13
|
-
readonly id: string | number;
|
|
14
|
-
readonly color: string;
|
|
15
|
-
readonly gradientEnd: string;
|
|
16
|
-
readonly title: string;
|
|
17
|
-
readonly description: string;
|
|
18
|
-
readonly icon?: string | object | false;
|
|
19
|
-
readonly titleColor: string;
|
|
20
|
-
readonly textColor: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const DEFAULT_ARC_ARROW_PROCESS_ITEMS_4: readonly [
|
|
24
|
-
IResolvedArcArrowProcessItem,
|
|
25
|
-
IResolvedArcArrowProcessItem,
|
|
26
|
-
IResolvedArcArrowProcessItem,
|
|
27
|
-
IResolvedArcArrowProcessItem,
|
|
28
|
-
] = [
|
|
29
|
-
{
|
|
30
|
-
id: '01',
|
|
31
|
-
color: '#a0a5aa',
|
|
32
|
-
gradientEnd: '#8e959f',
|
|
33
|
-
title: 'Heading Here',
|
|
34
|
-
description:
|
|
35
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut.',
|
|
36
|
-
titleColor: '#888d94',
|
|
37
|
-
textColor: '#8e959f',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: '02',
|
|
41
|
-
color: '#2c485d',
|
|
42
|
-
gradientEnd: '#334e68',
|
|
43
|
-
title: 'Heading Here',
|
|
44
|
-
description:
|
|
45
|
-
'Sed do eiusmod tempor incididunt ut labore et lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
46
|
-
titleColor: '#2c485d',
|
|
47
|
-
textColor: '#8e959f',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: '03',
|
|
51
|
-
color: '#6fa3b5',
|
|
52
|
-
gradientEnd: '#7fb0c0',
|
|
53
|
-
title: 'Heading Here',
|
|
54
|
-
description:
|
|
55
|
-
'Tempor incididunt ut laborelorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod et.',
|
|
56
|
-
titleColor: '#6fa3b5',
|
|
57
|
-
textColor: '#8e959f',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: '04',
|
|
61
|
-
color: '#d6284d',
|
|
62
|
-
gradientEnd: '#e63964',
|
|
63
|
-
title: 'Heading Here',
|
|
64
|
-
description:
|
|
65
|
-
'Eiusmod tempor incididunt ut labore lorem ipsum dolor sit amet, consectetur adipiscing elit, sed.',
|
|
66
|
-
titleColor: '#d6284d',
|
|
67
|
-
textColor: '#8e959f',
|
|
68
|
-
},
|
|
69
|
-
];
|
|
70
|
-
|
|
71
|
-
export const DEFAULT_ARC_ARROW_PROCESS_ITEMS_3: readonly [
|
|
72
|
-
IResolvedArcArrowProcessItem,
|
|
73
|
-
IResolvedArcArrowProcessItem,
|
|
74
|
-
IResolvedArcArrowProcessItem,
|
|
75
|
-
] = [
|
|
76
|
-
{
|
|
77
|
-
id: '01',
|
|
78
|
-
color: '#a0a5aa',
|
|
79
|
-
gradientEnd: '#8e959f',
|
|
80
|
-
title: 'Heading Here',
|
|
81
|
-
description:
|
|
82
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.',
|
|
83
|
-
titleColor: '#888d94',
|
|
84
|
-
textColor: '#8e959f',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: '02',
|
|
88
|
-
color: '#2c485d',
|
|
89
|
-
gradientEnd: '#334e68',
|
|
90
|
-
title: 'Heading Here',
|
|
91
|
-
description:
|
|
92
|
-
'Sed do eiusmod tempor incididunt ut labore et lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
93
|
-
titleColor: '#2c485d',
|
|
94
|
-
textColor: '#8e959f',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
id: '03',
|
|
98
|
-
color: '#d6284d',
|
|
99
|
-
gradientEnd: '#e63964',
|
|
100
|
-
title: 'Heading Here',
|
|
101
|
-
description:
|
|
102
|
-
'Eiusmod tempor incididunt ut labore lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do.',
|
|
103
|
-
titleColor: '#d6284d',
|
|
104
|
-
textColor: '#8e959f',
|
|
105
|
-
},
|
|
106
|
-
];
|
|
107
|
-
|
|
108
|
-
export const DEFAULT_ARC_ARROW_PROCESS_ITEMS_2: readonly [
|
|
109
|
-
IResolvedArcArrowProcessItem,
|
|
110
|
-
IResolvedArcArrowProcessItem,
|
|
111
|
-
] = [
|
|
112
|
-
{
|
|
113
|
-
id: '01',
|
|
114
|
-
color: '#2c485d',
|
|
115
|
-
gradientEnd: '#334e68',
|
|
116
|
-
title: 'Heading Here',
|
|
117
|
-
description:
|
|
118
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.',
|
|
119
|
-
titleColor: '#2c485d',
|
|
120
|
-
textColor: '#8e959f',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: '02',
|
|
124
|
-
color: '#6fa3b5',
|
|
125
|
-
gradientEnd: '#7fb0c0',
|
|
126
|
-
title: 'Heading Here',
|
|
127
|
-
description:
|
|
128
|
-
'Sed do eiusmod tempor incididunt ut labore et lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
129
|
-
titleColor: '#6fa3b5',
|
|
130
|
-
textColor: '#8e959f',
|
|
131
|
-
},
|
|
132
|
-
];
|
|
133
|
-
|
|
134
|
-
export function getDefaultArcArrowProcessItem(
|
|
135
|
-
index: number,
|
|
136
|
-
count: number = 4,
|
|
137
|
-
): IResolvedArcArrowProcessItem {
|
|
138
|
-
const list =
|
|
139
|
-
count === 2
|
|
140
|
-
? DEFAULT_ARC_ARROW_PROCESS_ITEMS_2
|
|
141
|
-
: count === 3
|
|
142
|
-
? DEFAULT_ARC_ARROW_PROCESS_ITEMS_3
|
|
143
|
-
: DEFAULT_ARC_ARROW_PROCESS_ITEMS_4;
|
|
144
|
-
const safe = Math.abs(index) % list.length;
|
|
145
|
-
const item = list[safe];
|
|
146
|
-
|
|
147
|
-
if (item) {
|
|
148
|
-
return item;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return DEFAULT_ARC_ARROW_PROCESS_ITEMS_4[0];
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export function resolveSingleArcArrowProcessItem(
|
|
155
|
-
item: IArcArrowProcessItem | undefined,
|
|
156
|
-
fallbackIndex = 0,
|
|
157
|
-
count: number = 4,
|
|
158
|
-
): IResolvedArcArrowProcessItem {
|
|
159
|
-
const fallback = getDefaultArcArrowProcessItem(fallbackIndex, count);
|
|
160
|
-
|
|
161
|
-
if (!item) {
|
|
162
|
-
return fallback;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return {
|
|
166
|
-
id: item.id ?? fallback.id,
|
|
167
|
-
color: item.color ?? fallback.color,
|
|
168
|
-
gradientEnd: item.gradientEnd ?? fallback.gradientEnd,
|
|
169
|
-
title: item.title ?? fallback.title,
|
|
170
|
-
description: item.description ?? fallback.description,
|
|
171
|
-
icon: item.icon !== undefined ? item.icon : fallback.icon,
|
|
172
|
-
titleColor: item.titleColor ?? item.color ?? fallback.titleColor,
|
|
173
|
-
textColor: item.textColor ?? fallback.textColor,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export function resolveArcArrowProcessItems(
|
|
178
|
-
items: readonly IArcArrowProcessItem[] | undefined,
|
|
179
|
-
count: number = 4,
|
|
180
|
-
): readonly IResolvedArcArrowProcessItem[] {
|
|
181
|
-
const targetCount = count >= 2 ? count : 4;
|
|
182
|
-
const result: IResolvedArcArrowProcessItem[] = [];
|
|
183
|
-
|
|
184
|
-
for (let i = 0; i < targetCount; i++) {
|
|
185
|
-
result.push(resolveSingleArcArrowProcessItem(items?.[i], i, targetCount));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return result;
|
|
189
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveArcOrbitItems,
|
|
3
|
-
DEFAULT_LOREM_TEXT as SHARED_LOREM_TEXT,
|
|
4
|
-
} from '../arcOrbit';
|
|
5
|
-
|
|
6
|
-
export interface IArcComparisonItem {
|
|
7
|
-
readonly id?: string | number;
|
|
8
|
-
readonly title?: string;
|
|
9
|
-
readonly description?: string;
|
|
10
|
-
readonly color?: string;
|
|
11
|
-
readonly textColor?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface IResolvedArcComparisonItem {
|
|
15
|
-
readonly id: string | number;
|
|
16
|
-
readonly title: string;
|
|
17
|
-
readonly description: string;
|
|
18
|
-
readonly color: string;
|
|
19
|
-
readonly textColor?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const DEFAULT_LEFT_COLOR = '#e87a36';
|
|
23
|
-
|
|
24
|
-
export const DEFAULT_RIGHT_COLOR = '#208b9e';
|
|
25
|
-
|
|
26
|
-
export const DEFAULT_LOREM_TEXT = SHARED_LOREM_TEXT;
|
|
27
|
-
|
|
28
|
-
export const DEFAULT_LEFT_ITEMS: readonly [
|
|
29
|
-
IResolvedArcComparisonItem,
|
|
30
|
-
IResolvedArcComparisonItem,
|
|
31
|
-
IResolvedArcComparisonItem,
|
|
32
|
-
IResolvedArcComparisonItem,
|
|
33
|
-
] = [
|
|
34
|
-
{
|
|
35
|
-
id: '01',
|
|
36
|
-
title: 'Add Text Here',
|
|
37
|
-
description: DEFAULT_LOREM_TEXT,
|
|
38
|
-
color: DEFAULT_LEFT_COLOR,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: '02',
|
|
42
|
-
title: 'Add Text Here',
|
|
43
|
-
description: DEFAULT_LOREM_TEXT,
|
|
44
|
-
color: DEFAULT_LEFT_COLOR,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: '03',
|
|
48
|
-
title: 'Add Text Here',
|
|
49
|
-
description: DEFAULT_LOREM_TEXT,
|
|
50
|
-
color: DEFAULT_LEFT_COLOR,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: '04',
|
|
54
|
-
title: 'Add Text Here',
|
|
55
|
-
description: DEFAULT_LOREM_TEXT,
|
|
56
|
-
color: DEFAULT_LEFT_COLOR,
|
|
57
|
-
},
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
export const DEFAULT_RIGHT_ITEMS: readonly [
|
|
61
|
-
IResolvedArcComparisonItem,
|
|
62
|
-
IResolvedArcComparisonItem,
|
|
63
|
-
IResolvedArcComparisonItem,
|
|
64
|
-
IResolvedArcComparisonItem,
|
|
65
|
-
] = [
|
|
66
|
-
{
|
|
67
|
-
id: '01',
|
|
68
|
-
title: 'Add Text Here',
|
|
69
|
-
description: DEFAULT_LOREM_TEXT,
|
|
70
|
-
color: DEFAULT_RIGHT_COLOR,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: '02',
|
|
74
|
-
title: 'Add Text Here',
|
|
75
|
-
description: DEFAULT_LOREM_TEXT,
|
|
76
|
-
color: DEFAULT_RIGHT_COLOR,
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: '03',
|
|
80
|
-
title: 'Add Text Here',
|
|
81
|
-
description: DEFAULT_LOREM_TEXT,
|
|
82
|
-
color: DEFAULT_RIGHT_COLOR,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: '04',
|
|
86
|
-
title: 'Add Text Here',
|
|
87
|
-
description: DEFAULT_LOREM_TEXT,
|
|
88
|
-
color: DEFAULT_RIGHT_COLOR,
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
export function resolveArcComparisonSideItems(
|
|
93
|
-
items?: readonly IArcComparisonItem[],
|
|
94
|
-
defaultColor = DEFAULT_LEFT_COLOR,
|
|
95
|
-
count = 3,
|
|
96
|
-
): readonly IResolvedArcComparisonItem[] {
|
|
97
|
-
return resolveArcOrbitItems({
|
|
98
|
-
items,
|
|
99
|
-
defaultColor,
|
|
100
|
-
count,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export interface ICreateChevronPathParams {
|
|
2
|
-
readonly width: number;
|
|
3
|
-
readonly height: number;
|
|
4
|
-
readonly notchDepth?: number;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Generates an SVG path for the chevron badge.
|
|
9
|
-
* Features an indented notched tail on the left and a protruding arrow tip on the right.
|
|
10
|
-
*/
|
|
11
|
-
export function createChevronPath({
|
|
12
|
-
width,
|
|
13
|
-
height,
|
|
14
|
-
notchDepth = 26,
|
|
15
|
-
}: ICreateChevronPathParams): string {
|
|
16
|
-
const safeNotch = Math.max(0, Math.min(notchDepth, width / 2));
|
|
17
|
-
const halfH = height / 2;
|
|
18
|
-
|
|
19
|
-
return `M 0 0 L ${width - safeNotch} 0 L ${width} ${halfH} L ${width - safeNotch} ${height} L 0 ${height} L ${safeNotch} ${halfH} Z`;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface ICreateChevronCardBodyPathParams {
|
|
23
|
-
readonly width: number;
|
|
24
|
-
readonly height: number;
|
|
25
|
-
readonly notchDepth?: number;
|
|
26
|
-
readonly borderRadius?: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Generates an SVG path for the card body container.
|
|
31
|
-
* Left edge matches the chevron notch so slide background shows through;
|
|
32
|
-
* right edge features smooth rounded corners.
|
|
33
|
-
*/
|
|
34
|
-
export function createChevronCardBodyPath({
|
|
35
|
-
width,
|
|
36
|
-
height,
|
|
37
|
-
notchDepth = 26,
|
|
38
|
-
borderRadius = 18,
|
|
39
|
-
}: ICreateChevronCardBodyPathParams): string {
|
|
40
|
-
const safeNotch = Math.max(0, Math.min(notchDepth, width / 2));
|
|
41
|
-
const safeR = Math.max(
|
|
42
|
-
0,
|
|
43
|
-
Math.min(borderRadius, (width - safeNotch) / 2, height / 2),
|
|
44
|
-
);
|
|
45
|
-
const halfH = height / 2;
|
|
46
|
-
|
|
47
|
-
return `M 0 0 L ${width - safeR} 0 A ${safeR} ${safeR} 0 0 1 ${width} ${safeR} L ${width} ${height - safeR} A ${safeR} ${safeR} 0 0 1 ${width - safeR} ${height} L 0 ${height} L ${safeNotch} ${halfH} Z`;
|
|
48
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
-
|
|
3
|
-
import type { IHexTriadItem } from './resolveHexTriadItems';
|
|
4
|
-
|
|
5
|
-
export interface IHexTriadRootContext {
|
|
6
|
-
readonly animation?: ComputedRef<boolean>;
|
|
7
|
-
readonly items: ComputedRef<readonly IHexTriadItem[]>;
|
|
8
|
-
readonly registerCallout: () => {
|
|
9
|
-
readonly index: number;
|
|
10
|
-
readonly item: ComputedRef<IHexTriadItem>;
|
|
11
|
-
readonly setBadgeText: (text: string | number) => void;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface IHexTriadCalloutContext {
|
|
16
|
-
readonly index: number;
|
|
17
|
-
readonly item: ComputedRef<IHexTriadItem>;
|
|
18
|
-
readonly setBadgeText: (text: string | number) => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const HEX_TRIAD_ROOT_KEY: InjectionKey<IHexTriadRootContext> =
|
|
22
|
-
Symbol('HEX_TRIAD_ROOT_KEY');
|
|
23
|
-
|
|
24
|
-
export const HEX_TRIAD_CALLOUT_KEY: InjectionKey<IHexTriadCalloutContext> =
|
|
25
|
-
Symbol('HEX_TRIAD_CALLOUT_KEY');
|
package/utils/hexTriad/index.ts
DELETED