@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
|
@@ -17,48 +17,45 @@ export interface IResolvedArrowTriadItem {
|
|
|
17
17
|
readonly title: string;
|
|
18
18
|
readonly description: string;
|
|
19
19
|
readonly icon?: string | object | false;
|
|
20
|
-
readonly cardBg
|
|
20
|
+
readonly cardBg?: string;
|
|
21
21
|
readonly textColor: string;
|
|
22
22
|
readonly titleColor: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const defaultItem0: IResolvedArrowTriadItem = {
|
|
26
26
|
id: '01',
|
|
27
|
-
color: '
|
|
28
|
-
depthColor: '
|
|
29
|
-
title: '
|
|
30
|
-
description:
|
|
31
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore',
|
|
27
|
+
color: 'var(--alpha-arrow-triad-item-1-color)',
|
|
28
|
+
depthColor: 'var(--alpha-arrow-triad-item-1-depth)',
|
|
29
|
+
title: '',
|
|
30
|
+
description: '',
|
|
32
31
|
icon: undefined,
|
|
33
|
-
cardBg:
|
|
34
|
-
textColor: '
|
|
35
|
-
titleColor: '
|
|
32
|
+
cardBg: undefined,
|
|
33
|
+
textColor: 'var(--alpha-arrow-triad-content)',
|
|
34
|
+
titleColor: 'var(--alpha-arrow-triad-item-1-color)',
|
|
36
35
|
};
|
|
37
36
|
|
|
38
37
|
const defaultItem1: IResolvedArrowTriadItem = {
|
|
39
38
|
id: '02',
|
|
40
|
-
color: '
|
|
41
|
-
depthColor: '
|
|
42
|
-
title: '
|
|
43
|
-
description:
|
|
44
|
-
'Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo cupidatat non proident, sunt',
|
|
39
|
+
color: 'var(--alpha-arrow-triad-item-2-color)',
|
|
40
|
+
depthColor: 'var(--alpha-arrow-triad-item-2-depth)',
|
|
41
|
+
title: '',
|
|
42
|
+
description: '',
|
|
45
43
|
icon: undefined,
|
|
46
|
-
cardBg:
|
|
47
|
-
textColor: '
|
|
48
|
-
titleColor: '
|
|
44
|
+
cardBg: undefined,
|
|
45
|
+
textColor: 'var(--alpha-arrow-triad-content)',
|
|
46
|
+
titleColor: 'var(--alpha-arrow-triad-item-2-color)',
|
|
49
47
|
};
|
|
50
48
|
|
|
51
49
|
const defaultItem2: IResolvedArrowTriadItem = {
|
|
52
50
|
id: '03',
|
|
53
|
-
color: '
|
|
54
|
-
depthColor: '
|
|
55
|
-
title: '
|
|
56
|
-
description:
|
|
57
|
-
'Magna aliqua ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo',
|
|
51
|
+
color: 'var(--alpha-arrow-triad-item-3-color)',
|
|
52
|
+
depthColor: 'var(--alpha-arrow-triad-item-3-depth)',
|
|
53
|
+
title: '',
|
|
54
|
+
description: '',
|
|
58
55
|
icon: undefined,
|
|
59
|
-
cardBg:
|
|
60
|
-
textColor: '
|
|
61
|
-
titleColor: '
|
|
56
|
+
cardBg: undefined,
|
|
57
|
+
textColor: 'var(--alpha-arrow-triad-content)',
|
|
58
|
+
titleColor: 'var(--alpha-arrow-triad-item-3-color)',
|
|
62
59
|
};
|
|
63
60
|
|
|
64
61
|
export const DEFAULT_ARROW_TRIAD_ITEMS: readonly [
|
|
@@ -93,16 +90,18 @@ export function resolveSingleArrowTriadItem(
|
|
|
93
90
|
return fallback;
|
|
94
91
|
}
|
|
95
92
|
|
|
93
|
+
const color = item.color ?? fallback.color;
|
|
94
|
+
|
|
96
95
|
return {
|
|
97
96
|
id: item.id ?? fallback.id,
|
|
98
|
-
color
|
|
97
|
+
color,
|
|
99
98
|
depthColor: item.depthColor ?? fallback.depthColor,
|
|
100
99
|
title: item.title ?? fallback.title,
|
|
101
100
|
description: item.description ?? fallback.description,
|
|
102
101
|
icon: item.icon !== undefined ? item.icon : fallback.icon,
|
|
103
|
-
cardBg: item.cardBg
|
|
102
|
+
cardBg: item.cardBg !== undefined ? item.cardBg : fallback.cardBg,
|
|
104
103
|
textColor: item.textColor ?? fallback.textColor,
|
|
105
|
-
titleColor: item.titleColor ??
|
|
104
|
+
titleColor: item.titleColor ?? color,
|
|
106
105
|
};
|
|
107
106
|
}
|
|
108
107
|
|
|
@@ -15,11 +15,11 @@ export interface IGearTriadRootContext {
|
|
|
15
15
|
readonly isShifted: ComputedRef<boolean>;
|
|
16
16
|
readonly currentStep: ComputedRef<number>;
|
|
17
17
|
readonly activeOptionIndex: ComputedRef<number>;
|
|
18
|
-
readonly
|
|
18
|
+
readonly hasDetails: ComputedRef<boolean>;
|
|
19
19
|
readonly registerCallout: (
|
|
20
20
|
override?: ComputedRef<IGearTriadItem> | (() => IGearTriadItem),
|
|
21
21
|
) => IGearTriadRegistration;
|
|
22
|
-
readonly
|
|
22
|
+
readonly registerDetails: () => void;
|
|
23
23
|
readonly items: ComputedRef<
|
|
24
24
|
readonly [
|
|
25
25
|
IResolvedGearTriadItem,
|
|
@@ -34,7 +34,7 @@ export interface IGearTriadCalloutContext {
|
|
|
34
34
|
readonly index: number;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export interface
|
|
37
|
+
export interface IGearTriadDetailsContext {
|
|
38
38
|
readonly activeItem: ComputedRef<IResolvedGearTriadItem>;
|
|
39
39
|
readonly activeOptionIndex: ComputedRef<number>;
|
|
40
40
|
readonly registerContent: (option?: number) => { index: number };
|
|
@@ -47,5 +47,5 @@ export const GEAR_TRIAD_ROOT_KEY: InjectionKey<IGearTriadRootContext> = Symbol(
|
|
|
47
47
|
export const GEAR_TRIAD_CALLOUT_KEY: InjectionKey<IGearTriadCalloutContext> =
|
|
48
48
|
Symbol('GEAR_TRIAD_CALLOUT_KEY');
|
|
49
49
|
|
|
50
|
-
export const
|
|
51
|
-
Symbol('
|
|
50
|
+
export const GEAR_TRIAD_DETAILS_KEY: InjectionKey<IGearTriadDetailsContext> =
|
|
51
|
+
Symbol('GEAR_TRIAD_DETAILS_KEY');
|
|
@@ -91,8 +91,10 @@ export function createGearTriadGeometry(): IGearTriadGeometry {
|
|
|
91
91
|
} else {
|
|
92
92
|
baseGearPath += ` L ${p1.x} ${p1.y}`;
|
|
93
93
|
}
|
|
94
|
+
|
|
94
95
|
baseGearPath += ` L ${p2.x} ${p2.y} L ${p3.x} ${p3.y} A ${rNotch} ${rNotch} 0 0 0 ${p4.x} ${p4.y}`;
|
|
95
96
|
}
|
|
97
|
+
|
|
96
98
|
baseGearPath += ' Z';
|
|
97
99
|
|
|
98
100
|
// ONE CANONICAL PETAL SHAPE (pointing South / 270 deg):
|
|
@@ -37,43 +37,40 @@ export interface IResolvedGearTriadItem {
|
|
|
37
37
|
readonly titleColor: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const DEFAULT_LOREM =
|
|
41
|
-
'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration.';
|
|
42
|
-
|
|
43
40
|
const defaultItem0: IResolvedGearTriadItem = {
|
|
44
41
|
id: '01',
|
|
45
|
-
color: '
|
|
46
|
-
depthColor: '
|
|
47
|
-
title: '
|
|
48
|
-
description:
|
|
42
|
+
color: 'var(--alpha-gear-triad-item-1-color)',
|
|
43
|
+
depthColor: 'var(--alpha-gear-triad-item-1-depth)',
|
|
44
|
+
title: '',
|
|
45
|
+
description: '',
|
|
49
46
|
icon: undefined,
|
|
50
47
|
cardBg: undefined,
|
|
51
|
-
textColor: '
|
|
52
|
-
titleColor: '
|
|
48
|
+
textColor: 'var(--alpha-gear-triad-content)',
|
|
49
|
+
titleColor: 'var(--alpha-gear-triad-item-1-color)',
|
|
53
50
|
};
|
|
54
51
|
|
|
55
52
|
const defaultItem1: IResolvedGearTriadItem = {
|
|
56
53
|
id: '02',
|
|
57
|
-
color: '
|
|
58
|
-
depthColor: '
|
|
59
|
-
title: '
|
|
60
|
-
description:
|
|
54
|
+
color: 'var(--alpha-gear-triad-item-2-color)',
|
|
55
|
+
depthColor: 'var(--alpha-gear-triad-item-2-depth)',
|
|
56
|
+
title: '',
|
|
57
|
+
description: '',
|
|
61
58
|
icon: undefined,
|
|
62
59
|
cardBg: undefined,
|
|
63
|
-
textColor: '
|
|
64
|
-
titleColor: '
|
|
60
|
+
textColor: 'var(--alpha-gear-triad-content)',
|
|
61
|
+
titleColor: 'var(--alpha-gear-triad-item-2-color)',
|
|
65
62
|
};
|
|
66
63
|
|
|
67
64
|
const defaultItem2: IResolvedGearTriadItem = {
|
|
68
65
|
id: '03',
|
|
69
|
-
color: '
|
|
70
|
-
depthColor: '
|
|
71
|
-
title: '
|
|
72
|
-
description:
|
|
66
|
+
color: 'var(--alpha-gear-triad-item-3-color)',
|
|
67
|
+
depthColor: 'var(--alpha-gear-triad-item-3-depth)',
|
|
68
|
+
title: '',
|
|
69
|
+
description: '',
|
|
73
70
|
icon: undefined,
|
|
74
71
|
cardBg: undefined,
|
|
75
|
-
textColor: '
|
|
76
|
-
titleColor: '
|
|
72
|
+
textColor: 'var(--alpha-gear-triad-content)',
|
|
73
|
+
titleColor: 'var(--alpha-gear-triad-item-3-color)',
|
|
77
74
|
};
|
|
78
75
|
|
|
79
76
|
export const DEFAULT_GEAR_TRIAD_ITEMS: readonly [
|
|
@@ -82,7 +79,7 @@ export const DEFAULT_GEAR_TRIAD_ITEMS: readonly [
|
|
|
82
79
|
IResolvedGearTriadItem,
|
|
83
80
|
] = [defaultItem0, defaultItem1, defaultItem2];
|
|
84
81
|
|
|
85
|
-
export const GEAR_TRIAD_BASE_COLOR = '
|
|
82
|
+
export const GEAR_TRIAD_BASE_COLOR = 'var(--alpha-gear-triad-valley)';
|
|
86
83
|
|
|
87
84
|
export function getDefaultGearTriadItem(index: number): IResolvedGearTriadItem {
|
|
88
85
|
const safe = Math.abs(index) % 3;
|
|
@@ -108,16 +105,18 @@ export function resolveSingleGearTriadItem(
|
|
|
108
105
|
return fallback;
|
|
109
106
|
}
|
|
110
107
|
|
|
108
|
+
const color = item.color ?? fallback.color;
|
|
109
|
+
|
|
111
110
|
return {
|
|
112
111
|
id: item.id ?? fallback.id,
|
|
113
|
-
color
|
|
112
|
+
color,
|
|
114
113
|
depthColor: item.depthColor ?? fallback.depthColor,
|
|
115
114
|
title: item.title ?? fallback.title,
|
|
116
115
|
description: item.description ?? fallback.description,
|
|
117
116
|
icon: item.icon !== undefined ? item.icon : fallback.icon,
|
|
118
117
|
cardBg: item.cardBg !== undefined ? item.cardBg : fallback.cardBg,
|
|
119
118
|
textColor: item.textColor ?? fallback.textColor,
|
|
120
|
-
titleColor: item.titleColor ??
|
|
119
|
+
titleColor: item.titleColor ?? color,
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
122
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type { IHexagonTriadItem } from './resolveHexagonTriadItems';
|
|
4
|
+
|
|
5
|
+
export interface IHexagonTriadRootContext {
|
|
6
|
+
readonly animation?: ComputedRef<boolean>;
|
|
7
|
+
readonly items: ComputedRef<readonly IHexagonTriadItem[]>;
|
|
8
|
+
readonly registerCallout: () => {
|
|
9
|
+
readonly index: number;
|
|
10
|
+
readonly item: ComputedRef<IHexagonTriadItem>;
|
|
11
|
+
readonly setBadgeText: (text: string | number) => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IHexagonTriadCalloutContext {
|
|
16
|
+
readonly index: number;
|
|
17
|
+
readonly item: ComputedRef<IHexagonTriadItem>;
|
|
18
|
+
readonly setBadgeText: (text: string | number) => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const HEX_TRIAD_ROOT_KEY: InjectionKey<IHexagonTriadRootContext> =
|
|
22
|
+
Symbol('HEX_TRIAD_ROOT_KEY');
|
|
23
|
+
|
|
24
|
+
export const HEX_TRIAD_CALLOUT_KEY: InjectionKey<IHexagonTriadCalloutContext> =
|
|
25
|
+
Symbol('HEX_TRIAD_CALLOUT_KEY');
|
|
@@ -1,37 +1,20 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface IHexagonTriadPoint {
|
|
2
2
|
readonly x: number;
|
|
3
3
|
readonly y: number;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface IHexagonTriadCoordinates {
|
|
7
7
|
readonly centerX: number;
|
|
8
8
|
readonly centerY: number;
|
|
9
9
|
readonly hexRadius: number;
|
|
10
10
|
readonly triadRadius: number;
|
|
11
11
|
readonly badgeRadius: number;
|
|
12
|
-
readonly hex1:
|
|
13
|
-
readonly hex2:
|
|
14
|
-
readonly hex3:
|
|
15
|
-
readonly badge1:
|
|
16
|
-
readonly badge2:
|
|
17
|
-
readonly badge3:
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Creates pointy-topped hexagon SVG points with sharp vertices
|
|
22
|
-
*/
|
|
23
|
-
export function createHexagonPoints(cx: number, cy: number, r: number): string {
|
|
24
|
-
const angles = [-90, -30, 30, 90, 150, 210];
|
|
25
|
-
|
|
26
|
-
return angles
|
|
27
|
-
.map((deg) => {
|
|
28
|
-
const rad = (deg * Math.PI) / 180;
|
|
29
|
-
const x = (cx + r * Math.cos(rad)).toFixed(1);
|
|
30
|
-
const y = (cy + r * Math.sin(rad)).toFixed(1);
|
|
31
|
-
|
|
32
|
-
return `${x},${y}`;
|
|
33
|
-
})
|
|
34
|
-
.join(' ');
|
|
12
|
+
readonly hex1: IHexagonTriadPoint;
|
|
13
|
+
readonly hex2: IHexagonTriadPoint;
|
|
14
|
+
readonly hex3: IHexagonTriadPoint;
|
|
15
|
+
readonly badge1: IHexagonTriadPoint;
|
|
16
|
+
readonly badge2: IHexagonTriadPoint;
|
|
17
|
+
readonly badge3: IHexagonTriadPoint;
|
|
35
18
|
}
|
|
36
19
|
|
|
37
20
|
/**
|
|
@@ -46,6 +29,7 @@ export function createRoundedHexagonPath(
|
|
|
46
29
|
const angles = [-90, -30, 30, 90, 150, 210];
|
|
47
30
|
const vertices = angles.map((deg) => {
|
|
48
31
|
const rad = (deg * Math.PI) / 180;
|
|
32
|
+
|
|
49
33
|
return {
|
|
50
34
|
x: cx + r * Math.cos(rad),
|
|
51
35
|
y: cy + r * Math.sin(rad),
|
|
@@ -108,14 +92,14 @@ export function createRoundedHexagonPath(
|
|
|
108
92
|
return commands.join(' ');
|
|
109
93
|
}
|
|
110
94
|
|
|
111
|
-
export function
|
|
95
|
+
export function calculateHexagonTriadCoordinates(
|
|
112
96
|
centerX = 270,
|
|
113
97
|
centerY = 224,
|
|
114
98
|
triadRadius = 66,
|
|
115
99
|
hexRadius = 114,
|
|
116
100
|
badgeRadius = 28,
|
|
117
101
|
horizontalSpread = 28,
|
|
118
|
-
):
|
|
102
|
+
): IHexagonTriadCoordinates {
|
|
119
103
|
const angleRad30 = (30 * Math.PI) / 180;
|
|
120
104
|
|
|
121
105
|
const hex2X = Number(
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface IHexagonTriadItem {
|
|
2
|
+
readonly id?: string | number;
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly description?: string;
|
|
5
|
+
readonly color?: string;
|
|
6
|
+
readonly depthColor?: string;
|
|
7
|
+
readonly lightColor?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const DEFAULT_HEX_TRIAD_ITEMS: readonly [
|
|
11
|
+
IHexagonTriadItem,
|
|
12
|
+
IHexagonTriadItem,
|
|
13
|
+
IHexagonTriadItem,
|
|
14
|
+
] = [
|
|
15
|
+
{
|
|
16
|
+
id: '01',
|
|
17
|
+
title: '',
|
|
18
|
+
description: '',
|
|
19
|
+
color: 'var(--alpha-hexagon-triad-item-1-color)',
|
|
20
|
+
depthColor: 'var(--alpha-hexagon-triad-item-1-depth)',
|
|
21
|
+
lightColor: 'var(--alpha-hexagon-triad-item-1-light)',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: '02',
|
|
25
|
+
title: '',
|
|
26
|
+
description: '',
|
|
27
|
+
color: 'var(--alpha-hexagon-triad-item-2-color)',
|
|
28
|
+
depthColor: 'var(--alpha-hexagon-triad-item-2-depth)',
|
|
29
|
+
lightColor: 'var(--alpha-hexagon-triad-item-2-light)',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: '03',
|
|
33
|
+
title: '',
|
|
34
|
+
description: '',
|
|
35
|
+
color: 'var(--alpha-hexagon-triad-item-3-color)',
|
|
36
|
+
depthColor: 'var(--alpha-hexagon-triad-item-3-depth)',
|
|
37
|
+
lightColor: 'var(--alpha-hexagon-triad-item-3-light)',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export function resolveHexagonTriadItems(
|
|
42
|
+
userItems?: readonly IHexagonTriadItem[],
|
|
43
|
+
): readonly [IHexagonTriadItem, IHexagonTriadItem, IHexagonTriadItem] {
|
|
44
|
+
const items = userItems ?? [];
|
|
45
|
+
|
|
46
|
+
return [
|
|
47
|
+
{
|
|
48
|
+
...DEFAULT_HEX_TRIAD_ITEMS[0],
|
|
49
|
+
...(items[0] ?? {}),
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
...DEFAULT_HEX_TRIAD_ITEMS[1],
|
|
53
|
+
...(items[1] ?? {}),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
...DEFAULT_HEX_TRIAD_ITEMS[2],
|
|
57
|
+
...(items[2] ?? {}),
|
|
58
|
+
},
|
|
59
|
+
] as const;
|
|
60
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ICalculateTocCenterAlignmentOffsetPxParams {
|
|
2
|
+
readonly markerCenterY: number;
|
|
3
|
+
readonly articleCenterY: number;
|
|
4
|
+
readonly scaleY: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function calculateTocCenterAlignmentOffsetPx({
|
|
8
|
+
markerCenterY,
|
|
9
|
+
articleCenterY,
|
|
10
|
+
scaleY,
|
|
11
|
+
}: ICalculateTocCenterAlignmentOffsetPxParams): number {
|
|
12
|
+
if (scaleY <= 0) {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (markerCenterY - articleCenterY) / scaleY;
|
|
17
|
+
}
|
|
@@ -64,18 +64,6 @@ export function calculateTocItemCount({
|
|
|
64
64
|
return Math.min(normalizedAvailableCount, normalizedMaximumCount);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
export function calculateTocMarkerCenterPercent(count: number): number {
|
|
68
|
-
const positions = calculateTocMarkerPositions(count);
|
|
69
|
-
const firstPosition = positions[0];
|
|
70
|
-
const lastPosition = positions.at(-1);
|
|
71
|
-
|
|
72
|
-
if (!firstPosition || !lastPosition) {
|
|
73
|
-
return 50;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return (firstPosition.topPercent + lastPosition.topPercent) / 2;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
67
|
export function calculateTocMiddleMarkerOffsetPx(count: number): number {
|
|
80
68
|
const positions = calculateTocMarkerPositions(count);
|
|
81
69
|
const middlePosition = positions[Math.floor((positions.length - 1) / 2)];
|
|
@@ -20,11 +20,17 @@ export function calculateTocConnectorEndX({
|
|
|
20
20
|
return articleLeftX + CONNECTOR_ARTICLE_OVERLAP_PX;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
end: ITocConnectorPoint
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
export interface ICreateTocConnectorPathParams {
|
|
24
|
+
readonly isMiddle: boolean;
|
|
25
|
+
readonly end: ITocConnectorPoint;
|
|
26
|
+
readonly start: ITocConnectorPoint;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function createTocConnectorPath({
|
|
30
|
+
end,
|
|
31
|
+
start,
|
|
32
|
+
isMiddle,
|
|
33
|
+
}: ICreateTocConnectorPathParams): string {
|
|
28
34
|
const startX = formatCoordinate(start.x);
|
|
29
35
|
const startY = formatCoordinate(start.y);
|
|
30
36
|
const endX = formatCoordinate(end.x);
|
|
@@ -97,7 +97,7 @@ function classifyBackground(utility: string): string[] {
|
|
|
97
97
|
return ['background-position'];
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
if (/^bg-(?:gradient|image|url)-/.test(utility)) {
|
|
100
|
+
if (/^bg-(?:gradient|linear|image|url)-/.test(utility)) {
|
|
101
101
|
return ['background-image'];
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -17,12 +17,14 @@ function splitClassNames(value: string): string[] {
|
|
|
17
17
|
if (escaped) {
|
|
18
18
|
current += character;
|
|
19
19
|
escaped = false;
|
|
20
|
+
|
|
20
21
|
continue;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
if (character === '\\') {
|
|
24
25
|
current += character;
|
|
25
26
|
escaped = true;
|
|
27
|
+
|
|
26
28
|
continue;
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -39,6 +41,7 @@ function splitClassNames(value: string): string[] {
|
|
|
39
41
|
if (character === '"' || character === "'") {
|
|
40
42
|
current += character;
|
|
41
43
|
quote = character;
|
|
44
|
+
|
|
42
45
|
continue;
|
|
43
46
|
}
|
|
44
47
|
|
|
@@ -99,9 +102,10 @@ function expandVariantGroup(token: string): string[] {
|
|
|
99
102
|
) {
|
|
100
103
|
const prefix = token.slice(0, index + 1);
|
|
101
104
|
const contents = token.slice(index + 2, -1);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
|
|
106
|
+
return splitClassNames(contents).flatMap((child) => {
|
|
107
|
+
return expandVariantGroup(`${prefix}${child}`);
|
|
108
|
+
});
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
111
|
|
|
@@ -117,6 +121,7 @@ function collectClassName(value: TUnoClassValue, result: string[]): void {
|
|
|
117
121
|
for (const token of splitClassNames(String(value))) {
|
|
118
122
|
result.push(...expandVariantGroup(token));
|
|
119
123
|
}
|
|
124
|
+
|
|
120
125
|
return;
|
|
121
126
|
}
|
|
122
127
|
|
|
@@ -124,6 +129,7 @@ function collectClassName(value: TUnoClassValue, result: string[]): void {
|
|
|
124
129
|
for (const item of value) {
|
|
125
130
|
collectClassName(item, result);
|
|
126
131
|
}
|
|
132
|
+
|
|
127
133
|
return;
|
|
128
134
|
}
|
|
129
135
|
|