@alphacifer/slidev-addon-theme 0.0.10 → 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-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} +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 +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/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/{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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
IRectangleOrbitTetradItem,
|
|
5
|
+
IResolvedRectangleOrbitTetradItem,
|
|
6
|
+
} from './resolveRectangleOrbitTetradItems';
|
|
7
|
+
|
|
8
|
+
export interface IRectangleOrbitTetradRegistration {
|
|
9
|
+
readonly index: number;
|
|
10
|
+
readonly item: ComputedRef<IResolvedRectangleOrbitTetradItem>;
|
|
11
|
+
readonly setCustomBadge?: (text: string | number) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IRectangleOrbitTetradRootContext {
|
|
15
|
+
readonly animation?: ComputedRef<boolean>;
|
|
16
|
+
readonly registerCallout: (
|
|
17
|
+
props?: IRectangleOrbitTetradItem,
|
|
18
|
+
) => IRectangleOrbitTetradRegistration;
|
|
19
|
+
readonly items: ComputedRef<readonly IResolvedRectangleOrbitTetradItem[]>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface IRectangleOrbitTetradCalloutContext {
|
|
23
|
+
readonly index: number;
|
|
24
|
+
readonly item: ComputedRef<IResolvedRectangleOrbitTetradItem>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const RECT_ORBIT_TETRAD_ROOT_KEY: InjectionKey<IRectangleOrbitTetradRootContext> =
|
|
28
|
+
Symbol('RECT_ORBIT_TETRAD_ROOT_KEY');
|
|
29
|
+
|
|
30
|
+
export const RECT_ORBIT_TETRAD_CALLOUT_KEY: InjectionKey<IRectangleOrbitTetradCalloutContext> =
|
|
31
|
+
Symbol('RECT_ORBIT_TETRAD_CALLOUT_KEY');
|
|
@@ -11,7 +11,7 @@ export interface IRectOrbitBox {
|
|
|
11
11
|
readonly height: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export interface
|
|
14
|
+
export interface IRectangleOrbitTetradCoordinates {
|
|
15
15
|
readonly centerX: number;
|
|
16
16
|
readonly centerY: number;
|
|
17
17
|
readonly arcPaths: readonly [string, string, string, string];
|
|
@@ -59,7 +59,7 @@ function createArcPath(
|
|
|
59
59
|
return `M ${x1} ${y1} A ${radius} ${radius} 0 ${largeArcFlag} 1 ${x2} ${y2}`;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export interface
|
|
62
|
+
export interface ICalculateRectangleOrbitTetradCoordinatesParams {
|
|
63
63
|
readonly gap?: number;
|
|
64
64
|
readonly width?: number;
|
|
65
65
|
readonly height?: number;
|
|
@@ -74,14 +74,14 @@ export interface ICalculateRectOrbitTetradCoordinatesParams {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Calculates geometric coordinates for the
|
|
77
|
+
* Calculates geometric coordinates for the RectangleOrbitTetrad layout.
|
|
78
78
|
* Indices (Clockwise starting Top-Left):
|
|
79
79
|
* 0: Top-Left (01)
|
|
80
80
|
* 1: Top-Right (02)
|
|
81
81
|
* 2: Bottom-Right (03)
|
|
82
82
|
* 3: Bottom-Left (04)
|
|
83
83
|
*/
|
|
84
|
-
export function
|
|
84
|
+
export function calculateRectangleOrbitTetradCoordinates({
|
|
85
85
|
gap = 14,
|
|
86
86
|
width = 136,
|
|
87
87
|
height = 150,
|
|
@@ -93,7 +93,7 @@ export function calculateRectOrbitTetradCoordinates({
|
|
|
93
93
|
iconPaddingX = 30,
|
|
94
94
|
iconPaddingY = 32,
|
|
95
95
|
arcBorderWidth = 5,
|
|
96
|
-
}:
|
|
96
|
+
}: ICalculateRectangleOrbitTetradCoordinatesParams = {}): IRectangleOrbitTetradCoordinates {
|
|
97
97
|
const centerX = viewBoxSize / 2;
|
|
98
98
|
const centerY = viewBoxSize / 2;
|
|
99
99
|
const halfGap = gap / 2;
|
|
@@ -235,102 +235,3 @@ export function calculateRectOrbitTetradCoordinates({
|
|
|
235
235
|
numberPositions: [num0, num1, num2, num3],
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
export interface ILightenColorParams {
|
|
240
|
-
readonly hex: string;
|
|
241
|
-
readonly ratio?: number;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Automatically lightens a base hex color by mixing it with white.
|
|
246
|
-
* ratio: 0 = original color, 1 = pure white.
|
|
247
|
-
*/
|
|
248
|
-
export function lightenColor({
|
|
249
|
-
hex,
|
|
250
|
-
ratio = 0.5,
|
|
251
|
-
}: ILightenColorParams): string {
|
|
252
|
-
const raw = hex.trim().replace(/^#/, '');
|
|
253
|
-
const sanitized =
|
|
254
|
-
raw.length === 3
|
|
255
|
-
? raw
|
|
256
|
-
.split('')
|
|
257
|
-
.map((char) => {
|
|
258
|
-
return char + char;
|
|
259
|
-
})
|
|
260
|
-
.join('')
|
|
261
|
-
: raw;
|
|
262
|
-
|
|
263
|
-
if (sanitized.length !== 6) {
|
|
264
|
-
return hex;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const r = Number.parseInt(sanitized.slice(0, 2), 16);
|
|
268
|
-
const g = Number.parseInt(sanitized.slice(2, 4), 16);
|
|
269
|
-
const b = Number.parseInt(sanitized.slice(4, 6), 16);
|
|
270
|
-
|
|
271
|
-
if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
|
|
272
|
-
return hex;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const clamp = (val: number): number => {
|
|
276
|
-
return Math.min(255, Math.max(0, Math.round(val)));
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
const lr = clamp(r + (255 - r) * ratio);
|
|
280
|
-
const lg = clamp(g + (255 - g) * ratio);
|
|
281
|
-
const lb = clamp(b + (255 - b) * ratio);
|
|
282
|
-
|
|
283
|
-
const toHex = (n: number): string => {
|
|
284
|
-
return n.toString(16).padStart(2, '0');
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
return `#${toHex(lr)}${toHex(lg)}${toHex(lb)}`;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export interface IDarkenColorParams {
|
|
291
|
-
readonly hex: string;
|
|
292
|
-
readonly ratio?: number;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Automatically darkens a base hex color by mixing it with black.
|
|
297
|
-
* ratio: 0 = original color, 1 = pure black.
|
|
298
|
-
*/
|
|
299
|
-
export function darkenColor({ hex, ratio = 0.18 }: IDarkenColorParams): string {
|
|
300
|
-
const raw = hex.trim().replace(/^#/, '');
|
|
301
|
-
const sanitized =
|
|
302
|
-
raw.length === 3
|
|
303
|
-
? raw
|
|
304
|
-
.split('')
|
|
305
|
-
.map((char) => {
|
|
306
|
-
return char + char;
|
|
307
|
-
})
|
|
308
|
-
.join('')
|
|
309
|
-
: raw;
|
|
310
|
-
|
|
311
|
-
if (sanitized.length !== 6) {
|
|
312
|
-
return hex;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
const r = Number.parseInt(sanitized.slice(0, 2), 16);
|
|
316
|
-
const g = Number.parseInt(sanitized.slice(2, 4), 16);
|
|
317
|
-
const b = Number.parseInt(sanitized.slice(4, 6), 16);
|
|
318
|
-
|
|
319
|
-
if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
|
|
320
|
-
return hex;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
const clamp = (val: number): number => {
|
|
324
|
-
return Math.min(255, Math.max(0, Math.round(val)));
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
const dr = clamp(r * (1 - ratio));
|
|
328
|
-
const dg = clamp(g * (1 - ratio));
|
|
329
|
-
const db = clamp(b * (1 - ratio));
|
|
330
|
-
|
|
331
|
-
const toHex = (n: number): string => {
|
|
332
|
-
return n.toString(16).padStart(2, '0');
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
return `#${toHex(dr)}${toHex(dg)}${toHex(db)}`;
|
|
336
|
-
}
|
|
@@ -1,57 +1,55 @@
|
|
|
1
|
-
import { lightenColor } from '
|
|
1
|
+
import { lightenColor } from '../../../colors';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type TRectangleOrbitTetradIcon = string | object | boolean;
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface IRectangleOrbitTetradItem {
|
|
6
6
|
readonly id?: string | number;
|
|
7
7
|
/**
|
|
8
8
|
* Optional icon: icon class (e.g. 'i-lucide-user'), component object,
|
|
9
9
|
* built-in name ('user' | 'academic' | 'briefcase' | 'target'), or false to hide.
|
|
10
10
|
*/
|
|
11
|
-
readonly icon?:
|
|
11
|
+
readonly icon?: TRectangleOrbitTetradIcon;
|
|
12
12
|
readonly color?: string;
|
|
13
13
|
readonly cardBg?: string;
|
|
14
14
|
readonly arcColor?: string;
|
|
15
15
|
readonly arcRatio?: number;
|
|
16
16
|
readonly textColor?: string;
|
|
17
|
-
readonly titleColor?: string;
|
|
18
17
|
readonly arcBorderColor?: string;
|
|
19
18
|
readonly arcBorderRatio?: number;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
export interface
|
|
21
|
+
export interface IResolvedRectangleOrbitTetradItem
|
|
22
|
+
extends IRectangleOrbitTetradItem {
|
|
23
23
|
readonly id: string | number;
|
|
24
24
|
readonly color: string;
|
|
25
25
|
readonly cardBg: string;
|
|
26
26
|
readonly arcColor: string;
|
|
27
27
|
readonly textColor: string;
|
|
28
|
-
readonly titleColor: string;
|
|
29
28
|
readonly arcBorderColor: string;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
IResolvedRectangleOrbitTetradItem,
|
|
33
|
+
IResolvedRectangleOrbitTetradItem,
|
|
34
|
+
IResolvedRectangleOrbitTetradItem,
|
|
35
|
+
IResolvedRectangleOrbitTetradItem,
|
|
37
36
|
] = [
|
|
38
37
|
// 0: Top-Left (01) - Golden Orange
|
|
39
38
|
{
|
|
40
39
|
id: '01',
|
|
41
40
|
icon: 'user',
|
|
42
|
-
color: '
|
|
41
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
43
42
|
cardBg: lightenColor({
|
|
44
|
-
hex: '
|
|
43
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
45
44
|
ratio: 0.9,
|
|
46
45
|
}),
|
|
47
46
|
arcColor: lightenColor({
|
|
48
|
-
hex: '
|
|
47
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
49
48
|
ratio: 0.55,
|
|
50
49
|
}),
|
|
51
|
-
textColor: '
|
|
52
|
-
titleColor: '#e6882c',
|
|
50
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
53
51
|
arcBorderColor: lightenColor({
|
|
54
|
-
hex: '
|
|
52
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-1-color)',
|
|
55
53
|
ratio: 0.8,
|
|
56
54
|
}),
|
|
57
55
|
},
|
|
@@ -59,19 +57,18 @@ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
|
59
57
|
{
|
|
60
58
|
id: '02',
|
|
61
59
|
icon: 'academic',
|
|
62
|
-
color: '
|
|
60
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
63
61
|
cardBg: lightenColor({
|
|
64
|
-
hex: '
|
|
62
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
65
63
|
ratio: 0.9,
|
|
66
64
|
}),
|
|
67
65
|
arcColor: lightenColor({
|
|
68
|
-
hex: '
|
|
66
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
69
67
|
ratio: 0.55,
|
|
70
68
|
}),
|
|
71
|
-
textColor: '
|
|
72
|
-
titleColor: '#8bb863',
|
|
69
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
73
70
|
arcBorderColor: lightenColor({
|
|
74
|
-
hex: '
|
|
71
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-2-color)',
|
|
75
72
|
ratio: 0.8,
|
|
76
73
|
}),
|
|
77
74
|
},
|
|
@@ -79,19 +76,18 @@ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
|
79
76
|
{
|
|
80
77
|
id: '03',
|
|
81
78
|
icon: 'briefcase',
|
|
82
|
-
color: '
|
|
79
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
83
80
|
cardBg: lightenColor({
|
|
84
|
-
hex: '
|
|
81
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
85
82
|
ratio: 0.9,
|
|
86
83
|
}),
|
|
87
84
|
arcColor: lightenColor({
|
|
88
|
-
hex: '
|
|
85
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
89
86
|
ratio: 0.55,
|
|
90
87
|
}),
|
|
91
|
-
textColor: '
|
|
92
|
-
titleColor: '#4ea798',
|
|
88
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
93
89
|
arcBorderColor: lightenColor({
|
|
94
|
-
hex: '
|
|
90
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-3-color)',
|
|
95
91
|
ratio: 0.8,
|
|
96
92
|
}),
|
|
97
93
|
},
|
|
@@ -99,30 +95,29 @@ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
|
|
|
99
95
|
{
|
|
100
96
|
id: '04',
|
|
101
97
|
icon: 'target',
|
|
102
|
-
color: '
|
|
98
|
+
color: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
103
99
|
cardBg: lightenColor({
|
|
104
|
-
hex: '
|
|
100
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
105
101
|
ratio: 0.9,
|
|
106
102
|
}),
|
|
107
103
|
arcColor: lightenColor({
|
|
108
|
-
hex: '
|
|
104
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
109
105
|
ratio: 0.55,
|
|
110
106
|
}),
|
|
111
|
-
textColor: '
|
|
112
|
-
titleColor: '#e45b65',
|
|
107
|
+
textColor: 'var(--alpha-rectangle-orbit-tetrad-content)',
|
|
113
108
|
arcBorderColor: lightenColor({
|
|
114
|
-
hex: '
|
|
109
|
+
hex: 'var(--alpha-rectangle-orbit-tetrad-item-4-color)',
|
|
115
110
|
ratio: 0.8,
|
|
116
111
|
}),
|
|
117
112
|
},
|
|
118
113
|
] as const;
|
|
119
114
|
|
|
120
115
|
export function resolveSingleItem(
|
|
121
|
-
defaultItem:
|
|
122
|
-
userItem?:
|
|
116
|
+
defaultItem: IResolvedRectangleOrbitTetradItem,
|
|
117
|
+
userItem?: IRectangleOrbitTetradItem,
|
|
123
118
|
defaultArcRatio = 0.55,
|
|
124
119
|
defaultArcBorderRatio = 0.8,
|
|
125
|
-
):
|
|
120
|
+
): IResolvedRectangleOrbitTetradItem {
|
|
126
121
|
const merged = {
|
|
127
122
|
...defaultItem,
|
|
128
123
|
...(userItem ?? {}),
|
|
@@ -155,9 +150,6 @@ export function resolveSingleItem(
|
|
|
155
150
|
})
|
|
156
151
|
: defaultItem.arcColor),
|
|
157
152
|
textColor: merged.textColor ?? defaultItem.textColor,
|
|
158
|
-
titleColor:
|
|
159
|
-
merged.titleColor ??
|
|
160
|
-
(isColorChanged ? baseColor : defaultItem.titleColor),
|
|
161
153
|
arcBorderColor:
|
|
162
154
|
userItem?.arcBorderColor ??
|
|
163
155
|
(isColorChanged || userItem?.arcBorderRatio !== undefined
|
|
@@ -169,21 +161,21 @@ export function resolveSingleItem(
|
|
|
169
161
|
};
|
|
170
162
|
}
|
|
171
163
|
|
|
172
|
-
export interface
|
|
173
|
-
readonly items?: readonly
|
|
164
|
+
export interface IResolveRectangleOrbitTetradItemsParams {
|
|
165
|
+
readonly items?: readonly IRectangleOrbitTetradItem[];
|
|
174
166
|
readonly arcRatio?: number;
|
|
175
167
|
readonly arcBorderRatio?: number;
|
|
176
168
|
}
|
|
177
169
|
|
|
178
|
-
export function
|
|
170
|
+
export function resolveRectangleOrbitTetradItems({
|
|
179
171
|
items = [],
|
|
180
172
|
arcRatio = 0.55,
|
|
181
173
|
arcBorderRatio = 0.8,
|
|
182
|
-
}:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
174
|
+
}: IResolveRectangleOrbitTetradItemsParams = {}): readonly [
|
|
175
|
+
IResolvedRectangleOrbitTetradItem,
|
|
176
|
+
IResolvedRectangleOrbitTetradItem,
|
|
177
|
+
IResolvedRectangleOrbitTetradItem,
|
|
178
|
+
IResolvedRectangleOrbitTetradItem,
|
|
187
179
|
] {
|
|
188
180
|
return [
|
|
189
181
|
resolveSingleItem(
|
|
@@ -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');
|