@cntrl-site/components 1.0.106-alpha.0 → 1.0.107-alpha.0
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/dist/ClickGallerie-CYQMgrIr.js +36 -0
- package/dist/ClickGallerie-o2U6oyOF.mjs +272 -0
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +2 -1
- package/dist/Components/Helix/Helix.d.ts +4 -1
- package/dist/Components/Hive/Hive.d.ts +4 -1
- package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +2 -1
- package/dist/Components/List/List.d.ts +6 -2
- package/dist/Components/Marquee/Marquee.d.ts +6 -2
- package/dist/Components/MarqueeText/MarqueeText.d.ts +2 -1
- package/dist/Components/Mercury/Mercury.d.ts +4 -1
- package/dist/Components/Waterfall/WaterfallLightbox.d.ts +4 -1
- package/dist/Components/utils/EmbedMediaFrame.d.ts +27 -0
- package/dist/Components/utils/LinkWrapper.d.ts +16 -0
- package/dist/Components/utils/embedMedia.d.ts +40 -0
- package/dist/Components/utils/index.d.ts +6 -0
- package/dist/{ControlSlider-SiOt22l_.js → ControlSlider-Kkec-i14.js} +1 -1
- package/dist/{ControlSlider-pZv7H6BU.mjs → ControlSlider-LcZmviGX.mjs} +1 -1
- package/dist/EmbedMediaFrame-DsOTKE4i.js +1 -0
- package/dist/EmbedMediaFrame-DwHeOAy5.mjs +164 -0
- package/dist/{FAQ-C7823fyi.js → FAQ-BxhMo7T8.js} +1 -1
- package/dist/{FAQ-CZ39u4m8.mjs → FAQ-CdwSft5p.mjs} +1 -1
- package/dist/Grid-CFHTP3mb.js +378 -0
- package/dist/Grid-e-gLfsji.mjs +1590 -0
- package/dist/Helix-BpLo9FD3.js +43 -0
- package/dist/Helix-CidI3ucE.mjs +324 -0
- package/dist/{Hive-D6-R6TwM.mjs → Hive-BsmFHk2i.mjs} +505 -475
- package/dist/Hive-D1j6wZpV.js +321 -0
- package/dist/ImageRevealSlider-BuukTGAK.js +1 -0
- package/dist/{ImageRevealSlider-BdFGyVEP.mjs → ImageRevealSlider-Df9sygk9.mjs} +63 -70
- package/dist/{Lightbox-eP9qAZzL.mjs → Lightbox-C_fXsfdz.mjs} +1 -1
- package/dist/{Lightbox-CIss_nOG.js → Lightbox-DaunVrkp.js} +1 -1
- package/dist/LinkWrapper-Ca84iPtg.js +1 -0
- package/dist/LinkWrapper-DZs9hlOn.mjs +13 -0
- package/dist/{List-DW7fyJbf.mjs → List-Bh_-l9vD.mjs} +532 -520
- package/dist/List-DVvpQ24J.js +377 -0
- package/dist/Marquee-DByooiWP.mjs +578 -0
- package/dist/Marquee-DfIP-tIN.js +133 -0
- package/dist/{MarqueeText-Rzt2fJYt.mjs → MarqueeText-D6FNCe6P.mjs} +115 -114
- package/dist/MarqueeText-DsUiV6Zv.js +132 -0
- package/dist/Mercury-B-s2Kvuq.js +267 -0
- package/dist/Mercury-CCW0Es-s.mjs +1700 -0
- package/dist/PretextComponent-Dnbenstn.js +1 -0
- package/dist/{PretextComponent-j-OsRZTx.mjs → PretextComponent-OygSO3fr.mjs} +312 -269
- package/dist/{RichTextRenderer-B6WtTYlR.mjs → RichTextRenderer-BptwNpbJ.mjs} +10 -9
- package/dist/RichTextRenderer-K90Dd7pt.js +1 -0
- package/dist/{Slider20-Dm8BeCli.mjs → Slider20-CCzixTiN.mjs} +1 -1
- package/dist/{Slider20-C9o2REDl.js → Slider20-fMVeRfgx.js} +1 -1
- package/dist/{TestimonialGrid-CPu4qQ6B.mjs → TestimonialGrid-CbsVxSn9.mjs} +1 -1
- package/dist/{TestimonialGrid-D4ieiz9e.js → TestimonialGrid-CiCagfBU.js} +1 -1
- package/dist/{TestimonialSingle-DLdnAVF7.mjs → TestimonialSingle-BVm3Amrl.mjs} +1 -1
- package/dist/{TestimonialSingle-CVu15ZtV.js → TestimonialSingle-BWXynGjv.js} +1 -1
- package/dist/Waterfall-3kKioKh2.mjs +1432 -0
- package/dist/Waterfall-DII4-WV5.js +288 -0
- package/dist/{components-D2LyuDm-.mjs → components-BRmbflgg.mjs} +15 -15
- package/dist/components-nvbH4l0S.js +1 -0
- package/dist/content/postFieldBindings.d.ts +29 -0
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +16 -16
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +52 -15
- package/dist/sources.js +312 -212
- package/dist/sources.mjs +312 -212
- package/dist/types/SchemaV1.d.ts +53 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +30 -20
- package/package.json +1 -1
- package/dist/ClickGallerie-D7g093HX.js +0 -36
- package/dist/ClickGallerie-QSOQjSdv.mjs +0 -271
- package/dist/Grid-BBpdl60K.js +0 -374
- package/dist/Grid-DS53S_gA.mjs +0 -1576
- package/dist/Helix-BPn9V1sg.mjs +0 -315
- package/dist/Helix-DcgsCc4D.js +0 -43
- package/dist/Hive-n8Fz-j3o.js +0 -321
- package/dist/ImageRevealSlider-BBWtFjUF.js +0 -1
- package/dist/List-C32WImI3.js +0 -377
- package/dist/Marquee-DOIRRCu4.js +0 -133
- package/dist/Marquee-O_PDwlIb.mjs +0 -564
- package/dist/MarqueeText-DkaO2lQ5.js +0 -132
- package/dist/Mercury-C9D10TTT.mjs +0 -1702
- package/dist/Mercury-DynO-NxY.js +0 -267
- package/dist/PretextComponent-BnsS2zJ6.js +0 -1
- package/dist/RichTextRenderer-CIy6yI8U.js +0 -1
- package/dist/Waterfall-DC2WQ3GT.js +0 -287
- package/dist/Waterfall-Yud2VR62.mjs +0 -1404
- package/dist/components-B9Vdjf0w.js +0 -1
package/dist/List-C32WImI3.js
DELETED
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),u=require("react"),_o=require("react-dom"),P=require("./scalingValue-CSHYgTZl.js"),Oo=require("./buildColorVars-CE2D5cQV.js"),No=require("./useScopedStyles-Bf6yohVQ.js"),Be=require("./textStylesToCss-CNN3zZTV.js");function Fo(t){if(t.type==="video")return!0;if(t.type==="image")return!1;const e=t.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t.assetId)}function Ho({media:t,className:e,style:o}){const n=u.useRef(null);return u.useEffect(()=>{if(!t.isVideo)return;const r=n.current;if(!r)return;const a=r.play();a&&a.catch(()=>{})},[t.isVideo,t.assetId]),t.isVideo?p.jsx("video",{ref:n,className:e,src:t.assetId,style:o,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):p.jsx("img",{className:e,src:t.assetId,alt:"",style:o})}function te(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Vo(t){return String(t??"").trim().length>0}function Se(t,e){const o=t.currentTarget,n=o.getBoundingClientRect(),r=t.clientY-n.top>n.height/2;o.classList.toggle(`${e}-reveal-from-bottom`,r)}function Me(t,e){const o=t.currentTarget,n=o.getBoundingClientRect(),r=t.clientY<n.top+n.height/2;o.classList.toggle(`${e}-reveal-from-bottom`,r)}function _e(t,e,o,n,r,a,s){const h=P.scalingValue(a,s),f=P.scalingValue(0,s),i=t===0,v=t===e-1&&!r;return{borderTopWidth:i&&o?h:f,borderBottomWidth:!v||n?h:f}}function jo(t,e,o){const n=P.scalingValue(e,o),r=P.scalingValue(0,o);return{borderTopWidth:r,borderBottomWidth:t?n:r}}const Oe=10,Ne=10,yt={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Do(t,e,o){return Math.max(e,Math.min(o,t))}function ee(t,e,o){return t+(e-t)*o}function Io(t,e,o,n){if(!e)return{x:0,y:0};const r=e.getBoundingClientRect(),a=r.top+r.height/2;if(t==="cursor"&&o)return{x:o.clientX+Oe,y:o.clientY+Oe};switch(t){case"left":return{x:r.left+Ne+n/2,y:a};case"center":return{x:r.left+r.width/2,y:a};case"right":return{x:r.right-Ne-n/2,y:a};default:return{x:r.left+r.width/2,y:a}}}function Ko(t,e){const o=u.useRef(null),n=u.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),r=u.useRef(null),a=u.useCallback(()=>{const c=o.current,R=n.current;c&&(c.style.transform=`translate3d(${R.x}px, ${R.y}px, 0) translate(-50%, -50%) rotate(${R.rotation.toFixed(3)}deg)`)},[]),s=u.useCallback(()=>{r.current!==null&&(cancelAnimationFrame(r.current),r.current=null)},[]),h=u.useCallback(()=>{const c=n.current;e?(c.x=ee(c.x,c.targetX,yt.positionEase),c.y=ee(c.y,c.targetY,yt.positionEase),c.rotation=ee(c.rotation,c.targetRotation,yt.rotationEase)):(c.x=c.targetX,c.y=c.targetY,c.rotation=c.targetRotation),a();const R=Math.abs(c.x-c.targetX)<.4&&Math.abs(c.y-c.targetY)<.4,y=Math.abs(c.rotation-c.targetRotation)<.08;!R||!y?r.current=requestAnimationFrame(h):r.current=null},[a,e]),f=u.useCallback(()=>{r.current===null&&(r.current=requestAnimationFrame(h))},[h]),i=u.useCallback((c,R)=>{const y=n.current;y.targetX=c,y.targetY=R,y.targetRotation=0,y.x=c,y.y=R,y.rotation=0,y.lastX=c,y.hasLastX=!0,a(),e&&f()},[a,e,f]),v=u.useCallback((c,R)=>{if(!t)return;const y=n.current;if(e&&y.hasLastX){const V=c-y.lastX;y.targetRotation=Do(V*yt.rotationFactor,-20,yt.maxRotation)}else y.targetRotation=0;if(y.lastX=c,y.hasLastX=!0,y.targetX=c,y.targetY=R,e){f();return}y.x=c,y.y=R,y.rotation=y.targetRotation,a()},[t,a,e,f]),T=u.useCallback(c=>{s(),n.current.hasLastX=!1,c==null||c()},[s]),_=u.useCallback(()=>{s(),n.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},o.current&&(o.current.style.transform="")},[s]);return u.useEffect(()=>(t||_(),s),[t,_,s]),{anchorRef:o,onShow:i,onCursorMove:v,exit:T,reset:_}}function Xo(t){return`
|
|
2
|
-
.${t}-wrapper {
|
|
3
|
-
display: grid;
|
|
4
|
-
align-items: start;
|
|
5
|
-
min-height: ${te(48)};
|
|
6
|
-
position: relative;
|
|
7
|
-
overflow: visible;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.${t}-hover-media-anchor {
|
|
12
|
-
position: fixed;
|
|
13
|
-
left: 0;
|
|
14
|
-
top: 0;
|
|
15
|
-
z-index: 9997;
|
|
16
|
-
pointer-events: none;
|
|
17
|
-
will-change: transform;
|
|
18
|
-
transform-origin: center center;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.${t}-hover-image,
|
|
22
|
-
.${t}-hover-video {
|
|
23
|
-
position: relative;
|
|
24
|
-
display: block;
|
|
25
|
-
pointer-events: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.${t}-list-item {
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: stretch;
|
|
32
|
-
width: 100%;
|
|
33
|
-
overflow: visible;
|
|
34
|
-
position: relative;
|
|
35
|
-
box-sizing: content-box;
|
|
36
|
-
user-select: none;
|
|
37
|
-
background: var(--${t}-background-color);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.${t}-wrapper.${t}-divider-top .${t}-list-item {
|
|
41
|
-
border-top-style: solid;
|
|
42
|
-
border-top-color: var(--${t}-divider-color);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.${t}-wrapper.${t}-divider-bottom .${t}-list-item {
|
|
46
|
-
border-bottom-style: solid;
|
|
47
|
-
border-bottom-color: var(--${t}-divider-color);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.${t}-list-cols-row {
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: start;
|
|
53
|
-
width: 100%;
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.${t}-list-cols-row-h {
|
|
58
|
-
align-items: stretch;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.${t}-list-cols-row-h [data-list-col] {
|
|
62
|
-
display: grid;
|
|
63
|
-
grid-template-rows: minmax(0, 1fr);
|
|
64
|
-
align-self: stretch;
|
|
65
|
-
min-height: min-content;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.${t}-list-cols-row-h .${t}-list-col {
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
align-items: flex-start;
|
|
72
|
-
justify-content: flex-start;
|
|
73
|
-
width: 100%;
|
|
74
|
-
min-height: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.${t}-list-cols-row-h .${t}-list-col-title {
|
|
78
|
-
display: block;
|
|
79
|
-
flex: 0 0 auto;
|
|
80
|
-
align-self: stretch;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.${t}-text-tight-leading {
|
|
84
|
-
display: block;
|
|
85
|
-
flex-shrink: 0;
|
|
86
|
-
padding-top: var(--${t}-title-leading-gap, 0);
|
|
87
|
-
padding-bottom: var(--${t}-title-leading-gap, 0);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.${t}-wrapper.${t}-type-b .${t}-list-cols-row {
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
align-items: stretch;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.${t}-wrapper.${t}-type-b .${t}-list-col {
|
|
96
|
-
width: 100%;
|
|
97
|
-
min-width: 0;
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
justify-content: flex-start;
|
|
100
|
-
align-items: flex-start;
|
|
101
|
-
min-height: min-content;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.${t}-wrapper.${t}-type-b .${t}-list-col-title {
|
|
105
|
-
display: block;
|
|
106
|
-
flex: 0 0 auto;
|
|
107
|
-
align-self: stretch;
|
|
108
|
-
text-align: center;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.${t}-wrapper.${t}-type-b .${t}-cut-item .${t}-list-cols-row {
|
|
112
|
-
flex-direction: row;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.${t}-wrapper.${t}-type-b .${t}-cut-label {
|
|
116
|
-
box-sizing: border-box;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.${t}-wrapper.${t}-type-b .${t}-list-col-last {
|
|
120
|
-
flex: 0 0 auto;
|
|
121
|
-
min-width: 0;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
a.${t}-list-item {
|
|
125
|
-
text-decoration: none;
|
|
126
|
-
color: inherit;
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.${t}-list-col {
|
|
131
|
-
flex-shrink: 0;
|
|
132
|
-
overflow: visible;
|
|
133
|
-
box-sizing: border-box;
|
|
134
|
-
min-width: ${te(50)};
|
|
135
|
-
position: relative;
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: flex-start;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.${t}-list-col-last {
|
|
141
|
-
flex: 1 1 auto;
|
|
142
|
-
min-width: ${te(50)};
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.${t}-list-col-title {
|
|
146
|
-
color: var(--${t}-text-color);
|
|
147
|
-
white-space: pre-wrap;
|
|
148
|
-
overflow-wrap: anywhere;
|
|
149
|
-
word-break: break-word;
|
|
150
|
-
flex: 1;
|
|
151
|
-
min-width: 0;
|
|
152
|
-
width: 100%;
|
|
153
|
-
box-sizing: border-box;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.${t}-baseline-probe {
|
|
157
|
-
display: inline-block;
|
|
158
|
-
width: 0;
|
|
159
|
-
height: 0;
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
vertical-align: baseline;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.${t}-col-resize-handle,
|
|
165
|
-
.${t}-control-anchor {
|
|
166
|
-
background: transparent;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.${t}-control-anchor {
|
|
170
|
-
position: absolute;
|
|
171
|
-
pointer-events: none;
|
|
172
|
-
z-index: 2;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.${t}-row-padding-handle {
|
|
176
|
-
width: 100%;
|
|
177
|
-
flex-shrink: 0;
|
|
178
|
-
background: transparent;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.${t}-list-col-wrap {
|
|
182
|
-
position: relative;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.${t}-list-cols-row-controls {
|
|
186
|
-
position: relative;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link,
|
|
190
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link,
|
|
191
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link,
|
|
192
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-item,
|
|
193
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item,
|
|
194
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item {
|
|
195
|
-
transition: background-color 250ms, border-color 250ms;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link .${t}-list-col-title,
|
|
199
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link .${t}-list-col-title,
|
|
200
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link .${t}-list-col-title,
|
|
201
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-label,
|
|
202
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-label,
|
|
203
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-label {
|
|
204
|
-
transition: color 250ms;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link:hover,
|
|
208
|
-
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link,
|
|
209
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-item:hover,
|
|
210
|
-
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item {
|
|
211
|
-
background: var(--${t}-background-hover-color);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item-has-link:hover,
|
|
215
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
|
|
216
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default:has(.${t}-cut-item:hover) .${t}-list-item-before-cut,
|
|
217
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link,
|
|
218
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-cut-item:hover,
|
|
219
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item,
|
|
220
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item-has-link:hover,
|
|
221
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
|
|
222
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds:has(.${t}-cut-item:hover) .${t}-list-item-before-cut,
|
|
223
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link,
|
|
224
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-cut-item:hover,
|
|
225
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item,
|
|
226
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item-has-link:hover,
|
|
227
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
|
|
228
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal:has(.${t}-cut-item:hover) .${t}-list-item-before-cut,
|
|
229
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link,
|
|
230
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-cut-item:hover,
|
|
231
|
-
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item {
|
|
232
|
-
border-bottom-color: var(--${t}-divider-hover-color);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default .${t}-list-item-has-link:hover:first-child,
|
|
236
|
-
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
237
|
-
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds .${t}-list-item-has-link:hover:first-child,
|
|
238
|
-
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
239
|
-
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-reveal .${t}-list-item-has-link:hover:first-child,
|
|
240
|
-
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link:first-child {
|
|
241
|
-
border-top-color: var(--${t}-divider-hover-color);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item-has-link:hover:first-child,
|
|
245
|
-
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
246
|
-
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item-has-link:hover:first-child,
|
|
247
|
-
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
248
|
-
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item-has-link:hover:first-child,
|
|
249
|
-
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link:first-child {
|
|
250
|
-
border-top-color: var(--${t}-divider-hover-color);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link:hover .${t}-list-col-title,
|
|
254
|
-
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
|
|
255
|
-
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-item:hover .${t}-cut-label,
|
|
256
|
-
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item .${t}-cut-label,
|
|
257
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link:hover .${t}-list-col-title,
|
|
258
|
-
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
|
|
259
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item:hover .${t}-cut-label,
|
|
260
|
-
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item .${t}-cut-label,
|
|
261
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link:hover .${t}-list-col-title,
|
|
262
|
-
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
|
|
263
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item:hover .${t}-cut-label,
|
|
264
|
-
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item .${t}-cut-label {
|
|
265
|
-
color: var(--${t}-text-hover-color);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link::before,
|
|
269
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item::before {
|
|
270
|
-
content: '';
|
|
271
|
-
position: absolute;
|
|
272
|
-
inset: 0;
|
|
273
|
-
background: var(--${t}-background-hover-color);
|
|
274
|
-
transform: scaleY(0);
|
|
275
|
-
transform-origin: center center;
|
|
276
|
-
opacity: 0;
|
|
277
|
-
transition: opacity 150ms, transform 0s 250ms;
|
|
278
|
-
z-index: 0;
|
|
279
|
-
pointer-events: none;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-col,
|
|
283
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-label {
|
|
284
|
-
position: relative;
|
|
285
|
-
z-index: 1;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link:hover::before,
|
|
289
|
-
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link::before,
|
|
290
|
-
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item:hover::before,
|
|
291
|
-
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item::before {
|
|
292
|
-
transform: scaleY(1);
|
|
293
|
-
opacity: 1;
|
|
294
|
-
transition: transform 250ms, opacity 250ms;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link::before,
|
|
298
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item::before {
|
|
299
|
-
content: '';
|
|
300
|
-
position: absolute;
|
|
301
|
-
inset: 0;
|
|
302
|
-
background: var(--${t}-background-hover-color);
|
|
303
|
-
transform: scaleY(0);
|
|
304
|
-
transform-origin: bottom center;
|
|
305
|
-
transition: transform 120ms;
|
|
306
|
-
z-index: 0;
|
|
307
|
-
pointer-events: none;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-col,
|
|
311
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-label {
|
|
312
|
-
position: relative;
|
|
313
|
-
z-index: 1;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link:hover::before,
|
|
317
|
-
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link::before,
|
|
318
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item:hover::before,
|
|
319
|
-
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item::before {
|
|
320
|
-
transform: scaleY(1);
|
|
321
|
-
transform-origin: top center;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom::before,
|
|
325
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom::before {
|
|
326
|
-
transform-origin: top center;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom:hover::before,
|
|
330
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom.${t}-state-hover::before,
|
|
331
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom:hover::before,
|
|
332
|
-
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom.${t}-state-hover::before {
|
|
333
|
-
transform-origin: bottom center;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.${t}-cut-item {
|
|
337
|
-
display: flex;
|
|
338
|
-
align-items: stretch;
|
|
339
|
-
width: 100%;
|
|
340
|
-
overflow: visible;
|
|
341
|
-
position: relative;
|
|
342
|
-
z-index: 3;
|
|
343
|
-
box-sizing: border-box;
|
|
344
|
-
user-select: none;
|
|
345
|
-
background: var(--${t}-background-color);
|
|
346
|
-
cursor: pointer;
|
|
347
|
-
padding: 0;
|
|
348
|
-
border: none;
|
|
349
|
-
font: inherit;
|
|
350
|
-
text-align: inherit;
|
|
351
|
-
appearance: none;
|
|
352
|
-
-webkit-appearance: none;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.${t}-cut-item .${t}-list-cols-row {
|
|
356
|
-
flex: 1;
|
|
357
|
-
min-height: 100%;
|
|
358
|
-
width: 100%;
|
|
359
|
-
display: flex;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.${t}-wrapper.${t}-divider-bottom .${t}-cut-item {
|
|
363
|
-
border-bottom-style: solid;
|
|
364
|
-
border-bottom-color: var(--${t}-divider-color);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.${t}-cut-label {
|
|
368
|
-
display: block;
|
|
369
|
-
position: relative;
|
|
370
|
-
z-index: 1;
|
|
371
|
-
margin: 0;
|
|
372
|
-
color: var(--${t}-text-color);
|
|
373
|
-
white-space: pre-wrap;
|
|
374
|
-
overflow-wrap: anywhere;
|
|
375
|
-
word-break: break-word;
|
|
376
|
-
}
|
|
377
|
-
`}const Ct=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ie=["AColumn","BColumn","CColumn","DColumn","EColumn"],lt="cutLabel",Ke=[...ie,lt],Tt=["A","B","C","D","E"];function ae(t){return`${t}ColumnVerticalAlign`}const Uo=["Top","Center","Bottom"];function le(t){const e=String(t??"Top").trim();if(e.toLowerCase().startsWith("baseline")){const n=e.slice(-1).toUpperCase();return Tt.includes(n)?`Baseline ${n}`:"Top"}const o=e.toLowerCase();return o==="center"?"Center":o==="bottom"?"Bottom":o==="top"?"Top":e}function Xe(t){const e=le(t);return e.toLowerCase().startsWith("baseline")?!1:e==="Top"||e==="Center"||e==="Bottom"}function Ue(t){const e=String(t??"").trim();if(!e.toLowerCase().startsWith("baseline"))return null;const o=e.slice(-1).toUpperCase();return Tt.includes(o)?o:null}function se(t,e,o){const n=Ue(t);return n?n===e?!1:Xe(o[ae(n)]):!0}function xt(t){const e=le(t);if(e.toLowerCase().startsWith("baseline")){const o=e.slice(-1).toUpperCase();return Tt.includes(o)?{kind:"baseline",anchorLetter:o}:{kind:"top"}}return e==="Center"?{kind:"center"}:e==="Bottom"?{kind:"bottom"}:{kind:"top"}}function zo(t,e,o){if(ze(t,e,o))return xt(t);const n=xt(t);return n.kind==="baseline"?{kind:"top"}:n}function Yo(t){const e=xt(t);return e.kind==="baseline"?{kind:"top"}:e}function ze(t,e,o){return se(t,o,e)?xt(t).kind==="baseline":!1}function qo(t){const e={};let o=!1;for(const n of Tt){const r=ae(n),a=t[r];if(t.type==="b"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(e[r]="Top",o=!0);continue}se(a,n,t)||(e[r]="Top",o=!0)}return o?e:null}function Go(t){return t==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:t==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Jo(t){const e=xt(t).kind;return e==="baseline"?"center":e}function Zo(t){return t==="right"?"flex-end":t==="center"?"center":"flex-start"}function Fe(t){return t==="center"?"center":t==="bottom"?"flex-end":"flex-start"}function Qo(t,e){const o=document.createElement("i");o.className=e,o.setAttribute("aria-hidden","true"),t.prepend(o);const{top:n}=t.getBoundingClientRect(),{bottom:r}=o.getBoundingClientRect(),a=r-n;return o.remove(),a}function oe(t,e,o,n){const r=t.titleEl;if(!r)return 0;const a=r.closest(`.${o}`);if(!a)return 0;const s=Qo(r,n);if(t.kind==="baseline")return r.getBoundingClientRect().top-e+s;const h=a.getBoundingClientRect(),f=r.getBoundingClientRect().height;let i=0;return t.kind==="center"?i=(h.height-f)/2:t.kind==="bottom"&&(i=h.height-f),h.top-e+i+s}function Po(t,e,o){const n=t.getBoundingClientRect().height;return n<=0?0:(e.forEach(r=>{const a=r.querySelector(`.${o}`);a&&(a.style.minHeight=`${n}px`,a.style.height=`${n}px`)}),n)}function tn(t,e){return!t||!e?(t&&(t.style.transform=""),0):(t.style.transform=`translateY(${e}px)`,e)}const en={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function H(t,e){return`${t}${e.replace(/^text/,"Text")}`}const Ye={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function qe(t){return[H(t,"textFontFamily"),H(t,"textFontSettings"),{type:"row",items:[H(t,"textFontSize"),H(t,"textLineHeight"),H(t,"textLetterSpacing"),H(t,"textWordSpacing")]},H(t,"textTextAlign"),H(t,"textTextAppearance"),`${t}VerticalAlign`]}function on(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ke.map(t=>[Ye[t],qe(t)]))}}function Kt(t,e){const o=n=>{const r=H(e,n);return t[r]};return{textFontFamily:o("textFontFamily")??"Arial",textFontSettings:o("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:o("textFontSize"),textLineHeight:o("textLineHeight"),textLetterSpacing:o("textLetterSpacing")??0,textWordSpacing:o("textWordSpacing")??0,textTextAlign:o("textTextAlign")??(e===lt?"center":"left"),textTextAppearance:o("textTextAppearance"),textColor:t.textColor}}function He(t,e){var n,r;const o={fontSettings:{fontFamily:t.textFontFamily,fontWeight:((n=t.textFontSettings)==null?void 0:n.fontWeight)??400,fontStyle:((r=t.textFontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.textFontSize??.01,lineHeight:t.textLineHeight,letterSpacing:t.textLetterSpacing,wordSpacing:t.textWordSpacing,textAlign:t.textTextAlign,textAppearance:t.textTextAppearance,color:t.textColor??"#767676"};return Be.omitTextColors(Be.textStylesToCss(o,e))}function Ve(t,e,o,n){const r=Kt(t,e),a=r.textFontSize??.01,s=r.textLineHeight;return s!==void 0&&s<a?`${o} ${n}`:o}function je(t,e,o,n){const r=Kt(t,e),a=r.textFontSize??.01,s=r.textLineHeight;return s===void 0||s>=a?{}:{[`--${o}-title-leading-gap`]:P.scalingValue((a-s)/2,n)}}const M=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ct=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],dt=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ut=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],nn={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},rn=["hover","focus","filled","success","error"],De=.004,at=.004,ne=at,ce=50,wt=1440,Lt=ce/wt;function de(t){const e=typeof t=="number"&&t>0?t:wt;return ce/e}function an(t){let e=t??null;for(;e;){const o=e.style.getPropertyValue("--cntrl-article-width").trim();if(o){const r=parseFloat(o);if(Number.isFinite(r)&&r>0)return r}const n=getComputedStyle(e).getPropertyValue("--cntrl-article-width").trim();if(n){const r=parseFloat(n);if(Number.isFinite(r)&&r>0)return r}e=e.parentElement}return wt}const Ge={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function st(t){const e=typeof t.wrapperWidth=="number"?t.wrapperWidth:1;return Math.max(0,e)}function Je(t,e=1){const o=e/t;return Object.fromEntries(M.map(n=>[n,o]))}function ln(){return Object.fromEntries([...ct.map(t=>[t,0]),...dt.map(t=>[t,0])])}function sn(){return Object.fromEntries(ut.map(t=>[t,0]))}function It(t){return Object.fromEntries(M.map(e=>[e,typeof t[e]=="number"?t[e]:Ge[e]]))}function ue(t,e,o){const n=t-Lt,r=e+o;if(r<=0||r<=n)return{paddingLeft:e,paddingRight:o};if(n<=0)return{paddingLeft:0,paddingRight:0};const a=n/r;return{paddingLeft:e*a,paddingRight:o*a}}function bt(t,e,o){const n=Xt(t,e,o);if(t<=0)return[];const r=n.slice(0,t-1).reduce((a,s)=>a+s,0);return[...n.slice(0,t-1),Math.max(0,e-r)]}function cn(t,e,o){const n={};for(let r=0;r<t;r+=1){const a=ct[r],s=dt[r],h=typeof o[a]=="number"?o[a]:0,f=typeof o[s]=="number"?o[s]:0,i=ue(e[r]??0,h,f);i.paddingLeft!==h&&(n[a]=i.paddingLeft),i.paddingRight!==f&&(n[s]=i.paddingRight)}return n}function Xt(t,e,o){if(t<=0)return[];const n=M.slice(0,t).map(i=>o[i]);if(t===1)return n;const r=n.slice(0,t-1),s=r.reduce((i,v)=>i+v,0)+Lt;if(e>=s)return n;const h=[...r];let f=s-e;for(let i=h.length-1;i>=0&&f>0;i-=1){const v=h[i]-Lt;if(v<=0)continue;const T=Math.min(f,v);h[i]-=T,f-=T}return[...h,n[t-1]]}function dn(t,e,o){if(t<=1)return{};const n=Xt(t,e,o),r={};for(let a=0;a<t-1;a+=1){const s=M[a];n[a]!==o[s]&&(r[s]=n[a])}return r}function Ie(t){return Array.isArray(t.columnsOrder)&&t.columnsOrder.length>0?t.columnsOrder:[...Ct]}function un(t,e){return t.length!==e.length?!1:t.every((o,n)=>o===e[n])}function hn(t,e,o,n){const r=Math.min(n,t.length,M.length),a={};for(let s=0;s<r;s+=1){const h=t[s],f=e.indexOf(h);if(f===-1)continue;const i=M[f],v=ct[f],T=dt[f],_=ut[f],c=M[s],R=ct[s],y=dt[s],V=ut[s],O=o[i],j=o[v],x=o[T],k=o[_];typeof O=="number"&&(a[c]=O),typeof j=="number"&&(a[R]=j),typeof x=="number"&&(a[y]=x),typeof k=="number"&&(a[V]=k)}return a}function Ze(t,e){const o=new Set([...Object.keys(t),...Object.keys(e)]);for(const n of o)if(t[n]!==e[n])return!0;return!1}function mn(t,e){const o=t.columns,n=e.columns;if(typeof o!="number"||o===n)return t;const r=st(t),a=t.type==="b"||t.type===void 0&&e.type==="b",s={...t,...Je(o,r),...ln()};if(a)for(const h of ut)typeof e[h]=="number"&&(s[h]=e[h]);else Object.assign(s,sn());return Ze(t,s)?s:t}function Qe(t,e,o){const n=qo(t);n&&(t={...t,...n});const r=de(o==null?void 0:o.designWidth),a=t.columns,s=e.columns,h=st(t),f=st(e),i=t.type==="b"||t.type===void 0&&e.type==="b",v=typeof a=="number"?a:typeof s=="number"?s:Ct.length,T=x=>{if(i)return x;const k=It({...e,...x}),tt=st(x),Y=bt(v,tt,k),Rt=cn(v,Y,{...e,...x});return Object.keys(Rt).length===0?x:{...x,...Rt}};if(typeof a=="number"&&a!==s)return t;const _=Ie(t),c=Ie(e);if(!un(_,c))return T({...t,...hn(_,c,e,v)});if(h<f&&typeof v=="number"&&!i){const x=It({...e,...t});return T({...t,...dn(v,h,x)})}if(i){const x=typeof t.textPaddingLR=="number"?t.textPaddingLR:0,k=Math.max(0,(h-r)/2);return x>k?{...t,textPaddingLR:k}:t}const R=It({...e,...t}),y=bt(v,f,It(e)),O=bt(v,h,R).some((x,k)=>x<(y[k]??x)),j=M.some(x=>{const k=t[x],tt=e[x];return typeof k=="number"&&typeof tt=="number"&&k!==tt});return O||j?T(t):t}function pn(t,e,o,n){const r=e.slice(0,t).reduce((s,h)=>s+h,0),a=o.slice(t+1,e.length-1).reduce((s,h)=>s+h,0);return Math.max(Lt,n-r-a-Lt)}function fn(t,e){return Math.random()*(e-t)+t}function $n(t){return Object.fromEntries(M.map(e=>[e,typeof t[e]=="number"?t[e]:Ge[e]]))}function re(t,e,o=0){return Object.fromEntries(e.map(n=>[n,typeof t[n]=="number"?t[n]:o]))}function vn(t,e,o,n,r,a){return t.slice(0,e).map((s,h)=>{const f=ct[h],i=dt[h],v=ut[h];return{key:s,textPrefix:en[s],widthKey:M[h],width:o[M[h]],paddingLeftKey:f,paddingRightKey:i,paddingBottomKey:v,paddingLeft:n[f],paddingRight:r[i],paddingBottom:a[v]}})}function gn({settings:t,content:e,isEditor:o,isPreviewMode:n,isEditMode:r,activeEvent:a,layoutId:s,portalId:h,onUpdateSettings:f}){const{prefix:i}=No.useScopedStyles(),v=!!r,{columns:T,type:_,wrapperWidth:c,entriesCount:R,cellMinHeight:y,dividerWidth:V,showVisibility:O,cut:j,showCut:x,cutCellMinHeight:k,cutLabel:tt,imageSize:Y,imageOnHover:Rt,imagePosition:he="cursor",imageInterpolation:Pe="on",entryHoverEffect:At,entryHoverShowOption:Ut,rowPaddingTop:to,rowPaddingBottom:eo,rowPaddingTopB:oo,columnsOrder:Wt,textPaddingLR:no,textColor:ro,backgroundColor:io,dividerColor:ao,textHoverColor:lo,backgroundHoverColor:so,dividerHoverColor:co}=t,[me,kt]=u.useState(void 0),[w,Et]=u.useState(null),Bt=u.useRef(null),D=Rt==="on"&&(!o||n),St=he==="cursor",uo=St&&Pe==="on",{anchorRef:ho,onShow:pe,onCursorMove:fe,exit:zt}=Ko(!!(D&&w!==null),uo),Mt=(j??0)>0,g=_==="b",ht=u.useRef(null),$e=u.useRef(null),[_t,Ot]=u.useState(null),[mt,ve]=u.useState(wt),ge=de(mt),mo=Math.max(0,((c??0)-ge)/2),pt=Math.min(no??0,mo),Nt=Math.max(pt,at),ye=((c??0)+ge)/2;u.useLayoutEffect(()=>{if(!o){ve(wt);return}const l=()=>{ve(an(ht.current))};l();const d=ht.current;if(!d)return;const m=new ResizeObserver(l);m.observe(d);let C=d;for(;C&&!C.style.getPropertyValue("--cntrl-article-width");)C=C.parentElement;return C&&m.observe(C),()=>m.disconnect()},[o,s]),u.useEffect(()=>{kt(void 0)},[j,x,e,R]),u.useEffect(()=>{o&&!n&&kt(void 0)},[o,n]);const po=Oo.buildColorVars(i,{textColor:ro,backgroundColor:io,dividerColor:ao,textHoverColor:lo,backgroundHoverColor:so,dividerHoverColor:co},nn,rn),fo=a&&a!=="default"?`${i}-state-${a}`:"",$o=`${!o||n?At==="default"?`${i}-entry-hover-default`:At==="blinds"?`${i}-entry-hover-blinds`:At==="reveal"?`${i}-entry-hover-reveal`:"":""} ${fo}`.trim(),et=At==="reveal"&&(!o||n),Ft=(O==null?void 0:O[0])??!1,ft=(O==null?void 0:O[1])??!1,$t=u.useRef(t),Yt=u.useRef(s);u.useEffect(()=>{if(!f||!o){$t.current=t,Yt.current=s;return}if(Yt.current!==s){$t.current=t,Yt.current=s;return}const l=$t.current;if(!(l!==t))return;if(typeof l.columns=="number"&&typeof t.columns=="number"&&l.columns!==t.columns){$t.current=t;return}const m=Qe(t,l,{designWidth:mt});$t.current=t,Ze(t,m)&&f(m)},[t,f,o,s,mt]);const q=u.useMemo(()=>$n(t),[t.AColumnWidth,t.BColumnWidth,t.CColumnWidth,t.DColumnWidth,t.EColumnWidth]),be=u.useMemo(()=>re(t,ct),[t.AColumnPaddingLeft,t.BColumnPaddingLeft,t.CColumnPaddingLeft,t.DColumnPaddingLeft,t.EColumnPaddingLeft]),Ce=u.useMemo(()=>re(t,dt),[t.AColumnPaddingRight,t.BColumnPaddingRight,t.CColumnPaddingRight,t.DColumnPaddingRight,t.EColumnPaddingRight]),xe=u.useMemo(()=>re(t,ut),[t.AColumnPaddingBottom,t.BColumnPaddingBottom,t.CColumnPaddingBottom,t.DColumnPaddingBottom,t.EColumnPaddingBottom]),we=u.useMemo(()=>Array.isArray(Wt)&&Wt.length>0?Wt:[...Ct],[Wt]),S=u.useMemo(()=>vn(we,T,q,be,Ce,xe),[we,T,q,be,Ce,xe]),G=st(t),vo=u.useMemo(()=>M.slice(0,T).map(l=>q[l]),[T,q]),qt=u.useMemo(()=>Xt(T,G,q),[T,G,q]),I=u.useMemo(()=>bt(T,G,q),[T,G,q]),ot=u.useMemo(()=>S.map((l,d)=>ue(I[d]??0,l.paddingLeft,l.paddingRight)),[S,I]),J=u.useMemo(()=>{const l=R===0?1/0:R;return(e??[]).slice(0,l).map((m,C)=>({id:C,cells:Object.fromEntries(Ct.map(A=>[A,m[A]??""])),image:m.image,link:m.link}))},[e,R]),Gt=Mt?me??j:J.length,Z=u.useMemo(()=>Mt?J.slice(0,Gt):J,[J,Mt,Gt]),nt=Mt&&Gt<J.length,go=Z.length>1||nt,Le=[Ft?`${i}-divider-top`:"",ft||go?`${i}-divider-bottom`:""].filter(Boolean).join(" "),Jt=!o||n,yo=()=>{if(!Jt)return;const l=me??j;if(!x){kt(J.length);return}kt(Math.min(l+x,J.length))},b=l=>P.scalingValue(l,o??!1),Ht=g?oo??0:to??0,Vt=eo??0,Zt=y??0,bo=Math.max(Vt,ne),Co=_e(0,Z.length,Ft,ft,nt,V??0,o??!1).borderTopWidth,xo=g?"rowPaddingTopB":"rowPaddingTop",Qt=S[0],Pt=S[S.length-1],vt=ot[0],gt=ot[ot.length-1],wo=Qt&&vt?Math.max(vt.paddingLeft,at):0,Te=Pt&>?Math.max(gt.paddingRight,at):0,Lo=G,Re=(l,d)=>Io(he,ht.current,St?l:null,d),To=(l,d)=>{if(!D)return;const m=l.image;if(!(m!=null&&m.assetId)){zt(()=>Et(null));return}const C=(Y==null?void 0:Y.min)??80,A=(Y==null?void 0:Y.max)??320,W=(w==null?void 0:w.rowId)===l.id,$=W?w.widthPx:fn(C,A),{x:N,y:E}=Re(d,$);if(W&&St){fe(N,E);return}Et({rowId:l.id,assetId:m.assetId,objectFit:"contain",isVideo:Fo(m),widthPx:$}),Bt.current={x:N,y:E}},Ro=l=>{if(!D||!w||!St)return;const{x:d,y:m}=Re(l,w.widthPx);fe(d,m)},Ao=()=>{w&&zt(()=>Et(null))},Wo=l=>{et&&Se(l,i),!(!D||!w)&&zt(()=>Et(null))},ko=l=>{et&&Me(l,i)};u.useLayoutEffect(()=>{if(!w||!Bt.current)return;const{x:l,y:d}=Bt.current;Bt.current=null,pe(l,d)},[w==null?void 0:w.rowId,w==null?void 0:w.assetId,pe]),u.useLayoutEffect(()=>{if(!v||g){Ot(null);return}const l=$e.current,d=l==null?void 0:l.parentElement;if(!l||!d){Ot(null);return}const m=()=>{const A=l.querySelector("[data-list-row]");if(!A){Ot(null);return}const W=d.getBoundingClientRect(),$=A.getBoundingClientRect();Ot($.top-W.top+$.height/2)};m();const C=new ResizeObserver(m);return C.observe(l),C.observe(d),()=>C.disconnect()},[v,g,Z,Ht,Vt,Zt,e,t,S,I,mt,V,Ft,ft,nt]);const Ae=u.useMemo(()=>!g&&ie.some(l=>{const d=l.charAt(0),m=t[`${l}VerticalAlign`];return ze(m,t,d)}),[g,t,t.AColumnVerticalAlign,t.BColumnVerticalAlign,t.CColumnVerticalAlign,t.DColumnVerticalAlign,t.EColumnVerticalAlign]);u.useLayoutEffect(()=>{var N;const l=ht.current;if(!l)return;const d=()=>{l.querySelectorAll("[data-list-col]").forEach(E=>{E.style.transform="";const B=E.querySelector(`.${i}-list-col`);B&&(B.style.minHeight="",B.style.height="");const F=E.querySelector(`.${i}-list-col-title`);F&&(F.style.transform="")})};if(g||!Ae){d();return}const m=()=>{const E=Array.from(l.querySelectorAll("[data-list-row]")),B=`${i}-list-col`,F=`${i}-baseline-probe`;E.forEach(K=>{K.querySelectorAll("[data-list-col]").forEach(X=>{X.style.transform="";const U=X.querySelector(`.${B}`);U&&(U.style.minHeight="",U.style.height="");const Q=X.querySelector(`.${i}-list-col-title`);Q&&(Q.style.transform="")})}),E.forEach(K=>{const X=Array.from(K.querySelectorAll("[data-list-col]"));Po(K,X,B)}),l.offsetHeight,E.forEach(K=>{const X=Array.from(K.querySelectorAll("[data-list-col]")),U=K.getBoundingClientRect().top,Q=new Map,jt=X.map(L=>{const rt=L.querySelector(`.${i}-list-col-title`),it={el:L,titleEl:rt,letter:L.getAttribute("data-col-letter")??"",kind:L.getAttribute("data-valign")??"top",anchor:L.getAttribute("data-valign-anchor")};return Q.set(it.letter,it),it}),z=new Map,Dt=(L,rt)=>{const it=z.get(L.letter);if(it!==void 0)return it;const We=L.anchor?Q.get(L.anchor):void 0;if(L.kind!=="baseline"||!We||rt.has(L.letter)){const Ee=oe(L,U,B,F);return z.set(L.letter,Ee),Ee}rt.add(L.letter);const Bo=Dt(We,rt);rt.delete(L.letter);const So=oe(L,U,B,F),Mo=Bo-So;tn(L.titleEl,Mo);const ke=oe(L,U,B,F);return z.set(L.letter,ke),ke};jt.forEach(L=>Dt(L,new Set))})};let C=null;const A=()=>{C===null&&(C=requestAnimationFrame(()=>{C=null,m()}))};m();const W=new ResizeObserver(()=>A());W.observe(l);let $=!1;return typeof document<"u"&&((N=document.fonts)!=null&&N.ready)&&document.fonts.ready.then(()=>{$||A()}),()=>{$=!0,C!==null&&(cancelAnimationFrame(C),C=null),W.disconnect(),d()}},[Ae,g,t,e,mt,Z,I]);const Eo=u.useMemo(()=>Xo(i),[i]);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Eo}}),p.jsx("div",{style:po,children:p.jsxs("div",{ref:ht,className:`${i}-wrapper ${$o}${Le?` ${Le}`:""}${g?` ${i}-type-b`:""}`.trim(),style:{width:P.scalingValue(c??0,o)},onMouseMove:D?Ro:void 0,onMouseLeave:D?Ao:void 0,children:[p.jsxs("div",{style:{width:"100%",position:"relative"},children:[Z.map((l,d)=>{var W;const m=(((W=l.link)==null?void 0:W.length)??0)>0,C=m&&(!o||n)?"a":"div",A=_e(d,Z.length,Ft,ft,nt,V??0,o??!1);return p.jsxs(C,{ref:d===0?$=>{$e.current=$}:void 0,className:`${i}-list-item${m||Ut==="always"?` ${i}-list-item-has-link`:""}${nt&&d===Z.length-1?` ${i}-list-item-before-cut`:""}`,...m?{href:l.link,target:"_blank"}:{},style:A,onMouseEnter:$=>{et&&(m||Ut==="always")&&Se($,i),D&&To(l,$)},onMouseLeave:$=>{et&&(m||Ut==="always")&&Me($,i)},children:[Ht>0&&p.jsx("div",{className:`${i}-row-padding-handle`,style:{height:b(Ht)}}),p.jsxs("div",{className:`${i}-list-cols-row${g?"":` ${i}-list-cols-row-h`}${v&&d===0&&g?` ${i}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:b(Zt)},children:[S.map(($,N)=>{const E=N===S.length-1,B=ot[N],F=$.paddingBottom,K=Vo(l.cells[$.key]),X=g&&F>0,U=g?{minHeight:b(Zt)}:{width:b(I[N])},Q=g?{paddingLeft:b(pt),paddingRight:b(pt)}:{paddingLeft:b(B.paddingLeft),paddingRight:b(B.paddingRight)},jt=$.textPrefix.charAt(0),z=g?Yo(t[`${$.textPrefix}VerticalAlign`]):zo(t[`${$.textPrefix}VerticalAlign`],t,jt),Dt=g&&v&&d===0;return p.jsxs("div",{className:g?`${i}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":jt,"data-valign":z.kind,...z.kind==="baseline"?{"data-valign-anchor":z.anchorLetter}:{}},children:[p.jsx("div",{className:`${i}-list-col${E?` ${i}-list-col-last`:""}`,style:{...Q,...U,...g?{justifyContent:Fe(z.kind)}:{}},"data-test":$.width,children:p.jsx("span",{className:Ve(t,$.textPrefix,`${i}-list-col-title`,`${i}-text-tight-leading`),style:{...He(Kt(t,$.textPrefix),o),...je(t,$.textPrefix,i,o),...g?{}:Go(z.kind)},children:K?l.cells[$.key]??null:g?" ":null})}),X&&p.jsx("div",{className:`${i}-row-padding-handle`,style:{height:b(F)}}),Dt&&p.jsx("div",{"data-controls":$.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${i}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:b(Math.max(F,ne))}})]},$.key)}),v&&d===0&&g&&p.jsxs(p.Fragment,{children:[p.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${i}-control-anchor`,style:{top:0,left:0,width:b(Nt),height:"100%"}}),p.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${i}-control-anchor`,style:{top:0,left:b(Math.max(Nt,G-Nt)),width:b(Nt),height:"100%"}})]})]}),!g&&Vt>0&&p.jsx("div",{className:`${i}-row-padding-handle`,style:{height:b(Vt)}}),v&&d===0&&!g&&p.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${i}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:b(bo)}})]},l.id)}),v&&p.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:p.jsx("div",{"data-controls":xo,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":g?"center":"left-y",className:`${i}-control-anchor`,style:{top:Co,left:0,width:"100%",height:b(Math.max(Ht,ne))}})},"row-padding-handles"),v&&!g&&Qt&&Pt&&p.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[p.jsx("div",{"data-controls":Qt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(I[0]-((vt==null?void 0:vt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":_t??void 0,className:`${i}-control-anchor`,style:{top:0,left:0,width:b(wo),height:"100%"}}),p.jsx("div",{"data-controls":Pt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(I[S.length-1]-((gt==null?void 0:gt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":_t??void 0,className:`${i}-control-anchor`,style:{top:0,left:b(Lo-Te),width:b(Te),height:"100%"}})]},"column-edge-padding-handles"),v&&!g&&S.slice(0,-1).map((l,d)=>{const m=S[d+1],C=qt.slice(0,d+1).reduce((E,B)=>E+B,0),A=ot[d],W=ot[d+1],$=Math.max(A.paddingRight,at),N=Math.max(W.paddingLeft,at);return p.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[p.jsx("div",{"data-controls":l.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(I[d]-A.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":_t??void 0,className:`${i}-control-anchor`,style:{top:0,left:b(C-$),width:b($),height:"100%"}}),p.jsx("div",{"data-controls":m.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(I[d+1]-W.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":_t??void 0,className:`${i}-control-anchor`,style:{top:0,left:b(C),width:b(N),height:"100%"}})]},`${l.paddingRightKey}-padding`)}),v&&!g&&S.slice(0,-1).map((l,d)=>{const m=pn(d,qt,vo,G),A=qt.slice(0,d+1).reduce((W,$)=>W+$,0)-De/2;return p.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:p.jsx("div",{"data-controls":l.widthKey,"data-controls-axis":"x","data-controls-min":String(ce),"data-controls-max-fraction":String(m),"data-controls-variant":"column-width",className:`${i}-col-resize-handle`,style:{position:"absolute",top:"0px",left:b(A),width:b(De),height:"calc(100%)",pointerEvents:"auto"}})},`${l.widthKey}-junction`)})]}),nt&&(()=>{const l=Kt(t,lt),d=Jo(t.cutLabelVerticalAlign),m=l.textTextAlign==="justify"||g;return p.jsx("button",{type:"button",className:`${i}-cut-item`,style:{minHeight:b(k??0),cursor:Jt?"pointer":"default",...jo(ft,V??0,o??!1)},onClick:Jt?yo:void 0,onMouseEnter:et||D?Wo:void 0,onMouseLeave:et?ko:void 0,children:p.jsx("div",{className:`${i}-list-cols-row`,style:{...g?{paddingLeft:b(pt),paddingRight:b(pt)}:{},justifyContent:Zo(l.textTextAlign),alignItems:Fe(d)},children:p.jsx("span",{className:Ve(t,lt,`${i}-cut-label`,`${i}-text-tight-leading`),style:{...He(l,o),...je(t,lt,i,o),...m?{width:"100%"}:{}},children:tt})})})})(),D&&w&&typeof document<"u"&&(()=>{const l=`${w.widthPx}px`,d={width:l,height:"auto",maxHeight:l,objectFit:"contain"},m=(h?document.getElementById(h):null)??document.body;return _o.createPortal(p.jsx("div",{ref:ho,className:`${i}-hover-media-anchor`,"data-selection":"none",children:p.jsx(Ho,{media:w,className:w.isVideo?`${i}-hover-video`:`${i}-hover-image`,style:d},`${w.rowId}-${w.assetId}`)}),m)})()]})})]})}exports.COLUMN_CONTENT_KEYS=Ct;exports.COLUMN_TEXT_PREFIXES=ie;exports.COLUMN_VALIGN_BASIC_OPTIONS=Uo;exports.CUT_LABEL_TEXT_PREFIX=lt;exports.LIST_COLUMN_LETTERS=Tt;exports.LIST_TEXT_STYLE_PREFIXES=Ke;exports.LIST_TEXT_STYLE_TAB_LABELS=Ye;exports.List=gn;exports.applyListColumnCountChange=mn;exports.applyListSettingsChange=Qe;exports.createListTextStylePanelTab=on;exports.createListTextStyleTabContentItems=qe;exports.getEffectiveListColumnWidths=bt;exports.getEqualListColumnWidthUpdates=Je;exports.getListColumnTextSettingKey=H;exports.getListColumnVerticalAlignSettingKey=ae;exports.getListEffectiveContentWidth=st;exports.getListMinColumnWidth=de;exports.isBaselineAnchorColumnVerticalAlign=Xe;exports.isValidColumnBaselineVAlign=se;exports.normalizeListColumnVerticalAlign=le;exports.parseBaselineAnchorLetter=Ue;exports.resolveListColumnPadding=ue;exports.resolveListColumnWidths=Xt;
|
package/dist/Marquee-DOIRRCu4.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),o=require("react"),P=require("classnames"),qe=require("./scalingValue-CSHYgTZl.js"),Ce=require("./useScopedStyles-Bf6yohVQ.js"),se=require("./observeIntersection-DxGj9Ctt.js"),Y=require("./useLazyVideos-CdCbc2j0.js");function Se(e,n){const r=n>0?`${n}px`:"0px";return`
|
|
2
|
-
.${e}-marquee-wrapper {
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: auto;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
@keyframes ${e}-marquee-left {
|
|
9
|
-
from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
|
10
|
-
to { -webkit-transform: translate3d(-${r}, 0, 0); transform: translate3d(-${r}, 0, 0); }
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@keyframes ${e}-marquee-right {
|
|
14
|
-
from { -webkit-transform: translate3d(-${r}, 0, 0); transform: translate3d(-${r}, 0, 0); }
|
|
15
|
-
to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.${e}-marquee-track {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
width: max-content;
|
|
22
|
-
will-change: transform;
|
|
23
|
-
backface-visibility: hidden;
|
|
24
|
-
-webkit-backface-visibility: hidden;
|
|
25
|
-
flex-wrap: nowrap;
|
|
26
|
-
-webkit-animation-timing-function: linear;
|
|
27
|
-
animation-timing-function: linear;
|
|
28
|
-
-webkit-animation-iteration-count: infinite;
|
|
29
|
-
animation-iteration-count: infinite;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.${e}-marquee-track[data-direction="left"] {
|
|
33
|
-
-webkit-animation-name: ${e}-marquee-left;
|
|
34
|
-
animation-name: ${e}-marquee-left;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.${e}-marquee-track[data-direction="right"] {
|
|
38
|
-
-webkit-animation-name: ${e}-marquee-right;
|
|
39
|
-
animation-name: ${e}-marquee-right;
|
|
40
|
-
}
|
|
41
|
-
.${e}-marquee-row {
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
align-items: flex-start;
|
|
45
|
-
}
|
|
46
|
-
.${e}-marquee-set {
|
|
47
|
-
flex: 0 0 auto;
|
|
48
|
-
}
|
|
49
|
-
.${e}-marquee-static {
|
|
50
|
-
justify-content: center;
|
|
51
|
-
overflow-x: auto;
|
|
52
|
-
}
|
|
53
|
-
.${e}-marquee-card {
|
|
54
|
-
position: relative;
|
|
55
|
-
flex: 0 0 auto;
|
|
56
|
-
align-self: flex-start;
|
|
57
|
-
}
|
|
58
|
-
.${e}-wrapper {
|
|
59
|
-
position: relative;
|
|
60
|
-
width: 100%;
|
|
61
|
-
height: 100%;
|
|
62
|
-
order: 1;
|
|
63
|
-
}
|
|
64
|
-
.${e}-cover {
|
|
65
|
-
position: absolute;
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
top: 0;
|
|
69
|
-
left: 0;
|
|
70
|
-
}
|
|
71
|
-
.${e}-elements-overlay {
|
|
72
|
-
position: relative;
|
|
73
|
-
inset: 0;
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
pointer-events: none;
|
|
77
|
-
}
|
|
78
|
-
.${e}-control {
|
|
79
|
-
position: relative;
|
|
80
|
-
z-index: 2;
|
|
81
|
-
width: 100%;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.${e}-marquee-link {
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
align-items: center;
|
|
89
|
-
width: 100%;
|
|
90
|
-
height: 100%;
|
|
91
|
-
text-decoration: none;
|
|
92
|
-
color: inherit;
|
|
93
|
-
}
|
|
94
|
-
.${e}-marquee-link-contain {
|
|
95
|
-
width: auto;
|
|
96
|
-
height: auto;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.${e}-control::before {
|
|
100
|
-
content: "";
|
|
101
|
-
position: absolute;
|
|
102
|
-
top: 0;
|
|
103
|
-
left: 0;
|
|
104
|
-
width: 100%;
|
|
105
|
-
height: 100%;
|
|
106
|
-
min-height: 20px;
|
|
107
|
-
pointer-events: auto;
|
|
108
|
-
z-index: 10;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.${e}-gap-control {
|
|
112
|
-
position: relative;
|
|
113
|
-
z-index: 2;
|
|
114
|
-
pointer-events: auto;
|
|
115
|
-
height: 100%;
|
|
116
|
-
}
|
|
117
|
-
.${e}-image-hover-brightness img,
|
|
118
|
-
.${e}-image-hover-brightness video {
|
|
119
|
-
transition: filter 0.3s ease;
|
|
120
|
-
}
|
|
121
|
-
.${e}-image-hover-brightness:hover img,
|
|
122
|
-
.${e}-image-hover-brightness:hover video {
|
|
123
|
-
filter: brightness(1.25);
|
|
124
|
-
}
|
|
125
|
-
.${e}-image-hover-grayscale img,
|
|
126
|
-
.${e}-image-hover-grayscale video {
|
|
127
|
-
transition: filter 0.3s ease;
|
|
128
|
-
}
|
|
129
|
-
.${e}-image-hover-grayscale:hover img,
|
|
130
|
-
.${e}-image-hover-grayscale:hover video {
|
|
131
|
-
filter: grayscale(100%);
|
|
132
|
-
}
|
|
133
|
-
`}const Ee=30,ke=20,ce=3,Ne=12,Me=32,Ae=3,_e=250,We=.5,Ie=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Ve=(e,n)=>Array.from({length:n},()=>e).flat(),je=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},ve=e=>e.reduce((n,r)=>n+(r.offsetWidth||r.getBoundingClientRect().width),0),ye=(e,n)=>{if(n<=0||e.children.length<n)return 0;const r=e.children[0],f=e.children[n-1];if(!r||!f)return 0;const p=getComputedStyle(e),d=Number.parseFloat(p.columnGap||p.gap||"0")||0,b=f.getBoundingClientRect().right-r.getBoundingClientRect().left;if(b>0)return b;const q=Array.from({length:n},(w,_)=>e.children[_]),m=ve(q);return m<=0?0:m+d*Math.max(0,n-1)},Te=e=>{const n=e.getBoundingClientRect().width;if(n>0)return n;const r=e.offsetWidth;if(r>0)return r;const f=ve(Array.from(e.children));if(f<=0)return 0;const p=getComputedStyle(e),d=Number.parseFloat(p.columnGap||p.gap||"0")||0,b=Number.parseFloat(p.paddingRight)||0;return f+d*Math.max(0,e.children.length-1)+b},Le=(e,n)=>{const r=n.getBoundingClientRect(),f=e.getBoundingClientRect();return f.right>r.left&&f.left<r.right},Oe=(e,n)=>{const r=e.querySelectorAll(`[data-marquee-item-index="${n}"]`);return Array.from(r).some(f=>Le(f,e))},He=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const n=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(n)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")},Be=e=>e?e instanceof HTMLVideoElement?e.readyState>=1:e.complete:!1,ze=({item:e,prefix:n,imageFit:r,imageMaxWidth:f,imageMaxHeight:p,cornerRadius:d,imageHoverClass:b,isFirstSet:q,scaled:m,onFirstSetImageDone:w})=>{var N,M,L,O;const _=o.useRef(null),U=!!((N=e.image)!=null&&N.assetId&&He(e.image));o.useLayoutEffect(()=>{q&&Be(_.current)&&(w==null||w())},[q,(M=e.image)==null?void 0:M.assetId,w]);const j=r.display==="cover",S=r.ratioValue??"1:1",F=r.reversed??!1,[G,C]=S.split(":").map(Number),X=(F?C:G)/(F?G:C),E=f/X,D=E>p?p:E,W=E>p?p*X:f,J=m(W),k=m(D),Z={borderRadius:m(d)},x=j?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...Z}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:m(f),maxHeight:m(p),objectFit:"contain",...Z},I=((L=e.image)==null?void 0:L.assetId)&&(U?v.jsx("video",{ref:V=>{_.current=V},src:e.image.assetId,style:x,muted:!0,loop:!0,playsInline:!0,preload:"none",onLoadedMetadata:q?w:void 0,onError:q?w:void 0}):v.jsx("img",{ref:V=>{_.current=V},src:e.image.assetId,alt:((O=e.image)==null?void 0:O.name)??"",style:x,onLoad:q?w:void 0,onError:q?w:void 0}));return v.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...j?{width:J}:{width:"max-content",maxWidth:m(f),minWidth:0}},children:v.jsx("div",{className:b,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...j?{width:J,height:k,overflow:"hidden",...Z}:{width:"max-content",maxWidth:m(f),height:m(p)}},children:I&&e.link?v.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:P(`${n}-marquee-link`,!j&&`${n}-marquee-link-contain`),children:I}):I})})},Ue=({settings:e,content:n,isEditor:r,isPreviewMode:f,isEditMode:p})=>{const{prefix:d}=Ce.useScopedStyles(),[b,q]=o.useState(0),m=b>0?Math.round(b):0,w=o.useMemo(()=>Se(d,m),[d,m]),{speed:_,direction:U,pauseOnHover:j,gap:S,imageMaxWidth:F,imageMaxHeight:G,hoverEffect:C,cornerRadius:le=0}=e,T=o.useMemo(()=>je(e.imageFit),[e.imageFit]),X=T.display!=="cover",E=(n==null?void 0:n.length)??0,D=!!p,W=!r||!!f,J=W&&C!=="off"&&C!=="randomize"?`${d}-image-hover-${C}`:void 0,k=r?!!f:!0,x=((n==null?void 0:n.length)??0)>0&&(k||!!r),I=Math.max(0,_)*Ee,N=t=>qe.scalingValue(t,r??!1),M=o.useRef(null),L=o.useRef(null),O=o.useRef(null),[V,ue]=o.useState(0),ee=k&&j==="on",[be,de]=o.useState(!1),[H,te]=o.useState({}),ne=o.useRef(H);ne.current=H;const re=o.useRef(null),ae=o.useRef(0),K=o.useRef(null),fe=o.useMemo(()=>(n??[]).map(t=>{var a;return((a=t.image)==null?void 0:a.assetId)??""}).join("\0"),[n]),[B,me]=o.useState(ce),oe=o.useMemo(()=>{const t=n??[];return t.length===0||!(k||!!r)?t:Ve(t,B)},[n,k,B,r]),he=o.useMemo(()=>(n??[]).filter(t=>{var a;return!!((a=t.image)!=null&&a.assetId)}).length,[n]),ge=x?Ae:1;o.useLayoutEffect(()=>{ae.current=0,te({}),re.current=null,me(ce),q(0)},[fe]),o.useEffect(()=>{if(!W||C!=="randomize")return;const t=M.current;if(!t)return;const a=c=>{te(l=>{const y=Array.from(c).filter(g=>g in l&&!Oe(t,g));if(y.length===0)return l;const h={...l};return y.forEach(g=>{delete h[g]}),h})},i=new IntersectionObserver(c=>{const l=new Set;for(const y of c){const h=y.target.dataset.marqueeItemIndex,g=h!==void 0?Number(h):NaN;Number.isNaN(g)||l.add(g)}l.size>0&&a(l)},{root:t,threshold:0});Object.keys(H).forEach(c=>{const l=Number(c);t.querySelectorAll(`[data-marquee-item-index="${l}"]`).forEach(y=>i.observe(y))});const u={current:0},s=()=>{const c=Object.keys(ne.current);c.length!==0&&(a(c.map(Number)),u.current=requestAnimationFrame(s))};return Object.keys(ne.current).length>0&&(u.current=requestAnimationFrame(s)),()=>{cancelAnimationFrame(u.current),i.disconnect()}},[C,H,W]),o.useEffect(()=>{const t=M.current;if(!t||typeof IntersectionObserver>"u")return;let a=!1,i=!1,u;const s=()=>{const h=t.querySelectorAll("video");if(!a){h.forEach(Y.pauseVideo);return}const g=t.getBoundingClientRect(),A=g.width*We;h.forEach($=>{const Q=$.getBoundingClientRect(),z=Q.right>g.left&&Q.left<g.right;Q.right>g.left-A&&Q.left<g.right+A?Y.raisePreload($,"auto"):X&&Y.raisePreload($,"metadata"),i&&z?$.paused&&Y.playVideo($):Y.pauseVideo($)})},c=()=>{a&&u===void 0?u=setInterval(s,_e):!a&&u!==void 0&&(clearInterval(u),u=void 0),s()},l=se.observeIntersection(t,se.NEAR_VIEWPORT_MARGIN,h=>{a=h,c()}),y=se.observeIntersection(t,"0px",h=>{i=h,c()});return()=>{l(),y(),clearInterval(u)}},[x,X]),o.useLayoutEffect(()=>{if(!x)return;const t=M.current,a=O.current;if(!t||!a)return;const i={current:0},u=()=>{const l=t.getBoundingClientRect().width||t.offsetWidth,y=Te(a),h=re.current,g=typeof h=="number"&&Math.abs(h-y)<=.25;re.current=y;let A=B,$=0;if((k||r)&&E>0&&l>0){const R=ye(a,E);if(R>=Me){$=R;const ie=Math.min(Ne,Math.max(ce,Math.ceil(l/R)+1));A=ie,ie!==B&&me(ie)}}const z=A!==B&&$>0?$*A:y>0?y:$>0?$*A:(()=>{const R=ye(a,E);return R>0?R*A:0})();z>0?q(R=>R<=0?z:!g||Math.round(R)===Math.round(z)?R:z):!g&&b<=0&&(cancelAnimationFrame(i.current),i.current=requestAnimationFrame(u))},s=()=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame(u)};K.current=s,s();const c=new ResizeObserver(s);return c.observe(t),c.observe(a),()=>{K.current=null,cancelAnimationFrame(i.current),c.disconnect()}},[k,x,b,fe,B,E,r]),o.useLayoutEffect(()=>{if(!x||m<=0)return;const t=L.current;t&&Ie(t)},[x,m,U,I]),o.useLayoutEffect(()=>{if(!x||b<=0){ue(0);return}const t=L.current,a=O.current;if(!t||!a)return;const i=()=>{const s=t.offsetHeight||t.getBoundingClientRect().height,c=Array.from(a.children).reduce((y,h)=>Math.max(y,h.offsetHeight||h.getBoundingClientRect().height),0),l=s>0?s:c;ue(l>0?l:0)};i();const u=new ResizeObserver(i);return u.observe(t),u.observe(a),()=>u.disconnect()},[x,ge,oe,r,S,F,G,b,T,H]),o.useLayoutEffect(()=>{if(!r||!D||!x||typeof window>"u")return;const t=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(t)},[r,D,x,U,b,V,S,oe]);const xe=()=>{ee&&de(!0)},we=()=>{ee&&de(!1)},$e=o.useCallback(()=>{var t;ae.current=Math.min(he,ae.current+1),(t=K.current)==null||t.call(K)},[he]),Re=o.useCallback((t,a)=>{te(i=>{const u=i[t]??a,s=(n??[]).filter(l=>l!==u);if(s.length===0)return i;const c=s[Math.floor(Math.random()*s.length)];return{...i,[t]:c}})},[n]),pe=(t,a,i,u)=>{const s=W&&C==="randomize"&&T.display==="cover"?H[i]??t:t,c=`max(${N(S)}, ${ke}px)`,l=`calc(-0.5 * (${c} + ${N(S)}))`;return v.jsxs("div",{className:`${d}-marquee-card`,"data-marquee-item-index":i,onMouseEnter:W&&C==="randomize"&&T.display==="cover"?()=>Re(i,t):void 0,children:[v.jsx(ze,{item:s,prefix:d,imageFit:T,imageMaxWidth:F,imageMaxHeight:G,cornerRadius:le,imageHoverClass:J,isEditor:r,isFirstSet:u,scaled:N,onFirstSetImageDone:$e}),D&&v.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${d}-gap-control`,style:{position:"absolute",top:0,right:l,width:c,height:"100%"}})]},`${a}-${i}`)};if(x){const t=k?ee&&be?"paused":"running":"paused",a=m>0&&I>0?m/I*1e3:0,i=`${Math.max(0,a)/1e3}s`;return v.jsxs("div",{ref:M,className:P(`${d}-wrapper`,`${d}-marquee-wrapper`),"aria-label":"Marquee",style:V>0?{height:V}:void 0,children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),v.jsx("div",{ref:L,className:`${d}-marquee-track`,"data-direction":U,onMouseEnter:xe,onMouseLeave:we,style:{WebkitAnimationDuration:i,animationDuration:i,WebkitAnimationPlayState:t,animationPlayState:t},children:Array.from({length:ge},(u,s)=>v.jsx("div",{ref:s===0?O:void 0,className:P(`${d}-marquee-row`,`${d}-marquee-set`),style:{gap:N(S),paddingRight:N(S)},"aria-hidden":s>0,children:oe.map((c,l)=>pe(c,s,l,s===0&&l<E))},`set-${s}`))})]})}return v.jsxs("div",{ref:M,className:`${d}-wrapper`,children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:w}}),v.jsx("div",{className:P(`${d}-marquee-row`,`${d}-marquee-static`),style:{gap:N(S),transform:"none"},"aria-label":"Marquee",children:n==null?void 0:n.map((t,a)=>pe(t,0,a))},"marquee-static")]})};exports.Marquee=Ue;
|