@alphacifer/slidev-addon-theme 0.0.4 → 0.0.6

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.
Files changed (84) hide show
  1. package/README.md +127 -2
  2. package/components/arc-arrow-process/ArcArrowProcess.vue +361 -0
  3. package/components/arc-arrow-process/ArcArrowProcessArrow.vue +143 -0
  4. package/components/arc-arrow-process/ArcArrowProcessCallout.vue +361 -0
  5. package/components/arc-arrow-process/ArcArrowProcessContent.vue +38 -0
  6. package/components/arc-arrow-process/ArcArrowProcessHeading.vue +43 -0
  7. package/components/arc-arrow-process/ArcArrowProcessIcon.vue +154 -0
  8. package/components/arc-compare/ArcCompare.vue +443 -0
  9. package/components/arc-compare/ArcCompareBadge.vue +63 -0
  10. package/components/arc-compare/ArcCompareCallout.vue +386 -0
  11. package/components/arc-compare/ArcCompareContent.vue +52 -0
  12. package/components/arc-compare/ArcCompareContents.vue +18 -0
  13. package/components/arc-compare/ArcCompareHeading.vue +52 -0
  14. package/components/arc-compare/ArcCompareLeft.vue +183 -0
  15. package/components/arc-compare/ArcCompareRight.vue +183 -0
  16. package/components/arc-compare/ArcCompareTitle.vue +47 -0
  17. package/components/arrow-triad/ArrowTriad.vue +368 -0
  18. package/components/arrow-triad/ArrowTriadCallout.vue +300 -0
  19. package/components/arrow-triad/ArrowTriadContent.vue +38 -0
  20. package/components/arrow-triad/ArrowTriadHeading.vue +38 -0
  21. package/components/arrow-triad/ArrowTriadIcon.vue +96 -0
  22. package/components/chevron-card/ChevronCard.vue +237 -0
  23. package/components/chevron-card/ChevronCardBadge.vue +74 -0
  24. package/components/chevron-card/ChevronCardContent.vue +39 -0
  25. package/components/chevron-card/ChevronCardHeading.vue +39 -0
  26. package/components/hex-triad/HexTriad.vue +438 -0
  27. package/components/hex-triad/HexTriadBadge.vue +110 -0
  28. package/components/hex-triad/HexTriadCallout.vue +200 -0
  29. package/components/hex-triad/HexTriadCenterBadge.vue +51 -0
  30. package/components/hex-triad/HexTriadContent.vue +20 -0
  31. package/components/hex-triad/HexTriadHeading.vue +28 -0
  32. package/components/hex-triad/HexTriadLayer.vue +28 -0
  33. package/components/horiz-card/HorizCard.vue +318 -0
  34. package/components/horiz-card/HorizCardBadge.vue +75 -0
  35. package/components/horiz-card/HorizCardContent.vue +46 -0
  36. package/components/horiz-card/HorizCardHeading.vue +47 -0
  37. package/components/horiz-card/HorizCardIcon.vue +118 -0
  38. package/components/quad-hub/QuadHub.vue +642 -0
  39. package/components/quad-hub/QuadHubCallout.vue +267 -0
  40. package/components/quad-hub/QuadHubCenter.vue +53 -0
  41. package/components/quad-hub/QuadHubContent.vue +39 -0
  42. package/components/quad-hub/QuadHubHeading.vue +44 -0
  43. package/components/quad-hub/QuadHubIcon.vue +112 -0
  44. package/components/shifting-heading/TransitionHeading.vue +3 -3
  45. package/components/vert-card/VertCard.vue +389 -0
  46. package/components/vert-card/VertCardBadge.vue +72 -0
  47. package/components/vert-card/VertCardContent.vue +45 -0
  48. package/components/vert-card/VertCardHeading.vue +68 -0
  49. package/components/vert-card/VertCardIcon.vue +126 -0
  50. package/components/vert-card/VertCardTitle.vue +76 -0
  51. package/layouts/core/arc-toc.vue +76 -113
  52. package/layouts/core/bg-center.vue +32 -4
  53. package/layouts/shifting-heading/shifting-intro.vue +35 -7
  54. package/package.json +3 -2
  55. package/utils/arcArrowProcess/context.ts +28 -0
  56. package/utils/arcArrowProcess/createArcArrowProcessGeometry.ts +137 -0
  57. package/utils/arcArrowProcess/index.ts +3 -0
  58. package/utils/arcArrowProcess/resolveArcArrowProcessItems.ts +189 -0
  59. package/utils/arcCompare/context.ts +36 -0
  60. package/utils/arcCompare/createArcCompareGeometry.ts +254 -0
  61. package/utils/arcCompare/index.ts +3 -0
  62. package/utils/arcCompare/resolveArcCompareItems.ts +123 -0
  63. package/utils/arrowTriad/context.ts +38 -0
  64. package/utils/arrowTriad/createArrowTriadGeometry.ts +63 -0
  65. package/utils/arrowTriad/index.ts +3 -0
  66. package/utils/arrowTriad/resolveArrowTriadItems.ts +121 -0
  67. package/utils/chevronCard/context.ts +12 -0
  68. package/utils/chevronCard/createChevronCardGeometry.ts +48 -0
  69. package/utils/chevronCard/index.ts +2 -0
  70. package/utils/hexTriad/context.ts +25 -0
  71. package/utils/hexTriad/createHexTriadGeometry.ts +182 -0
  72. package/utils/hexTriad/index.ts +3 -0
  73. package/utils/hexTriad/resolveHexTriadItems.ts +63 -0
  74. package/utils/horizCard/context.ts +13 -0
  75. package/utils/horizCard/createHorizCardGeometry.ts +243 -0
  76. package/utils/horizCard/index.ts +2 -0
  77. package/utils/quadHub/context.ts +26 -0
  78. package/utils/quadHub/createQuadHubGeometry.ts +331 -0
  79. package/utils/quadHub/index.ts +3 -0
  80. package/utils/quadHub/resolveQuadHubItems.ts +214 -0
  81. package/utils/useDiagramAutoScale.ts +300 -0
  82. package/utils/vertCard/context.ts +18 -0
  83. package/utils/vertCard/createVertCardGeometry.ts +242 -0
  84. package/utils/vertCard/index.ts +2 -0
@@ -0,0 +1,183 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ computed,
4
+ Fragment,
5
+ inject,
6
+ onBeforeUpdate,
7
+ provide,
8
+ ref,
9
+ useSlots,
10
+ type VNode,
11
+ } from 'vue';
12
+
13
+ import {
14
+ ARC_COMPARE_ROOT_KEY,
15
+ ARC_COMPARE_SIDE_KEY,
16
+ DEFAULT_RIGHT_COLOR,
17
+ } from '../../utils/arcCompare';
18
+ import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
19
+ import ArcCompareCallout from './ArcCompareCallout.vue';
20
+ import ArcCompareContents from './ArcCompareContents.vue';
21
+ import ArcCompareTitle from './ArcCompareTitle.vue';
22
+
23
+ defineOptions({
24
+ inheritAttrs: false,
25
+ name: 'ArcCompareRight',
26
+ });
27
+
28
+ export interface IArcCompareRightProps {
29
+ readonly color?: string;
30
+ readonly title?: string;
31
+ readonly count?: number;
32
+ }
33
+
34
+ const props = withDefaults(defineProps<IArcCompareRightProps>(), {
35
+ color: DEFAULT_RIGHT_COLOR,
36
+ title: undefined,
37
+ count: undefined,
38
+ });
39
+
40
+ const rootContext = inject(ARC_COMPARE_ROOT_KEY, undefined);
41
+
42
+ const slots = useSlots();
43
+
44
+ interface INamedComponent {
45
+ readonly name?: string;
46
+ readonly __name?: string;
47
+ }
48
+
49
+ function hasComponentName(type: unknown, name: string): boolean {
50
+ if (typeof type === 'object' && type !== null) {
51
+ const comp = type as INamedComponent;
52
+
53
+ return comp.name === name || comp.__name === name;
54
+ }
55
+
56
+ if (typeof type === 'function') {
57
+ return (type as { name?: string }).name === name;
58
+ }
59
+
60
+ return false;
61
+ }
62
+
63
+ let calloutCounter = 0;
64
+ onBeforeUpdate(() => {
65
+ calloutCounter = 0;
66
+ });
67
+
68
+ const sideColor = computed(() => {
69
+ return props.color ?? DEFAULT_RIGHT_COLOR;
70
+ });
71
+
72
+ const resolvedCount = computed(() => {
73
+ return props.count ?? rootContext?.pointsCount.value ?? 3;
74
+ });
75
+
76
+ const currentTitle = ref<string>(props.title ?? 'Add Project\nName');
77
+
78
+ provide(ARC_COMPARE_SIDE_KEY, {
79
+ side: 'right',
80
+ color: sideColor,
81
+ title: computed(() => currentTitle.value),
82
+ setTitle: (val: string) => {
83
+ currentTitle.value = val;
84
+ },
85
+ registerCallout: () => {
86
+ return calloutCounter++;
87
+ },
88
+ count: resolvedCount,
89
+ });
90
+
91
+ function isSignificantNode(node: VNode): boolean {
92
+ if (typeof node.type === 'symbol') {
93
+ if (typeof node.children === 'string' && !node.children.trim()) {
94
+ return false;
95
+ }
96
+ }
97
+
98
+ if (typeof node.children === 'string' && !node.children.trim()) {
99
+ return false;
100
+ }
101
+
102
+ return true;
103
+ }
104
+
105
+ function flattenVNodes(nodes: VNode[]): VNode[] {
106
+ const result: VNode[] = [];
107
+
108
+ for (const node of nodes) {
109
+ if (node.type === Fragment && Array.isArray(node.children)) {
110
+ result.push(...flattenVNodes(node.children as VNode[]));
111
+ } else if (isSignificantNode(node)) {
112
+ result.push(node);
113
+ }
114
+ }
115
+
116
+ return result;
117
+ }
118
+
119
+ function isTitleNode(node: VNode): boolean {
120
+ return (
121
+ hasComponentName(node.type, 'ArcCompareTitle') ||
122
+ node.type === ArcCompareTitle
123
+ );
124
+ }
125
+
126
+ const defaultNodes = computed(() => {
127
+ if (!slots.default) {
128
+ return [];
129
+ }
130
+
131
+ return flattenVNodes(slots.default());
132
+ });
133
+
134
+ const titleNode = computed(() => {
135
+ return defaultNodes.value.find(isTitleNode);
136
+ });
137
+
138
+ const bodyNodes = computed(() => {
139
+ return defaultNodes.value.filter((node) => !isTitleNode(node));
140
+ });
141
+
142
+ const hubStyle = computed(() => {
143
+ const hubR = rootContext?.geo.value.right.hubRadius ?? 170;
144
+ const centerY = rootContext?.geo.value.centerY ?? 240;
145
+
146
+ return {
147
+ top: `${centerY - hubR}px`,
148
+ width: `${hubR}px`,
149
+ height: `${hubR * 2}px`,
150
+ };
151
+ });
152
+
153
+ const { className, forwardedAttrs } = useMergedUnoAttrs(
154
+ 'alpha-arc-compare-right absolute inset-0 w-full h-full pointer-events-none',
155
+ );
156
+ </script>
157
+
158
+ <template>
159
+ <div v-bind="forwardedAttrs()" :class="className()">
160
+ <!-- Right Hub Title Display -->
161
+ <div
162
+ class="alpha-arc-compare__hub-title alpha-arc-compare__hub-title--right absolute right-0 flex items-center justify-center z-10 pointer-events-auto"
163
+ :style="hubStyle"
164
+ >
165
+ <component :is="titleNode" v-if="titleNode" />
166
+ <ArcCompareTitle v-else-if="props.title">
167
+ {{ props.title }}
168
+ </ArcCompareTitle>
169
+ <ArcCompareTitle v-else />
170
+ </div>
171
+ <!-- Contents & Callouts -->
172
+ <template v-if="bodyNodes.length > 0">
173
+ <component :is="node" v-for="(node, i) in bodyNodes" :key="i" />
174
+ </template>
175
+ <ArcCompareContents v-else>
176
+ <ArcCompareCallout
177
+ v-for="idx in resolvedCount"
178
+ :key="idx"
179
+ :index="idx - 1"
180
+ />
181
+ </ArcCompareContents>
182
+ </div>
183
+ </template>
@@ -0,0 +1,47 @@
1
+ <script setup lang="ts">
2
+ import { computed, inject } from 'vue';
3
+
4
+ import { ARC_COMPARE_SIDE_KEY } from '../../utils/arcCompare';
5
+ import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
6
+
7
+ defineOptions({
8
+ inheritAttrs: false,
9
+ name: 'ArcCompareTitle',
10
+ });
11
+
12
+ export interface IArcCompareTitleProps {
13
+ readonly color?: string;
14
+ }
15
+
16
+ const props = withDefaults(defineProps<IArcCompareTitleProps>(), {
17
+ color: undefined,
18
+ });
19
+
20
+ const sideContext = inject(ARC_COMPARE_SIDE_KEY, undefined);
21
+
22
+ const titleColor = computed(() => {
23
+ return props.color ?? sideContext?.color.value ?? '#e87a36';
24
+ });
25
+
26
+ const titleStyle = computed(() => {
27
+ return {
28
+ color: titleColor.value,
29
+ fontFamily:
30
+ 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
31
+ };
32
+ });
33
+
34
+ const { className, forwardedAttrs } = useMergedUnoAttrs(
35
+ 'alpha-arc-compare-title font-bold text-center px-2 leading-tight flex items-center justify-center select-none text-[1.125rem] tracking-tight',
36
+ );
37
+ </script>
38
+
39
+ <template>
40
+ <div
41
+ v-bind="forwardedAttrs()"
42
+ :class="className()"
43
+ :style="titleStyle"
44
+ >
45
+ <slot>Add Project<br />Name</slot>
46
+ </div>
47
+ </template>
@@ -0,0 +1,368 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ type ComputedRef,
4
+ computed,
5
+ inject,
6
+ onBeforeUpdate,
7
+ provide,
8
+ ref,
9
+ useSlots,
10
+ } from 'vue';
11
+
12
+ import {
13
+ ARROW_TRIAD_ROOT_KEY,
14
+ createArrowTriadGeometry,
15
+ getDefaultArrowTriadItem,
16
+ type IArrowTriadItem,
17
+ resolveArrowTriadItems,
18
+ type TArrowTriadLayout,
19
+ } from '../../utils/arrowTriad';
20
+ import { useDiagramAutoScale } from '../../utils/useDiagramAutoScale';
21
+ import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
22
+ import ArrowTriadCallout from './ArrowTriadCallout.vue';
23
+
24
+ defineOptions({
25
+ name: 'ArrowTriad',
26
+ inheritAttrs: false,
27
+ });
28
+
29
+ export interface IArrowTriadProps {
30
+ readonly items?: readonly IArrowTriadItem[];
31
+ readonly animation?: boolean;
32
+ readonly height?: number | string;
33
+ readonly startDelay?: number;
34
+ readonly active?: boolean;
35
+ readonly triangleHead?: boolean;
36
+ readonly neckLine?: boolean;
37
+ readonly scale?: number;
38
+ readonly autoScale?: boolean;
39
+ readonly maxScale?: number;
40
+ readonly hidePagy?: boolean;
41
+ readonly layout?: TArrowTriadLayout;
42
+ readonly offsetX?: number;
43
+ }
44
+
45
+ const props = withDefaults(defineProps<IArrowTriadProps>(), {
46
+ items: undefined,
47
+ animation: true,
48
+ height: undefined,
49
+ startDelay: undefined,
50
+ active: undefined,
51
+ triangleHead: true,
52
+ neckLine: true,
53
+ scale: undefined,
54
+ autoScale: true,
55
+ maxScale: undefined,
56
+ hidePagy: undefined,
57
+ layout: '2-left-1-right',
58
+ offsetX: undefined,
59
+ });
60
+
61
+ const slots = useSlots();
62
+
63
+ const shiftingIntro = inject<
64
+ | {
65
+ active: ComputedRef<boolean>;
66
+ isShifting?: ComputedRef<boolean>;
67
+ }
68
+ | undefined
69
+ >('SLIDEV_LAYOUT_SHIFTING_INTRO', undefined);
70
+
71
+ const isAnimated = computed(() => {
72
+ if (!props.animation) {
73
+ return false;
74
+ }
75
+
76
+ if (props.active !== undefined) {
77
+ return props.active;
78
+ }
79
+
80
+ if (shiftingIntro) {
81
+ return shiftingIntro.active.value;
82
+ }
83
+
84
+ return true;
85
+ });
86
+
87
+ const resolvedStartDelay = computed(() => {
88
+ if (props.startDelay !== undefined) {
89
+ return props.startDelay;
90
+ }
91
+
92
+ if (shiftingIntro) {
93
+ return shiftingIntro.isShifting?.value ? 600 : 0;
94
+ }
95
+
96
+ return 0;
97
+ });
98
+
99
+ const resolvedItems = computed(() => {
100
+ return resolveArrowTriadItems(props.items);
101
+ });
102
+
103
+ let calloutCounter = 0;
104
+ onBeforeUpdate(() => {
105
+ calloutCounter = 0;
106
+ });
107
+
108
+ const registerCallout = () => {
109
+ const idx = calloutCounter++;
110
+
111
+ return {
112
+ index: idx,
113
+ item: computed(() => {
114
+ return resolvedItems.value[idx] ?? getDefaultArrowTriadItem(idx);
115
+ }),
116
+ };
117
+ };
118
+
119
+ const resolvedLayout = computed<TArrowTriadLayout>(() => props.layout);
120
+
121
+ const is2Left = computed(() => {
122
+ return (
123
+ resolvedLayout.value === '2-left-1-right' ||
124
+ resolvedLayout.value === '2-left'
125
+ );
126
+ });
127
+
128
+ provide(ARROW_TRIAD_ROOT_KEY, {
129
+ registerCallout,
130
+ items: resolvedItems,
131
+ animation: isAnimated,
132
+ layout: resolvedLayout,
133
+ });
134
+
135
+ const geo = createArrowTriadGeometry();
136
+
137
+ const rootRef = ref<HTMLElement | null>(null);
138
+
139
+ const { resolvedScale, containerHeight } = useDiagramAutoScale({
140
+ rootRef,
141
+ baseWidth: 900,
142
+ baseHeight: 390,
143
+ scale: () => props.scale,
144
+ autoScale: () => props.autoScale,
145
+ maxScale: () => props.maxScale,
146
+ height: () => props.height,
147
+ });
148
+
149
+ const resolvedOffsetX = computed(() => {
150
+ if (props.offsetX !== undefined) {
151
+ return props.offsetX;
152
+ }
153
+
154
+ return is2Left.value ? -8 : 8;
155
+ });
156
+
157
+ const stageTransform = computed(() => {
158
+ const parts: string[] = [];
159
+ if (resolvedOffsetX.value !== 0) {
160
+ parts.push(`translateX(${resolvedOffsetX.value}px)`);
161
+ }
162
+
163
+ if (resolvedScale.value !== 1) {
164
+ parts.push(`scale(${resolvedScale.value})`);
165
+ }
166
+
167
+ return parts.length > 0 ? parts.join(' ') : undefined;
168
+ });
169
+
170
+ const resolvedHeightStyle = computed(() => {
171
+ if (props.height !== undefined) {
172
+ return typeof props.height === 'number'
173
+ ? `${props.height}px`
174
+ : props.height;
175
+ }
176
+
177
+ if (containerHeight.value > 0) {
178
+ return `${containerHeight.value}px`;
179
+ }
180
+
181
+ return undefined;
182
+ });
183
+
184
+ const { className, forwardedAttrs } = useMergedUnoAttrs(
185
+ 'alpha-arrow-triad w-full flex-1 flex flex-col items-center justify-center select-none font-sans relative min-h-0',
186
+ );
187
+ </script>
188
+
189
+ <template>
190
+ <div
191
+ ref="rootRef"
192
+ v-bind="forwardedAttrs()"
193
+ :class="[
194
+ className(),
195
+ { 'hide-pagy': props.hidePagy },
196
+ ]"
197
+ :data-hide-pagy="props.hidePagy ? '' : undefined"
198
+ :style="{
199
+ height: resolvedHeightStyle,
200
+ fontFamily:
201
+ 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
202
+ '--arrow-triad-start-delay': `${resolvedStartDelay}ms`,
203
+ }"
204
+ >
205
+ <!-- Relative stage container -->
206
+ <div
207
+ class="alpha-arrow-triad__stage relative w-full h-full min-h-[350px] max-w-[900px] flex items-center justify-center overflow-visible"
208
+ :style="{
209
+ transform: stageTransform,
210
+ transformOrigin: 'center center',
211
+ }"
212
+ >
213
+ <!-- Central SVG graphic: 3 curved arrows + concentric dashed arcs -->
214
+ <div
215
+ class="alpha-arrow-triad__center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[320px] h-[362px] pointer-events-none"
216
+ >
217
+ <svg
218
+ class="w-full h-full overflow-visible"
219
+ :viewBox="`0 0 ${geo.viewBoxWidth} ${geo.viewBoxHeight}`"
220
+ xmlns="http://www.w3.org/2000/svg"
221
+ >
222
+ <g :transform="is2Left ? `translate(${geo.viewBoxWidth}, 0) scale(-1, 1)` : undefined">
223
+ <!-- Dashed Guide Arcs -->
224
+ <g
225
+ class="alpha-arrow-triad__dashed"
226
+ :class="{ 'alpha-arrow-triad--animated': isAnimated }"
227
+ fill="none"
228
+ stroke="#94a3b8"
229
+ stroke-width="1.8"
230
+ stroke-dasharray="4 4"
231
+ opacity="0.8"
232
+ >
233
+ <path
234
+ v-for="(d, idx) in geo.dashedArcs"
235
+ :key="idx"
236
+ :d="d"
237
+ />
238
+ </g>
239
+ <!-- Arrow 0: Yellow Arrow (Top-Right) -->
240
+ <g
241
+ class="alpha-arrow-triad__branch alpha-arrow-triad__branch--yellow"
242
+ :class="{ 'alpha-arrow-triad--animated': isAnimated }"
243
+ >
244
+ <path
245
+ :d="props.triangleHead ? geo.yellowArrow.stemPath : geo.yellowArrow.path"
246
+ :fill="resolvedItems[0].color"
247
+ />
248
+ <polygon
249
+ v-if="props.triangleHead"
250
+ :points="geo.yellowArrow.outerHeadPoints"
251
+ :fill="resolvedItems[0].color"
252
+ :stroke="resolvedItems[0].depthColor"
253
+ stroke-width="4"
254
+ stroke-linejoin="round"
255
+ />
256
+ <path
257
+ v-else-if="props.neckLine"
258
+ :d="geo.yellowArrow.neckLine"
259
+ fill="none"
260
+ :stroke="resolvedItems[0].depthColor"
261
+ stroke-width="4"
262
+ stroke-linecap="round"
263
+ />
264
+ </g>
265
+ <!-- Arrow 1: Green Arrow (Bottom-Right) -->
266
+ <g
267
+ class="alpha-arrow-triad__branch alpha-arrow-triad__branch--green"
268
+ :class="{ 'alpha-arrow-triad--animated': isAnimated }"
269
+ >
270
+ <path
271
+ :d="props.triangleHead ? geo.greenArrow.stemPath : geo.greenArrow.path"
272
+ :fill="resolvedItems[1].color"
273
+ />
274
+ <polygon
275
+ v-if="props.triangleHead"
276
+ :points="geo.greenArrow.outerHeadPoints"
277
+ :fill="resolvedItems[1].color"
278
+ :stroke="resolvedItems[1].depthColor"
279
+ stroke-width="4"
280
+ stroke-linejoin="round"
281
+ />
282
+ <path
283
+ v-else-if="props.neckLine"
284
+ :d="geo.greenArrow.neckLine"
285
+ fill="none"
286
+ :stroke="resolvedItems[1].depthColor"
287
+ stroke-width="4"
288
+ stroke-linecap="round"
289
+ />
290
+ </g>
291
+ <!-- Arrow 2: Blue Arrow (Left) -->
292
+ <g
293
+ class="alpha-arrow-triad__branch alpha-arrow-triad__branch--blue"
294
+ :class="{ 'alpha-arrow-triad--animated': isAnimated }"
295
+ >
296
+ <path
297
+ :d="props.triangleHead ? geo.blueArrow.stemPath : geo.blueArrow.path"
298
+ :fill="resolvedItems[2].color"
299
+ />
300
+ <polygon
301
+ v-if="props.triangleHead"
302
+ :points="geo.blueArrow.outerHeadPoints"
303
+ :fill="resolvedItems[2].color"
304
+ :stroke="resolvedItems[2].depthColor"
305
+ stroke-width="4"
306
+ stroke-linejoin="round"
307
+ />
308
+ <path
309
+ v-else-if="props.neckLine"
310
+ :d="geo.blueArrow.neckLine"
311
+ fill="none"
312
+ :stroke="resolvedItems[2].depthColor"
313
+ stroke-width="4"
314
+ stroke-linecap="round"
315
+ />
316
+ </g>
317
+ </g>
318
+ </svg>
319
+ </div>
320
+ <!-- Callout Cards -->
321
+ <slot>
322
+ <ArrowTriadCallout :index="0" />
323
+ <ArrowTriadCallout :index="1" />
324
+ <ArrowTriadCallout :index="2" />
325
+ </slot>
326
+ </div>
327
+ </div>
328
+ </template>
329
+
330
+ <style scoped>
331
+ .alpha-arrow-triad--animated.alpha-arrow-triad__dashed {
332
+ animation: arrow-triad-dashed-fade 500ms ease-out calc(var(--arrow-triad-start-delay, 0ms) + 100ms) both;
333
+ }
334
+
335
+ .alpha-arrow-triad--animated.alpha-arrow-triad__branch--yellow {
336
+ animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arrow-triad-start-delay, 0ms) + 50ms) both;
337
+ transform-origin: 349px 319px;
338
+ }
339
+
340
+ .alpha-arrow-triad--animated.alpha-arrow-triad__branch--green {
341
+ animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arrow-triad-start-delay, 0ms) + 120ms) both;
342
+ transform-origin: 349px 319px;
343
+ }
344
+
345
+ .alpha-arrow-triad--animated.alpha-arrow-triad__branch--blue {
346
+ animation: arrow-triad-branch-pop 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--arrow-triad-start-delay, 0ms) + 190ms) both;
347
+ transform-origin: 349px 319px;
348
+ }
349
+
350
+ @keyframes arrow-triad-branch-pop {
351
+ 0% {
352
+ transform: scale(0.85);
353
+ }
354
+ 100% {
355
+ opacity: 1;
356
+ transform: scale(1);
357
+ }
358
+ }
359
+
360
+ @keyframes arrow-triad-dashed-fade {
361
+ 0% {
362
+ opacity: 0;
363
+ }
364
+ 100% {
365
+ opacity: 0.8;
366
+ }
367
+ }
368
+ </style>