zuljaman-banner-components 1.0.23 → 1.0.24
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 +228 -131
- package/dist/components/BannerRenderer/BannerRenderer.d.ts +8 -0
- package/dist/components/BannerRenderer/BannerRenderer.d.ts.map +1 -0
- package/dist/components/BannerRenderer/BannerRenderer.js +325 -0
- package/dist/components/BannerRenderer/components/CopyElement.d.ts +62 -0
- package/dist/components/BannerRenderer/components/CopyElement.d.ts.map +1 -0
- package/dist/components/BannerRenderer/components/CopyElement.js +220 -0
- package/dist/components/BannerRenderer/components/InteractiveLines.d.ts +26 -0
- package/dist/components/BannerRenderer/components/InteractiveLines.d.ts.map +1 -0
- package/dist/components/BannerRenderer/components/InteractiveLines.js +172 -0
- package/dist/components/BannerRenderer/components/LogoElement.d.ts +55 -0
- package/dist/components/BannerRenderer/components/LogoElement.d.ts.map +1 -0
- package/dist/components/BannerRenderer/components/LogoElement.js +53 -0
- package/dist/components/BannerRenderer/components/VisualGuides.d.ts +43 -0
- package/dist/components/BannerRenderer/components/VisualGuides.d.ts.map +1 -0
- package/dist/components/BannerRenderer/components/VisualGuides.js +110 -0
- package/dist/components/BannerRenderer/components/index.d.ts +12 -0
- package/dist/components/BannerRenderer/components/index.d.ts.map +1 -0
- package/dist/components/BannerRenderer/components/index.js +14 -0
- package/dist/components/BannerRenderer/constants.d.ts +15 -0
- package/dist/components/BannerRenderer/constants.d.ts.map +1 -0
- package/dist/components/BannerRenderer/constants.js +36 -0
- package/dist/components/BannerRenderer/hooks/index.d.ts +14 -0
- package/dist/components/BannerRenderer/hooks/index.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/index.js +16 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/debugPositions.d.ts +30 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/debugPositions.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/debugPositions.js +87 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/index.d.ts +13 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/index.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/index.js +21 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useAnchorEdgeLocking.d.ts +71 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useAnchorEdgeLocking.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useAnchorEdgeLocking.js +151 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useAutoPositioningMain.d.ts +66 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useAutoPositioningMain.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useAutoPositioningMain.js +332 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useChainPositioning.d.ts +61 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useChainPositioning.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useChainPositioning.js +180 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useHeightCompensation.d.ts +60 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useHeightCompensation.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning/useHeightCompensation.js +178 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning.d.ts +8 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useAutoPositioning.js +12 -0
- package/dist/components/BannerRenderer/hooks/useDragSnap.d.ts +30 -0
- package/dist/components/BannerRenderer/hooks/useDragSnap.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useDragSnap.js +90 -0
- package/dist/components/BannerRenderer/hooks/useElementRefs.d.ts +22 -0
- package/dist/components/BannerRenderer/hooks/useElementRefs.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useElementRefs.js +70 -0
- package/dist/components/BannerRenderer/hooks/useLineDrawing.d.ts +40 -0
- package/dist/components/BannerRenderer/hooks/useLineDrawing.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useLineDrawing.js +198 -0
- package/dist/components/BannerRenderer/hooks/useProximityDetection.d.ts +43 -0
- package/dist/components/BannerRenderer/hooks/useProximityDetection.d.ts.map +1 -0
- package/dist/components/BannerRenderer/hooks/useProximityDetection.js +491 -0
- package/dist/components/BannerRenderer/index.d.ts +6 -0
- package/dist/components/BannerRenderer/index.d.ts.map +1 -0
- package/dist/components/BannerRenderer/index.js +8 -0
- package/dist/components/{BannerRenderer.d.ts → BannerRenderer/types.d.ts} +29 -8
- package/dist/components/BannerRenderer/types.d.ts.map +1 -0
- package/dist/components/BannerRenderer/types.js +5 -0
- package/dist/components/BannerRenderer/utils/alignmentUtils.d.ts +38 -0
- package/dist/components/BannerRenderer/utils/alignmentUtils.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/alignmentUtils.js +138 -0
- package/dist/components/BannerRenderer/utils/elementCheckUtils.d.ts +22 -0
- package/dist/components/BannerRenderer/utils/elementCheckUtils.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/elementCheckUtils.js +37 -0
- package/dist/components/BannerRenderer/utils/elementIdUtils.d.ts +25 -0
- package/dist/components/BannerRenderer/utils/elementIdUtils.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/elementIdUtils.js +56 -0
- package/dist/components/BannerRenderer/utils/fontUtils.d.ts +12 -0
- package/dist/components/BannerRenderer/utils/fontUtils.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/fontUtils.js +26 -0
- package/dist/components/BannerRenderer/utils/graphUtils.d.ts +54 -0
- package/dist/components/BannerRenderer/utils/graphUtils.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/graphUtils.js +138 -0
- package/dist/components/BannerRenderer/utils/index.d.ts +12 -0
- package/dist/components/BannerRenderer/utils/index.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/index.js +27 -0
- package/dist/components/BannerRenderer/utils/snapUtils.d.ts +38 -0
- package/dist/components/BannerRenderer/utils/snapUtils.d.ts.map +1 -0
- package/dist/components/BannerRenderer/utils/snapUtils.js +109 -0
- package/dist/components/BannerVisor.d.ts.map +1 -1
- package/dist/components/BannerVisor.js +8 -1
- package/dist/components/index.js +1 -1
- package/dist/components/shared/DraggableElement.d.ts +11 -0
- package/dist/components/shared/DraggableElement.d.ts.map +1 -1
- package/dist/components/shared/DraggableElement.js +47 -51
- package/dist/components/styles/Style1/substyleConfig.d.ts.map +1 -1
- package/dist/components/styles/Style1/substyleConfig.js +53 -54
- package/dist/components/styles/Style2/substyleConfig.js +78 -78
- package/dist/components/styles/Style3/substyleConfig.d.ts.map +1 -1
- package/dist/components/styles/Style3/substyleConfig.js +40 -37
- package/dist/components/styles/Style4/substyleConfig.js +57 -57
- package/dist/components/styles/types/substyleTypes.d.ts +32 -15
- package/dist/components/styles/types/substyleTypes.d.ts.map +1 -1
- package/dist/components/styles/utils/chainValidation.d.ts +41 -0
- package/dist/components/styles/utils/chainValidation.d.ts.map +1 -0
- package/dist/components/styles/utils/chainValidation.js +148 -0
- package/dist/components/styles/utils/positioningUtils.d.ts +207 -11
- package/dist/components/styles/utils/positioningUtils.d.ts.map +1 -1
- package/dist/components/styles/utils/positioningUtils.js +520 -19
- package/dist/constants/characterLimits.d.ts +4 -16
- package/dist/constants/characterLimits.d.ts.map +1 -1
- package/dist/constants/characterLimits.js +28 -26
- package/dist/constants/styleConfigs.js +6 -6
- package/dist/styleConfig.d.ts +4 -4
- package/dist/styleConfig.d.ts.map +1 -1
- package/dist/styleConfig.js +8 -16
- package/dist/types.d.ts +42 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/BannerRenderer.d.ts.map +0 -1
- package/dist/components/BannerRenderer.js +0 -559
|
@@ -18,108 +18,108 @@ exports.STYLE2_SUBSTYLE_CONFIGS = {
|
|
|
18
18
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
19
19
|
y: -486, // 5% from top (54px) = -486px from center
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
copies: [
|
|
22
|
+
{
|
|
23
|
+
x: 0, // Centered horizontally (copy-0)
|
|
24
|
+
y: 432, // 10% from bottom (108px) = 432px from center
|
|
25
|
+
width: 950, // 88% of 1080px
|
|
26
|
+
alignment: 'center',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
x: 259, // 6% from right (65px), centered within 40% width (432px) = 259px from center (copy-1)
|
|
30
|
+
y: 432, // Same Y as copy-0, auto-positioning calculates offset
|
|
31
|
+
width: 432, // 40% of 1080px
|
|
32
|
+
alignment: 'center',
|
|
33
|
+
rotation: 3,
|
|
34
|
+
color: '#000000',
|
|
35
|
+
bgColor: '#FFFFFF',
|
|
36
|
+
hasBg: true,
|
|
37
|
+
paddingX: '1.25rem',
|
|
38
|
+
paddingY: '1rem',
|
|
39
|
+
borderRadius: '0.75rem',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
40
42
|
autoPositioning: true,
|
|
41
43
|
autoPositioningConfig: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
enabled: true,
|
|
45
|
+
links: [
|
|
46
|
+
{ fromElement: 'copy-0', toElement: 'copy-1', direction: 'up' },
|
|
47
|
+
],
|
|
45
48
|
},
|
|
46
49
|
gapRem: 2,
|
|
47
|
-
|
|
48
|
-
copy1: 1.0,
|
|
49
|
-
copy2: 0.40,
|
|
50
|
-
},
|
|
50
|
+
fontSizes: [1.0, 0.40],
|
|
51
51
|
},
|
|
52
52
|
2: {
|
|
53
53
|
logo: {
|
|
54
54
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
55
55
|
y: -486,
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
copies: [
|
|
58
|
+
{
|
|
59
|
+
x: 0, // copy-0
|
|
60
|
+
y: 432,
|
|
61
|
+
width: 950,
|
|
62
|
+
alignment: 'center',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
x: -259, // 6% from left (65px), centered within 40% width (432px) = -259px from center (copy-1)
|
|
66
|
+
y: -486, // Same Y as logo, auto-positioning calculates offset
|
|
67
|
+
width: 432,
|
|
68
|
+
alignment: 'center',
|
|
69
|
+
rotation: -3,
|
|
70
|
+
color: '#000000',
|
|
71
|
+
bgColor: '#FFFFFF',
|
|
72
|
+
hasBg: true,
|
|
73
|
+
paddingX: '1.25rem',
|
|
74
|
+
paddingY: '1rem',
|
|
75
|
+
borderRadius: '0.75rem',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
76
78
|
autoPositioning: true,
|
|
77
79
|
autoPositioningConfig: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
enabled: true,
|
|
81
|
+
links: [
|
|
82
|
+
{ fromElement: 'logo', toElement: 'copy-1', direction: 'down' },
|
|
83
|
+
],
|
|
81
84
|
},
|
|
82
85
|
gapRem: 2,
|
|
83
|
-
|
|
84
|
-
copy1: 1.0,
|
|
85
|
-
copy2: 0.40,
|
|
86
|
-
},
|
|
86
|
+
fontSizes: [1.0, 0.40],
|
|
87
87
|
},
|
|
88
88
|
3: {
|
|
89
89
|
logo: {
|
|
90
90
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
91
91
|
y: -486,
|
|
92
92
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
93
|
+
copies: [
|
|
94
|
+
{
|
|
95
|
+
x: 0, // copy-0
|
|
96
|
+
y: 432,
|
|
97
|
+
width: 950,
|
|
98
|
+
alignment: 'center',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
x: 259, // 6% from right (65px), centered within 40% width (432px) = 259px from center (copy-1)
|
|
102
|
+
y: -486, // Same Y as logo, auto-positioning calculates offset
|
|
103
|
+
width: 432,
|
|
104
|
+
alignment: 'center',
|
|
105
|
+
rotation: 3,
|
|
106
|
+
color: '#000000',
|
|
107
|
+
bgColor: '#FFFFFF',
|
|
108
|
+
hasBg: true,
|
|
109
|
+
paddingX: '1.25rem',
|
|
110
|
+
paddingY: '1rem',
|
|
111
|
+
borderRadius: '0.75rem',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
112
114
|
autoPositioning: true,
|
|
113
115
|
autoPositioningConfig: {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
enabled: true,
|
|
117
|
+
links: [
|
|
118
|
+
{ fromElement: 'logo', toElement: 'copy-1', direction: 'down' },
|
|
119
|
+
],
|
|
117
120
|
},
|
|
118
121
|
gapRem: 2,
|
|
119
|
-
|
|
120
|
-
copy1: 1.0,
|
|
121
|
-
copy2: 0.40,
|
|
122
|
-
},
|
|
122
|
+
fontSizes: [1.0, 0.40],
|
|
123
123
|
},
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style3/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style3/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAsElE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
|
|
@@ -15,69 +15,72 @@ const substyleUtils_1 = require("../utils/substyleUtils");
|
|
|
15
15
|
exports.STYLE3_SUBSTYLE_CONFIGS = {
|
|
16
16
|
1: {
|
|
17
17
|
logo: {
|
|
18
|
-
x: 14, // Centered with
|
|
18
|
+
x: 14, // Centered with copy-0 (124 - logoWidth/2)
|
|
19
19
|
y: -216, // 30% from top (324px) = -216px from center
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
copies: [
|
|
22
|
+
{
|
|
23
|
+
x: 124, // 6% from right, centered within 65% width = 124px from center (copy-0)
|
|
24
|
+
y: -216, // Same Y as logo, auto-positioning calculates offset
|
|
25
|
+
width: 702, // 65% of 1080px
|
|
26
|
+
alignment: 'center',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
27
29
|
autoPositioning: true,
|
|
28
30
|
autoPositioningConfig: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
enabled: true,
|
|
32
|
+
links: [
|
|
33
|
+
{ fromElement: 'logo', toElement: 'copy-0', direction: 'down' },
|
|
34
|
+
],
|
|
32
35
|
},
|
|
33
36
|
gapRem: 1.5,
|
|
34
|
-
|
|
35
|
-
copy1: 0.60,
|
|
36
|
-
},
|
|
37
|
+
fontSizes: [0.60],
|
|
37
38
|
},
|
|
38
39
|
2: {
|
|
39
40
|
logo: {
|
|
40
41
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
41
42
|
y: 380, // 15% from bottom (162px) = 378px from center
|
|
42
43
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
copies: [
|
|
45
|
+
{
|
|
46
|
+
x: 0, // Centered horizontally (copy-0)
|
|
47
|
+
y: 380, // Same Y as logo, auto-positioning calculates offset
|
|
48
|
+
width: 702, // 65% of 1080px
|
|
49
|
+
alignment: 'center',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
49
52
|
autoPositioning: true,
|
|
50
53
|
autoPositioningConfig: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
enabled: true,
|
|
55
|
+
links: [
|
|
56
|
+
{ fromElement: 'logo', toElement: 'copy-0', direction: 'up' },
|
|
57
|
+
],
|
|
54
58
|
},
|
|
55
59
|
gapRem: 1.5,
|
|
56
|
-
|
|
57
|
-
copy1: 0.60,
|
|
58
|
-
},
|
|
60
|
+
fontSizes: [0.60],
|
|
59
61
|
},
|
|
60
62
|
3: {
|
|
61
63
|
logo: {
|
|
62
64
|
x: 254, // 6% from right edge, logo left edge = 254px from center
|
|
63
65
|
y: 380, // 15% from bottom (162px) = 378px from center
|
|
64
66
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
copies: [
|
|
68
|
+
{
|
|
69
|
+
x: 313, // 6% from right, centered within 30% width = 313px from center (copy-0)
|
|
70
|
+
y: 380, // Same Y as logo, auto-positioning calculates offset
|
|
71
|
+
width: 324, // 30% of 1080px
|
|
72
|
+
alignment: 'left',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
71
75
|
autoPositioning: true,
|
|
72
76
|
autoPositioningConfig: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
enabled: true,
|
|
78
|
+
links: [
|
|
79
|
+
{ fromElement: 'logo', toElement: 'copy-0', direction: 'up' },
|
|
80
|
+
],
|
|
76
81
|
},
|
|
77
82
|
gapRem: 1.5,
|
|
78
|
-
|
|
79
|
-
copy1: 0.60,
|
|
80
|
-
},
|
|
83
|
+
fontSizes: [0.60],
|
|
81
84
|
},
|
|
82
85
|
};
|
|
83
86
|
/**
|
|
@@ -18,87 +18,87 @@ exports.STYLE4_SUBSTYLE_CONFIGS = {
|
|
|
18
18
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
19
19
|
y: 380, // 15% from bottom (162px) = 378px from center
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
copies: [
|
|
22
|
+
{
|
|
23
|
+
x: 0, // Centered horizontally (copy-0)
|
|
24
|
+
y: -486, // Same Y as copy-1, auto-positioning calculates offset
|
|
25
|
+
width: 972, // 90% of 1080px
|
|
26
|
+
alignment: 'center',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
x: 0, // Centered horizontally (copy-1)
|
|
30
|
+
y: -486, // 5% from top (54px) = -486px from center
|
|
31
|
+
width: 950, // 88% of 1080px
|
|
32
|
+
alignment: 'center',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
33
35
|
autoPositioning: true,
|
|
34
36
|
autoPositioningConfig: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
enabled: true,
|
|
38
|
+
links: [
|
|
39
|
+
{ fromElement: 'copy-1', toElement: 'copy-0', direction: 'down' },
|
|
40
|
+
],
|
|
38
41
|
},
|
|
39
42
|
gapRem: 0.15,
|
|
40
|
-
|
|
41
|
-
copy1: 1.6,
|
|
42
|
-
copy2: 0.60,
|
|
43
|
-
},
|
|
43
|
+
fontSizes: [1.6, 0.60],
|
|
44
44
|
},
|
|
45
45
|
2: {
|
|
46
46
|
logo: {
|
|
47
47
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
48
48
|
y: 380, // 15% from bottom (162px) = 378px from center
|
|
49
49
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
copies: [
|
|
51
|
+
{
|
|
52
|
+
x: 0, // Centered horizontally (copy-0)
|
|
53
|
+
y: -136, // 37.4% from top (404px) = -136px from center
|
|
54
|
+
width: 972, // 90% of 1080px
|
|
55
|
+
alignment: 'center',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
x: 0, // Centered horizontally (copy-1)
|
|
59
|
+
y: -136, // Same Y as copy-0, auto-positioning calculates offset
|
|
60
|
+
width: 950, // 88% of 1080px
|
|
61
|
+
alignment: 'center',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
62
64
|
autoPositioning: true,
|
|
63
65
|
autoPositioningConfig: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
enabled: true,
|
|
67
|
+
links: [
|
|
68
|
+
{ fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
|
|
69
|
+
],
|
|
67
70
|
},
|
|
68
71
|
gapRem: 1,
|
|
69
|
-
|
|
70
|
-
copy1: 1.75,
|
|
71
|
-
copy2: 0.60,
|
|
72
|
-
},
|
|
72
|
+
fontSizes: [1.75, 0.60],
|
|
73
73
|
},
|
|
74
74
|
3: {
|
|
75
75
|
logo: {
|
|
76
76
|
x: -110, // Centered horizontally (logo left edge offset for centerOrigin: false)
|
|
77
77
|
y: 380, // 15% from bottom (162px) = 378px from center
|
|
78
78
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
copies: [
|
|
80
|
+
{
|
|
81
|
+
x: 0, // Centered horizontally (copy-0)
|
|
82
|
+
y: -281, // 24% from top (259px) = -281px from center
|
|
83
|
+
width: 972, // 90% of 1080px
|
|
84
|
+
alignment: 'center',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
x: 0, // Centered horizontally (copy-1)
|
|
88
|
+
y: -281, // Same Y as copy-0, auto-positioning calculates offset
|
|
89
|
+
width: 950, // 88% of 1080px
|
|
90
|
+
alignment: 'center',
|
|
91
|
+
},
|
|
92
|
+
],
|
|
91
93
|
autoPositioning: true,
|
|
92
94
|
autoPositioningConfig: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
enabled: true,
|
|
96
|
+
links: [
|
|
97
|
+
{ fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
|
|
98
|
+
],
|
|
96
99
|
},
|
|
97
100
|
gapRem: 1,
|
|
98
|
-
|
|
99
|
-
copy1: 1.75,
|
|
100
|
-
copy2: 0.60,
|
|
101
|
-
},
|
|
101
|
+
fontSizes: [1.75, 0.60],
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
@@ -27,23 +27,39 @@ export interface CopyElementConfig {
|
|
|
27
27
|
borderRadius?: string;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* Defines
|
|
30
|
+
* Single link in the auto-positioning chain
|
|
31
|
+
* Defines a positioning relationship between two elements
|
|
32
|
+
* Element names use format: 'logo', 'copy-N' where N is the styleSlot (e.g., 'copy-0', 'copy-1', 'copy-2')
|
|
33
|
+
* Note: styleSlot 0 is the first copy, styleSlot 1 is the second copy, etc.
|
|
32
34
|
*/
|
|
33
|
-
export interface
|
|
34
|
-
/** Element that serves as the reference point
|
|
35
|
-
|
|
36
|
-
/** Element that will be positioned relative to
|
|
37
|
-
|
|
38
|
-
/** Direction from
|
|
35
|
+
export interface AutoPositioningLink {
|
|
36
|
+
/** Element that serves as the reference point for this link */
|
|
37
|
+
fromElement: string;
|
|
38
|
+
/** Element that will be positioned relative to fromElement */
|
|
39
|
+
toElement: string;
|
|
40
|
+
/** Direction from fromElement to toElement */
|
|
39
41
|
direction: 'up' | 'down' | 'left' | 'right';
|
|
42
|
+
/** Optional: Custom gap for this specific link (overrides global gapRem) */
|
|
43
|
+
gapRem?: number;
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* Auto-positioning configuration (chain-based approach)
|
|
47
|
+
* Supports multiple elements in a chain (e.g., anchor → target1 → target2)
|
|
48
|
+
*
|
|
49
|
+
* Example for 3-element chain:
|
|
50
|
+
* {
|
|
51
|
+
* enabled: true,
|
|
52
|
+
* links: [
|
|
53
|
+
* { fromElement: 'copy-0', toElement: 'copy-1', direction: 'up' },
|
|
54
|
+
* { fromElement: 'copy-1', toElement: 'copy-2', direction: 'up' },
|
|
55
|
+
* ]
|
|
56
|
+
* }
|
|
43
57
|
*/
|
|
44
|
-
export interface
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
export interface AutoPositioningConfig {
|
|
59
|
+
/** Whether auto-positioning is enabled for this chain */
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
/** Array of positioning links that define the chain */
|
|
62
|
+
links: AutoPositioningLink[];
|
|
47
63
|
}
|
|
48
64
|
/**
|
|
49
65
|
* Complete substyle configuration
|
|
@@ -51,15 +67,16 @@ export interface FontSizeConfig {
|
|
|
51
67
|
*/
|
|
52
68
|
export interface SubstyleConfig {
|
|
53
69
|
logo: LogoConfig;
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
/** Array of copy configurations (index 0 = first copy, index 1 = second copy, etc.) */
|
|
71
|
+
copies: CopyElementConfig[];
|
|
56
72
|
/** Enable automatic positioning of elements relative to each other */
|
|
57
73
|
autoPositioning?: boolean;
|
|
58
74
|
/** Configuration for automatic positioning (anchor, target, direction) */
|
|
59
75
|
autoPositioningConfig?: AutoPositioningConfig;
|
|
60
76
|
/** Gap in rem units between auto-positioned elements */
|
|
61
77
|
gapRem?: number;
|
|
62
|
-
|
|
78
|
+
/** Font size multipliers per copy (index matches copies array) */
|
|
79
|
+
fontSizes?: number[];
|
|
63
80
|
}
|
|
64
81
|
/**
|
|
65
82
|
* Collection of substyle configurations indexed by substyle number
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"substyleTypes.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/types/substyleTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"substyleTypes.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/types/substyleTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5C,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,uFAAuF;IACvF,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,sEAAsE;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chain validation utilities for auto-positioning
|
|
3
|
+
* Provides validation, graph building, and topological sorting for positioning chains
|
|
4
|
+
*/
|
|
5
|
+
import { AutoPositioningLink } from '../types/substyleTypes';
|
|
6
|
+
export interface ValidationResult {
|
|
7
|
+
valid: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Build a dependency graph from positioning links
|
|
12
|
+
* Returns a Map where key = element ID, value = array of dependent element IDs
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildDependencyGraph(links: AutoPositioningLink[]): Map<string, string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Validate chain configuration for errors
|
|
17
|
+
* Checks for:
|
|
18
|
+
* - Circular dependencies
|
|
19
|
+
* - Empty links array
|
|
20
|
+
* - Duplicate links
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateChainConfiguration(links: AutoPositioningLink[]): ValidationResult;
|
|
23
|
+
/**
|
|
24
|
+
* Perform topological sort on the dependency graph
|
|
25
|
+
* Returns elements in calculation order (roots first, then dependencies)
|
|
26
|
+
*/
|
|
27
|
+
export declare function topologicalSort(graph: Map<string, string[]>): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Find elements that have no incoming links (root/anchor elements)
|
|
30
|
+
*/
|
|
31
|
+
export declare function findRootElements(links: AutoPositioningLink[]): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Find the incoming link for a given element (the link where element is the "to")
|
|
34
|
+
*/
|
|
35
|
+
export declare function findIncomingLink(links: AutoPositioningLink[], elementId: string): AutoPositioningLink | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Find orphaned elements after links are removed
|
|
38
|
+
* Returns elements that are referenced in remaining copies but not in any link
|
|
39
|
+
*/
|
|
40
|
+
export declare function findOrphanedElements(links: AutoPositioningLink[], allElementIds: string[]): string[];
|
|
41
|
+
//# sourceMappingURL=chainValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/utils/chainValidation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAiBxF;AA6BD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,CAoCzF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAwBtE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAYvE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,mBAAmB,EAAE,EAC5B,SAAS,EAAE,MAAM,GAChB,mBAAmB,GAAG,SAAS,CAEjC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAAE,EAC5B,aAAa,EAAE,MAAM,EAAE,GACtB,MAAM,EAAE,CASV"}
|