@alphacifer/slidev-addon-theme 0.0.7 → 0.0.8
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 +106 -76
- package/components/{chevron-card → card/chevron-card}/ChevronCard.vue +2 -2
- package/components/{chevron-card → card/chevron-card}/ChevronCardBadge.vue +1 -1
- package/components/{chevron-card → card/chevron-card}/ChevronCardContent.vue +1 -1
- package/components/{chevron-card → card/chevron-card}/ChevronCardHeading.vue +1 -1
- package/components/{horiz-card → card/horiz-card}/HorizCard.vue +2 -2
- package/components/{horiz-card → card/horiz-card}/HorizCardBadge.vue +2 -2
- package/components/{horiz-card → card/horiz-card}/HorizCardContent.vue +2 -2
- package/components/{horiz-card → card/horiz-card}/HorizCardHeading.vue +2 -2
- package/components/{horiz-card → card/horiz-card}/HorizCardIcon.vue +2 -2
- package/components/{vert-card → card/vert-card}/VertCard.vue +2 -2
- package/components/{vert-card → card/vert-card}/VertCardBadge.vue +5 -2
- package/components/{vert-card → card/vert-card}/VertCardContent.vue +2 -2
- package/components/{vert-card → card/vert-card}/VertCardHeading.vue +2 -2
- package/components/{vert-card → card/vert-card}/VertCardIcon.vue +2 -2
- package/components/{vert-card → card/vert-card}/VertCardTitle.vue +2 -2
- package/components/comparisons/arc-comparison/ArcComparison.vue +654 -0
- package/components/comparisons/arc-comparison/ArcComparisonBadge.vue +29 -0
- package/components/comparisons/arc-comparison/ArcComparisonContent.vue +29 -0
- package/components/comparisons/arc-comparison/ArcComparisonContents.vue +17 -0
- package/components/comparisons/arc-comparison/ArcComparisonHeading.vue +29 -0
- package/components/comparisons/arc-comparison/ArcComparisonLeft.vue +268 -0
- package/components/comparisons/arc-comparison/ArcComparisonOrbit.vue +47 -0
- package/components/comparisons/arc-comparison/ArcComparisonRight.vue +271 -0
- package/components/comparisons/arc-comparison/ArcComparisonTitle.vue +29 -0
- package/components/{comparison-table/ComparisonTable.vue → comparisons/table-comparison/TableComparison.vue} +37 -27
- package/components/{comparison-table/ComparisonTableCell.vue → comparisons/table-comparison/TableComparisonCell.vue} +8 -8
- package/components/{comparison-table/ComparisonTableCol.vue → comparisons/table-comparison/TableComparisonCol.vue} +10 -10
- package/components/{comparison-table/ComparisonTableCols.vue → comparisons/table-comparison/TableComparisonCols.vue} +11 -11
- package/components/{comparison-table/ComparisonTableRow.vue → comparisons/table-comparison/TableComparisonRow.vue} +9 -9
- package/components/{comparison-table/ComparisonTableRows.vue → comparisons/table-comparison/TableComparisonRows.vue} +3 -3
- package/components/core/ReflectedTitle.vue +2 -1
- package/components/core/arc-orbit/ArcOrbit.vue +468 -0
- package/components/{arc-compare/ArcCompareBadge.vue → core/arc-orbit/ArcOrbitBadge.vue} +11 -8
- package/components/core/arc-orbit/ArcOrbitCallout.vue +400 -0
- package/components/{arc-compare/ArcCompareContent.vue → core/arc-orbit/ArcOrbitContent.vue} +8 -8
- package/components/{arc-compare/ArcCompareContents.vue → core/arc-orbit/ArcOrbitContents.vue} +3 -3
- package/components/{arc-compare/ArcCompareHeading.vue → core/arc-orbit/ArcOrbitHeading.vue} +11 -8
- package/components/core/arc-orbit/ArcOrbitTitle.vue +50 -0
- package/components/{thanks → core/thanks}/ThanksOutlineSquare.vue +1 -1
- package/components/{thanks → core/thanks}/ThanksSquare.vue +1 -1
- package/components/{quad-hub/QuadHub.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetrad.vue} +71 -69
- package/components/{quad-hub/QuadHubCallout.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCallout.vue} +45 -43
- package/components/{quad-hub/QuadHubCenter.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCenter.vue} +4 -4
- package/components/{quad-hub/QuadHubContent.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradContent.vue} +6 -6
- package/components/{quad-hub/QuadHubHeading.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradHeading.vue} +6 -6
- package/components/{quad-hub/QuadHubIcon.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradIcon.vue} +6 -6
- package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriad.vue +3 -3
- package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadCallout.vue +1 -1
- package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadContent.vue +1 -1
- package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadHeading.vue +1 -1
- package/components/facets/triad/gear-triad/GearTriad.vue +591 -0
- package/components/facets/triad/gear-triad/GearTriadCallout.vue +285 -0
- package/components/facets/triad/gear-triad/GearTriadCenter.vue +41 -0
- package/components/facets/triad/gear-triad/GearTriadContent.vue +58 -0
- package/components/facets/triad/gear-triad/GearTriadContents.vue +111 -0
- package/components/facets/triad/gear-triad/GearTriadDescription.vue +38 -0
- package/components/facets/triad/gear-triad/GearTriadHeading.vue +38 -0
- package/components/facets/triad/gear-triad/GearTriadIcon.vue +157 -0
- package/components/{hex-triad → facets/triad/hex-triad}/HexTriad.vue +2 -2
- package/components/{hex-triad → facets/triad/hex-triad}/HexTriadBadge.vue +1 -1
- package/components/{hex-triad → facets/triad/hex-triad}/HexTriadCallout.vue +1 -1
- package/components/{hex-triad → facets/triad/hex-triad}/HexTriadHeading.vue +1 -1
- package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcess.vue +2 -2
- package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessArrow.vue +1 -1
- package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessCallout.vue +1 -1
- package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessContent.vue +1 -1
- package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessHeading.vue +1 -1
- package/package.json +1 -1
- package/utils/arcComparison/context.ts +40 -0
- package/utils/arcComparison/createArcComparisonGeometry.ts +175 -0
- package/utils/arcComparison/index.ts +3 -0
- package/utils/{arcCompare/resolveArcCompareItems.ts → arcComparison/resolveArcComparisonItems.ts} +24 -45
- package/utils/arcOrbit/context.ts +38 -0
- package/utils/{arcCompare/createArcCompareGeometry.ts → arcOrbit/createArcOrbitGeometry.ts} +77 -108
- package/utils/arcOrbit/index.ts +3 -0
- package/utils/arcOrbit/resolveArcOrbitItems.ts +92 -0
- package/utils/gearTriad/context.ts +51 -0
- package/utils/gearTriad/createGearTriadGeometry.ts +210 -0
- package/utils/gearTriad/index.ts +3 -0
- package/utils/gearTriad/resolveGearTriadItems.ts +159 -0
- package/utils/rectOrbitTetrad/context.ts +31 -0
- package/utils/{quadHub/createQuadHubGeometry.ts → rectOrbitTetrad/createRectOrbitTetradGeometry.ts} +33 -28
- package/utils/rectOrbitTetrad/index.ts +3 -0
- package/utils/{quadHub/resolveQuadHubItems.ts → rectOrbitTetrad/resolveRectOrbitTetradItems.ts} +25 -25
- package/utils/{comparisonTable → tableComparison}/context.ts +6 -6
- package/utils/useDiagramAutoScale.ts +1 -1
- package/components/arc-compare/ArcCompare.vue +0 -443
- package/components/arc-compare/ArcCompareCallout.vue +0 -386
- package/components/arc-compare/ArcCompareLeft.vue +0 -183
- package/components/arc-compare/ArcCompareRight.vue +0 -183
- package/components/arc-compare/ArcCompareTitle.vue +0 -47
- package/utils/arcCompare/context.ts +0 -36
- package/utils/arcCompare/index.ts +0 -3
- package/utils/quadHub/context.ts +0 -26
- package/utils/quadHub/index.ts +0 -3
- /package/components/{shifting-heading → core}/TransitionHeading.vue +0 -0
- /package/components/{thanks → core/thanks}/ThanksContent.vue +0 -0
- /package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadIcon.vue +0 -0
- /package/components/{hex-triad → facets/triad/hex-triad}/HexTriadCenterBadge.vue +0 -0
- /package/components/{hex-triad → facets/triad/hex-triad}/HexTriadContent.vue +0 -0
- /package/components/{hex-triad → facets/triad/hex-triad}/HexTriadLayer.vue +0 -0
- /package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessIcon.vue +0 -0
- /package/utils/{comparisonTable → tableComparison}/constants.ts +0 -0
- /package/utils/{comparisonTable → tableComparison}/index.ts +0 -0
package/components/{quad-hub/QuadHub.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetrad.vue}
RENAMED
|
@@ -16,37 +16,37 @@ import {
|
|
|
16
16
|
} from 'vue';
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type
|
|
22
|
-
type
|
|
23
|
-
type
|
|
24
|
-
type
|
|
25
|
-
type
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} from '
|
|
29
|
-
import { useMergedUnoAttrs } from '
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
19
|
+
calculateRectOrbitTetradCoordinates,
|
|
20
|
+
DEFAULT_RECT_ORBIT_TETRAD_ITEMS,
|
|
21
|
+
type IRectOrbitBox,
|
|
22
|
+
type IRectOrbitPoint,
|
|
23
|
+
type IRectOrbitTetradItem,
|
|
24
|
+
type IRectOrbitTetradRegistration,
|
|
25
|
+
type IResolvedRectOrbitTetradItem,
|
|
26
|
+
RECT_ORBIT_TETRAD_ROOT_KEY,
|
|
27
|
+
resolveRectOrbitTetradItems,
|
|
28
|
+
} from '../../../../utils/rectOrbitTetrad';
|
|
29
|
+
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
30
|
+
import RectOrbitTetradCallout from './RectOrbitTetradCallout.vue';
|
|
31
|
+
import RectOrbitTetradCenter from './RectOrbitTetradCenter.vue';
|
|
32
|
+
import RectOrbitTetradIcon from './RectOrbitTetradIcon.vue';
|
|
33
33
|
|
|
34
34
|
defineOptions({
|
|
35
|
-
name: '
|
|
35
|
+
name: 'RectOrbitTetrad',
|
|
36
36
|
inheritAttrs: false,
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
export interface
|
|
40
|
-
readonly box:
|
|
39
|
+
export interface IRectOrbitBlockData {
|
|
40
|
+
readonly box: IRectOrbitBox;
|
|
41
41
|
readonly arcPath: string;
|
|
42
|
-
readonly iconPos:
|
|
43
|
-
readonly numberPos:
|
|
44
|
-
readonly item:
|
|
42
|
+
readonly iconPos: IRectOrbitPoint;
|
|
43
|
+
readonly numberPos: IRectOrbitPoint;
|
|
44
|
+
readonly item: IResolvedRectOrbitTetradItem;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export interface
|
|
47
|
+
export interface IRectOrbitTetradProps {
|
|
48
48
|
readonly title?: string;
|
|
49
|
-
readonly items?: readonly
|
|
49
|
+
readonly items?: readonly IRectOrbitTetradItem[];
|
|
50
50
|
readonly active?: boolean;
|
|
51
51
|
readonly height?: number | string;
|
|
52
52
|
readonly arcRatio?: number;
|
|
@@ -59,7 +59,7 @@ export interface IQuadHubProps {
|
|
|
59
59
|
readonly maxScale?: number;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const props = withDefaults(defineProps<
|
|
62
|
+
const props = withDefaults(defineProps<IRectOrbitTetradProps>(), {
|
|
63
63
|
title: undefined,
|
|
64
64
|
items: undefined,
|
|
65
65
|
active: undefined,
|
|
@@ -150,31 +150,31 @@ const resolvedStartDelay = computed((): number => {
|
|
|
150
150
|
return 0;
|
|
151
151
|
});
|
|
152
152
|
|
|
153
|
-
const registeredCallouts = shallowReactive<Map<number,
|
|
153
|
+
const registeredCallouts = shallowReactive<Map<number, IRectOrbitTetradItem>>(
|
|
154
154
|
new Map(),
|
|
155
155
|
);
|
|
156
156
|
|
|
157
157
|
const resolvedItems = computed(
|
|
158
158
|
(): readonly [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
IResolvedRectOrbitTetradItem,
|
|
160
|
+
IResolvedRectOrbitTetradItem,
|
|
161
|
+
IResolvedRectOrbitTetradItem,
|
|
162
|
+
IResolvedRectOrbitTetradItem,
|
|
163
163
|
] => {
|
|
164
164
|
const rawDefaultNodes = slots.default ? slots.default() : [];
|
|
165
165
|
const flattenedNodes = flattenVNodes(rawDefaultNodes);
|
|
166
166
|
const calloutNodes = flattenedNodes.filter((node) => {
|
|
167
167
|
return (
|
|
168
|
-
hasComponentName(node.type, '
|
|
169
|
-
node.type ===
|
|
168
|
+
hasComponentName(node.type, 'RectOrbitTetradCallout') ||
|
|
169
|
+
node.type === RectOrbitTetradCallout
|
|
170
170
|
);
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
const mergedItems:
|
|
173
|
+
const mergedItems: IRectOrbitTetradItem[] = [];
|
|
174
174
|
|
|
175
175
|
for (let i = 0; i < 4; i++) {
|
|
176
176
|
const slotProps =
|
|
177
|
-
(calloutNodes[i]?.props as
|
|
177
|
+
(calloutNodes[i]?.props as IRectOrbitTetradItem | undefined) ?? {};
|
|
178
178
|
const regProps = registeredCallouts.get(i) ?? {};
|
|
179
179
|
const propItem = props.items?.[i] ?? {};
|
|
180
180
|
|
|
@@ -185,7 +185,7 @@ const resolvedItems = computed(
|
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
return
|
|
188
|
+
return resolveRectOrbitTetradItems({
|
|
189
189
|
items: mergedItems,
|
|
190
190
|
arcRatio: props.arcRatio,
|
|
191
191
|
arcBorderRatio: props.arcBorderRatio,
|
|
@@ -193,11 +193,13 @@ const resolvedItems = computed(
|
|
|
193
193
|
},
|
|
194
194
|
);
|
|
195
195
|
|
|
196
|
-
const [firstFallbackItem] =
|
|
196
|
+
const [firstFallbackItem] = DEFAULT_RECT_ORBIT_TETRAD_ITEMS;
|
|
197
197
|
|
|
198
198
|
let calloutCounter = 0;
|
|
199
199
|
|
|
200
|
-
const registerCallout = (
|
|
200
|
+
const registerCallout = (
|
|
201
|
+
calloutProps?: IRectOrbitTetradItem,
|
|
202
|
+
): IRectOrbitTetradRegistration => {
|
|
201
203
|
const idx = calloutCounter++;
|
|
202
204
|
|
|
203
205
|
if (calloutProps) {
|
|
@@ -206,7 +208,7 @@ const registerCallout = (calloutProps?: IQuadHubItem): IQuadHubRegistration => {
|
|
|
206
208
|
|
|
207
209
|
return {
|
|
208
210
|
index: idx,
|
|
209
|
-
item: computed(():
|
|
211
|
+
item: computed((): IResolvedRectOrbitTetradItem => {
|
|
210
212
|
const current = resolvedItems.value[idx];
|
|
211
213
|
return current ?? resolvedItems.value[0] ?? firstFallbackItem;
|
|
212
214
|
}),
|
|
@@ -217,14 +219,14 @@ onBeforeUpdate(() => {
|
|
|
217
219
|
calloutCounter = 0;
|
|
218
220
|
});
|
|
219
221
|
|
|
220
|
-
provide(
|
|
222
|
+
provide(RECT_ORBIT_TETRAD_ROOT_KEY, {
|
|
221
223
|
items: resolvedItems,
|
|
222
224
|
animation: isAnimated,
|
|
223
225
|
registerCallout,
|
|
224
226
|
});
|
|
225
227
|
|
|
226
228
|
// Precision coordinates calculation for SVG elements
|
|
227
|
-
const coords =
|
|
229
|
+
const coords = calculateRectOrbitTetradCoordinates({
|
|
228
230
|
gap: 14,
|
|
229
231
|
width: 136,
|
|
230
232
|
height: 150,
|
|
@@ -253,10 +255,10 @@ const {
|
|
|
253
255
|
|
|
254
256
|
const quadrantBlocks = computed(
|
|
255
257
|
(): readonly [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
IRectOrbitBlockData,
|
|
259
|
+
IRectOrbitBlockData,
|
|
260
|
+
IRectOrbitBlockData,
|
|
261
|
+
IRectOrbitBlockData,
|
|
260
262
|
] => {
|
|
261
263
|
const [i0, i1, i2, i3] = resolvedItems.value;
|
|
262
264
|
return [
|
|
@@ -293,7 +295,7 @@ const quadrantBlocks = computed(
|
|
|
293
295
|
);
|
|
294
296
|
|
|
295
297
|
const { className, forwardedAttrs } = useMergedUnoAttrs(
|
|
296
|
-
'alpha-
|
|
298
|
+
'alpha-rect-orbit-tetrad w-full flex-1 flex flex-col items-center justify-center select-none font-sans min-h-0',
|
|
297
299
|
);
|
|
298
300
|
|
|
299
301
|
const rootRef = ref<HTMLElement | null>(null);
|
|
@@ -482,11 +484,11 @@ const resolvedScale = computed((): number => {
|
|
|
482
484
|
height: resolvedHeightStyle,
|
|
483
485
|
fontFamily:
|
|
484
486
|
'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif',
|
|
485
|
-
'--
|
|
487
|
+
'--rect-orbit-start-delay': `${resolvedStartDelay}ms`,
|
|
486
488
|
}"
|
|
487
489
|
>
|
|
488
490
|
<div
|
|
489
|
-
class="alpha-
|
|
491
|
+
class="alpha-rect-orbit-tetrad__stage relative w-full h-full min-h-[350px] max-w-[1020px] mx-auto flex items-center justify-center overflow-visible"
|
|
490
492
|
:style="{
|
|
491
493
|
transform: props.scale !== undefined ? `scale(${props.scale})` : undefined,
|
|
492
494
|
transformOrigin: 'center center',
|
|
@@ -494,21 +496,21 @@ const resolvedScale = computed((): number => {
|
|
|
494
496
|
>
|
|
495
497
|
<!-- Center Diagram: 4 Colored Quadrants + Concentric Arcs -->
|
|
496
498
|
<div
|
|
497
|
-
class="alpha-
|
|
499
|
+
class="alpha-rect-orbit-tetrad__center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center w-[390px] h-[390px] z-10 pointer-events-none"
|
|
498
500
|
>
|
|
499
501
|
<svg
|
|
500
|
-
class="alpha-
|
|
502
|
+
class="alpha-rect-orbit-tetrad__svg w-[390px] h-[390px] overflow-visible"
|
|
501
503
|
:viewBox="`0 0 ${viewBoxSize} ${viewBoxSize}`"
|
|
502
504
|
>
|
|
503
505
|
<defs>
|
|
504
506
|
<!-- Drop shadow for the quadrant blocks (unique per component instance) -->
|
|
505
|
-
<filter :id="`
|
|
507
|
+
<filter :id="`rect-orbit-block-shadow-${uid}`" x="-20%" y="-20%" width="140%" height="140%">
|
|
506
508
|
<feDropShadow dx="0" dy="4" stdDeviation="6" flood-opacity="0.10" />
|
|
507
509
|
</filter>
|
|
508
510
|
<!-- Quadrant Clip Paths for Rounded Corner Squares (unique per instance) -->
|
|
509
511
|
<clipPath
|
|
510
512
|
v-for="(block, idx) in quadrantBlocks"
|
|
511
|
-
:id="`clip-
|
|
513
|
+
:id="`clip-rect-orbit-${uid}-${idx}`"
|
|
512
514
|
:key="idx"
|
|
513
515
|
>
|
|
514
516
|
<rect
|
|
@@ -526,11 +528,11 @@ const resolvedScale = computed((): number => {
|
|
|
526
528
|
v-for="(block, idx) in quadrantBlocks"
|
|
527
529
|
:key="idx"
|
|
528
530
|
:class="[
|
|
529
|
-
'alpha-
|
|
530
|
-
`alpha-
|
|
531
|
-
{ 'alpha-
|
|
531
|
+
'alpha-rect-orbit-block',
|
|
532
|
+
`alpha-rect-orbit-block--${idx}`,
|
|
533
|
+
{ 'alpha-rect-orbit-block--animated': isAnimated },
|
|
532
534
|
]"
|
|
533
|
-
:filter="`url(#
|
|
535
|
+
:filter="`url(#rect-orbit-block-shadow-${uid})`"
|
|
534
536
|
>
|
|
535
537
|
<!-- Base solid colored rounded rectangle -->
|
|
536
538
|
<rect
|
|
@@ -548,7 +550,7 @@ const resolvedScale = computed((): number => {
|
|
|
548
550
|
:cy="centerY"
|
|
549
551
|
:r="arcRadius"
|
|
550
552
|
:fill="block.item.arcColor"
|
|
551
|
-
:clip-path="`url(#clip-
|
|
553
|
+
:clip-path="`url(#clip-rect-orbit-${uid}-${idx})`"
|
|
552
554
|
/>
|
|
553
555
|
<!-- Floating Arc Separator Border (Touches pastel area without overlay) -->
|
|
554
556
|
<path
|
|
@@ -572,14 +574,14 @@ const resolvedScale = computed((): number => {
|
|
|
572
574
|
</g>
|
|
573
575
|
</svg>
|
|
574
576
|
<!-- HTML Icon Overlay Layer (ensures UnoCSS mask icons render reliably) -->
|
|
575
|
-
<div class="alpha-
|
|
577
|
+
<div class="alpha-rect-orbit-tetrad__icons absolute top-0 left-0 w-[360px] h-[360px] pointer-events-none">
|
|
576
578
|
<div
|
|
577
579
|
v-for="(block, idx) in quadrantBlocks"
|
|
578
580
|
:key="idx"
|
|
579
581
|
:class="[
|
|
580
|
-
'alpha-
|
|
581
|
-
`alpha-
|
|
582
|
-
{ 'alpha-
|
|
582
|
+
'alpha-rect-orbit-block',
|
|
583
|
+
`alpha-rect-orbit-block--${idx}`,
|
|
584
|
+
{ 'alpha-rect-orbit-block--animated': isAnimated },
|
|
583
585
|
]"
|
|
584
586
|
class="absolute flex items-center justify-center w-[34px] h-[34px]"
|
|
585
587
|
:style="{
|
|
@@ -587,7 +589,7 @@ const resolvedScale = computed((): number => {
|
|
|
587
589
|
left: `${block.iconPos.x - 17}px`,
|
|
588
590
|
}"
|
|
589
591
|
>
|
|
590
|
-
<
|
|
592
|
+
<RectOrbitTetradIcon
|
|
591
593
|
v-if="block.item.icon !== false && block.item.icon !== undefined"
|
|
592
594
|
:icon="block.item.icon"
|
|
593
595
|
:size="34"
|
|
@@ -597,7 +599,7 @@ const resolvedScale = computed((): number => {
|
|
|
597
599
|
</div>
|
|
598
600
|
<!-- Central Circular Hub -->
|
|
599
601
|
<slot name="hub">
|
|
600
|
-
<
|
|
602
|
+
<RectOrbitTetradCenter
|
|
601
603
|
:title="props.title"
|
|
602
604
|
:subtitle="props.subtitle"
|
|
603
605
|
:radius="hubRadius"
|
|
@@ -611,23 +613,23 @@ const resolvedScale = computed((): number => {
|
|
|
611
613
|
</template>
|
|
612
614
|
|
|
613
615
|
<style scoped>
|
|
614
|
-
.alpha-
|
|
615
|
-
animation:
|
|
616
|
+
.alpha-rect-orbit-block--animated.alpha-rect-orbit-block--0 {
|
|
617
|
+
animation: rect-orbit-block-pop 400ms cubic-bezier(0.2, 0.9, 0.4, 1) calc(var(--rect-orbit-start-delay, 0ms) + 100ms) both;
|
|
616
618
|
}
|
|
617
619
|
|
|
618
|
-
.alpha-
|
|
619
|
-
animation:
|
|
620
|
+
.alpha-rect-orbit-block--animated.alpha-rect-orbit-block--1 {
|
|
621
|
+
animation: rect-orbit-block-pop 400ms cubic-bezier(0.2, 0.9, 0.4, 1) calc(var(--rect-orbit-start-delay, 0ms) + 200ms) both;
|
|
620
622
|
}
|
|
621
623
|
|
|
622
|
-
.alpha-
|
|
623
|
-
animation:
|
|
624
|
+
.alpha-rect-orbit-block--animated.alpha-rect-orbit-block--2 {
|
|
625
|
+
animation: rect-orbit-block-pop 400ms cubic-bezier(0.2, 0.9, 0.4, 1) calc(var(--rect-orbit-start-delay, 0ms) + 300ms) both;
|
|
624
626
|
}
|
|
625
627
|
|
|
626
|
-
.alpha-
|
|
627
|
-
animation:
|
|
628
|
+
.alpha-rect-orbit-block--animated.alpha-rect-orbit-block--3 {
|
|
629
|
+
animation: rect-orbit-block-pop 400ms cubic-bezier(0.2, 0.9, 0.4, 1) calc(var(--rect-orbit-start-delay, 0ms) + 400ms) both;
|
|
628
630
|
}
|
|
629
631
|
|
|
630
|
-
@keyframes
|
|
632
|
+
@keyframes rect-orbit-block-pop {
|
|
631
633
|
0% {
|
|
632
634
|
opacity: 0;
|
|
633
635
|
transform: scale(0.92);
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import { computed, Fragment, inject, provide, useSlots, type VNode } from 'vue';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
DEFAULT_RECT_ORBIT_TETRAD_ITEMS,
|
|
6
|
+
type IResolvedRectOrbitTetradItem,
|
|
7
|
+
RECT_ORBIT_TETRAD_CALLOUT_KEY,
|
|
8
|
+
RECT_ORBIT_TETRAD_ROOT_KEY,
|
|
9
9
|
resolveSingleItem,
|
|
10
|
-
type
|
|
11
|
-
} from '
|
|
12
|
-
import
|
|
13
|
-
import
|
|
10
|
+
type TRectOrbitTetradIcon,
|
|
11
|
+
} from '../../../../utils/rectOrbitTetrad';
|
|
12
|
+
import RectOrbitTetradContent from './RectOrbitTetradContent.vue';
|
|
13
|
+
import RectOrbitTetradHeading from './RectOrbitTetradHeading.vue';
|
|
14
14
|
|
|
15
15
|
defineOptions({
|
|
16
|
-
name: '
|
|
16
|
+
name: 'RectOrbitTetradCallout',
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface IRectOrbitTetradCalloutProps {
|
|
20
20
|
readonly id?: string | number;
|
|
21
|
-
readonly icon?:
|
|
21
|
+
readonly icon?: TRectOrbitTetradIcon;
|
|
22
22
|
readonly color?: string;
|
|
23
23
|
readonly cardBg?: string;
|
|
24
24
|
readonly arcColor?: string;
|
|
@@ -27,7 +27,7 @@ export interface IQuadHubCalloutProps {
|
|
|
27
27
|
readonly arcBorderColor?: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const props = withDefaults(defineProps<
|
|
30
|
+
const props = withDefaults(defineProps<IRectOrbitTetradCalloutProps>(), {
|
|
31
31
|
id: undefined,
|
|
32
32
|
icon: undefined,
|
|
33
33
|
color: undefined,
|
|
@@ -52,28 +52,30 @@ function hasComponentName(type: unknown, name: string): boolean {
|
|
|
52
52
|
return false;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const rootContext = inject(
|
|
55
|
+
const rootContext = inject(RECT_ORBIT_TETRAD_ROOT_KEY, undefined);
|
|
56
56
|
|
|
57
57
|
if (!rootContext) {
|
|
58
|
-
console.warn(
|
|
58
|
+
console.warn(
|
|
59
|
+
'[RectOrbitTetradCallout] Must be used inside <RectOrbitTetrad>',
|
|
60
|
+
);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
const registration = rootContext?.registerCallout(props);
|
|
62
64
|
const index = registration?.index ?? 0;
|
|
63
65
|
|
|
64
|
-
const [firstDefaultItem] =
|
|
66
|
+
const [firstDefaultItem] = DEFAULT_RECT_ORBIT_TETRAD_ITEMS;
|
|
65
67
|
|
|
66
|
-
const fallbackItem = computed<
|
|
67
|
-
const current =
|
|
68
|
+
const fallbackItem = computed<IResolvedRectOrbitTetradItem>(() => {
|
|
69
|
+
const current = DEFAULT_RECT_ORBIT_TETRAD_ITEMS[index];
|
|
68
70
|
|
|
69
71
|
return resolveSingleItem(current ?? firstDefaultItem, props);
|
|
70
72
|
});
|
|
71
73
|
|
|
72
|
-
const item = computed<
|
|
74
|
+
const item = computed<IResolvedRectOrbitTetradItem>(() => {
|
|
73
75
|
return registration?.item.value ?? fallbackItem.value;
|
|
74
76
|
});
|
|
75
77
|
|
|
76
|
-
provide(
|
|
78
|
+
provide(RECT_ORBIT_TETRAD_CALLOUT_KEY, {
|
|
77
79
|
item,
|
|
78
80
|
index,
|
|
79
81
|
});
|
|
@@ -96,15 +98,15 @@ function flattenVNodes(nodes: VNode[]): VNode[] {
|
|
|
96
98
|
|
|
97
99
|
function isHeadingNode(node: VNode): boolean {
|
|
98
100
|
return (
|
|
99
|
-
hasComponentName(node.type, '
|
|
100
|
-
node.type ===
|
|
101
|
+
hasComponentName(node.type, 'RectOrbitTetradHeading') ||
|
|
102
|
+
node.type === RectOrbitTetradHeading
|
|
101
103
|
);
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
function isContentNode(node: VNode): boolean {
|
|
105
107
|
return (
|
|
106
|
-
hasComponentName(node.type, '
|
|
107
|
-
node.type ===
|
|
108
|
+
hasComponentName(node.type, 'RectOrbitTetradContent') ||
|
|
109
|
+
node.type === RectOrbitTetradContent
|
|
108
110
|
);
|
|
109
111
|
}
|
|
110
112
|
|
|
@@ -166,10 +168,10 @@ const animation = computed(() => {
|
|
|
166
168
|
<div
|
|
167
169
|
v-if="index < 4"
|
|
168
170
|
:class="[
|
|
169
|
-
'alpha-
|
|
171
|
+
'alpha-rect-orbit-tetrad-callout absolute rounded-2xl flex flex-col justify-center z-0 transition-all duration-300 pointer-events-auto shadow-sm select-none box-border',
|
|
170
172
|
isLeftCard ? 'pl-5 pr-16 py-4 text-right' : 'pl-16 pr-5 py-4 text-left',
|
|
171
|
-
`alpha-
|
|
172
|
-
{ 'alpha-
|
|
173
|
+
`alpha-rect-orbit-tetrad-callout--${index}`,
|
|
174
|
+
{ 'alpha-rect-orbit-tetrad-callout--animated': animation },
|
|
173
175
|
]"
|
|
174
176
|
:style="[
|
|
175
177
|
positionStyle,
|
|
@@ -216,34 +218,34 @@ const animation = computed(() => {
|
|
|
216
218
|
</template>
|
|
217
219
|
|
|
218
220
|
<style scoped>
|
|
219
|
-
.alpha-
|
|
220
|
-
.alpha-
|
|
221
|
-
.alpha-
|
|
222
|
-
.alpha-
|
|
223
|
-
.alpha-
|
|
224
|
-
.alpha-
|
|
225
|
-
.alpha-
|
|
221
|
+
.alpha-rect-orbit-tetrad-callout :deep(p),
|
|
222
|
+
.alpha-rect-orbit-tetrad-callout :deep(h1),
|
|
223
|
+
.alpha-rect-orbit-tetrad-callout :deep(h2),
|
|
224
|
+
.alpha-rect-orbit-tetrad-callout :deep(h3),
|
|
225
|
+
.alpha-rect-orbit-tetrad-callout :deep(h4),
|
|
226
|
+
.alpha-rect-orbit-tetrad-callout :deep(h5),
|
|
227
|
+
.alpha-rect-orbit-tetrad-callout :deep(h6) {
|
|
226
228
|
margin: 0;
|
|
227
229
|
padding: 0;
|
|
228
230
|
}
|
|
229
231
|
|
|
230
|
-
.alpha-
|
|
231
|
-
animation:
|
|
232
|
+
.alpha-rect-orbit-tetrad-callout--animated.alpha-rect-orbit-tetrad-callout--0 {
|
|
233
|
+
animation: rect-orbit-callout-left 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--rect-orbit-start-delay, 0ms) + 150ms) both;
|
|
232
234
|
}
|
|
233
235
|
|
|
234
|
-
.alpha-
|
|
235
|
-
animation:
|
|
236
|
+
.alpha-rect-orbit-tetrad-callout--animated.alpha-rect-orbit-tetrad-callout--1 {
|
|
237
|
+
animation: rect-orbit-callout-right 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--rect-orbit-start-delay, 0ms) + 300ms) both;
|
|
236
238
|
}
|
|
237
239
|
|
|
238
|
-
.alpha-
|
|
239
|
-
animation:
|
|
240
|
+
.alpha-rect-orbit-tetrad-callout--animated.alpha-rect-orbit-tetrad-callout--2 {
|
|
241
|
+
animation: rect-orbit-callout-right 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--rect-orbit-start-delay, 0ms) + 450ms) both;
|
|
240
242
|
}
|
|
241
243
|
|
|
242
|
-
.alpha-
|
|
243
|
-
animation:
|
|
244
|
+
.alpha-rect-orbit-tetrad-callout--animated.alpha-rect-orbit-tetrad-callout--3 {
|
|
245
|
+
animation: rect-orbit-callout-left 450ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--rect-orbit-start-delay, 0ms) + 600ms) both;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
|
-
@keyframes
|
|
248
|
+
@keyframes rect-orbit-callout-right {
|
|
247
249
|
0% {
|
|
248
250
|
opacity: 0;
|
|
249
251
|
transform: translateX(-28px);
|
|
@@ -254,7 +256,7 @@ const animation = computed(() => {
|
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
|
|
257
|
-
@keyframes
|
|
259
|
+
@keyframes rect-orbit-callout-left {
|
|
258
260
|
0% {
|
|
259
261
|
opacity: 0;
|
|
260
262
|
transform: translateX(28px);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
defineOptions({
|
|
3
|
-
name: '
|
|
3
|
+
name: 'RectOrbitTetradCenter',
|
|
4
4
|
});
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface IRectOrbitTetradCenterProps {
|
|
7
7
|
readonly title?: string;
|
|
8
8
|
readonly radius?: number;
|
|
9
9
|
readonly subtitle?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const props = withDefaults(defineProps<
|
|
12
|
+
const props = withDefaults(defineProps<IRectOrbitTetradCenterProps>(), {
|
|
13
13
|
title: undefined,
|
|
14
14
|
subtitle: undefined,
|
|
15
15
|
radius: 58,
|
|
@@ -18,7 +18,7 @@ const props = withDefaults(defineProps<IQuadHubCenterProps>(), {
|
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
20
|
<div
|
|
21
|
-
class="alpha-
|
|
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
22
|
:style="{
|
|
23
23
|
width: `${props.radius * 2}px`,
|
|
24
24
|
height: `${props.radius * 2}px`,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, inject } from 'vue';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { RECT_ORBIT_TETRAD_CALLOUT_KEY } from '../../../../utils/rectOrbitTetrad';
|
|
5
5
|
|
|
6
6
|
defineOptions({
|
|
7
|
-
name: '
|
|
7
|
+
name: 'RectOrbitTetradContent',
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
export interface
|
|
10
|
+
export interface IRectOrbitTetradContentProps {
|
|
11
11
|
readonly color?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const props = withDefaults(defineProps<
|
|
14
|
+
const props = withDefaults(defineProps<IRectOrbitTetradContentProps>(), {
|
|
15
15
|
color: undefined,
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
const calloutContext = inject(
|
|
18
|
+
const calloutContext = inject(RECT_ORBIT_TETRAD_CALLOUT_KEY, undefined);
|
|
19
19
|
|
|
20
20
|
const contentColor = computed(() => {
|
|
21
21
|
return props.color ?? calloutContext?.item.value.textColor ?? '#555555';
|
|
@@ -24,7 +24,7 @@ const contentColor = computed(() => {
|
|
|
24
24
|
|
|
25
25
|
<template>
|
|
26
26
|
<div
|
|
27
|
-
class="alpha-
|
|
27
|
+
class="alpha-rect-orbit-tetrad-content text-[1rem] leading-[1.38] font-normal tracking-tight m-0 p-0 select-none"
|
|
28
28
|
:style="{
|
|
29
29
|
color: contentColor,
|
|
30
30
|
margin: 0,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, inject } from 'vue';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { RECT_ORBIT_TETRAD_CALLOUT_KEY } from '../../../../utils/rectOrbitTetrad';
|
|
5
5
|
|
|
6
6
|
defineOptions({
|
|
7
|
-
name: '
|
|
7
|
+
name: 'RectOrbitTetradHeading',
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
export interface
|
|
10
|
+
export interface IRectOrbitTetradHeadingProps {
|
|
11
11
|
readonly color?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const props = withDefaults(defineProps<
|
|
14
|
+
const props = withDefaults(defineProps<IRectOrbitTetradHeadingProps>(), {
|
|
15
15
|
color: undefined,
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
const calloutContext = inject(
|
|
18
|
+
const calloutContext = inject(RECT_ORBIT_TETRAD_CALLOUT_KEY, undefined);
|
|
19
19
|
|
|
20
20
|
const headingColor = computed(() => {
|
|
21
21
|
return (
|
|
@@ -29,7 +29,7 @@ const headingColor = computed(() => {
|
|
|
29
29
|
|
|
30
30
|
<template>
|
|
31
31
|
<div
|
|
32
|
-
class="alpha-
|
|
32
|
+
class="alpha-rect-orbit-tetrad-heading font-bold text-[1.25rem] leading-tight tracking-tight m-0 p-0 select-none"
|
|
33
33
|
:style="{
|
|
34
34
|
color: headingColor,
|
|
35
35
|
margin: 0,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { TRectOrbitTetradIcon } from '../../../../utils/rectOrbitTetrad';
|
|
5
5
|
|
|
6
6
|
defineOptions({
|
|
7
|
-
name: '
|
|
7
|
+
name: 'RectOrbitTetradIcon',
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
export interface
|
|
10
|
+
export interface IRectOrbitTetradIconProps {
|
|
11
11
|
readonly size?: number;
|
|
12
12
|
readonly color?: string;
|
|
13
|
-
readonly icon?:
|
|
13
|
+
readonly icon?: TRectOrbitTetradIcon;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const props = withDefaults(defineProps<
|
|
16
|
+
const props = withDefaults(defineProps<IRectOrbitTetradIconProps>(), {
|
|
17
17
|
size: 34,
|
|
18
18
|
icon: undefined,
|
|
19
19
|
color: '#ffffff',
|
|
@@ -31,7 +31,7 @@ const isComponentIcon = computed((): boolean => {
|
|
|
31
31
|
<template>
|
|
32
32
|
<div
|
|
33
33
|
v-if="props.icon !== false"
|
|
34
|
-
class="alpha-
|
|
34
|
+
class="alpha-rect-orbit-tetrad-icon flex items-center justify-center pointer-events-none select-none"
|
|
35
35
|
:style="{
|
|
36
36
|
color: props.color,
|
|
37
37
|
width: `${props.size}px`,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
type IArrowTriadItem,
|
|
17
17
|
resolveArrowTriadItems,
|
|
18
18
|
type TArrowTriadLayout,
|
|
19
|
-
} from '
|
|
20
|
-
import { useDiagramAutoScale } from '
|
|
21
|
-
import { useMergedUnoAttrs } from '
|
|
19
|
+
} from '../../../../utils/arrowTriad';
|
|
20
|
+
import { useDiagramAutoScale } from '../../../../utils/useDiagramAutoScale';
|
|
21
|
+
import { useMergedUnoAttrs } from '../../../../utils/useMergedUnoAttrs';
|
|
22
22
|
import ArrowTriadCallout from './ArrowTriadCallout.vue';
|
|
23
23
|
|
|
24
24
|
defineOptions({
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
type IArrowTriadItem,
|
|
9
9
|
type IResolvedArrowTriadItem,
|
|
10
10
|
resolveSingleArrowTriadItem,
|
|
11
|
-
} from '
|
|
11
|
+
} from '../../../../utils/arrowTriad';
|
|
12
12
|
import ArrowTriadContent from './ArrowTriadContent.vue';
|
|
13
13
|
import ArrowTriadHeading from './ArrowTriadHeading.vue';
|
|
14
14
|
import ArrowTriadIcon from './ArrowTriadIcon.vue';
|