@alphacifer/slidev-addon-theme 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -76
- package/components/card/chevron-card/ChevronCard.vue +44 -32
- package/components/card/chevron-card/ChevronCardBadge.vue +14 -8
- package/components/card/chevron-card/ChevronCardContent.vue +15 -13
- package/components/card/chevron-card/style.css +12 -0
- package/components/card/{horiz-card/HorizCard.vue → horizontal-card/HorizontalCard.vue} +78 -85
- package/components/card/{horiz-card/HorizCardBadge.vue → horizontal-card/HorizontalCardBadge.vue} +15 -10
- package/components/card/{horiz-card/HorizCardContent.vue → horizontal-card/HorizontalCardContent.vue} +11 -11
- package/components/card/{horiz-card/HorizCardIcon.vue → horizontal-card/HorizontalCardIcon.vue} +24 -38
- package/components/card/horizontal-card/style.css +17 -0
- package/components/card/{vert-card/VertCard.vue → vertical-card/VerticalCard.vue} +80 -103
- package/components/card/{vert-card/VertCardBadge.vue → vertical-card/VerticalCardBadge.vue} +15 -10
- package/components/card/{vert-card/VertCardContent.vue → vertical-card/VerticalCardContent.vue} +13 -12
- package/components/card/{vert-card/VertCardIcon.vue → vertical-card/VerticalCardIcon.vue} +15 -33
- package/components/card/vertical-card/style.css +19 -0
- package/components/comparisons/arc-comparison/ArcComparison.vue +376 -80
- package/components/comparisons/arc-comparison/ArcComparisonBadge.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonContent.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonHeading.vue +9 -4
- package/components/comparisons/arc-comparison/ArcComparisonLeft.vue +39 -63
- package/components/comparisons/arc-comparison/ArcComparisonOrbit.vue +9 -8
- package/components/comparisons/arc-comparison/ArcComparisonRight.vue +39 -63
- package/components/comparisons/arc-comparison/style.css +27 -0
- package/components/comparisons/table-comparison/TableComparison.vue +8 -90
- package/components/comparisons/table-comparison/TableComparisonCell.vue +22 -20
- package/components/comparisons/table-comparison/{TableComparisonCol.vue → TableComparisonColumn.vue} +16 -14
- package/components/comparisons/table-comparison/{TableComparisonCols.vue → TableComparisonColumns.vue} +5 -8
- package/components/comparisons/table-comparison/TableComparisonRow.vue +10 -14
- package/components/comparisons/table-comparison/TableComparisonRows.vue +1 -4
- package/components/comparisons/table-comparison/style.css +15 -0
- package/components/core/Date.vue +2 -5
- package/components/core/MetaList.vue +50 -0
- package/components/core/QnA.vue +1 -1
- package/components/core/Quote.vue +3 -6
- package/components/core/ReflectedTitle.vue +2 -6
- package/components/core/Speaker.vue +6 -11
- package/components/core/TransitionHeading.vue +2 -5
- package/components/core/arc-orbit/ArcOrbit.vue +65 -84
- package/components/core/arc-orbit/ArcOrbitBadge.vue +9 -11
- package/components/core/arc-orbit/ArcOrbitCallout.vue +19 -23
- package/components/core/arc-orbit/ArcOrbitContent.vue +6 -12
- package/components/core/arc-orbit/ArcOrbitHeading.vue +13 -11
- package/components/core/arc-orbit/style.css +20 -0
- package/components/core/style.css +9 -0
- package/components/core/thanks/{ThanksContent.vue → SquareThanks.vue} +36 -31
- package/components/core/thanks/SquareThanksContent.vue +87 -0
- package/components/core/thanks/ThanksOutlineSquare.vue +2 -5
- package/components/core/thanks/ThanksSquare.vue +2 -5
- package/components/core/thanks/style.css +30 -0
- package/components/defense-in-depth/{arc-did/ArcDiD.vue → arc-defense-in-depth/ArcDefenseInDepth.vue} +167 -97
- package/components/defense-in-depth/arc-defense-in-depth/ArcDefenseInDepthLayer.vue +240 -0
- package/components/defense-in-depth/{arc-did/ArcDiDLayerTitle.vue → arc-defense-in-depth/ArcDefenseInDepthLayerHeading.vue} +27 -29
- package/components/defense-in-depth/{arc-did/ArcDiDLayerPart.vue → arc-defense-in-depth/ArcDefenseInDepthLayerPart.vue} +91 -39
- package/components/defense-in-depth/{arc-did/ArcDiDLayerSector.vue → arc-defense-in-depth/ArcDefenseInDepthLayerSector.vue} +37 -23
- package/components/defense-in-depth/arc-defense-in-depth/style.css +38 -0
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetrad.vue → rectangle-orbit-tetrad/RectangleOrbitTetrad.vue} +66 -63
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetradCallout.vue → rectangle-orbit-tetrad/RectangleOrbitTetradCallout.vue} +58 -46
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradCenter.vue +54 -0
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradContent.vue +44 -0
- package/components/facets/tetrad/rectangle-orbit-tetrad/RectangleOrbitTetradHeading.vue +27 -0
- package/components/facets/tetrad/{rect-orbit-tetrad/RectOrbitTetradIcon.vue → rectangle-orbit-tetrad/RectangleOrbitTetradIcon.vue} +23 -13
- package/components/facets/tetrad/rectangle-orbit-tetrad/style.css +22 -0
- package/components/facets/triad/arrow-triad/ArrowTriad.vue +99 -109
- package/components/facets/triad/arrow-triad/ArrowTriadCallout.vue +31 -59
- package/components/facets/triad/arrow-triad/ArrowTriadContent.vue +18 -13
- package/components/facets/triad/arrow-triad/ArrowTriadHeading.vue +20 -13
- package/components/facets/triad/arrow-triad/ArrowTriadIcon.vue +14 -9
- package/components/facets/triad/arrow-triad/style.css +15 -0
- package/components/facets/triad/gear-triad/GearTriad.vue +73 -64
- package/components/facets/triad/gear-triad/GearTriadCallout.vue +58 -53
- package/components/facets/triad/gear-triad/GearTriadCenter.vue +9 -4
- package/components/facets/triad/gear-triad/GearTriadContent.vue +21 -36
- package/components/facets/triad/gear-triad/GearTriadDetail.vue +92 -0
- package/components/facets/triad/gear-triad/GearTriadDetails.vue +169 -0
- package/components/facets/triad/gear-triad/GearTriadDetailsContent.vue +18 -0
- package/components/facets/triad/gear-triad/GearTriadDetailsHeading.vue +60 -0
- package/components/facets/triad/gear-triad/GearTriadHeading.vue +19 -13
- package/components/facets/triad/gear-triad/GearTriadIcon.vue +22 -9
- package/components/facets/triad/gear-triad/style.css +26 -0
- package/components/facets/triad/{hex-triad/HexTriad.vue → hexagon-triad/HexagonTriad.vue} +81 -63
- package/components/facets/triad/{hex-triad/HexTriadBadge.vue → hexagon-triad/HexagonTriadBadge.vue} +38 -12
- package/components/facets/triad/{hex-triad/HexTriadCallout.vue → hexagon-triad/HexagonTriadCallout.vue} +35 -31
- package/components/facets/triad/hexagon-triad/HexagonTriadCenterBadge.vue +74 -0
- package/components/facets/triad/hexagon-triad/HexagonTriadContent.vue +34 -0
- package/components/facets/triad/hexagon-triad/HexagonTriadHeading.vue +44 -0
- package/components/facets/triad/{hex-triad/HexTriadLayer.vue → hexagon-triad/HexagonTriadLayer.vue} +12 -4
- package/components/facets/triad/hexagon-triad/style.css +22 -0
- package/components/process/arc-arrow-process/ArcArrowProcess.vue +13 -35
- package/components/process/arc-arrow-process/ArcArrowProcessArrow.vue +20 -21
- package/components/process/arc-arrow-process/ArcArrowProcessCallout.vue +30 -71
- package/components/process/arc-arrow-process/ArcArrowProcessContent.vue +18 -13
- package/components/process/arc-arrow-process/ArcArrowProcessHeading.vue +18 -18
- package/components/process/arc-arrow-process/ArcArrowProcessIcon.vue +23 -11
- package/components/process/arc-arrow-process/style.css +20 -0
- package/components/pyramid/circular-pyramid/CircularPyramid.vue +269 -170
- package/components/pyramid/circular-pyramid/CircularPyramidStack.vue +70 -52
- package/components/pyramid/circular-pyramid/CircularPyramidStackContent.vue +47 -37
- package/components/pyramid/circular-pyramid/{CircularPyramidStackTitle.vue → CircularPyramidStackHeading.vue} +49 -45
- package/components/pyramid/circular-pyramid/style.css +26 -0
- package/components/pyramid/square-pyramid/SquarePyramid.vue +191 -62
- package/components/pyramid/square-pyramid/SquarePyramidStack.vue +74 -49
- package/components/pyramid/square-pyramid/SquarePyramidStackContent.vue +47 -33
- package/components/pyramid/square-pyramid/{SquarePyramidStackTitle.vue → SquarePyramidStackHeading.vue} +49 -41
- package/components/pyramid/square-pyramid/style.css +48 -0
- package/components/style.css +35 -0
- package/layouts/core/arc-toc.vue +40 -45
- package/layouts/core/bg-center.vue +7 -6
- package/layouts/core/references.vue +84 -0
- package/layouts/core/style.css +47 -0
- package/layouts/shifting-heading/shifting-intro.vue +4 -13
- package/layouts/thanks/thanks.vue +5 -5
- package/package.json +7 -5
- package/style.css +17 -0
- package/uno.config.ts +1 -0
- package/utils/activateOnKeyboard.ts +14 -0
- package/utils/{chevronCard → card/chevron-card}/context.ts +1 -1
- package/utils/card/chevron-card/index.ts +1 -0
- package/utils/card/horizontal-card/context.ts +12 -0
- package/utils/{horizCard/createHorizCardGeometry.ts → card/horizontal-card/createHorizontalCardGeometry.ts} +10 -45
- package/utils/card/horizontal-card/index.ts +2 -0
- package/utils/card/vertical-card/context.ts +19 -0
- package/utils/{vertCard/createVertCardGeometry.ts → card/vertical-card/createVerticalCardGeometry.ts} +9 -130
- package/utils/card/vertical-card/index.ts +2 -0
- package/utils/colors.ts +93 -0
- package/utils/{arcComparison → comparisons/arc-comparison}/context.ts +0 -11
- package/utils/{arcComparison → comparisons/arc-comparison}/createArcComparisonGeometry.ts +1 -1
- package/utils/comparisons/arc-comparison/resolveArcComparisonItems.ts +33 -0
- package/utils/comparisons/table-comparison/constants.ts +47 -0
- package/utils/{tableComparison → comparisons/table-comparison}/context.ts +2 -2
- package/utils/{arcOrbit → core/arc-orbit}/resolveArcOrbitItems.ts +11 -15
- package/utils/{defenseInDepth/arcDid → defense-in-depth/arc-defense-in-depth}/context.ts +34 -31
- package/utils/{defenseInDepth/arcDid/createArcDiDGeometry.ts → defense-in-depth/arc-defense-in-depth/createArcDefenseInDepthGeometry.ts} +69 -39
- package/utils/{defenseInDepth/arcDid → defense-in-depth/arc-defense-in-depth}/types.ts +39 -35
- package/utils/defense-in-depth/shared/colors.ts +51 -0
- package/utils/defense-in-depth/shared/constants.ts +22 -0
- package/utils/{defenseInDepth → defense-in-depth}/shared/types.ts +0 -5
- package/utils/facets/tetrad/rectangle-orbit-tetrad/context.ts +31 -0
- package/utils/{rectOrbitTetrad/createRectOrbitTetradGeometry.ts → facets/tetrad/rectangle-orbit-tetrad/createRectangleOrbitTetradGeometry.ts} +5 -104
- package/utils/facets/tetrad/rectangle-orbit-tetrad/index.ts +3 -0
- package/utils/{rectOrbitTetrad/resolveRectOrbitTetradItems.ts → facets/tetrad/rectangle-orbit-tetrad/resolveRectangleOrbitTetradItems.ts} +41 -49
- package/utils/{arrowTriad → facets/triad/arrow-triad}/resolveArrowTriadItems.ts +27 -28
- package/utils/{gearTriad → facets/triad/gear-triad}/context.ts +5 -5
- package/utils/{gearTriad → facets/triad/gear-triad}/createGearTriadGeometry.ts +2 -0
- package/utils/{gearTriad → facets/triad/gear-triad}/resolveGearTriadItems.ts +23 -24
- package/utils/facets/triad/hexagon-triad/context.ts +25 -0
- package/utils/{hexTriad/createHexTriadGeometry.ts → facets/triad/hexagon-triad/createHexagonTriadGeometry.ts} +11 -27
- package/utils/facets/triad/hexagon-triad/index.ts +3 -0
- package/utils/facets/triad/hexagon-triad/resolveHexagonTriadItems.ts +60 -0
- package/utils/{shiftingHeading → layouts/shifting-heading}/collectShiftingIntroNodes.ts +1 -0
- package/utils/layouts/table-of-contents/calculateTocCenterAlignmentOffset.ts +17 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/calculateTocMarkerPositions.ts +0 -12
- package/utils/{tableOfContents → layouts/table-of-contents}/createTocConnectorPath.ts +11 -5
- package/utils/{mergeUno → merge-uno}/classifyVisual.ts +1 -1
- package/utils/{mergeUno → merge-uno}/collectClassNames.ts +9 -3
- package/utils/process/arc-arrow-process/resolveArcArrowProcessItems.ts +180 -0
- package/utils/pyramid/circular-pyramid/context.ts +1 -4
- package/utils/pyramid/circular-pyramid/createCircularPyramidGeometry.ts +6 -10
- package/utils/pyramid/shared/colors.ts +33 -83
- package/utils/pyramid/shared/constants.ts +2 -2
- package/utils/pyramid/shared/types.ts +0 -5
- package/utils/pyramid/square-pyramid/context.ts +1 -4
- package/utils/pyramid/square-pyramid/createSquarePyramidGeometry.ts +6 -10
- package/utils/useDiagramAutoScale.ts +8 -6
- package/utils/useMergedUnoAttrs.ts +9 -5
- package/components/card/chevron-card/ChevronCardHeading.vue +0 -39
- package/components/card/horiz-card/HorizCardHeading.vue +0 -47
- package/components/card/vert-card/VertCardHeading.vue +0 -68
- package/components/card/vert-card/VertCardTitle.vue +0 -76
- package/components/comparisons/arc-comparison/ArcComparisonContents.vue +0 -17
- package/components/comparisons/arc-comparison/ArcComparisonTitle.vue +0 -29
- package/components/core/arc-orbit/ArcOrbitContents.vue +0 -18
- package/components/core/arc-orbit/ArcOrbitTitle.vue +0 -50
- package/components/defense-in-depth/arc-did/ArcDiDLayer.vue +0 -321
- package/components/defense-in-depth/arc-did/ArcDiDLayerParts.vue +0 -11
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCenter.vue +0 -53
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradContent.vue +0 -39
- package/components/facets/tetrad/rect-orbit-tetrad/RectOrbitTetradHeading.vue +0 -44
- package/components/facets/triad/gear-triad/GearTriadContents.vue +0 -111
- package/components/facets/triad/gear-triad/GearTriadDescription.vue +0 -38
- package/components/facets/triad/hex-triad/HexTriadCenterBadge.vue +0 -51
- package/components/facets/triad/hex-triad/HexTriadContent.vue +0 -20
- package/components/facets/triad/hex-triad/HexTriadHeading.vue +0 -28
- package/layouts/core/table-of-contents.vue +0 -30
- package/utils/arcArrowProcess/resolveArcArrowProcessItems.ts +0 -189
- package/utils/arcComparison/resolveArcComparisonItems.ts +0 -102
- package/utils/chevronCard/createChevronCardGeometry.ts +0 -48
- package/utils/chevronCard/index.ts +0 -2
- package/utils/defenseInDepth/arcDid/index.ts +0 -3
- package/utils/defenseInDepth/index.ts +0 -2
- package/utils/defenseInDepth/shared/colors.ts +0 -121
- package/utils/defenseInDepth/shared/constants.ts +0 -14
- package/utils/defenseInDepth/shared/index.ts +0 -3
- package/utils/hexTriad/context.ts +0 -25
- package/utils/hexTriad/index.ts +0 -3
- package/utils/hexTriad/resolveHexTriadItems.ts +0 -63
- package/utils/horizCard/context.ts +0 -13
- package/utils/horizCard/index.ts +0 -2
- package/utils/pyramid/index.ts +0 -3
- package/utils/rectOrbitTetrad/context.ts +0 -31
- package/utils/rectOrbitTetrad/index.ts +0 -3
- package/utils/tableComparison/constants.ts +0 -72
- package/utils/tableOfContents/calculateTocCenterAlignmentOffset.ts +0 -11
- package/utils/vertCard/context.ts +0 -18
- package/utils/vertCard/index.ts +0 -2
- package/utils/{arcComparison → comparisons/arc-comparison}/index.ts +0 -0
- package/utils/{tableComparison → comparisons/table-comparison}/index.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/context.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/createArcOrbitGeometry.ts +0 -0
- package/utils/{arcOrbit → core/arc-orbit}/index.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/context.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/createArrowTriadGeometry.ts +0 -0
- package/utils/{arrowTriad → facets/triad/arrow-triad}/index.ts +0 -0
- package/utils/{gearTriad → facets/triad/gear-triad}/index.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/calculateUniformTocArticleWidth.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/createTocArcPath.ts +0 -0
- package/utils/{tableOfContents → layouts/table-of-contents}/index.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyLayout.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifySimple.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyTypography.ts +0 -0
- package/utils/{mergeUno → merge-uno}/classifyUtility.ts +0 -0
- package/utils/{mergeUno → merge-uno}/index.ts +0 -0
- package/utils/{mergeUno → merge-uno}/mergeClassValues.ts +0 -0
- package/utils/{mergeUno → merge-uno}/splitVariantScope.ts +1 -1
- package/utils/{mergeUno → merge-uno}/types.ts +0 -0
- package/utils/{arcArrowProcess → process/arc-arrow-process}/context.ts +1 -1
- /package/utils/{arcArrowProcess → process/arc-arrow-process}/createArcArrowProcessGeometry.ts +0 -0
- /package/utils/{arcArrowProcess → process/arc-arrow-process}/index.ts +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
5
|
-
import { VERT_CARD_KEY } from '../../../utils/vertCard';
|
|
6
|
-
|
|
7
|
-
defineOptions({
|
|
8
|
-
inheritAttrs: false,
|
|
9
|
-
name: 'VertCardTitle',
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export interface IVertCardTitleProps {
|
|
13
|
-
/**
|
|
14
|
-
* Title text color. Overrides context titleColor.
|
|
15
|
-
*/
|
|
16
|
-
readonly color?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to render the decorative horizontal line with center dot below the title.
|
|
19
|
-
* Defaults to context hasDivider, or true.
|
|
20
|
-
*/
|
|
21
|
-
readonly hasDivider?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const props = withDefaults(defineProps<IVertCardTitleProps>(), {
|
|
25
|
-
color: undefined,
|
|
26
|
-
hasDivider: undefined,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const context = inject(VERT_CARD_KEY, undefined);
|
|
30
|
-
|
|
31
|
-
const headingColor = computed(() => {
|
|
32
|
-
return (
|
|
33
|
-
props.color ??
|
|
34
|
-
context?.titleColor.value ??
|
|
35
|
-
context?.color.value ??
|
|
36
|
-
'#ea583a'
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const isDividerVisible = computed(() => {
|
|
41
|
-
if (props.hasDivider !== undefined) {
|
|
42
|
-
return props.hasDivider;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return context?.hasDivider?.value ?? true;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
49
|
-
'alpha-vert-card-title font-sans font-bold text-xl tracking-tight leading-tight text-center',
|
|
50
|
-
);
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<template>
|
|
54
|
-
<div class="flex flex-col items-center w-full">
|
|
55
|
-
<h3
|
|
56
|
-
v-bind="forwardedAttrs()"
|
|
57
|
-
:class="className()"
|
|
58
|
-
:style="{ color: headingColor }"
|
|
59
|
-
>
|
|
60
|
-
<slot>Lorem Ipsum</slot>
|
|
61
|
-
</h3>
|
|
62
|
-
<div
|
|
63
|
-
v-if="isDividerVisible"
|
|
64
|
-
class="mt-2.5 flex items-center justify-center w-32 relative"
|
|
65
|
-
>
|
|
66
|
-
<div
|
|
67
|
-
class="w-full h-[1.5px]"
|
|
68
|
-
:style="{ backgroundColor: headingColor }"
|
|
69
|
-
/>
|
|
70
|
-
<span
|
|
71
|
-
class="absolute w-2 h-2 rounded-full"
|
|
72
|
-
:style="{ backgroundColor: headingColor }"
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import ArcOrbitContents from '../../core/arc-orbit/ArcOrbitContents.vue';
|
|
3
|
-
|
|
4
|
-
defineOptions({
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
name: 'ArcComparisonContents',
|
|
7
|
-
});
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<ArcOrbitContents
|
|
12
|
-
v-bind="$attrs"
|
|
13
|
-
class="alpha-arc-comparison-contents"
|
|
14
|
-
>
|
|
15
|
-
<slot />
|
|
16
|
-
</ArcOrbitContents>
|
|
17
|
-
</template>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import ArcOrbitTitle, {
|
|
3
|
-
type IArcOrbitTitleProps,
|
|
4
|
-
} from '../../core/arc-orbit/ArcOrbitTitle.vue';
|
|
5
|
-
|
|
6
|
-
defineOptions({
|
|
7
|
-
inheritAttrs: false,
|
|
8
|
-
name: 'ArcComparisonTitle',
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export interface IArcComparisonTitleProps extends IArcOrbitTitleProps {}
|
|
12
|
-
|
|
13
|
-
const props = defineProps<IArcComparisonTitleProps>();
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<ArcOrbitTitle
|
|
18
|
-
v-if="$slots.default"
|
|
19
|
-
v-bind="{ ...props, ...$attrs }"
|
|
20
|
-
class="alpha-arc-comparison-title"
|
|
21
|
-
>
|
|
22
|
-
<slot />
|
|
23
|
-
</ArcOrbitTitle>
|
|
24
|
-
<ArcOrbitTitle
|
|
25
|
-
v-else
|
|
26
|
-
v-bind="{ ...props, ...$attrs }"
|
|
27
|
-
class="alpha-arc-comparison-title"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
3
|
-
|
|
4
|
-
defineOptions({
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
name: 'ArcOrbitContents',
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
10
|
-
'alpha-arc-orbit-contents absolute inset-0 w-full h-full pointer-events-none',
|
|
11
|
-
);
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div v-bind="forwardedAttrs()" :class="className()">
|
|
16
|
-
<slot />
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
ARC_ORBIT_ROOT_KEY,
|
|
6
|
-
DEFAULT_ARC_ORBIT_COLOR,
|
|
7
|
-
} from '../../../utils/arcOrbit';
|
|
8
|
-
import { useMergedUnoAttrs } from '../../../utils/useMergedUnoAttrs';
|
|
9
|
-
|
|
10
|
-
defineOptions({
|
|
11
|
-
inheritAttrs: false,
|
|
12
|
-
name: 'ArcOrbitTitle',
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export interface IArcOrbitTitleProps {
|
|
16
|
-
readonly color?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const props = withDefaults(defineProps<IArcOrbitTitleProps>(), {
|
|
20
|
-
color: undefined,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const rootContext = inject(ARC_ORBIT_ROOT_KEY, undefined);
|
|
24
|
-
|
|
25
|
-
const titleColor = computed(() => {
|
|
26
|
-
return props.color ?? rootContext?.color.value ?? DEFAULT_ARC_ORBIT_COLOR;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const titleStyle = computed(() => {
|
|
30
|
-
return {
|
|
31
|
-
color: titleColor.value,
|
|
32
|
-
fontFamily:
|
|
33
|
-
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
38
|
-
'alpha-arc-orbit-title font-bold text-center px-2 leading-tight flex items-center justify-center select-none text-[1.125rem] tracking-tight whitespace-pre-line',
|
|
39
|
-
);
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<template>
|
|
43
|
-
<div
|
|
44
|
-
v-bind="forwardedAttrs()"
|
|
45
|
-
:class="className()"
|
|
46
|
-
:style="titleStyle"
|
|
47
|
-
>
|
|
48
|
-
<slot>{{ rootContext?.title.value ?? 'Add Topic\nTitle' }}</slot>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
type ComputedRef,
|
|
4
|
-
computed,
|
|
5
|
-
Fragment,
|
|
6
|
-
inject,
|
|
7
|
-
onUnmounted,
|
|
8
|
-
provide,
|
|
9
|
-
ref,
|
|
10
|
-
useSlots,
|
|
11
|
-
type VNode,
|
|
12
|
-
watch,
|
|
13
|
-
} from 'vue';
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
ARC_DID_LAYER_KEY,
|
|
17
|
-
ARC_DID_ROOT_KEY,
|
|
18
|
-
type IArcDiDLayerContext,
|
|
19
|
-
type IArcDiDRegisteredLayerData,
|
|
20
|
-
type IArcDiDRegisteredSectorData,
|
|
21
|
-
} from '../../../utils/defenseInDepth/arcDid/context';
|
|
22
|
-
import type {
|
|
23
|
-
IArcDiDPartGeometry,
|
|
24
|
-
IArcDiDPartItem,
|
|
25
|
-
IArcDiDSectorItem,
|
|
26
|
-
} from '../../../utils/defenseInDepth/arcDid/types';
|
|
27
|
-
import ArcDiDLayerPart from './ArcDiDLayerPart.vue';
|
|
28
|
-
import ArcDiDLayerParts from './ArcDiDLayerParts.vue';
|
|
29
|
-
import ArcDiDLayerSector from './ArcDiDLayerSector.vue';
|
|
30
|
-
import ArcDiDLayerTitle from './ArcDiDLayerTitle.vue';
|
|
31
|
-
|
|
32
|
-
defineOptions({
|
|
33
|
-
name: 'ArcDiDLayer',
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
export interface IArcDiDLayerProps {
|
|
37
|
-
readonly title?: string;
|
|
38
|
-
readonly color?: string;
|
|
39
|
-
readonly textColor?: string;
|
|
40
|
-
readonly index?: number;
|
|
41
|
-
readonly active?: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const props = withDefaults(defineProps<IArcDiDLayerProps>(), {
|
|
45
|
-
title: undefined,
|
|
46
|
-
color: undefined,
|
|
47
|
-
textColor: undefined,
|
|
48
|
-
index: undefined,
|
|
49
|
-
active: undefined,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const slots = useSlots();
|
|
53
|
-
const rootContext = inject(ARC_DID_ROOT_KEY, undefined);
|
|
54
|
-
|
|
55
|
-
interface INamedComponent {
|
|
56
|
-
readonly type?: {
|
|
57
|
-
readonly name?: string;
|
|
58
|
-
readonly displayName?: string;
|
|
59
|
-
readonly __name?: string;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function hasComponentName(type: unknown, targetName: string): boolean {
|
|
64
|
-
if (typeof type === 'object' && type !== null) {
|
|
65
|
-
const comp = type as INamedComponent['type'];
|
|
66
|
-
return (
|
|
67
|
-
comp?.name === targetName ||
|
|
68
|
-
comp?.displayName === targetName ||
|
|
69
|
-
comp?.__name === targetName
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function flattenVNodes(nodes: VNode[]): VNode[] {
|
|
76
|
-
const result: VNode[] = [];
|
|
77
|
-
for (const node of nodes) {
|
|
78
|
-
if (node.type === Fragment && Array.isArray(node.children)) {
|
|
79
|
-
result.push(...flattenVNodes(node.children as VNode[]));
|
|
80
|
-
} else {
|
|
81
|
-
result.push(node);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const defaultNodes = computed(() => {
|
|
88
|
-
if (!slots.default) {
|
|
89
|
-
return [];
|
|
90
|
-
}
|
|
91
|
-
return flattenVNodes(slots.default());
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const hasSlottedTitle = computed(() => {
|
|
95
|
-
return defaultNodes.value.some((node) =>
|
|
96
|
-
hasComponentName(node.type, 'ArcDiDLayerTitle'),
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
const hasSlottedParts = computed(() => {
|
|
101
|
-
if (registeredSectorTokens.value.length > 0) {
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
return defaultNodes.value.some(
|
|
105
|
-
(node) =>
|
|
106
|
-
hasComponentName(node.type, 'ArcDiDLayerParts') ||
|
|
107
|
-
hasComponentName(node.type, 'ArcDiDLayerPart') ||
|
|
108
|
-
hasComponentName(node.type, 'ArcDiDLayerSector'),
|
|
109
|
-
);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
const currentTitle = ref<string | undefined>(props.title);
|
|
113
|
-
watch(
|
|
114
|
-
() => props.title,
|
|
115
|
-
(val) => {
|
|
116
|
-
if (val !== undefined) {
|
|
117
|
-
currentTitle.value = val;
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
// Manage sector and part registrations within this layer
|
|
123
|
-
const registeredSectorTokens = ref<symbol[]>([]);
|
|
124
|
-
const registeredSectorData = ref<Map<symbol, IArcDiDRegisteredSectorData>>(
|
|
125
|
-
new Map(),
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
function registerSector(
|
|
129
|
-
token?: symbol,
|
|
130
|
-
sectorDataRef?: ComputedRef<IArcDiDRegisteredSectorData | undefined>,
|
|
131
|
-
) {
|
|
132
|
-
const sToken = token ?? Symbol();
|
|
133
|
-
if (!registeredSectorTokens.value.includes(sToken)) {
|
|
134
|
-
registeredSectorTokens.value = [...registeredSectorTokens.value, sToken];
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
let stopWatch: (() => void) | undefined;
|
|
138
|
-
if (sectorDataRef) {
|
|
139
|
-
stopWatch = watch(
|
|
140
|
-
sectorDataRef,
|
|
141
|
-
(val) => {
|
|
142
|
-
const nextMap = new Map(registeredSectorData.value);
|
|
143
|
-
if (val) {
|
|
144
|
-
nextMap.set(sToken, val);
|
|
145
|
-
} else {
|
|
146
|
-
nextMap.delete(sToken);
|
|
147
|
-
}
|
|
148
|
-
registeredSectorData.value = nextMap;
|
|
149
|
-
},
|
|
150
|
-
{ immediate: true },
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const index = computed(() => registeredSectorTokens.value.indexOf(sToken));
|
|
155
|
-
|
|
156
|
-
return {
|
|
157
|
-
index,
|
|
158
|
-
unregister: () => {
|
|
159
|
-
stopWatch?.();
|
|
160
|
-
registeredSectorTokens.value = registeredSectorTokens.value.filter(
|
|
161
|
-
(t) => t !== sToken,
|
|
162
|
-
);
|
|
163
|
-
const nextMap = new Map(registeredSectorData.value);
|
|
164
|
-
nextMap.delete(sToken);
|
|
165
|
-
registeredSectorData.value = nextMap;
|
|
166
|
-
},
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function registerPart(
|
|
171
|
-
token?: symbol,
|
|
172
|
-
partDataRef?: ComputedRef<IArcDiDPartItem | undefined>,
|
|
173
|
-
) {
|
|
174
|
-
const pToken = token ?? Symbol();
|
|
175
|
-
const sectorDataRef = computed<IArcDiDRegisteredSectorData | undefined>(
|
|
176
|
-
() => {
|
|
177
|
-
const pData = partDataRef?.value;
|
|
178
|
-
if (!pData) return undefined;
|
|
179
|
-
return {
|
|
180
|
-
parts: [pData],
|
|
181
|
-
split: false,
|
|
182
|
-
angle: pData.angle,
|
|
183
|
-
span: pData.span,
|
|
184
|
-
color: pData.color,
|
|
185
|
-
};
|
|
186
|
-
},
|
|
187
|
-
);
|
|
188
|
-
return registerSector(pToken, sectorDataRef);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const registeredSectorsList = computed<IArcDiDSectorItem[]>(() => {
|
|
192
|
-
return registeredSectorTokens.value
|
|
193
|
-
.map((token) => registeredSectorData.value.get(token))
|
|
194
|
-
.filter((item): item is IArcDiDRegisteredSectorData => item !== undefined)
|
|
195
|
-
.map((data) => ({
|
|
196
|
-
parts: data.parts ?? [],
|
|
197
|
-
split: data.split,
|
|
198
|
-
angle: data.angle,
|
|
199
|
-
span: data.span,
|
|
200
|
-
color: data.color,
|
|
201
|
-
}));
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
const registeredPartsList = computed<IArcDiDPartItem[]>(() => {
|
|
205
|
-
return registeredSectorsList.value.flatMap(
|
|
206
|
-
(s) => s.parts as IArcDiDPartItem[],
|
|
207
|
-
);
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
const layerToken = Symbol();
|
|
211
|
-
const layerRegistrationData = computed<IArcDiDRegisteredLayerData>(() => ({
|
|
212
|
-
title: currentTitle.value,
|
|
213
|
-
color: props.color,
|
|
214
|
-
sectors: registeredSectorsList.value,
|
|
215
|
-
parts: registeredPartsList.value,
|
|
216
|
-
index: props.index !== undefined ? Number(props.index) : undefined,
|
|
217
|
-
}));
|
|
218
|
-
|
|
219
|
-
const registration = rootContext?.registerLayer(
|
|
220
|
-
layerToken,
|
|
221
|
-
layerRegistrationData,
|
|
222
|
-
);
|
|
223
|
-
|
|
224
|
-
onUnmounted(() => {
|
|
225
|
-
registration?.unregister();
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
const resolvedIndex = computed<number>(() => {
|
|
229
|
-
if (props.index !== undefined) {
|
|
230
|
-
return Number(props.index);
|
|
231
|
-
}
|
|
232
|
-
return registration?.index.value ?? 0;
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
const layerGeo = computed(() => {
|
|
236
|
-
if (!rootContext) {
|
|
237
|
-
return undefined;
|
|
238
|
-
}
|
|
239
|
-
return rootContext.geo.value.layers[resolvedIndex.value];
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
const isActive = computed<boolean>(() => {
|
|
243
|
-
if (props.active !== undefined) {
|
|
244
|
-
return props.active;
|
|
245
|
-
}
|
|
246
|
-
if (!rootContext) {
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
return (
|
|
250
|
-
rootContext.activeIndex.value === -1 ||
|
|
251
|
-
rootContext.activeIndex.value === resolvedIndex.value
|
|
252
|
-
);
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
const effectiveColor = computed<string>(() => {
|
|
256
|
-
if (props.color) {
|
|
257
|
-
return props.color;
|
|
258
|
-
}
|
|
259
|
-
if (rootContext) {
|
|
260
|
-
return rootContext.getLayerColor(resolvedIndex.value);
|
|
261
|
-
}
|
|
262
|
-
return '#0ea5e9';
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
const layerContext: IArcDiDLayerContext = {
|
|
266
|
-
layerIndex: resolvedIndex,
|
|
267
|
-
layerGeo,
|
|
268
|
-
isActive,
|
|
269
|
-
color: effectiveColor,
|
|
270
|
-
textColor: computed(() => props.textColor),
|
|
271
|
-
title: computed(() => currentTitle.value),
|
|
272
|
-
setTitle: (title: string) => {
|
|
273
|
-
currentTitle.value = title;
|
|
274
|
-
},
|
|
275
|
-
partsCount: computed(() => registeredPartsList.value.length),
|
|
276
|
-
registerPart,
|
|
277
|
-
registerSector,
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
provide(ARC_DID_LAYER_KEY, layerContext);
|
|
281
|
-
</script>
|
|
282
|
-
|
|
283
|
-
<template>
|
|
284
|
-
<div
|
|
285
|
-
class="alpha-arc-did__layer contents"
|
|
286
|
-
:data-index="resolvedIndex"
|
|
287
|
-
:data-active="isActive"
|
|
288
|
-
>
|
|
289
|
-
<!-- Auto-render title if prop title provided but no slotted ArcDiDLayerTitle -->
|
|
290
|
-
<ArcDiDLayerTitle v-if="!hasSlottedTitle && currentTitle" :title="currentTitle" />
|
|
291
|
-
|
|
292
|
-
<!-- Default children slots -->
|
|
293
|
-
<slot />
|
|
294
|
-
|
|
295
|
-
<!-- Fallback parts from geometry if layer has no slotted parts and default geo parts/sectors exist -->
|
|
296
|
-
<ArcDiDLayerParts v-if="!hasSlottedParts && registeredSectorTokens.length === 0 && layerGeo && layerGeo.sectors.length > 0">
|
|
297
|
-
<template v-for="sector in layerGeo.sectors" :key="sector.index">
|
|
298
|
-
<ArcDiDLayerSector v-if="sector.parts.length > 1 || sector.split" :split="sector.split">
|
|
299
|
-
<ArcDiDLayerPart
|
|
300
|
-
v-for="part in sector.parts"
|
|
301
|
-
:key="part.index"
|
|
302
|
-
:label="part.label"
|
|
303
|
-
:index="part.index"
|
|
304
|
-
:position="part.position"
|
|
305
|
-
:angle="part.angle"
|
|
306
|
-
:radius="part.radius"
|
|
307
|
-
/>
|
|
308
|
-
</ArcDiDLayerSector>
|
|
309
|
-
<ArcDiDLayerPart
|
|
310
|
-
v-else-if="sector.parts[0]"
|
|
311
|
-
:key="sector.parts[0].index"
|
|
312
|
-
:label="sector.parts[0].label"
|
|
313
|
-
:index="sector.parts[0].index"
|
|
314
|
-
:position="sector.parts[0].position"
|
|
315
|
-
:angle="sector.parts[0].angle"
|
|
316
|
-
:radius="sector.parts[0].radius"
|
|
317
|
-
/>
|
|
318
|
-
</template>
|
|
319
|
-
</ArcDiDLayerParts>
|
|
320
|
-
</div>
|
|
321
|
-
</template>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
defineOptions({
|
|
3
|
-
name: 'RectOrbitTetradCenter',
|
|
4
|
-
});
|
|
5
|
-
|
|
6
|
-
export interface IRectOrbitTetradCenterProps {
|
|
7
|
-
readonly title?: string;
|
|
8
|
-
readonly radius?: number;
|
|
9
|
-
readonly subtitle?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(defineProps<IRectOrbitTetradCenterProps>(), {
|
|
13
|
-
title: undefined,
|
|
14
|
-
subtitle: undefined,
|
|
15
|
-
radius: 58,
|
|
16
|
-
});
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<template>
|
|
20
|
-
<div
|
|
21
|
-
class="alpha-rect-orbit-tetrad-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-20 rounded-full bg-white flex flex-col items-center justify-center text-center shadow-lg pointer-events-auto select-none"
|
|
22
|
-
:style="{
|
|
23
|
-
width: `${props.radius * 2}px`,
|
|
24
|
-
height: `${props.radius * 2}px`,
|
|
25
|
-
boxShadow: '0 4px 18px rgba(0, 0, 0, 0.12)',
|
|
26
|
-
fontFamily: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
27
|
-
}"
|
|
28
|
-
>
|
|
29
|
-
<slot>
|
|
30
|
-
<slot name="title">
|
|
31
|
-
<span
|
|
32
|
-
v-if="props.title"
|
|
33
|
-
:class="[
|
|
34
|
-
'text-[23px] font-extrabold text-slate-800 tracking-tight leading-none',
|
|
35
|
-
{ 'mb-2': props.subtitle },
|
|
36
|
-
]"
|
|
37
|
-
style="font-family: inherit;"
|
|
38
|
-
>
|
|
39
|
-
{{ props.title }}
|
|
40
|
-
</span>
|
|
41
|
-
</slot>
|
|
42
|
-
<slot name="subtitle">
|
|
43
|
-
<span
|
|
44
|
-
v-if="props.subtitle"
|
|
45
|
-
class="text-[13px] font-medium text-slate-400 tracking-normal leading-none"
|
|
46
|
-
style="font-family: inherit;"
|
|
47
|
-
>
|
|
48
|
-
{{ props.subtitle }}
|
|
49
|
-
</span>
|
|
50
|
-
</slot>
|
|
51
|
-
</slot>
|
|
52
|
-
</div>
|
|
53
|
-
</template>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
import { RECT_ORBIT_TETRAD_CALLOUT_KEY } from '../../../../utils/rectOrbitTetrad';
|
|
5
|
-
|
|
6
|
-
defineOptions({
|
|
7
|
-
name: 'RectOrbitTetradContent',
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export interface IRectOrbitTetradContentProps {
|
|
11
|
-
readonly color?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const props = withDefaults(defineProps<IRectOrbitTetradContentProps>(), {
|
|
15
|
-
color: undefined,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const calloutContext = inject(RECT_ORBIT_TETRAD_CALLOUT_KEY, undefined);
|
|
19
|
-
|
|
20
|
-
const contentColor = computed(() => {
|
|
21
|
-
return props.color ?? calloutContext?.item.value.textColor ?? '#555555';
|
|
22
|
-
});
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<template>
|
|
26
|
-
<div
|
|
27
|
-
class="alpha-rect-orbit-tetrad-content text-[1rem] leading-[1.38] font-normal tracking-tight m-0 p-0 select-none"
|
|
28
|
-
:style="{
|
|
29
|
-
color: contentColor,
|
|
30
|
-
margin: 0,
|
|
31
|
-
padding: 0,
|
|
32
|
-
fontSize: '1rem',
|
|
33
|
-
fontFamily:
|
|
34
|
-
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Helvetica, Arial, sans-serif',
|
|
35
|
-
}"
|
|
36
|
-
>
|
|
37
|
-
<slot />
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
import { RECT_ORBIT_TETRAD_CALLOUT_KEY } from '../../../../utils/rectOrbitTetrad';
|
|
5
|
-
|
|
6
|
-
defineOptions({
|
|
7
|
-
name: 'RectOrbitTetradHeading',
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export interface IRectOrbitTetradHeadingProps {
|
|
11
|
-
readonly color?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const props = withDefaults(defineProps<IRectOrbitTetradHeadingProps>(), {
|
|
15
|
-
color: undefined,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const calloutContext = inject(RECT_ORBIT_TETRAD_CALLOUT_KEY, undefined);
|
|
19
|
-
|
|
20
|
-
const headingColor = computed(() => {
|
|
21
|
-
return (
|
|
22
|
-
props.color ??
|
|
23
|
-
calloutContext?.item.value.titleColor ??
|
|
24
|
-
calloutContext?.item.value.color ??
|
|
25
|
-
'#f29e4b'
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<div
|
|
32
|
-
class="alpha-rect-orbit-tetrad-heading font-bold text-[1.25rem] leading-tight tracking-tight m-0 p-0 select-none"
|
|
33
|
-
:style="{
|
|
34
|
-
color: headingColor,
|
|
35
|
-
margin: 0,
|
|
36
|
-
padding: 0,
|
|
37
|
-
fontSize: '1.25rem',
|
|
38
|
-
fontFamily:
|
|
39
|
-
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Helvetica, Arial, sans-serif',
|
|
40
|
-
}"
|
|
41
|
-
>
|
|
42
|
-
<slot />
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|