@alphacifer/slidev-addon-theme 0.0.6 → 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.
Files changed (105) hide show
  1. package/README.md +117 -51
  2. package/components/{chevron-card → card/chevron-card}/ChevronCard.vue +2 -2
  3. package/components/{chevron-card → card/chevron-card}/ChevronCardBadge.vue +1 -1
  4. package/components/{chevron-card → card/chevron-card}/ChevronCardContent.vue +1 -1
  5. package/components/{chevron-card → card/chevron-card}/ChevronCardHeading.vue +1 -1
  6. package/components/{horiz-card → card/horiz-card}/HorizCard.vue +2 -2
  7. package/components/{horiz-card → card/horiz-card}/HorizCardBadge.vue +2 -2
  8. package/components/{horiz-card → card/horiz-card}/HorizCardContent.vue +2 -2
  9. package/components/{horiz-card → card/horiz-card}/HorizCardHeading.vue +2 -2
  10. package/components/{horiz-card → card/horiz-card}/HorizCardIcon.vue +2 -2
  11. package/components/{vert-card → card/vert-card}/VertCard.vue +2 -2
  12. package/components/{vert-card → card/vert-card}/VertCardBadge.vue +5 -2
  13. package/components/{vert-card → card/vert-card}/VertCardContent.vue +2 -2
  14. package/components/{vert-card → card/vert-card}/VertCardHeading.vue +2 -2
  15. package/components/{vert-card → card/vert-card}/VertCardIcon.vue +2 -2
  16. package/components/{vert-card → card/vert-card}/VertCardTitle.vue +2 -2
  17. package/components/comparisons/arc-comparison/ArcComparison.vue +654 -0
  18. package/components/comparisons/arc-comparison/ArcComparisonBadge.vue +29 -0
  19. package/components/comparisons/arc-comparison/ArcComparisonContent.vue +29 -0
  20. package/components/comparisons/arc-comparison/ArcComparisonContents.vue +17 -0
  21. package/components/comparisons/arc-comparison/ArcComparisonHeading.vue +29 -0
  22. package/components/comparisons/arc-comparison/ArcComparisonLeft.vue +268 -0
  23. package/components/comparisons/arc-comparison/ArcComparisonOrbit.vue +47 -0
  24. package/components/comparisons/arc-comparison/ArcComparisonRight.vue +271 -0
  25. package/components/comparisons/arc-comparison/ArcComparisonTitle.vue +29 -0
  26. package/components/comparisons/table-comparison/TableComparison.vue +254 -0
  27. package/components/comparisons/table-comparison/TableComparisonCell.vue +88 -0
  28. package/components/comparisons/table-comparison/TableComparisonCol.vue +97 -0
  29. package/components/comparisons/table-comparison/TableComparisonCols.vue +74 -0
  30. package/components/comparisons/table-comparison/TableComparisonRow.vue +92 -0
  31. package/components/comparisons/table-comparison/TableComparisonRows.vue +21 -0
  32. package/components/core/ReflectedTitle.vue +2 -1
  33. package/components/core/arc-orbit/ArcOrbit.vue +468 -0
  34. package/components/{arc-compare/ArcCompareBadge.vue → core/arc-orbit/ArcOrbitBadge.vue} +11 -8
  35. package/components/core/arc-orbit/ArcOrbitCallout.vue +400 -0
  36. package/components/{arc-compare/ArcCompareContent.vue → core/arc-orbit/ArcOrbitContent.vue} +8 -8
  37. package/components/{arc-compare/ArcCompareContents.vue → core/arc-orbit/ArcOrbitContents.vue} +3 -3
  38. package/components/{arc-compare/ArcCompareHeading.vue → core/arc-orbit/ArcOrbitHeading.vue} +11 -8
  39. package/components/core/arc-orbit/ArcOrbitTitle.vue +50 -0
  40. package/components/{thanks → core/thanks}/ThanksOutlineSquare.vue +1 -1
  41. package/components/{thanks → core/thanks}/ThanksSquare.vue +1 -1
  42. package/components/{quad-hub/QuadHub.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetrad.vue} +71 -69
  43. package/components/{quad-hub/QuadHubCallout.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCallout.vue} +45 -43
  44. package/components/{quad-hub/QuadHubCenter.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradCenter.vue} +4 -4
  45. package/components/{quad-hub/QuadHubContent.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradContent.vue} +6 -6
  46. package/components/{quad-hub/QuadHubHeading.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradHeading.vue} +6 -6
  47. package/components/{quad-hub/QuadHubIcon.vue → facets/tetrad/rect-orbit-tetrad/RectOrbitTetradIcon.vue} +6 -6
  48. package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriad.vue +3 -3
  49. package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadCallout.vue +1 -1
  50. package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadContent.vue +1 -1
  51. package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadHeading.vue +1 -1
  52. package/components/facets/triad/gear-triad/GearTriad.vue +591 -0
  53. package/components/facets/triad/gear-triad/GearTriadCallout.vue +285 -0
  54. package/components/facets/triad/gear-triad/GearTriadCenter.vue +41 -0
  55. package/components/facets/triad/gear-triad/GearTriadContent.vue +58 -0
  56. package/components/facets/triad/gear-triad/GearTriadContents.vue +111 -0
  57. package/components/facets/triad/gear-triad/GearTriadDescription.vue +38 -0
  58. package/components/facets/triad/gear-triad/GearTriadHeading.vue +38 -0
  59. package/components/facets/triad/gear-triad/GearTriadIcon.vue +157 -0
  60. package/components/{hex-triad → facets/triad/hex-triad}/HexTriad.vue +2 -2
  61. package/components/{hex-triad → facets/triad/hex-triad}/HexTriadBadge.vue +1 -1
  62. package/components/{hex-triad → facets/triad/hex-triad}/HexTriadCallout.vue +1 -1
  63. package/components/{hex-triad → facets/triad/hex-triad}/HexTriadHeading.vue +1 -1
  64. package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcess.vue +2 -2
  65. package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessArrow.vue +1 -1
  66. package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessCallout.vue +1 -1
  67. package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessContent.vue +1 -1
  68. package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessHeading.vue +1 -1
  69. package/package.json +1 -1
  70. package/utils/arcComparison/context.ts +40 -0
  71. package/utils/arcComparison/createArcComparisonGeometry.ts +175 -0
  72. package/utils/arcComparison/index.ts +3 -0
  73. package/utils/{arcCompare/resolveArcCompareItems.ts → arcComparison/resolveArcComparisonItems.ts} +24 -45
  74. package/utils/arcOrbit/context.ts +38 -0
  75. package/utils/{arcCompare/createArcCompareGeometry.ts → arcOrbit/createArcOrbitGeometry.ts} +77 -108
  76. package/utils/arcOrbit/index.ts +3 -0
  77. package/utils/arcOrbit/resolveArcOrbitItems.ts +92 -0
  78. package/utils/gearTriad/context.ts +51 -0
  79. package/utils/gearTriad/createGearTriadGeometry.ts +210 -0
  80. package/utils/gearTriad/index.ts +3 -0
  81. package/utils/gearTriad/resolveGearTriadItems.ts +159 -0
  82. package/utils/rectOrbitTetrad/context.ts +31 -0
  83. package/utils/{quadHub/createQuadHubGeometry.ts → rectOrbitTetrad/createRectOrbitTetradGeometry.ts} +33 -28
  84. package/utils/rectOrbitTetrad/index.ts +3 -0
  85. package/utils/{quadHub/resolveQuadHubItems.ts → rectOrbitTetrad/resolveRectOrbitTetradItems.ts} +25 -25
  86. package/utils/tableComparison/constants.ts +72 -0
  87. package/utils/tableComparison/context.ts +24 -0
  88. package/utils/tableComparison/index.ts +2 -0
  89. package/utils/useDiagramAutoScale.ts +1 -1
  90. package/components/arc-compare/ArcCompare.vue +0 -443
  91. package/components/arc-compare/ArcCompareCallout.vue +0 -386
  92. package/components/arc-compare/ArcCompareLeft.vue +0 -183
  93. package/components/arc-compare/ArcCompareRight.vue +0 -183
  94. package/components/arc-compare/ArcCompareTitle.vue +0 -47
  95. package/utils/arcCompare/context.ts +0 -36
  96. package/utils/arcCompare/index.ts +0 -3
  97. package/utils/quadHub/context.ts +0 -26
  98. package/utils/quadHub/index.ts +0 -3
  99. /package/components/{shifting-heading → core}/TransitionHeading.vue +0 -0
  100. /package/components/{thanks → core/thanks}/ThanksContent.vue +0 -0
  101. /package/components/{arrow-triad → facets/triad/arrow-triad}/ArrowTriadIcon.vue +0 -0
  102. /package/components/{hex-triad → facets/triad/hex-triad}/HexTriadCenterBadge.vue +0 -0
  103. /package/components/{hex-triad → facets/triad/hex-triad}/HexTriadContent.vue +0 -0
  104. /package/components/{hex-triad → facets/triad/hex-triad}/HexTriadLayer.vue +0 -0
  105. /package/components/{arc-arrow-process → process/arc-arrow-process}/ArcArrowProcessIcon.vue +0 -0
@@ -0,0 +1,159 @@
1
+ export type TGearTriadIcon =
2
+ | 'document'
3
+ | 'file'
4
+ | 'file-text'
5
+ | 'shield'
6
+ | 'shield-star'
7
+ | 'archive'
8
+ | 'box'
9
+ | 'package'
10
+ | 'gear'
11
+ | 'settings'
12
+ | string
13
+ | object
14
+ | false;
15
+
16
+ export interface IGearTriadItem {
17
+ readonly id?: string | number;
18
+ readonly color?: string;
19
+ readonly depthColor?: string;
20
+ readonly title?: string;
21
+ readonly description?: string;
22
+ readonly icon?: TGearTriadIcon;
23
+ readonly cardBg?: string;
24
+ readonly textColor?: string;
25
+ readonly titleColor?: string;
26
+ }
27
+
28
+ export interface IResolvedGearTriadItem {
29
+ readonly id: string | number;
30
+ readonly color: string;
31
+ readonly depthColor: string;
32
+ readonly title: string;
33
+ readonly description: string;
34
+ readonly icon?: TGearTriadIcon;
35
+ readonly cardBg?: string;
36
+ readonly textColor: string;
37
+ readonly titleColor: string;
38
+ }
39
+
40
+ const DEFAULT_LOREM =
41
+ 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration.';
42
+
43
+ const defaultItem0: IResolvedGearTriadItem = {
44
+ id: '01',
45
+ color: '#1fb5b5',
46
+ depthColor: '#126e7a',
47
+ title: 'Option 1',
48
+ description: DEFAULT_LOREM,
49
+ icon: undefined,
50
+ cardBg: undefined,
51
+ textColor: '#64748b',
52
+ titleColor: '#0f172a',
53
+ };
54
+
55
+ const defaultItem1: IResolvedGearTriadItem = {
56
+ id: '02',
57
+ color: '#f38942',
58
+ depthColor: '#aa521d',
59
+ title: 'Option 2',
60
+ description: DEFAULT_LOREM,
61
+ icon: undefined,
62
+ cardBg: undefined,
63
+ textColor: '#64748b',
64
+ titleColor: '#0f172a',
65
+ };
66
+
67
+ const defaultItem2: IResolvedGearTriadItem = {
68
+ id: '03',
69
+ color: '#f05367',
70
+ depthColor: '#a82c3c',
71
+ title: 'Option 3',
72
+ description: DEFAULT_LOREM,
73
+ icon: undefined,
74
+ cardBg: undefined,
75
+ textColor: '#64748b',
76
+ titleColor: '#0f172a',
77
+ };
78
+
79
+ export const DEFAULT_GEAR_TRIAD_ITEMS: readonly [
80
+ IResolvedGearTriadItem,
81
+ IResolvedGearTriadItem,
82
+ IResolvedGearTriadItem,
83
+ ] = [defaultItem0, defaultItem1, defaultItem2];
84
+
85
+ export const GEAR_TRIAD_BASE_COLOR = '#11455c';
86
+
87
+ export function getDefaultGearTriadItem(index: number): IResolvedGearTriadItem {
88
+ const safe = Math.abs(index) % 3;
89
+
90
+ if (safe === 1) {
91
+ return defaultItem1;
92
+ }
93
+
94
+ if (safe === 2) {
95
+ return defaultItem2;
96
+ }
97
+
98
+ return defaultItem0;
99
+ }
100
+
101
+ export function resolveSingleGearTriadItem(
102
+ item: IGearTriadItem | undefined,
103
+ fallbackIndex = 0,
104
+ ): IResolvedGearTriadItem {
105
+ const fallback = getDefaultGearTriadItem(fallbackIndex);
106
+
107
+ if (!item) {
108
+ return fallback;
109
+ }
110
+
111
+ return {
112
+ id: item.id ?? fallback.id,
113
+ color: item.color ?? fallback.color,
114
+ depthColor: item.depthColor ?? fallback.depthColor,
115
+ title: item.title ?? fallback.title,
116
+ description: item.description ?? fallback.description,
117
+ icon: item.icon !== undefined ? item.icon : fallback.icon,
118
+ cardBg: item.cardBg !== undefined ? item.cardBg : fallback.cardBg,
119
+ textColor: item.textColor ?? fallback.textColor,
120
+ titleColor: item.titleColor ?? fallback.titleColor,
121
+ };
122
+ }
123
+
124
+ export function resolveGearTriadItems(
125
+ items?: readonly IGearTriadItem[],
126
+ icons?: readonly (TGearTriadIcon | undefined)[],
127
+ ): readonly [
128
+ IResolvedGearTriadItem,
129
+ IResolvedGearTriadItem,
130
+ IResolvedGearTriadItem,
131
+ ] {
132
+ const item0 = items?.[0];
133
+ const item1 = items?.[1];
134
+ const item2 = items?.[2];
135
+
136
+ const merged0 = item0
137
+ ? { icon: item0.icon ?? icons?.[0], ...item0 }
138
+ : icons?.[0] !== undefined
139
+ ? { icon: icons[0] }
140
+ : undefined;
141
+
142
+ const merged1 = item1
143
+ ? { icon: item1.icon ?? icons?.[1], ...item1 }
144
+ : icons?.[1] !== undefined
145
+ ? { icon: icons[1] }
146
+ : undefined;
147
+
148
+ const merged2 = item2
149
+ ? { icon: item2.icon ?? icons?.[2], ...item2 }
150
+ : icons?.[2] !== undefined
151
+ ? { icon: icons[2] }
152
+ : undefined;
153
+
154
+ return [
155
+ resolveSingleGearTriadItem(merged0, 0),
156
+ resolveSingleGearTriadItem(merged1, 1),
157
+ resolveSingleGearTriadItem(merged2, 2),
158
+ ];
159
+ }
@@ -0,0 +1,31 @@
1
+ import type { ComputedRef, InjectionKey } from 'vue';
2
+
3
+ import type {
4
+ IRectOrbitTetradItem,
5
+ IResolvedRectOrbitTetradItem,
6
+ } from './resolveRectOrbitTetradItems';
7
+
8
+ export interface IRectOrbitTetradRegistration {
9
+ readonly index: number;
10
+ readonly item: ComputedRef<IResolvedRectOrbitTetradItem>;
11
+ readonly setCustomBadge?: (text: string | number) => void;
12
+ }
13
+
14
+ export interface IRectOrbitTetradRootContext {
15
+ readonly animation?: ComputedRef<boolean>;
16
+ readonly registerCallout: (
17
+ props?: IRectOrbitTetradItem,
18
+ ) => IRectOrbitTetradRegistration;
19
+ readonly items: ComputedRef<readonly IResolvedRectOrbitTetradItem[]>;
20
+ }
21
+
22
+ export interface IRectOrbitTetradCalloutContext {
23
+ readonly index: number;
24
+ readonly item: ComputedRef<IResolvedRectOrbitTetradItem>;
25
+ }
26
+
27
+ export const RECT_ORBIT_TETRAD_ROOT_KEY: InjectionKey<IRectOrbitTetradRootContext> =
28
+ Symbol('RECT_ORBIT_TETRAD_ROOT_KEY');
29
+
30
+ export const RECT_ORBIT_TETRAD_CALLOUT_KEY: InjectionKey<IRectOrbitTetradCalloutContext> =
31
+ Symbol('RECT_ORBIT_TETRAD_CALLOUT_KEY');
@@ -1,9 +1,9 @@
1
- export interface IQuadPoint {
1
+ export interface IRectOrbitPoint {
2
2
  readonly x: number;
3
3
  readonly y: number;
4
4
  }
5
5
 
6
- export interface IQuadBox {
6
+ export interface IRectOrbitBox {
7
7
  readonly x: number;
8
8
  readonly y: number;
9
9
  readonly rx: number;
@@ -11,26 +11,31 @@ export interface IQuadBox {
11
11
  readonly height: number;
12
12
  }
13
13
 
14
- export interface IQuadHubCoordinates {
14
+ export interface IRectOrbitTetradCoordinates {
15
15
  readonly centerX: number;
16
16
  readonly centerY: number;
17
17
  readonly arcPaths: readonly [string, string, string, string];
18
18
  readonly arcRadius: number;
19
19
  readonly hubRadius: number;
20
- readonly quadrants: readonly [IQuadBox, IQuadBox, IQuadBox, IQuadBox];
20
+ readonly quadrants: readonly [
21
+ IRectOrbitBox,
22
+ IRectOrbitBox,
23
+ IRectOrbitBox,
24
+ IRectOrbitBox,
25
+ ];
21
26
  readonly viewBoxSize: number;
22
27
  readonly iconPositions: readonly [
23
- IQuadPoint,
24
- IQuadPoint,
25
- IQuadPoint,
26
- IQuadPoint,
28
+ IRectOrbitPoint,
29
+ IRectOrbitPoint,
30
+ IRectOrbitPoint,
31
+ IRectOrbitPoint,
27
32
  ];
28
33
  readonly arcBorderWidth: number;
29
34
  readonly numberPositions: readonly [
30
- IQuadPoint,
31
- IQuadPoint,
32
- IQuadPoint,
33
- IQuadPoint,
35
+ IRectOrbitPoint,
36
+ IRectOrbitPoint,
37
+ IRectOrbitPoint,
38
+ IRectOrbitPoint,
34
39
  ];
35
40
  }
36
41
 
@@ -54,7 +59,7 @@ function createArcPath(
54
59
  return `M ${x1} ${y1} A ${radius} ${radius} 0 ${largeArcFlag} 1 ${x2} ${y2}`;
55
60
  }
56
61
 
57
- export interface ICalculateQuadHubCoordinatesParams {
62
+ export interface ICalculateRectOrbitTetradCoordinatesParams {
58
63
  readonly gap?: number;
59
64
  readonly width?: number;
60
65
  readonly height?: number;
@@ -69,14 +74,14 @@ export interface ICalculateQuadHubCoordinatesParams {
69
74
  }
70
75
 
71
76
  /**
72
- * Calculates geometric coordinates for the QuadHub layout.
77
+ * Calculates geometric coordinates for the RectOrbitTetrad layout.
73
78
  * Indices (Clockwise starting Top-Left):
74
79
  * 0: Top-Left (01)
75
80
  * 1: Top-Right (02)
76
81
  * 2: Bottom-Right (03)
77
82
  * 3: Bottom-Left (04)
78
83
  */
79
- export function calculateQuadHubCoordinates({
84
+ export function calculateRectOrbitTetradCoordinates({
80
85
  gap = 14,
81
86
  width = 136,
82
87
  height = 150,
@@ -88,14 +93,14 @@ export function calculateQuadHubCoordinates({
88
93
  iconPaddingX = 30,
89
94
  iconPaddingY = 32,
90
95
  arcBorderWidth = 5,
91
- }: ICalculateQuadHubCoordinatesParams = {}): IQuadHubCoordinates {
96
+ }: ICalculateRectOrbitTetradCoordinatesParams = {}): IRectOrbitTetradCoordinates {
92
97
  const centerX = viewBoxSize / 2;
93
98
  const centerY = viewBoxSize / 2;
94
99
  const halfGap = gap / 2;
95
100
 
96
101
  // Quadrants:
97
102
  // 0: Top-Left (1)
98
- const q0: IQuadBox = {
103
+ const q0: IRectOrbitBox = {
99
104
  x: centerX - halfGap - width,
100
105
  y: centerY - halfGap - height,
101
106
  rx: cornerRadius,
@@ -104,7 +109,7 @@ export function calculateQuadHubCoordinates({
104
109
  };
105
110
 
106
111
  // 1: Top-Right (2)
107
- const q1: IQuadBox = {
112
+ const q1: IRectOrbitBox = {
108
113
  x: centerX + halfGap,
109
114
  y: centerY - halfGap - height,
110
115
  rx: cornerRadius,
@@ -113,7 +118,7 @@ export function calculateQuadHubCoordinates({
113
118
  };
114
119
 
115
120
  // 2: Bottom-Right (3)
116
- const q2: IQuadBox = {
121
+ const q2: IRectOrbitBox = {
117
122
  x: centerX + halfGap,
118
123
  y: centerY + halfGap,
119
124
  rx: cornerRadius,
@@ -122,7 +127,7 @@ export function calculateQuadHubCoordinates({
122
127
  };
123
128
 
124
129
  // 3: Bottom-Left (4)
125
- const q3: IQuadBox = {
130
+ const q3: IRectOrbitBox = {
126
131
  x: centerX - halfGap - width,
127
132
  y: centerY + halfGap,
128
133
  rx: cornerRadius,
@@ -137,44 +142,44 @@ export function calculateQuadHubCoordinates({
137
142
  const offsetY = Number((numberRadius * Math.sin(rad)).toFixed(2));
138
143
 
139
144
  // 0: Top-Left (1)
140
- const num0: IQuadPoint = {
145
+ const num0: IRectOrbitPoint = {
141
146
  x: centerX - offsetX,
142
147
  y: centerY - offsetY,
143
148
  };
144
149
  // 1: Top-Right (2)
145
- const num1: IQuadPoint = {
150
+ const num1: IRectOrbitPoint = {
146
151
  x: centerX + offsetX,
147
152
  y: centerY - offsetY,
148
153
  };
149
154
  // 2: Bottom-Right (3)
150
- const num2: IQuadPoint = {
155
+ const num2: IRectOrbitPoint = {
151
156
  x: centerX + offsetX,
152
157
  y: centerY + offsetY,
153
158
  };
154
159
  // 3: Bottom-Left (4)
155
- const num3: IQuadPoint = {
160
+ const num3: IRectOrbitPoint = {
156
161
  x: centerX - offsetX,
157
162
  y: centerY + offsetY,
158
163
  };
159
164
 
160
165
  // Icon positions (in outer corner of each block)
161
166
  // 0: Top-Left (1)
162
- const icon0: IQuadPoint = {
167
+ const icon0: IRectOrbitPoint = {
163
168
  x: q0.x + iconPaddingX,
164
169
  y: q0.y + iconPaddingY,
165
170
  };
166
171
  // 1: Top-Right (2)
167
- const icon1: IQuadPoint = {
172
+ const icon1: IRectOrbitPoint = {
168
173
  x: q1.x + q1.width - iconPaddingX,
169
174
  y: q1.y + iconPaddingY,
170
175
  };
171
176
  // 2: Bottom-Right (3)
172
- const icon2: IQuadPoint = {
177
+ const icon2: IRectOrbitPoint = {
173
178
  x: q2.x + q2.width - iconPaddingX,
174
179
  y: q2.y + q2.height - iconPaddingY,
175
180
  };
176
181
  // 3: Bottom-Left (4)
177
- const icon3: IQuadPoint = {
182
+ const icon3: IRectOrbitPoint = {
178
183
  x: q3.x + iconPaddingX,
179
184
  y: q3.y + q3.height - iconPaddingY,
180
185
  };
@@ -0,0 +1,3 @@
1
+ export * from './context';
2
+ export * from './createRectOrbitTetradGeometry';
3
+ export * from './resolveRectOrbitTetradItems';
@@ -1,14 +1,14 @@
1
- import { lightenColor } from './createQuadHubGeometry';
1
+ import { lightenColor } from './createRectOrbitTetradGeometry';
2
2
 
3
- export type TQuadHubIcon = string | object | boolean;
3
+ export type TRectOrbitTetradIcon = string | object | boolean;
4
4
 
5
- export interface IQuadHubItem {
5
+ export interface IRectOrbitTetradItem {
6
6
  readonly id?: string | number;
7
7
  /**
8
8
  * Optional icon: icon class (e.g. 'i-lucide-user'), component object,
9
9
  * built-in name ('user' | 'academic' | 'briefcase' | 'target'), or false to hide.
10
10
  */
11
- readonly icon?: TQuadHubIcon;
11
+ readonly icon?: TRectOrbitTetradIcon;
12
12
  readonly color?: string;
13
13
  readonly cardBg?: string;
14
14
  readonly arcColor?: string;
@@ -19,7 +19,7 @@ export interface IQuadHubItem {
19
19
  readonly arcBorderRatio?: number;
20
20
  }
21
21
 
22
- export interface IResolvedQuadHubItem extends IQuadHubItem {
22
+ export interface IResolvedRectOrbitTetradItem extends IRectOrbitTetradItem {
23
23
  readonly id: string | number;
24
24
  readonly color: string;
25
25
  readonly cardBg: string;
@@ -29,11 +29,11 @@ export interface IResolvedQuadHubItem extends IQuadHubItem {
29
29
  readonly arcBorderColor: string;
30
30
  }
31
31
 
32
- export const DEFAULT_QUAD_HUB_ITEMS: readonly [
33
- IResolvedQuadHubItem,
34
- IResolvedQuadHubItem,
35
- IResolvedQuadHubItem,
36
- IResolvedQuadHubItem,
32
+ export const DEFAULT_RECT_ORBIT_TETRAD_ITEMS: readonly [
33
+ IResolvedRectOrbitTetradItem,
34
+ IResolvedRectOrbitTetradItem,
35
+ IResolvedRectOrbitTetradItem,
36
+ IResolvedRectOrbitTetradItem,
37
37
  ] = [
38
38
  // 0: Top-Left (01) - Golden Orange
39
39
  {
@@ -118,11 +118,11 @@ export const DEFAULT_QUAD_HUB_ITEMS: readonly [
118
118
  ] as const;
119
119
 
120
120
  export function resolveSingleItem(
121
- defaultItem: IResolvedQuadHubItem,
122
- userItem?: IQuadHubItem,
121
+ defaultItem: IResolvedRectOrbitTetradItem,
122
+ userItem?: IRectOrbitTetradItem,
123
123
  defaultArcRatio = 0.55,
124
124
  defaultArcBorderRatio = 0.8,
125
- ): IResolvedQuadHubItem {
125
+ ): IResolvedRectOrbitTetradItem {
126
126
  const merged = {
127
127
  ...defaultItem,
128
128
  ...(userItem ?? {}),
@@ -169,43 +169,43 @@ export function resolveSingleItem(
169
169
  };
170
170
  }
171
171
 
172
- export interface IResolveQuadHubItemsParams {
173
- readonly items?: readonly IQuadHubItem[];
172
+ export interface IResolveRectOrbitTetradItemsParams {
173
+ readonly items?: readonly IRectOrbitTetradItem[];
174
174
  readonly arcRatio?: number;
175
175
  readonly arcBorderRatio?: number;
176
176
  }
177
177
 
178
- export function resolveQuadHubItems({
178
+ export function resolveRectOrbitTetradItems({
179
179
  items = [],
180
180
  arcRatio = 0.55,
181
181
  arcBorderRatio = 0.8,
182
- }: IResolveQuadHubItemsParams = {}): readonly [
183
- IResolvedQuadHubItem,
184
- IResolvedQuadHubItem,
185
- IResolvedQuadHubItem,
186
- IResolvedQuadHubItem,
182
+ }: IResolveRectOrbitTetradItemsParams = {}): readonly [
183
+ IResolvedRectOrbitTetradItem,
184
+ IResolvedRectOrbitTetradItem,
185
+ IResolvedRectOrbitTetradItem,
186
+ IResolvedRectOrbitTetradItem,
187
187
  ] {
188
188
  return [
189
189
  resolveSingleItem(
190
- DEFAULT_QUAD_HUB_ITEMS[0],
190
+ DEFAULT_RECT_ORBIT_TETRAD_ITEMS[0],
191
191
  items[0],
192
192
  arcRatio,
193
193
  arcBorderRatio,
194
194
  ),
195
195
  resolveSingleItem(
196
- DEFAULT_QUAD_HUB_ITEMS[1],
196
+ DEFAULT_RECT_ORBIT_TETRAD_ITEMS[1],
197
197
  items[1],
198
198
  arcRatio,
199
199
  arcBorderRatio,
200
200
  ),
201
201
  resolveSingleItem(
202
- DEFAULT_QUAD_HUB_ITEMS[2],
202
+ DEFAULT_RECT_ORBIT_TETRAD_ITEMS[2],
203
203
  items[2],
204
204
  arcRatio,
205
205
  arcBorderRatio,
206
206
  ),
207
207
  resolveSingleItem(
208
- DEFAULT_QUAD_HUB_ITEMS[3],
208
+ DEFAULT_RECT_ORBIT_TETRAD_ITEMS[3],
209
209
  items[3],
210
210
  arcRatio,
211
211
  arcBorderRatio,
@@ -0,0 +1,72 @@
1
+ export const DEFAULT_COL_COLORS: readonly string[] = [
2
+ '#354f82',
3
+ '#5b8bb3',
4
+ '#00a8a8',
5
+ '#00b884',
6
+ '#00875a',
7
+ ];
8
+
9
+ export const DEFAULT_ROW_HEADER_COLOR = '#2e8b9a';
10
+ export const DEFAULT_ROW_HEADER_TEXT_COLOR = '#ffffff';
11
+ export const DEFAULT_COL_HEADER_TEXT_COLOR = '#ffffff';
12
+ export const DEFAULT_CELL_BG = '#d6e5ef';
13
+ export const DEFAULT_CELL_COLOR = '#475569';
14
+ export const DEFAULT_BORDER_RADIUS = '8px';
15
+ export const DEFAULT_SPACING = '6px';
16
+ export const DEFAULT_ROW_HEADER_WIDTH = '160px';
17
+
18
+ export interface IDefaultMockupCol {
19
+ readonly title: string;
20
+ readonly color: string;
21
+ }
22
+
23
+ export interface IDefaultMockupRow {
24
+ readonly title: string;
25
+ readonly cells: readonly string[];
26
+ }
27
+
28
+ export const DEFAULT_MOCKUP_COLS: readonly IDefaultMockupCol[] = [
29
+ { title: 'COLUMN 1', color: '#354f82' },
30
+ { title: 'COLUMN 2', color: '#5b8bb3' },
31
+ { title: 'COLUMN 3', color: '#00a8a8' },
32
+ { title: 'COLUMN 4', color: '#00b884' },
33
+ { title: 'COLUMN 5', color: '#00875a' },
34
+ ];
35
+
36
+ export const DEFAULT_MOCKUP_ROWS: readonly IDefaultMockupRow[] = [
37
+ { title: 'ROW 1', cells: ['TEXT', 'TEXT', 'TEXT', 'TEXT', 'TEXT'] },
38
+ { title: 'ROW 2', cells: ['TEXT', 'TEXT', 'TEXT', 'TEXT', 'TEXT'] },
39
+ { title: 'ROW 3', cells: ['TEXT', 'TEXT', 'TEXT', 'TEXT', 'TEXT'] },
40
+ { title: 'ROW 4', cells: ['TEXT', 'TEXT', 'TEXT', 'TEXT', 'TEXT'] },
41
+ { title: 'ROW 5', cells: ['TEXT', 'TEXT', 'TEXT', 'TEXT', 'TEXT'] },
42
+ { title: 'ROW 6', cells: ['TEXT', 'TEXT', 'TEXT', 'TEXT', 'TEXT'] },
43
+ ];
44
+
45
+ /**
46
+ * Resolves a dimension input (number or string) into a CSS-ready unit string.
47
+ */
48
+ export function resolveDimension(
49
+ value: number | string | undefined,
50
+ defaultUnit = 'px',
51
+ ): string | undefined {
52
+ if (value === undefined || value === null) {
53
+ return undefined;
54
+ }
55
+
56
+ if (typeof value === 'number') {
57
+ return `${value}${defaultUnit}`;
58
+ }
59
+
60
+ const trimmed = value.trim();
61
+
62
+ if (!trimmed) {
63
+ return undefined;
64
+ }
65
+
66
+ // If already contains unit or percentage or calc/var, return as is
67
+ if (/^[+-]?\d+(\.\d+)?$/.test(trimmed)) {
68
+ return `${trimmed}${defaultUnit}`;
69
+ }
70
+
71
+ return trimmed;
72
+ }
@@ -0,0 +1,24 @@
1
+ import type { ComputedRef, InjectionKey } from 'vue';
2
+
3
+ export interface ITableComparisonContext {
4
+ readonly cellBg: ComputedRef<string>;
5
+ readonly cellColor: ComputedRef<string>;
6
+ readonly rowHeaderColor: ComputedRef<string>;
7
+ readonly rowHeaderTextColor: ComputedRef<string>;
8
+ readonly colHeaderTextColor: ComputedRef<string>;
9
+ readonly borderRadius: ComputedRef<string>;
10
+ readonly rowHeaderWidth: ComputedRef<string | undefined>;
11
+ readonly spacing: ComputedRef<string>;
12
+ readonly dense: ComputedRef<boolean>;
13
+ readonly animation: ComputedRef<boolean>;
14
+ }
15
+
16
+ export interface ITableComparisonColsContext {
17
+ readonly registerCol: () => number;
18
+ }
19
+
20
+ export const TABLE_COMPARISON_KEY: InjectionKey<ITableComparisonContext> =
21
+ Symbol('TABLE_COMPARISON_KEY');
22
+
23
+ export const TABLE_COMPARISON_COLS_KEY: InjectionKey<ITableComparisonColsContext> =
24
+ Symbol('TABLE_COMPARISON_COLS_KEY');
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './context';
@@ -43,7 +43,7 @@ function resolveValue<T>(val: Ref<T> | (() => T) | undefined, fallback: T): T {
43
43
 
44
44
  /**
45
45
  * Automatically computes a scale factor (via CSS transform: scale)
46
- * so that diagram components (ArrowTriad, QuadHub, ArcArrowProcess, etc.)
46
+ * so that diagram components (ArrowTriad, RectOrbitTetrad, ArcArrowProcess, etc.)
47
47
  * fit comfortably inside the available slide canvas without clipping or overlaying pagination.
48
48
  */
49
49
  export function useDiagramAutoScale(