@alphacifer/slidev-addon-theme 0.0.9 → 0.0.10

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 (26) hide show
  1. package/components/defense-in-depth/arc-did/ArcDiD.vue +732 -0
  2. package/components/defense-in-depth/arc-did/ArcDiDLayer.vue +321 -0
  3. package/components/defense-in-depth/arc-did/ArcDiDLayerPart.vue +449 -0
  4. package/components/defense-in-depth/arc-did/ArcDiDLayerParts.vue +11 -0
  5. package/components/defense-in-depth/arc-did/ArcDiDLayerSector.vue +148 -0
  6. package/components/defense-in-depth/arc-did/ArcDiDLayerTitle.vue +98 -0
  7. package/components/pyramid/circular-pyramid/CircularPyramid.vue +10 -23
  8. package/components/pyramid/circular-pyramid/CircularPyramidStack.vue +17 -50
  9. package/components/pyramid/circular-pyramid/CircularPyramidStackContent.vue +98 -1
  10. package/components/pyramid/circular-pyramid/CircularPyramidStackTitle.vue +70 -0
  11. package/components/pyramid/square-pyramid/SquarePyramid.vue +10 -23
  12. package/components/pyramid/square-pyramid/SquarePyramidStack.vue +17 -50
  13. package/components/pyramid/square-pyramid/SquarePyramidStackContent.vue +98 -1
  14. package/components/pyramid/square-pyramid/SquarePyramidStackTitle.vue +70 -0
  15. package/package.json +1 -1
  16. package/utils/defenseInDepth/arcDid/context.ts +110 -0
  17. package/utils/defenseInDepth/arcDid/createArcDiDGeometry.ts +570 -0
  18. package/utils/defenseInDepth/arcDid/index.ts +3 -0
  19. package/utils/defenseInDepth/arcDid/types.ts +140 -0
  20. package/utils/defenseInDepth/index.ts +2 -0
  21. package/utils/defenseInDepth/shared/colors.ts +121 -0
  22. package/utils/defenseInDepth/shared/constants.ts +14 -0
  23. package/utils/defenseInDepth/shared/index.ts +3 -0
  24. package/utils/defenseInDepth/shared/types.ts +12 -0
  25. package/utils/pyramid/shared/constants.ts +1 -0
  26. package/utils/useDiagramAutoScale.ts +61 -15
@@ -775,6 +775,10 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
775
775
  ? `url(#${getActiveShadowId(layer.index)})`
776
776
  : undefined
777
777
  "
778
+ :style="{
779
+ '--layer-order': layer.index,
780
+ '--layer-delay': `calc(var(--circular-pyramid-start-delay, 0ms) + ${layer.index * 320 + 10}ms)`,
781
+ }"
778
782
  @click.stop="handleLayerClick(layer.index, $event)"
779
783
  >
780
784
  <!-- 1. 3D Cylindrical Rim (Mantle) -->
@@ -834,34 +838,17 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
834
838
  filter: brightness(1.05);
835
839
  }
836
840
 
837
- .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer--0 {
838
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 60ms) both;
839
- }
840
-
841
- .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer--1 {
842
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 140ms) both;
843
- }
844
-
845
- .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer--2 {
846
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 220ms) both;
847
- }
848
-
849
- .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer--3 {
850
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 300ms) both;
851
- }
852
-
853
- .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer--4 {
854
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 380ms) both;
855
- }
856
-
857
- .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer--5 {
858
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 460ms) both;
841
+ .alpha-circular-pyramid--animated .alpha-circular-pyramid__layer {
842
+ animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) var(--layer-delay, calc(var(--circular-pyramid-start-delay, 0ms) + 10ms)) both;
859
843
  }
860
844
 
861
845
  @keyframes alpha-pyramid-layer-enter {
862
846
  0% {
863
847
  opacity: 0;
864
- transform: translateY(12px) scale(0.97);
848
+ transform: translateY(80px) scale(0.92);
849
+ }
850
+ 25% {
851
+ opacity: 1;
865
852
  }
866
853
  100% {
867
854
  opacity: 1;
@@ -15,6 +15,7 @@ import {
15
15
  DEFAULT_CIRCULAR_PYRAMID_COLOR,
16
16
  DEFAULT_CIRCULAR_PYRAMID_STACK_COLORS,
17
17
  } from '../../../utils/pyramid/circular-pyramid';
18
+ import { PYRAMID_DOT_GAP_PX } from '../../../utils/pyramid/shared';
18
19
  import CircularPyramidStackContent from './CircularPyramidStackContent.vue';
19
20
  import CircularPyramidStackTitle from './CircularPyramidStackTitle.vue';
20
21
 
@@ -158,7 +159,7 @@ const leftWidth = computed(() => {
158
159
  if (layerGeometry.value) {
159
160
  const rx = layerGeometry.value.rx;
160
161
  const cx = 465;
161
- return Math.max(180, Math.round(cx - rx - 40));
162
+ return Math.max(180, Math.round(cx - rx - PYRAMID_DOT_GAP_PX));
162
163
  }
163
164
  return DOT_POSITION_X;
164
165
  });
@@ -169,11 +170,11 @@ const rightWingWidth = computed(() => {
169
170
  if (layerGeometry.value) {
170
171
  const rx = layerGeometry.value.rx;
171
172
  const cx = 465;
172
- const dotRightX = cx + rx + 40;
173
+ const dotRightX = cx + rx + PYRAMID_DOT_GAP_PX;
173
174
  const containerW = 960;
174
175
  return Math.max(rightWidth.value + 20, Math.round(containerW - dotRightX));
175
176
  }
176
- return rightWidth.value + 40;
177
+ return rightWidth.value + PYRAMID_DOT_GAP_PX;
177
178
  });
178
179
 
179
180
  const rightOffset = computed(
@@ -216,6 +217,10 @@ const connectorWidth = computed(() => {
216
217
  return Math.max(20, rightWingWidth.value - rightWidth.value);
217
218
  });
218
219
 
220
+ const stepIndex = computed(() => {
221
+ return resolvedIndex.value;
222
+ });
223
+
219
224
  provide(CIRCULAR_PYRAMID_STACK_KEY, {
220
225
  index: resolvedIndex,
221
226
  isActive,
@@ -252,6 +257,7 @@ provide(CIRCULAR_PYRAMID_STACK_KEY, {
252
257
  { 'alpha-circular-pyramid-stack--animated': rootContext?.animation.value },
253
258
  ]"
254
259
  :style="{
260
+ '--wing-delay': `calc(var(--circular-pyramid-start-delay, 0ms) + ${460 + stepIndex * 320}ms)`,
255
261
  width: `${leftWidth}px`,
256
262
  minWidth: `${leftWidth}px`,
257
263
  maxWidth: `${leftWidth}px`,
@@ -267,7 +273,7 @@ provide(CIRCULAR_PYRAMID_STACK_KEY, {
267
273
  :connector-width="props.connectorWidth"
268
274
  />
269
275
  </div>
270
- <!-- Right Wing: Dot + Connector + Content Card (40px from slab) -->
276
+ <!-- Right Wing: Dot + Connector + Content Card (10px from slab) -->
271
277
  <div
272
278
  class="alpha-circular-pyramid-stack__right flex-shrink-0 flex items-center justify-end pointer-events-auto cursor-pointer"
273
279
  :class="[
@@ -275,6 +281,7 @@ provide(CIRCULAR_PYRAMID_STACK_KEY, {
275
281
  { 'alpha-circular-pyramid-stack--animated': rootContext?.animation.value },
276
282
  ]"
277
283
  :style="{
284
+ '--wing-delay': `calc(var(--circular-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
278
285
  width: `${rightWingWidth}px`,
279
286
  minWidth: `${rightWidth}px`,
280
287
  maxWidth: `${rightWingWidth}px`,
@@ -303,34 +310,14 @@ provide(CIRCULAR_PYRAMID_STACK_KEY, {
303
310
  transition: opacity 0.3s ease, transform 0.3s ease;
304
311
  }
305
312
 
306
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__left--0 {
307
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 100ms) both;
308
- }
309
-
310
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__left--1 {
311
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 180ms) both;
312
- }
313
-
314
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__left--2 {
315
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 260ms) both;
316
- }
317
-
318
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__left--3 {
319
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 340ms) both;
320
- }
321
-
322
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__left--4 {
323
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 420ms) both;
324
- }
325
-
326
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__left--5 {
327
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 500ms) both;
313
+ .alpha-circular-pyramid-stack--animated .alpha-circular-pyramid-stack__left {
314
+ animation: alpha-pyramid-left-in 140ms cubic-bezier(0.16, 1, 0.3, 1) var(--wing-delay, calc(var(--circular-pyramid-start-delay, 0ms) + 460ms)) both;
328
315
  }
329
316
 
330
317
  @keyframes alpha-pyramid-left-in {
331
318
  0% {
332
319
  opacity: 0;
333
- transform: translateX(-12px);
320
+ transform: translateX(-10px);
334
321
  }
335
322
  100% {
336
323
  opacity: 1;
@@ -338,34 +325,14 @@ provide(CIRCULAR_PYRAMID_STACK_KEY, {
338
325
  }
339
326
  }
340
327
 
341
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__right--0 {
342
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 120ms) both;
343
- }
344
-
345
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__right--1 {
346
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 200ms) both;
347
- }
348
-
349
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__right--2 {
350
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 280ms) both;
351
- }
352
-
353
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__right--3 {
354
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 360ms) both;
355
- }
356
-
357
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__right--4 {
358
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 440ms) both;
359
- }
360
-
361
- .alpha-circular-pyramid-stack--animated.alpha-circular-pyramid-stack__right--5 {
362
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--circular-pyramid-start-delay, 0ms) + 520ms) both;
328
+ .alpha-circular-pyramid-stack--animated .alpha-circular-pyramid-stack__right {
329
+ animation: alpha-pyramid-right-in 140ms cubic-bezier(0.16, 1, 0.3, 1) var(--wing-delay, calc(var(--circular-pyramid-start-delay, 0ms) + 470ms)) both;
363
330
  }
364
331
 
365
332
  @keyframes alpha-pyramid-right-in {
366
333
  0% {
367
334
  opacity: 0;
368
- transform: translateX(12px);
335
+ transform: translateX(10px);
369
336
  }
370
337
  100% {
371
338
  opacity: 1;
@@ -53,6 +53,14 @@ const isActive = computed(() => {
53
53
  return stackContext?.isActive.value ?? false;
54
54
  });
55
55
 
56
+ const isAnimated = computed(() => {
57
+ return rootContext?.animation.value ?? false;
58
+ });
59
+
60
+ const stepIndex = computed(() => {
61
+ return stackContext?.index.value ?? 0;
62
+ });
63
+
56
64
  const palette = computed(() => {
57
65
  return rootContext?.palette.value;
58
66
  });
@@ -111,7 +119,12 @@ const stackColor = computed(() => {
111
119
  </script>
112
120
 
113
121
  <template>
114
- <div class="alpha-circular-pyramid-stack-content-wrapper relative w-full flex items-center select-none overflow-visible">
122
+ <div
123
+ class="alpha-circular-pyramid-stack-content-wrapper relative w-full flex items-center select-none overflow-visible"
124
+ :style="{
125
+ '--content-delay': `calc(var(--circular-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
126
+ }"
127
+ >
115
128
  <!-- Scalable Line between Dot and Content Card (always at least 20px) -->
116
129
  <div
117
130
  ref="connectorRef"
@@ -119,6 +132,9 @@ const stackColor = computed(() => {
119
132
  >
120
133
  <div
121
134
  class="alpha-circular-pyramid-stack-content__dot absolute left-0 top-0 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 pointer-events-auto"
135
+ :class="{
136
+ 'alpha-circular-pyramid-stack-content__dot--animated': isAnimated,
137
+ }"
122
138
  :style="{
123
139
  backgroundColor: stackColor,
124
140
  boxShadow: isActive
@@ -130,6 +146,9 @@ const stackColor = computed(() => {
130
146
  <div
131
147
  v-if="!effectiveDeltaY"
132
148
  class="alpha-circular-pyramid-stack-content__line absolute left-0 top-0 w-full h-[1px] -translate-y-1/2 pointer-events-none transition-colors duration-300"
149
+ :class="{
150
+ 'alpha-circular-pyramid-stack-content__line--animated': isAnimated,
151
+ }"
133
152
  :style="{
134
153
  backgroundColor: stackColor,
135
154
  opacity: isActive ? 1 : 0.65,
@@ -150,12 +169,16 @@ const stackColor = computed(() => {
150
169
  >
151
170
  <path
152
171
  class="alpha-circular-pyramid-stack-content__line transition-all duration-300"
172
+ :class="{
173
+ 'alpha-circular-pyramid-stack-content__line--svg-animated': isAnimated,
174
+ }"
153
175
  :d="connectorPath"
154
176
  fill="none"
155
177
  :stroke="stackColor"
156
178
  stroke-width="1.25"
157
179
  stroke-linecap="round"
158
180
  stroke-linejoin="round"
181
+ pathLength="1"
159
182
  :style="{
160
183
  opacity: isActive ? 1 : 0.65,
161
184
  }"
@@ -169,6 +192,9 @@ const stackColor = computed(() => {
169
192
  isActive
170
193
  ? 'alpha-circular-pyramid-stack-content--active'
171
194
  : 'alpha-circular-pyramid-stack-content--default',
195
+ {
196
+ 'alpha-circular-pyramid-stack-content--animated': isAnimated,
197
+ },
172
198
  ]"
173
199
  :style="{
174
200
  width: `${contentWidth}px`,
@@ -182,6 +208,7 @@ const stackColor = computed(() => {
182
208
  boxShadow: isActive
183
209
  ? `0 4px 14px ${stackColor}26`
184
210
  : 'none',
211
+ '--card-transform': deltaY ? `translateY(${deltaY}px)` : 'none',
185
212
  transform: deltaY ? `translateY(${deltaY}px)` : undefined,
186
213
  }"
187
214
  >
@@ -205,4 +232,74 @@ const stackColor = computed(() => {
205
232
  .alpha-circular-pyramid-stack-content--active {
206
233
  backdrop-filter: blur(8px);
207
234
  }
235
+
236
+ .alpha-circular-pyramid-stack-content__dot--animated {
237
+ animation: alpha-pyramid-dot-pop 120ms cubic-bezier(0.16, 1, 0.3, 1) var(--content-delay) both;
238
+ }
239
+
240
+ @keyframes alpha-pyramid-dot-pop {
241
+ 0% {
242
+ opacity: 0;
243
+ transform: translate(-50%, -50%) scale(0);
244
+ }
245
+ 100% {
246
+ opacity: 1;
247
+ transform: translate(-50%, -50%) scale(1);
248
+ }
249
+ }
250
+
251
+ .alpha-circular-pyramid-stack-content__line--animated {
252
+ transform-origin: left center;
253
+ animation: alpha-pyramid-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1) calc(var(--content-delay) + 120ms) both;
254
+ }
255
+
256
+ @keyframes alpha-pyramid-line-draw {
257
+ 0% {
258
+ opacity: 0;
259
+ transform: translateY(-50%) scaleX(0);
260
+ }
261
+ 2% {
262
+ opacity: 1;
263
+ transform: translateY(-50%) scaleX(0);
264
+ }
265
+ 100% {
266
+ opacity: 1;
267
+ transform: translateY(-50%) scaleX(1);
268
+ }
269
+ }
270
+
271
+ .alpha-circular-pyramid-stack-content__line--svg-animated {
272
+ stroke-dasharray: 1;
273
+ animation: alpha-pyramid-svg-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1) calc(var(--content-delay) + 120ms) both;
274
+ }
275
+
276
+ @keyframes alpha-pyramid-svg-line-draw {
277
+ 0% {
278
+ opacity: 0;
279
+ stroke-dashoffset: 1;
280
+ }
281
+ 2% {
282
+ opacity: 1;
283
+ stroke-dashoffset: 1;
284
+ }
285
+ 100% {
286
+ opacity: 1;
287
+ stroke-dashoffset: 0;
288
+ }
289
+ }
290
+
291
+ .alpha-circular-pyramid-stack-content--animated {
292
+ animation: alpha-pyramid-card-in 240ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--content-delay) + 380ms) both;
293
+ }
294
+
295
+ @keyframes alpha-pyramid-card-in {
296
+ 0% {
297
+ opacity: 0;
298
+ transform: var(--card-transform, none) translateX(10px);
299
+ }
300
+ 100% {
301
+ opacity: 1;
302
+ transform: var(--card-transform, none) translateX(0);
303
+ }
304
+ }
208
305
  </style>
@@ -31,6 +31,14 @@ const isActive = computed(() => {
31
31
  return stackContext?.isActive.value ?? false;
32
32
  });
33
33
 
34
+ const isAnimated = computed(() => {
35
+ return rootContext?.animation.value ?? false;
36
+ });
37
+
38
+ const stepIndex = computed(() => {
39
+ return stackContext?.index.value ?? 0;
40
+ });
41
+
34
42
  const resolvedStep = computed(() => {
35
43
  if (props.step !== undefined) {
36
44
  return props.step;
@@ -65,10 +73,16 @@ const stackColor = computed(() => {
65
73
  ? 'alpha-circular-pyramid-stack-title--active'
66
74
  : 'alpha-circular-pyramid-stack-title--default',
67
75
  ]"
76
+ :style="{
77
+ '--title-delay': `calc(var(--circular-pyramid-start-delay, 0ms) + ${460 + stepIndex * 320}ms)`,
78
+ }"
68
79
  >
69
80
  <!-- Pill Badge Container (min-width: 150px, max-width: whole spacing left leaving at least 30px before dot) -->
70
81
  <div
71
82
  class="alpha-circular-pyramid-stack-title__pill flex items-center gap-2 px-2.5 py-1 rounded-full transition-all duration-300 border flex-shrink-0"
83
+ :class="{
84
+ 'alpha-circular-pyramid-stack-title__pill--animated': isAnimated,
85
+ }"
72
86
  :style="{
73
87
  minWidth: `${minPillWidth}px`,
74
88
  maxWidth: 'calc(100% - 30px)',
@@ -109,6 +123,9 @@ const stackColor = computed(() => {
109
123
  >
110
124
  <div
111
125
  class="alpha-circular-pyramid-stack-title__line flex-1 h-[1px] transition-colors duration-300"
126
+ :class="{
127
+ 'alpha-circular-pyramid-stack-title__line--animated': isAnimated,
128
+ }"
112
129
  :style="{
113
130
  backgroundColor: stackColor,
114
131
  opacity: isActive ? 1 : 0.65,
@@ -116,6 +133,9 @@ const stackColor = computed(() => {
116
133
  />
117
134
  <div
118
135
  class="alpha-circular-pyramid-stack-title__dot w-1.5 h-1.5 rounded-full flex-shrink-0 -ml-1 transition-all duration-300"
136
+ :class="{
137
+ 'alpha-circular-pyramid-stack-title__dot--animated': isAnimated,
138
+ }"
119
139
  :style="{
120
140
  backgroundColor: stackColor,
121
141
  boxShadow: isActive
@@ -135,4 +155,54 @@ const stackColor = computed(() => {
135
155
  .alpha-circular-pyramid-stack-title--active .alpha-circular-pyramid-stack-title__pill {
136
156
  backdrop-filter: blur(8px);
137
157
  }
158
+
159
+ .alpha-circular-pyramid-stack-title__dot--animated {
160
+ animation: alpha-pyramid-title-dot-pop 120ms cubic-bezier(0.16, 1, 0.3, 1) var(--title-delay) both;
161
+ }
162
+
163
+ @keyframes alpha-pyramid-title-dot-pop {
164
+ 0% {
165
+ opacity: 0;
166
+ transform: scale(0);
167
+ }
168
+ 100% {
169
+ opacity: 1;
170
+ transform: scale(1);
171
+ }
172
+ }
173
+
174
+ .alpha-circular-pyramid-stack-title__line--animated {
175
+ transform-origin: right center;
176
+ animation: alpha-pyramid-title-line-draw 500ms cubic-bezier(0.4, 0, 0.2, 1) calc(var(--title-delay) + 120ms) both;
177
+ }
178
+
179
+ @keyframes alpha-pyramid-title-line-draw {
180
+ 0% {
181
+ opacity: 0;
182
+ transform: scaleX(0);
183
+ }
184
+ 2% {
185
+ opacity: 1;
186
+ transform: scaleX(0);
187
+ }
188
+ 100% {
189
+ opacity: 1;
190
+ transform: scaleX(1);
191
+ }
192
+ }
193
+
194
+ .alpha-circular-pyramid-stack-title__pill--animated {
195
+ animation: alpha-pyramid-title-pill-in 240ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--title-delay) + 380ms) both;
196
+ }
197
+
198
+ @keyframes alpha-pyramid-title-pill-in {
199
+ 0% {
200
+ opacity: 0;
201
+ transform: translateX(-10px);
202
+ }
203
+ 100% {
204
+ opacity: 1;
205
+ transform: translateX(0);
206
+ }
207
+ }
138
208
  </style>
@@ -773,6 +773,10 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
773
773
  ? `url(#${getActiveShadowId(layer.index)})`
774
774
  : undefined
775
775
  "
776
+ :style="{
777
+ '--layer-order': layer.index,
778
+ '--layer-delay': `calc(var(--square-pyramid-start-delay, 0ms) + ${layer.index * 260 + 10}ms)`,
779
+ }"
776
780
  @click.stop="handleLayerClick(layer.index, $event)"
777
781
  >
778
782
  <!-- 1. 3D Square Slab Thickness Rim (Mantle) -->
@@ -839,34 +843,17 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
839
843
  filter: brightness(1.05);
840
844
  }
841
845
 
842
- .alpha-square-pyramid--animated .alpha-square-pyramid__layer--0 {
843
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 60ms) both;
844
- }
845
-
846
- .alpha-square-pyramid--animated .alpha-square-pyramid__layer--1 {
847
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 140ms) both;
848
- }
849
-
850
- .alpha-square-pyramid--animated .alpha-square-pyramid__layer--2 {
851
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 220ms) both;
852
- }
853
-
854
- .alpha-square-pyramid--animated .alpha-square-pyramid__layer--3 {
855
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 300ms) both;
856
- }
857
-
858
- .alpha-square-pyramid--animated .alpha-square-pyramid__layer--4 {
859
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 380ms) both;
860
- }
861
-
862
- .alpha-square-pyramid--animated .alpha-square-pyramid__layer--5 {
863
- animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 460ms) both;
846
+ .alpha-square-pyramid--animated .alpha-square-pyramid__layer {
847
+ animation: alpha-pyramid-layer-enter 450ms cubic-bezier(0.16, 1, 0.3, 1) var(--layer-delay, calc(var(--square-pyramid-start-delay, 0ms) + 10ms)) both;
864
848
  }
865
849
 
866
850
  @keyframes alpha-pyramid-layer-enter {
867
851
  0% {
868
852
  opacity: 0;
869
- transform: translateY(12px) scale(0.97);
853
+ transform: translateY(80px) scale(0.92);
854
+ }
855
+ 25% {
856
+ opacity: 1;
870
857
  }
871
858
  100% {
872
859
  opacity: 1;
@@ -9,6 +9,7 @@ import {
9
9
  type VNode,
10
10
  } from 'vue';
11
11
 
12
+ import { PYRAMID_DOT_GAP_PX } from '../../../utils/pyramid/shared';
12
13
  import {
13
14
  DEFAULT_SQUARE_PYRAMID_COLOR,
14
15
  DEFAULT_SQUARE_PYRAMID_STACK_COLORS,
@@ -150,7 +151,7 @@ const leftWidth = computed(() => {
150
151
  if (layerGeometry.value) {
151
152
  const rx = layerGeometry.value.rx;
152
153
  const cx = 465;
153
- return Math.max(180, Math.round(cx - rx - 40));
154
+ return Math.max(180, Math.round(cx - rx - PYRAMID_DOT_GAP_PX));
154
155
  }
155
156
  return DOT_POSITION_X;
156
157
  });
@@ -161,11 +162,11 @@ const rightWingWidth = computed(() => {
161
162
  if (layerGeometry.value) {
162
163
  const rx = layerGeometry.value.rx;
163
164
  const cx = 465;
164
- const dotRightX = cx + rx + 40;
165
+ const dotRightX = cx + rx + PYRAMID_DOT_GAP_PX;
165
166
  const containerW = 960;
166
167
  return Math.max(rightWidth.value + 20, Math.round(containerW - dotRightX));
167
168
  }
168
- return rightWidth.value + 40;
169
+ return rightWidth.value + PYRAMID_DOT_GAP_PX;
169
170
  });
170
171
 
171
172
  const rightOffset = computed(
@@ -207,6 +208,10 @@ const connectorWidth = computed(() => {
207
208
  return Math.max(20, rightWingWidth.value - rightWidth.value);
208
209
  });
209
210
 
211
+ const stepIndex = computed(() => {
212
+ return resolvedIndex.value;
213
+ });
214
+
210
215
  provide(SQUARE_PYRAMID_STACK_KEY, {
211
216
  index: resolvedIndex,
212
217
  isActive,
@@ -243,6 +248,7 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
243
248
  { 'alpha-square-pyramid-stack--animated': rootContext?.animation.value },
244
249
  ]"
245
250
  :style="{
251
+ '--wing-delay': `calc(var(--square-pyramid-start-delay, 0ms) + ${460 + stepIndex * 320}ms)`,
246
252
  width: `${leftWidth}px`,
247
253
  minWidth: `${leftWidth}px`,
248
254
  maxWidth: `${leftWidth}px`,
@@ -258,7 +264,7 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
258
264
  :connector-width="props.connectorWidth"
259
265
  />
260
266
  </div>
261
- <!-- Right Wing: Dot + Connector + Content Card (40px from slab) -->
267
+ <!-- Right Wing: Dot + Connector + Content Card (10px from slab) -->
262
268
  <div
263
269
  class="alpha-square-pyramid-stack__right flex-shrink-0 flex items-center justify-end pointer-events-auto cursor-pointer"
264
270
  :class="[
@@ -266,6 +272,7 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
266
272
  { 'alpha-square-pyramid-stack--animated': rootContext?.animation.value },
267
273
  ]"
268
274
  :style="{
275
+ '--wing-delay': `calc(var(--square-pyramid-start-delay, 0ms) + ${470 + stepIndex * 320}ms)`,
269
276
  width: `${rightWingWidth}px`,
270
277
  minWidth: `${rightWidth}px`,
271
278
  maxWidth: `${rightWingWidth}px`,
@@ -294,34 +301,14 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
294
301
  transition: opacity 0.3s ease, transform 0.3s ease;
295
302
  }
296
303
 
297
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--0 {
298
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 100ms) both;
299
- }
300
-
301
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--1 {
302
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 180ms) both;
303
- }
304
-
305
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--2 {
306
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 260ms) both;
307
- }
308
-
309
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--3 {
310
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 340ms) both;
311
- }
312
-
313
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--4 {
314
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 420ms) both;
315
- }
316
-
317
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__left--5 {
318
- animation: alpha-pyramid-left-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 500ms) both;
304
+ .alpha-square-pyramid-stack--animated .alpha-square-pyramid-stack__left {
305
+ animation: alpha-pyramid-left-in 140ms cubic-bezier(0.16, 1, 0.3, 1) var(--wing-delay, calc(var(--square-pyramid-start-delay, 0ms) + 460ms)) both;
319
306
  }
320
307
 
321
308
  @keyframes alpha-pyramid-left-in {
322
309
  0% {
323
310
  opacity: 0;
324
- transform: translateX(-12px);
311
+ transform: translateX(-10px);
325
312
  }
326
313
  100% {
327
314
  opacity: 1;
@@ -329,34 +316,14 @@ provide(SQUARE_PYRAMID_STACK_KEY, {
329
316
  }
330
317
  }
331
318
 
332
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--0 {
333
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 120ms) both;
334
- }
335
-
336
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--1 {
337
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 200ms) both;
338
- }
339
-
340
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--2 {
341
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 280ms) both;
342
- }
343
-
344
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--3 {
345
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 360ms) both;
346
- }
347
-
348
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--4 {
349
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 440ms) both;
350
- }
351
-
352
- .alpha-square-pyramid-stack--animated.alpha-square-pyramid-stack__right--5 {
353
- animation: alpha-pyramid-right-in 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--square-pyramid-start-delay, 0ms) + 520ms) both;
319
+ .alpha-square-pyramid-stack--animated .alpha-square-pyramid-stack__right {
320
+ animation: alpha-pyramid-right-in 140ms cubic-bezier(0.16, 1, 0.3, 1) var(--wing-delay, calc(var(--square-pyramid-start-delay, 0ms) + 470ms)) both;
354
321
  }
355
322
 
356
323
  @keyframes alpha-pyramid-right-in {
357
324
  0% {
358
325
  opacity: 0;
359
- transform: translateX(12px);
326
+ transform: translateX(10px);
360
327
  }
361
328
  100% {
362
329
  opacity: 1;