@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
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
computed,
|
|
5
5
|
Fragment,
|
|
6
6
|
inject,
|
|
7
|
+
onBeforeUnmount,
|
|
7
8
|
provide,
|
|
8
9
|
type Ref,
|
|
9
10
|
ref,
|
|
@@ -15,7 +16,7 @@ import {
|
|
|
15
16
|
import {
|
|
16
17
|
ARC_COMPARISON_ROOT_KEY,
|
|
17
18
|
createArcComparisonGeometry,
|
|
18
|
-
} from '../../../utils/
|
|
19
|
+
} from '../../../utils/comparisons/arc-comparison';
|
|
19
20
|
import { useDiagramAutoScale } from '../../../utils/useDiagramAutoScale';
|
|
20
21
|
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
21
22
|
import ArcComparisonLeft from './ArcComparisonLeft.vue';
|
|
@@ -34,6 +35,7 @@ export interface IArcComparisonProps {
|
|
|
34
35
|
readonly edgeOffset?: number;
|
|
35
36
|
readonly vsText?: string;
|
|
36
37
|
readonly vsSize?: number;
|
|
38
|
+
readonly vsBorderRotation?: number;
|
|
37
39
|
readonly count?: number;
|
|
38
40
|
readonly hubRadius?: number;
|
|
39
41
|
readonly arcRadius?: number;
|
|
@@ -54,6 +56,7 @@ const props = withDefaults(defineProps<IArcComparisonProps>(), {
|
|
|
54
56
|
edgeOffset: 30,
|
|
55
57
|
vsText: 'Vs',
|
|
56
58
|
vsSize: 14,
|
|
59
|
+
vsBorderRotation: 30,
|
|
57
60
|
count: undefined,
|
|
58
61
|
hubRadius: undefined,
|
|
59
62
|
arcRadius: undefined,
|
|
@@ -178,6 +181,12 @@ const geo = computed(() => {
|
|
|
178
181
|
let clipInstanceCounter = 0;
|
|
179
182
|
const clipId = `alpha-arc-canvas-clip-${++clipInstanceCounter}`;
|
|
180
183
|
|
|
184
|
+
let vsGradientInstanceCounter = 0;
|
|
185
|
+
const vsGradientId = `alpha-arc-vs-gradient-${++vsGradientInstanceCounter}`;
|
|
186
|
+
|
|
187
|
+
let vsTextGradientInstanceCounter = 0;
|
|
188
|
+
const vsTextGradientId = `alpha-arc-vs-text-gradient-${++vsTextGradientInstanceCounter}`;
|
|
189
|
+
|
|
181
190
|
const internalMoved = ref(false);
|
|
182
191
|
|
|
183
192
|
const isMoved = computed(() => {
|
|
@@ -192,11 +201,41 @@ const isMoved = computed(() => {
|
|
|
192
201
|
return internalMoved.value;
|
|
193
202
|
});
|
|
194
203
|
|
|
204
|
+
const bordersRenderKey = ref(0);
|
|
205
|
+
const isReturningToFirstStep = ref(false);
|
|
206
|
+
let returnTimer: ReturnType<typeof setTimeout> | undefined;
|
|
207
|
+
|
|
208
|
+
onBeforeUnmount(() => {
|
|
209
|
+
if (returnTimer) {
|
|
210
|
+
clearTimeout(returnTimer);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
watch(isMoved, (newMoved) => {
|
|
215
|
+
if (returnTimer) {
|
|
216
|
+
clearTimeout(returnTimer);
|
|
217
|
+
returnTimer = undefined;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (props.as === 'layout') {
|
|
221
|
+
if (newMoved) {
|
|
222
|
+
isReturningToFirstStep.value = false;
|
|
223
|
+
} else {
|
|
224
|
+
isReturningToFirstStep.value = true;
|
|
225
|
+
returnTimer = setTimeout(() => {
|
|
226
|
+
isReturningToFirstStep.value = false;
|
|
227
|
+
bordersRenderKey.value++;
|
|
228
|
+
}, 650);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
195
233
|
watch(
|
|
196
234
|
() => props.as,
|
|
197
235
|
(newAs) => {
|
|
198
236
|
if (newAs === 'layout') {
|
|
199
237
|
internalMoved.value = false;
|
|
238
|
+
isReturningToFirstStep.value = false;
|
|
200
239
|
}
|
|
201
240
|
},
|
|
202
241
|
);
|
|
@@ -226,6 +265,7 @@ const leftHubMoverStyle = computed(() => {
|
|
|
226
265
|
if (props.as === 'layout' && !isMoved.value) {
|
|
227
266
|
return { transform: 'translateX(0px)' };
|
|
228
267
|
}
|
|
268
|
+
|
|
229
269
|
return { transform: `translateX(${leftTranslateX.value})` };
|
|
230
270
|
});
|
|
231
271
|
|
|
@@ -233,6 +273,7 @@ const rightHubMoverStyle = computed(() => {
|
|
|
233
273
|
if (props.as === 'layout' && !isMoved.value) {
|
|
234
274
|
return { transform: 'translateX(0px)' };
|
|
235
275
|
}
|
|
276
|
+
|
|
236
277
|
return { transform: `translateX(${rightTranslateX.value})` };
|
|
237
278
|
});
|
|
238
279
|
|
|
@@ -258,6 +299,120 @@ const dividerStyle = computed(() => {
|
|
|
258
299
|
};
|
|
259
300
|
});
|
|
260
301
|
|
|
302
|
+
const resolvedVsBorderRotation = computed(() => props.vsBorderRotation ?? 30);
|
|
303
|
+
|
|
304
|
+
const resolvedLeftColor = computed(() => {
|
|
305
|
+
for (const node of defaultNodes.value) {
|
|
306
|
+
const type = node.type as Record<string, unknown> | undefined;
|
|
307
|
+
const name = (type?.name ?? type?.__name) as string | undefined;
|
|
308
|
+
if (name === 'ArcComparisonLeft' && typeof node.props?.color === 'string') {
|
|
309
|
+
return node.props.color;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return 'var(--alpha-arc-comparison-left-accent)';
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
const resolvedRightColor = computed(() => {
|
|
317
|
+
for (const node of defaultNodes.value) {
|
|
318
|
+
const type = node.type as Record<string, unknown> | undefined;
|
|
319
|
+
const name = (type?.name ?? type?.__name) as string | undefined;
|
|
320
|
+
if (
|
|
321
|
+
name === 'ArcComparisonRight' &&
|
|
322
|
+
typeof node.props?.color === 'string'
|
|
323
|
+
) {
|
|
324
|
+
return node.props.color;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
return 'var(--alpha-arc-comparison-right-accent)';
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
const vsMixedColor = computed(() => {
|
|
332
|
+
return `color-mix(in srgb, ${resolvedLeftColor.value} 50%, ${resolvedRightColor.value} 50%)`;
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
const leftHubLinePath = computed(() => {
|
|
336
|
+
if (props.as !== 'layout') {
|
|
337
|
+
return undefined;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const { centerX, centerY, vsRadius, left } = geo.value;
|
|
341
|
+
return `M ${centerX} ${centerY - vsRadius} L ${centerX} ${centerY - left.hubRadius}`;
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
const rightHubLinePath = computed(() => {
|
|
345
|
+
if (props.as !== 'layout') {
|
|
346
|
+
return undefined;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const { centerX, centerY, vsRadius, right } = geo.value;
|
|
350
|
+
return `M ${centerX} ${centerY + vsRadius} L ${centerX} ${centerY + right.hubRadius}`;
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
const leftHubBorderPath = computed(() => {
|
|
354
|
+
if (props.as !== 'layout') {
|
|
355
|
+
return undefined;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const { centerX, centerY, left } = geo.value;
|
|
359
|
+
return `M ${centerX} ${centerY - left.hubRadius} A ${left.hubRadius} ${left.hubRadius} 0 0 0 ${centerX} ${centerY + left.hubRadius}`;
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
const rightHubBorderPath = computed(() => {
|
|
363
|
+
if (props.as !== 'layout') {
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
const { centerX, centerY, right } = geo.value;
|
|
368
|
+
return `M ${centerX} ${centerY + right.hubRadius} A ${right.hubRadius} ${right.hubRadius} 0 0 0 ${centerX} ${centerY - right.hubRadius}`;
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
const layoutBordersStyle = computed(() => {
|
|
372
|
+
if (props.as !== 'layout') {
|
|
373
|
+
return undefined;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return {
|
|
377
|
+
transitionDuration: '200ms',
|
|
378
|
+
transitionDelay: '0ms',
|
|
379
|
+
};
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
const vsTextStops = computed(() => {
|
|
383
|
+
const text = props.vsText || 'Vs';
|
|
384
|
+
const len = Math.max(1, text.length);
|
|
385
|
+
const stops: Array<{ offset: string; color: string }> = [];
|
|
386
|
+
|
|
387
|
+
for (let i = 0; i < len; i++) {
|
|
388
|
+
const start = (i / len) * 100;
|
|
389
|
+
const mid1 = ((i + 0.35) / len) * 100;
|
|
390
|
+
const center = ((i + 0.5) / len) * 100;
|
|
391
|
+
const mid2 = ((i + 0.65) / len) * 100;
|
|
392
|
+
const end = ((i + 1) / len) * 100;
|
|
393
|
+
|
|
394
|
+
stops.push({
|
|
395
|
+
offset: `${start.toFixed(1)}%`,
|
|
396
|
+
color: resolvedLeftColor.value,
|
|
397
|
+
});
|
|
398
|
+
stops.push({
|
|
399
|
+
offset: `${mid1.toFixed(1)}%`,
|
|
400
|
+
color: resolvedLeftColor.value,
|
|
401
|
+
});
|
|
402
|
+
stops.push({ offset: `${center.toFixed(1)}%`, color: vsMixedColor.value });
|
|
403
|
+
stops.push({
|
|
404
|
+
offset: `${mid2.toFixed(1)}%`,
|
|
405
|
+
color: resolvedRightColor.value,
|
|
406
|
+
});
|
|
407
|
+
stops.push({
|
|
408
|
+
offset: `${end.toFixed(1)}%`,
|
|
409
|
+
color: resolvedRightColor.value,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return stops;
|
|
414
|
+
});
|
|
415
|
+
|
|
261
416
|
provide(ARC_COMPARISON_ROOT_KEY, {
|
|
262
417
|
animation: isAnimated,
|
|
263
418
|
startDelay: resolvedStartDelay,
|
|
@@ -301,12 +456,13 @@ const resolvedHeightStyle = computed(() => {
|
|
|
301
456
|
});
|
|
302
457
|
|
|
303
458
|
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
304
|
-
'alpha-arc-comparison w-full flex-1 flex flex-col items-center justify-center select-none font-sans relative min-h-0',
|
|
459
|
+
'alpha-arc-comparison w-full flex-1 flex flex-col items-center justify-center select-none font-sans relative min-h-0 bg-transparent border-0 p-0 m-0 appearance-none',
|
|
305
460
|
);
|
|
306
461
|
</script>
|
|
307
462
|
|
|
308
463
|
<template>
|
|
309
|
-
<
|
|
464
|
+
<button
|
|
465
|
+
type="button"
|
|
310
466
|
ref="rootRef"
|
|
311
467
|
v-bind="forwardedAttrs()"
|
|
312
468
|
:class="[
|
|
@@ -321,16 +477,17 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
321
477
|
:style="{
|
|
322
478
|
height: resolvedHeightStyle,
|
|
323
479
|
cursor: props.as === 'layout' ? 'pointer' : undefined,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
'--arc-
|
|
327
|
-
'--arc-orbit-
|
|
480
|
+
'--alpha-arc-comparison-start-delay': `${resolvedStartDelay}ms`,
|
|
481
|
+
'--alpha-arc-orbit-start-delay': `${resolvedStartDelay}ms`,
|
|
482
|
+
'--alpha-arc-orbit-heading': 'var(--alpha-arc-comparison-heading)',
|
|
483
|
+
'--alpha-arc-orbit-content': 'var(--alpha-arc-comparison-content)',
|
|
484
|
+
'--alpha-arc-orbit-badge': 'var(--alpha-arc-comparison-badge)',
|
|
328
485
|
}"
|
|
329
486
|
@click="handleClick"
|
|
330
487
|
>
|
|
331
488
|
<!-- Relative stage container -->
|
|
332
489
|
<div
|
|
333
|
-
class="alpha-arc-comparison__stage relative w-
|
|
490
|
+
class="alpha-arc-comparison__stage relative w-250 h-120 flex items-center justify-center overflow-visible shrink-0"
|
|
334
491
|
:style="{
|
|
335
492
|
transform: stageTransform,
|
|
336
493
|
transformOrigin: 'center center',
|
|
@@ -338,6 +495,7 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
338
495
|
>
|
|
339
496
|
<!-- Base SVG Layer -->
|
|
340
497
|
<svg
|
|
498
|
+
aria-hidden="true"
|
|
341
499
|
class="alpha-arc-comparison__svg absolute inset-0 w-full h-full pointer-events-none overflow-visible"
|
|
342
500
|
viewBox="0 0 1000 480"
|
|
343
501
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -346,6 +504,27 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
346
504
|
<clipPath :id="clipId">
|
|
347
505
|
<rect x="0" y="0" width="1000" height="480" />
|
|
348
506
|
</clipPath>
|
|
507
|
+
<linearGradient :id="vsGradientId" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
508
|
+
<stop offset="0%" :stop-color="resolvedLeftColor" />
|
|
509
|
+
<stop offset="35%" :stop-color="resolvedLeftColor" />
|
|
510
|
+
<stop offset="50%" :stop-color="vsMixedColor" />
|
|
511
|
+
<stop offset="65%" :stop-color="resolvedRightColor" />
|
|
512
|
+
<stop offset="100%" :stop-color="resolvedRightColor" />
|
|
513
|
+
</linearGradient>
|
|
514
|
+
<linearGradient
|
|
515
|
+
:id="vsTextGradientId"
|
|
516
|
+
x1="0%"
|
|
517
|
+
y1="0%"
|
|
518
|
+
x2="100%"
|
|
519
|
+
y2="0%"
|
|
520
|
+
>
|
|
521
|
+
<stop
|
|
522
|
+
v-for="(stop, sIdx) in vsTextStops"
|
|
523
|
+
:key="sIdx"
|
|
524
|
+
:offset="stop.offset"
|
|
525
|
+
:stop-color="stop.color"
|
|
526
|
+
/>
|
|
527
|
+
</linearGradient>
|
|
349
528
|
</defs>
|
|
350
529
|
<!-- Semicircular Hubs Group with Canvas Clip -->
|
|
351
530
|
<g :clip-path="`url(#${clipId})`">
|
|
@@ -362,8 +541,8 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
362
541
|
>
|
|
363
542
|
<path
|
|
364
543
|
:d="geo.left.otherHubPath"
|
|
365
|
-
fill="
|
|
366
|
-
class="transition-colors duration-300
|
|
544
|
+
fill="var(--alpha-arc-comparison-hub-fill)"
|
|
545
|
+
class="transition-colors duration-300"
|
|
367
546
|
/>
|
|
368
547
|
</g>
|
|
369
548
|
</g>
|
|
@@ -379,8 +558,8 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
379
558
|
>
|
|
380
559
|
<path
|
|
381
560
|
:d="geo.right.otherHubPath"
|
|
382
|
-
fill="
|
|
383
|
-
class="transition-colors duration-300
|
|
561
|
+
fill="var(--alpha-arc-comparison-hub-fill)"
|
|
562
|
+
class="transition-colors duration-300"
|
|
384
563
|
/>
|
|
385
564
|
</g>
|
|
386
565
|
</g>
|
|
@@ -396,8 +575,8 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
396
575
|
>
|
|
397
576
|
<path
|
|
398
577
|
:d="geo.left.hubPath"
|
|
399
|
-
fill="
|
|
400
|
-
class="transition-colors duration-300
|
|
578
|
+
fill="var(--alpha-arc-comparison-hub-fill)"
|
|
579
|
+
class="transition-colors duration-300"
|
|
401
580
|
/>
|
|
402
581
|
</g>
|
|
403
582
|
</g>
|
|
@@ -413,12 +592,77 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
413
592
|
>
|
|
414
593
|
<path
|
|
415
594
|
:d="geo.right.hubPath"
|
|
416
|
-
fill="
|
|
417
|
-
class="transition-colors duration-300
|
|
595
|
+
fill="var(--alpha-arc-comparison-hub-fill)"
|
|
596
|
+
class="transition-colors duration-300"
|
|
418
597
|
/>
|
|
419
598
|
</g>
|
|
420
599
|
</g>
|
|
421
600
|
</g>
|
|
601
|
+
<!-- Layout Mode Combined Drawing Paths (Middle Lines + Semicircle Borders) -->
|
|
602
|
+
<g
|
|
603
|
+
v-if="props.as === 'layout'"
|
|
604
|
+
:key="bordersRenderKey"
|
|
605
|
+
class="alpha-arc-comparison__layout-borders transition-opacity ease-out"
|
|
606
|
+
:class="{
|
|
607
|
+
'alpha-arc-comparison--animated': isAnimated,
|
|
608
|
+
'opacity-0 pointer-events-none': isMoved || isReturningToFirstStep,
|
|
609
|
+
'opacity-100': !isMoved && !isReturningToFirstStep,
|
|
610
|
+
}"
|
|
611
|
+
:style="layoutBordersStyle"
|
|
612
|
+
>
|
|
613
|
+
<!-- Middle Lines: Drawn first from the Vs badge outwards -->
|
|
614
|
+
<path
|
|
615
|
+
v-if="leftHubLinePath"
|
|
616
|
+
:d="leftHubLinePath"
|
|
617
|
+
pathLength="100"
|
|
618
|
+
stroke-dasharray="100"
|
|
619
|
+
:stroke-dashoffset="isAnimated ? 100 : 0"
|
|
620
|
+
fill="none"
|
|
621
|
+
:stroke="resolvedLeftColor"
|
|
622
|
+
stroke-width="1.5"
|
|
623
|
+
stroke-linecap="round"
|
|
624
|
+
class="alpha-arc-comparison__hub-line alpha-arc-comparison__hub-line--left"
|
|
625
|
+
/>
|
|
626
|
+
<path
|
|
627
|
+
v-if="rightHubLinePath"
|
|
628
|
+
:d="rightHubLinePath"
|
|
629
|
+
pathLength="100"
|
|
630
|
+
stroke-dasharray="100"
|
|
631
|
+
:stroke-dashoffset="isAnimated ? 100 : 0"
|
|
632
|
+
fill="none"
|
|
633
|
+
:stroke="resolvedRightColor"
|
|
634
|
+
stroke-width="1.5"
|
|
635
|
+
stroke-linecap="round"
|
|
636
|
+
class="alpha-arc-comparison__hub-line alpha-arc-comparison__hub-line--right"
|
|
637
|
+
/>
|
|
638
|
+
<!-- Semicircular Perimeter Borders: Drawn second around the arcs -->
|
|
639
|
+
<path
|
|
640
|
+
v-if="leftHubBorderPath"
|
|
641
|
+
:d="leftHubBorderPath"
|
|
642
|
+
pathLength="100"
|
|
643
|
+
stroke-dasharray="100"
|
|
644
|
+
:stroke-dashoffset="isAnimated ? 100 : 0"
|
|
645
|
+
fill="none"
|
|
646
|
+
:stroke="resolvedLeftColor"
|
|
647
|
+
stroke-width="1.5"
|
|
648
|
+
stroke-linejoin="round"
|
|
649
|
+
stroke-linecap="round"
|
|
650
|
+
class="alpha-arc-comparison__hub-border alpha-arc-comparison__hub-border--left"
|
|
651
|
+
/>
|
|
652
|
+
<path
|
|
653
|
+
v-if="rightHubBorderPath"
|
|
654
|
+
:d="rightHubBorderPath"
|
|
655
|
+
pathLength="100"
|
|
656
|
+
stroke-dasharray="100"
|
|
657
|
+
:stroke-dashoffset="isAnimated ? 100 : 0"
|
|
658
|
+
fill="none"
|
|
659
|
+
:stroke="resolvedRightColor"
|
|
660
|
+
stroke-width="1.5"
|
|
661
|
+
stroke-linejoin="round"
|
|
662
|
+
stroke-linecap="round"
|
|
663
|
+
class="alpha-arc-comparison__hub-border alpha-arc-comparison__hub-border--right"
|
|
664
|
+
/>
|
|
665
|
+
</g>
|
|
422
666
|
<!-- Left Arc Guide Line and End Dots -->
|
|
423
667
|
<g
|
|
424
668
|
v-if="props.as !== 'layout' || isMoved"
|
|
@@ -436,23 +680,21 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
436
680
|
<path
|
|
437
681
|
:d="geo.left.arcPath"
|
|
438
682
|
fill="none"
|
|
439
|
-
stroke="
|
|
683
|
+
stroke="var(--alpha-arc-comparison-guide-stroke)"
|
|
440
684
|
stroke-width="1.5"
|
|
441
|
-
class="transition-colors duration-300
|
|
685
|
+
class="transition-colors duration-300"
|
|
442
686
|
/>
|
|
443
687
|
<circle
|
|
444
688
|
:cx="geo.left.topDot.x"
|
|
445
689
|
:cy="geo.left.topDot.y"
|
|
446
690
|
:r="geo.left.dotRadius"
|
|
447
|
-
fill="
|
|
448
|
-
class="dark:fill-slate-600"
|
|
691
|
+
fill="var(--alpha-arc-comparison-guide-dot)"
|
|
449
692
|
/>
|
|
450
693
|
<circle
|
|
451
694
|
:cx="geo.left.bottomDot.x"
|
|
452
695
|
:cy="geo.left.bottomDot.y"
|
|
453
696
|
:r="geo.left.dotRadius"
|
|
454
|
-
fill="
|
|
455
|
-
class="dark:fill-slate-600"
|
|
697
|
+
fill="var(--alpha-arc-comparison-guide-dot)"
|
|
456
698
|
/>
|
|
457
699
|
</g>
|
|
458
700
|
<!-- Right Arc Guide Line and End Dots -->
|
|
@@ -472,66 +714,93 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
472
714
|
<path
|
|
473
715
|
:d="geo.right.arcPath"
|
|
474
716
|
fill="none"
|
|
475
|
-
stroke="
|
|
717
|
+
stroke="var(--alpha-arc-comparison-guide-stroke)"
|
|
476
718
|
stroke-width="1.5"
|
|
477
|
-
class="transition-colors duration-300
|
|
719
|
+
class="transition-colors duration-300"
|
|
478
720
|
/>
|
|
479
721
|
<circle
|
|
480
722
|
:cx="geo.right.topDot.x"
|
|
481
723
|
:cy="geo.right.topDot.y"
|
|
482
724
|
:r="geo.right.dotRadius"
|
|
483
|
-
fill="
|
|
484
|
-
class="dark:fill-slate-600"
|
|
725
|
+
fill="var(--alpha-arc-comparison-guide-dot)"
|
|
485
726
|
/>
|
|
486
727
|
<circle
|
|
487
728
|
:cx="geo.right.bottomDot.x"
|
|
488
729
|
:cy="geo.right.bottomDot.y"
|
|
489
730
|
:r="geo.right.dotRadius"
|
|
490
|
-
fill="
|
|
491
|
-
class="dark:fill-slate-600"
|
|
731
|
+
fill="var(--alpha-arc-comparison-guide-dot)"
|
|
492
732
|
/>
|
|
493
733
|
</g>
|
|
494
|
-
<!-- Center Divider Line -->
|
|
495
|
-
<
|
|
496
|
-
|
|
734
|
+
<!-- Center Divider Line (Top: Left Color, Bottom: Right Color) -->
|
|
735
|
+
<g
|
|
736
|
+
v-if="props.as !== 'layout' || isMoved"
|
|
737
|
+
class="alpha-arc-comparison__divider transition-colors duration-300"
|
|
497
738
|
:class="{
|
|
498
739
|
'alpha-arc-comparison--animated': isAnimated,
|
|
499
740
|
'alpha-arc-comparison__divider--layout': props.as === 'layout',
|
|
741
|
+
'opacity-0 pointer-events-none': props.as === 'layout' && !isMoved,
|
|
742
|
+
'opacity-100': props.as !== 'layout' || isMoved,
|
|
500
743
|
}"
|
|
501
744
|
:style="dividerStyle"
|
|
502
|
-
:x1="geo.dividerLine.x"
|
|
503
|
-
:y1="geo.dividerLine.y1"
|
|
504
|
-
:x2="geo.dividerLine.x"
|
|
505
|
-
:y2="geo.dividerLine.y2"
|
|
506
|
-
stroke="#cbd5e1"
|
|
507
|
-
stroke-width="1.5"
|
|
508
|
-
/>
|
|
509
|
-
<!-- Center "Vs" Circle Badge -->
|
|
510
|
-
<g
|
|
511
|
-
class="alpha-arc-comparison__vs"
|
|
512
|
-
:class="{ 'alpha-arc-comparison--animated': isAnimated }"
|
|
513
745
|
>
|
|
746
|
+
<path
|
|
747
|
+
:d="`M ${geo.dividerLine.x} ${geo.centerY - geo.vsRadius} L ${geo.dividerLine.x} ${geo.dividerLine.y1}`"
|
|
748
|
+
pathLength="100"
|
|
749
|
+
stroke-dasharray="100"
|
|
750
|
+
:stroke-dashoffset="isAnimated ? 100 : 0"
|
|
751
|
+
fill="none"
|
|
752
|
+
:stroke="resolvedLeftColor"
|
|
753
|
+
stroke-width="1.5"
|
|
754
|
+
stroke-linecap="round"
|
|
755
|
+
class="alpha-arc-comparison__divider-line alpha-arc-comparison__divider-line--top transition-colors duration-300"
|
|
756
|
+
/>
|
|
757
|
+
<path
|
|
758
|
+
:d="`M ${geo.dividerLine.x} ${geo.centerY + geo.vsRadius} L ${geo.dividerLine.x} ${geo.dividerLine.y2}`"
|
|
759
|
+
pathLength="100"
|
|
760
|
+
stroke-dasharray="100"
|
|
761
|
+
:stroke-dashoffset="isAnimated ? 100 : 0"
|
|
762
|
+
fill="none"
|
|
763
|
+
:stroke="resolvedRightColor"
|
|
764
|
+
stroke-width="1.5"
|
|
765
|
+
stroke-linecap="round"
|
|
766
|
+
class="alpha-arc-comparison__divider-line alpha-arc-comparison__divider-line--bottom transition-colors duration-300"
|
|
767
|
+
/>
|
|
768
|
+
</g>
|
|
769
|
+
<!-- Center "Vs" Circle Badge -->
|
|
770
|
+
<g class="alpha-arc-comparison__vs">
|
|
514
771
|
<circle
|
|
515
772
|
:cx="geo.vsCenter.x"
|
|
516
773
|
:cy="geo.vsCenter.y"
|
|
517
774
|
:r="geo.vsRadius"
|
|
518
|
-
fill="
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
class="transition-colors duration-300 dark:fill-slate-100 dark:stroke-slate-300"
|
|
522
|
-
style="filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));"
|
|
775
|
+
fill="var(--alpha-arc-comparison-vs-bg)"
|
|
776
|
+
class="transition-colors duration-300"
|
|
777
|
+
style="filter: var(--alpha-arc-comparison-vs-shadow);"
|
|
523
778
|
/>
|
|
779
|
+
<!-- Rotated Split Border with Mixed Boundary Gradient -->
|
|
780
|
+
<g
|
|
781
|
+
:transform="`rotate(${resolvedVsBorderRotation}, ${geo.vsCenter.x}, ${geo.vsCenter.y})`"
|
|
782
|
+
>
|
|
783
|
+
<circle
|
|
784
|
+
class="alpha-arc-comparison__vs-border alpha-arc-comparison__vs-border--left alpha-arc-comparison__vs-border--right transition-colors duration-300"
|
|
785
|
+
:cx="geo.vsCenter.x"
|
|
786
|
+
:cy="geo.vsCenter.y"
|
|
787
|
+
:r="geo.vsRadius"
|
|
788
|
+
fill="none"
|
|
789
|
+
:stroke="`url(#${vsGradientId})`"
|
|
790
|
+
stroke-width="2"
|
|
791
|
+
/>
|
|
792
|
+
</g>
|
|
524
793
|
<text
|
|
525
794
|
:x="geo.vsCenter.x"
|
|
526
795
|
:y="geo.vsCenter.y"
|
|
527
796
|
text-anchor="middle"
|
|
528
797
|
dominant-baseline="central"
|
|
529
798
|
font-weight="700"
|
|
799
|
+
font-style="italic"
|
|
530
800
|
:font-size="props.vsSize"
|
|
531
|
-
fill="
|
|
801
|
+
:fill="`url(#${vsTextGradientId})`"
|
|
532
802
|
letter-spacing="-0.01em"
|
|
533
|
-
class="
|
|
534
|
-
style="font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;"
|
|
803
|
+
class="font-sans italic select-none pointer-events-none"
|
|
535
804
|
>
|
|
536
805
|
{{ props.vsText }}
|
|
537
806
|
</text>
|
|
@@ -546,61 +815,73 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
546
815
|
<ArcComparisonRight :count="resolvedCount" />
|
|
547
816
|
</template>
|
|
548
817
|
</div>
|
|
549
|
-
</
|
|
818
|
+
</button>
|
|
550
819
|
</template>
|
|
551
820
|
|
|
552
821
|
<style scoped>
|
|
553
822
|
/* Animated Transitions */
|
|
554
|
-
.alpha-arc-comparison--animated.alpha-arc-comparison__divider
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
823
|
+
.alpha-arc-comparison--animated .alpha-arc-comparison__divider-line--top,
|
|
824
|
+
.alpha-arc-comparison--animated .alpha-arc-comparison__divider-line--bottom {
|
|
825
|
+
stroke-dasharray: 100;
|
|
826
|
+
stroke-dashoffset: 100;
|
|
827
|
+
animation: alpha-arc-draw-line 600ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
828
|
+
calc(var(--alpha-arc-comparison-start-delay, 0ms) + 40ms) both;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.alpha-arc-comparison--animated .alpha-arc-comparison__hub-line--left,
|
|
832
|
+
.alpha-arc-comparison--animated .alpha-arc-comparison__hub-line--right {
|
|
833
|
+
stroke-dasharray: 100;
|
|
834
|
+
stroke-dashoffset: 100;
|
|
835
|
+
animation: alpha-arc-draw-line 300ms cubic-bezier(0.2, 0.8, 0.4, 1)
|
|
836
|
+
calc(var(--alpha-arc-comparison-start-delay, 0ms) + 40ms) both;
|
|
558
837
|
}
|
|
559
838
|
|
|
560
|
-
.alpha-arc-comparison--animated.alpha-arc-
|
|
561
|
-
|
|
839
|
+
.alpha-arc-comparison--animated .alpha-arc-comparison__hub-border--left,
|
|
840
|
+
.alpha-arc-comparison--animated .alpha-arc-comparison__hub-border--right {
|
|
841
|
+
stroke-dasharray: 100;
|
|
842
|
+
stroke-dashoffset: 100;
|
|
843
|
+
animation: alpha-arc-draw-continuous 550ms cubic-bezier(0.25, 1, 0.5, 1)
|
|
844
|
+
calc(var(--alpha-arc-comparison-start-delay, 0ms) + 260ms) both;
|
|
562
845
|
}
|
|
563
846
|
|
|
564
847
|
.alpha-arc-comparison__divider--layout {
|
|
565
848
|
transform-box: view-box;
|
|
566
|
-
transition:
|
|
849
|
+
transition:
|
|
850
|
+
transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
|
|
851
|
+
opacity 500ms ease-out;
|
|
567
852
|
}
|
|
568
853
|
|
|
569
854
|
.alpha-arc-comparison--animated.alpha-arc-comparison__hub--left {
|
|
570
|
-
animation: arc-hub-left-in 550ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
855
|
+
animation: arc-hub-left-in 550ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
856
|
+
calc(var(--alpha-arc-comparison-start-delay, 0ms) + 30ms) both;
|
|
571
857
|
}
|
|
572
858
|
|
|
573
859
|
.alpha-arc-comparison--animated.alpha-arc-comparison__hub--right {
|
|
574
|
-
animation: arc-hub-right-in 550ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
860
|
+
animation: arc-hub-right-in 550ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
861
|
+
calc(var(--alpha-arc-comparison-start-delay, 0ms) + 30ms) both;
|
|
575
862
|
}
|
|
576
863
|
|
|
577
864
|
.alpha-arc-comparison--animated.alpha-arc-comparison__arc--left,
|
|
578
865
|
.alpha-arc-comparison--animated.alpha-arc-comparison__arc--right {
|
|
579
|
-
animation: arc-line-fade 500ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
866
|
+
animation: arc-line-fade 500ms cubic-bezier(0.16, 1, 0.3, 1)
|
|
867
|
+
calc(var(--alpha-arc-comparison-start-delay, 0ms) + 100ms) both;
|
|
580
868
|
}
|
|
581
869
|
|
|
582
|
-
|
|
583
|
-
animation: arc-vs-bounce 550ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--arc-comparison-start-delay, 0ms) + 220ms) both;
|
|
584
|
-
transform-origin: 500px 240px;
|
|
585
|
-
transform-box: view-box;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
@keyframes arc-divider-in {
|
|
870
|
+
@keyframes arc-hub-left-in {
|
|
589
871
|
0% {
|
|
590
872
|
opacity: 0;
|
|
591
|
-
transform:
|
|
592
|
-
transform-origin: center;
|
|
873
|
+
transform: translateX(-40px);
|
|
593
874
|
}
|
|
594
875
|
100% {
|
|
595
876
|
opacity: 1;
|
|
596
|
-
transform:
|
|
877
|
+
transform: translateX(0);
|
|
597
878
|
}
|
|
598
879
|
}
|
|
599
880
|
|
|
600
|
-
@keyframes arc-hub-
|
|
881
|
+
@keyframes arc-hub-right-in {
|
|
601
882
|
0% {
|
|
602
883
|
opacity: 0;
|
|
603
|
-
transform: translateX(
|
|
884
|
+
transform: translateX(40px);
|
|
604
885
|
}
|
|
605
886
|
100% {
|
|
606
887
|
opacity: 1;
|
|
@@ -608,34 +889,49 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
|
608
889
|
}
|
|
609
890
|
}
|
|
610
891
|
|
|
611
|
-
@keyframes arc-
|
|
892
|
+
@keyframes arc-line-fade {
|
|
612
893
|
0% {
|
|
613
894
|
opacity: 0;
|
|
614
|
-
transform: translateX(40px);
|
|
615
895
|
}
|
|
616
896
|
100% {
|
|
617
897
|
opacity: 1;
|
|
618
|
-
transform: translateX(0);
|
|
619
898
|
}
|
|
620
899
|
}
|
|
621
900
|
|
|
622
|
-
@keyframes arc-
|
|
901
|
+
@keyframes alpha-arc-draw-continuous {
|
|
623
902
|
0% {
|
|
903
|
+
stroke-dashoffset: 100;
|
|
624
904
|
opacity: 0;
|
|
625
905
|
}
|
|
906
|
+
1% {
|
|
907
|
+
opacity: 1;
|
|
908
|
+
}
|
|
626
909
|
100% {
|
|
910
|
+
stroke-dashoffset: 0;
|
|
627
911
|
opacity: 1;
|
|
628
912
|
}
|
|
629
913
|
}
|
|
630
914
|
|
|
631
|
-
@keyframes arc-
|
|
915
|
+
@keyframes alpha-arc-draw-line {
|
|
632
916
|
0% {
|
|
917
|
+
stroke-dashoffset: 100;
|
|
633
918
|
opacity: 0;
|
|
634
|
-
|
|
919
|
+
}
|
|
920
|
+
1% {
|
|
921
|
+
opacity: 1;
|
|
635
922
|
}
|
|
636
923
|
100% {
|
|
924
|
+
stroke-dashoffset: 0;
|
|
637
925
|
opacity: 1;
|
|
638
|
-
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
@keyframes alpha-arc-draw-arc {
|
|
930
|
+
0% {
|
|
931
|
+
stroke-dashoffset: 100;
|
|
932
|
+
}
|
|
933
|
+
100% {
|
|
934
|
+
stroke-dashoffset: 0;
|
|
639
935
|
}
|
|
640
936
|
}
|
|
641
937
|
|