@cntrl-site/components 1.0.101 → 1.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +25 -1
  2. package/dist/Burger-C6jI6C1c.js +661 -0
  3. package/dist/Burger-EMSn7TPB.mjs +1807 -0
  4. package/dist/ClickGallerie-D_O1XhAO.mjs +270 -0
  5. package/dist/ClickGallerie-M9xdGR1G.js +36 -0
  6. package/dist/Components/Burger/BurgerComponent.d.ts +0 -1
  7. package/dist/Components/ClickGallerie/ClickGallerieComponent.d.ts +0 -1
  8. package/dist/Components/FAQ/FAQComponent.d.ts +0 -1
  9. package/dist/Components/Form/FormComponent.d.ts +0 -1
  10. package/dist/Components/Grid/GridComponent.d.ts +0 -1
  11. package/dist/Components/Helix/HelixComponent.d.ts +0 -1
  12. package/dist/Components/Hive/HiveComponent.d.ts +0 -1
  13. package/dist/Components/LightboxJournal/LightboxJournalComponent.d.ts +0 -1
  14. package/dist/Components/LightboxStrip/LightboxStripComponent.d.ts +0 -1
  15. package/dist/Components/List/ListComponent.d.ts +0 -1
  16. package/dist/Components/Marquee/MarqueeComponent.d.ts +0 -1
  17. package/dist/Components/MarqueeText/MarqueeTextComponent.d.ts +0 -1
  18. package/dist/Components/Mercury/MercuryComponent.d.ts +0 -1
  19. package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +0 -1
  20. package/dist/Components/Pretext/PretextComponent.d.ts +0 -1
  21. package/dist/Components/Scale/ScaleComponent.d.ts +0 -1
  22. package/dist/Components/SimpleButton/SimpleButtonComponent.d.ts +0 -1
  23. package/dist/Components/Slider20/Slider20Component.d.ts +0 -1
  24. package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +0 -1
  25. package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +0 -1
  26. package/dist/Components/Waterfall/WaterfallComponent.d.ts +0 -1
  27. package/dist/ControlSlider-SiOt22l_.js +1 -0
  28. package/dist/ControlSlider-pZv7H6BU.mjs +334 -0
  29. package/dist/FAQ-C7823fyi.js +166 -0
  30. package/dist/FAQ-CZ39u4m8.mjs +588 -0
  31. package/dist/Form-BX5_41nb.mjs +472 -0
  32. package/dist/Form-Dn-6A1He.js +153 -0
  33. package/dist/Grid-CemGhf3F.js +374 -0
  34. package/dist/Grid-cfQsXW3b.mjs +1553 -0
  35. package/dist/Helix-2Vr-9WBa.js +43 -0
  36. package/dist/Helix-BmkAKT1G.mjs +315 -0
  37. package/dist/Hive-BC6zQBsv.js +321 -0
  38. package/dist/Hive-BGMWinrW.mjs +1425 -0
  39. package/dist/HiveLightboxTitles-DhEeFKWs.mjs +507 -0
  40. package/dist/HiveLightboxTitles-DlyptAaK.js +1 -0
  41. package/dist/ImageRevealSlider-BBWtFjUF.js +1 -0
  42. package/dist/ImageRevealSlider-BdFGyVEP.mjs +184 -0
  43. package/dist/Lightbox-CIss_nOG.js +1 -0
  44. package/dist/Lightbox-eP9qAZzL.mjs +665 -0
  45. package/dist/LightboxJournal-D59ex6wH.mjs +1613 -0
  46. package/dist/LightboxJournal-DAEZOPDi.js +523 -0
  47. package/dist/LightboxStrip-BDjI1jyH.js +386 -0
  48. package/dist/LightboxStrip-YspzBP8N.mjs +1574 -0
  49. package/dist/List-C32WImI3.js +377 -0
  50. package/dist/List-DW7fyJbf.mjs +1891 -0
  51. package/dist/Marquee-BYClHHws.mjs +551 -0
  52. package/dist/Marquee-vmHaTGIP.js +133 -0
  53. package/dist/MarqueeText-4Rip_sQX.mjs +515 -0
  54. package/dist/MarqueeText-E6OubMOG.js +132 -0
  55. package/dist/Mercury-BwF_XW2w.js +267 -0
  56. package/dist/Mercury-DuKJQ1Zo.mjs +1701 -0
  57. package/dist/OnelinerForm-BEu7_sho.mjs +434 -0
  58. package/dist/OnelinerForm-C2Y_XMCY.js +194 -0
  59. package/dist/Pretext-10CcyP1E.mjs +2762 -0
  60. package/dist/Pretext-DvQ3xsni.js +231 -0
  61. package/dist/PretextComponent-C3YFICy8.js +1 -0
  62. package/dist/PretextComponent-Ct0newmn.mjs +11624 -0
  63. package/dist/RichTextRenderer-B6WtTYlR.mjs +32 -0
  64. package/dist/RichTextRenderer-CIy6yI8U.js +1 -0
  65. package/dist/Scale-976sjO8e.js +111 -0
  66. package/dist/Scale-rLNT4KAk.mjs +345 -0
  67. package/dist/SimpleButton-C-o2W9bS.mjs +451 -0
  68. package/dist/SimpleButton-nGEcO2gB.js +243 -0
  69. package/dist/Slider20-C9o2REDl.js +272 -0
  70. package/dist/Slider20-Dm8BeCli.mjs +851 -0
  71. package/dist/SvgImage-B5mR9y6q.mjs +51 -0
  72. package/dist/SvgImage-DFlmxAoL.js +1 -0
  73. package/dist/TestimonialGrid-CPu4qQ6B.mjs +492 -0
  74. package/dist/TestimonialGrid-D4ieiz9e.js +90 -0
  75. package/dist/TestimonialSingle-CVu15ZtV.js +125 -0
  76. package/dist/TestimonialSingle-DLdnAVF7.mjs +391 -0
  77. package/dist/Waterfall-A0FjM2my.mjs +1400 -0
  78. package/dist/Waterfall-DnPDHbCL.js +287 -0
  79. package/dist/buildColorVars-CE2D5cQV.js +1 -0
  80. package/dist/buildColorVars-CLyWQm5K.mjs +21 -0
  81. package/dist/components-OE3ac1dr.js +1 -0
  82. package/dist/components-w-jHX-2U.mjs +2053 -0
  83. package/dist/components.css +1 -1
  84. package/dist/elements.d.ts +7 -0
  85. package/dist/elements.js +1 -0
  86. package/dist/elements.mjs +63 -0
  87. package/dist/elements.node.d.ts +6 -0
  88. package/dist/elements.node.js +1 -0
  89. package/dist/elements.node.mjs +21 -0
  90. package/dist/forking.d.ts +1 -0
  91. package/dist/formFieldValidation-DZl2KVaF.js +1 -0
  92. package/dist/formFieldValidation-DvihFrq5.mjs +21 -0
  93. package/dist/getColorAlpha-BVBY0N5x.mjs +39 -0
  94. package/dist/getColorAlpha-CoSseoCn.js +1 -0
  95. package/dist/getImageRect-BQhQXvT8.js +1 -0
  96. package/dist/getImageRect-CBMhFNHM.mjs +109 -0
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.js +1 -28862
  99. package/dist/index.mjs +16 -62473
  100. package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
  101. package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
  102. package/dist/panelAvailability-D179wwJx.mjs +27 -0
  103. package/dist/panelAvailability-DnOe0rQ4.js +1 -0
  104. package/dist/react-splide.esm-CabaEmHi.js +6 -0
  105. package/dist/react-splide.esm-DQqds4PL.mjs +1750 -0
  106. package/dist/readTestimonialTextMeasure-BIXpGFEt.mjs +13 -0
  107. package/dist/readTestimonialTextMeasure-CEPaB4Sy.js +1 -0
  108. package/dist/scalingValue-C9JH5L6O.mjs +6 -0
  109. package/dist/scalingValue-CSHYgTZl.js +1 -0
  110. package/dist/sources.d.ts +1 -0
  111. package/dist/sources.js +23753 -0
  112. package/dist/sources.mjs +23779 -0
  113. package/dist/textStylesToCss-05Mn6I_2.mjs +32 -0
  114. package/dist/textStylesToCss-CNN3zZTV.js +1 -0
  115. package/dist/types/Component.d.ts +0 -1
  116. package/dist/useLightboxScrollLock-Hf16Eq4g.js +1 -0
  117. package/dist/useLightboxScrollLock-VQ07s7EJ.mjs +18 -0
  118. package/dist/useLightboxSwipeDismiss-Br9uE5G0.js +1 -0
  119. package/dist/useLightboxSwipeDismiss-SGv6Ra33.mjs +95 -0
  120. package/dist/useScopedStyles-Bf6yohVQ.js +1 -0
  121. package/dist/useScopedStyles-DhBG3557.mjs +11 -0
  122. package/dist/utils-033j3qNL.js +1 -0
  123. package/dist/utils-FxC9rcxw.mjs +247 -0
  124. package/dist/utils.js +1 -1
  125. package/dist/utils.mjs +17 -11
  126. package/package.json +31 -2
  127. package/dist/index-2JTNRDR1.js +0 -1
  128. package/dist/index-DA8t6EZ4.mjs +0 -255
  129. package/dist/panelAvailability-CgSic84c.mjs +0 -126
  130. package/dist/panelAvailability-D8c7cdbu.js +0 -1
@@ -0,0 +1,270 @@
1
+ import { jsxs as Z, Fragment as ne, jsx as M } from "react/jsx-runtime";
2
+ import { useState as y, useRef as j, useMemo as re, useCallback as se, useEffect as w } from "react";
3
+ import { u as oe } from "./useScopedStyles-DhBG3557.mjs";
4
+ const ae = {
5
+ sizeType: "custom",
6
+ value: 700,
7
+ min: 400,
8
+ max: 700
9
+ };
10
+ function T(o, a) {
11
+ return {
12
+ widthPx: o,
13
+ heightPx: o * a
14
+ };
15
+ }
16
+ function O(o, a, i, r, t, f) {
17
+ return {
18
+ x: Math.min(Math.max(o, t / 2), i - t / 2),
19
+ y: Math.min(Math.max(a, f / 2), r - f / 2)
20
+ };
21
+ }
22
+ function J(o, a, i, r) {
23
+ const { heightPx: t } = T(i, r);
24
+ return O(
25
+ o / 2,
26
+ a / 2,
27
+ o,
28
+ a,
29
+ i,
30
+ t
31
+ );
32
+ }
33
+ function Q(o, a, i) {
34
+ for (const r of i) {
35
+ const { heightPx: t } = T(r.widthPx, r.aspectRatio), f = r.widthPx / 2, d = t / 2;
36
+ if (o >= r.x - f && o <= r.x + f && a >= r.y - d && a <= r.y + d)
37
+ return !0;
38
+ }
39
+ return !1;
40
+ }
41
+ function ie(o, a, i, r, t, f, d, g) {
42
+ if (t === "system")
43
+ return "none";
44
+ const E = r.getBoundingClientRect(), R = document.elementFromPoint(E.left + o, E.top + a);
45
+ return R && R.closest("a") ? "none" : Q(o, a, i) || f === "area" ? d ?? "none" : g ?? "none";
46
+ }
47
+ function K(o, a, i) {
48
+ var g;
49
+ const { sizeType: r, value: t, min: f, max: d } = a;
50
+ return r === "custom" ? t : r === "as is" ? ((g = i.get(o)) == null ? void 0 : g.naturalWidth) ?? t : Math.round(Math.random() * (d - f) + f);
51
+ }
52
+ function ce(o) {
53
+ return `
54
+ .${o}-root {
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ height: 100%;
60
+ overflow: hidden;
61
+ }
62
+ .${o}-wrapper {
63
+ position: absolute;
64
+ transform: translate(-50%, -50%);
65
+ height: auto;
66
+ }
67
+ .${o}-image {
68
+ display: block;
69
+ width: 100%;
70
+ height: auto;
71
+ object-fit: cover;
72
+ position: relative;
73
+ user-select: none;
74
+ pointer-events: none;
75
+ }
76
+ .${o}-link {
77
+ width: 100%;
78
+ display: block;
79
+ }
80
+ .${o}-cursor {
81
+ position: absolute;
82
+ top: 0;
83
+ left: 0;
84
+ pointer-events: none;
85
+ width: 32px;
86
+ height: 32px;
87
+ }
88
+ `;
89
+ }
90
+ function le(o) {
91
+ return new Promise((a) => {
92
+ const i = new Image();
93
+ i.onload = () => {
94
+ a({
95
+ aspectRatio: i.naturalHeight / i.naturalWidth,
96
+ naturalWidth: i.naturalWidth
97
+ });
98
+ }, i.onerror = () => {
99
+ a({ aspectRatio: 1, naturalWidth: 700 });
100
+ }, i.src = o;
101
+ });
102
+ }
103
+ async function ue(o) {
104
+ const a = [...new Set(o.filter(Boolean))], i = await Promise.all(
105
+ a.map(async (r) => [r, await le(r)])
106
+ );
107
+ return new Map(i);
108
+ }
109
+ function he({ settings: o, content: a = [], isEditor: i }) {
110
+ const { prefix: r } = oe(), [t, f] = y(null), [d, g] = y([]), [E, R] = y(0), V = j(0), [U, D] = y({ x: 0, y: 0 }), [A, G] = y("none"), k = j({ x: 0, y: 0 }), [x, q] = y(!1), [W, _] = y(!1), $ = j(/* @__PURE__ */ new Map()), {
111
+ imageSize: P = ae,
112
+ cursor: F = "system",
113
+ target: S = "area",
114
+ position: I = "random",
115
+ visible: X = "all",
116
+ defaultCursor: B = null,
117
+ hoverCursor: L = null
118
+ } = o, p = a.filter(
119
+ (e) => {
120
+ var n;
121
+ return !!((n = e == null ? void 0 : e.image) != null && n.assetId);
122
+ }
123
+ ), ee = re(() => ce(r), [r]), v = se((e, n, s = d) => {
124
+ if (!t) return;
125
+ const u = t.getBoundingClientRect(), c = e - u.left, l = n - u.top;
126
+ D({ x: c, y: l }), G(
127
+ ie(c, l, s, t, F, S, L, B)
128
+ );
129
+ }, [t, d, F, S, L, B]);
130
+ w(() => {
131
+ const e = [
132
+ ...p.map((s) => s.image.assetId),
133
+ B,
134
+ L
135
+ ].filter((s) => !!s);
136
+ if (e.length === 0) {
137
+ $.current = /* @__PURE__ */ new Map(), _(!0);
138
+ return;
139
+ }
140
+ let n = !1;
141
+ return _(!1), ue(e).then((s) => {
142
+ n || ($.current = s, _(!0));
143
+ }), () => {
144
+ n = !0;
145
+ };
146
+ }, [a, B, L]), w(() => {
147
+ if (!t) return;
148
+ const e = (s) => {
149
+ s.stopPropagation(), k.current = { x: s.clientX, y: s.clientY }, v(s.clientX, s.clientY);
150
+ }, n = () => {
151
+ x && v(k.current.x, k.current.y);
152
+ };
153
+ return t.addEventListener("mousemove", e), window.addEventListener("scroll", n, !0), () => {
154
+ t.removeEventListener("mousemove", e), window.removeEventListener("scroll", n, !0);
155
+ };
156
+ }, [t, x, v]), w(() => {
157
+ !t || !x || v(k.current.x, k.current.y);
158
+ }, [d, t, x, v]), w(() => {
159
+ x || G("none");
160
+ }, [x]);
161
+ const H = (e, n, s, u = {}) => {
162
+ var C, N;
163
+ if (!((C = e == null ? void 0 : e.image) != null && C.assetId)) return null;
164
+ const c = ((N = $.current.get(e.image.assetId)) == null ? void 0 : N.aspectRatio) ?? 1, l = K(e.image.assetId, P, $.current), { heightPx: b } = T(l, c);
165
+ let m = 0, h = 0;
166
+ return I === "same" ? { x: m, y: h } = J(n, s, l, c) : (m = u.x ?? Math.random() * n, h = u.y ?? Math.random() * s, { x: m, y: h } = O(m, h, n, s, l, b)), {
167
+ id: V.current++,
168
+ assetId: e.image.assetId,
169
+ link: e.link,
170
+ name: e.image.name,
171
+ x: m,
172
+ y: h,
173
+ xRatio: m / n,
174
+ yRatio: h / s,
175
+ aspectRatio: c,
176
+ widthPx: l
177
+ };
178
+ }, z = () => {
179
+ if (!t) return;
180
+ const e = t.getBoundingClientRect(), n = e.width, s = e.height;
181
+ n === 0 || s === 0 || g((u) => u.length === 0 ? u : u.map((c) => {
182
+ const l = P.sizeType === "random" ? c.widthPx : K(c.assetId, P, $.current), { heightPx: b } = T(l, c.aspectRatio);
183
+ if (I === "same") {
184
+ const { x: C, y: N } = J(n, s, l, c.aspectRatio);
185
+ return { ...c, x: C, y: N, widthPx: l };
186
+ }
187
+ const { x: m, y: h } = O(
188
+ c.xRatio * n,
189
+ c.yRatio * s,
190
+ n,
191
+ s,
192
+ l,
193
+ b
194
+ );
195
+ return { ...c, x: m, y: h, widthPx: l };
196
+ }));
197
+ };
198
+ w(() => {
199
+ if (!t || p.length === 0 || !W) return;
200
+ const e = t.getBoundingClientRect(), n = e.width, s = e.height, u = H(p[0], n, s);
201
+ u && (g([u]), R(p.length > 1 ? 1 : 0));
202
+ }, [P, I, t, a, W]), w(() => {
203
+ if (!t) return;
204
+ z();
205
+ const e = new ResizeObserver(z);
206
+ return e.observe(t), window.addEventListener("resize", z), () => {
207
+ e.disconnect(), window.removeEventListener("resize", z);
208
+ };
209
+ }, [t, I, P, d.length]), w(() => {
210
+ X === "last One" && g((e) => e.length > 0 ? [e[e.length - 1]] : []);
211
+ }, [X]);
212
+ const te = (e) => {
213
+ if (!t || p.length === 0 || !W) return;
214
+ const n = t.getBoundingClientRect(), s = e.clientX - n.left, u = e.clientY - n.top;
215
+ if (S === "image" && !Q(s, u, d)) return;
216
+ let c = 0, l = 0;
217
+ I === "on Click" ? (c = s, l = u) : I === "same" ? (c = n.width / 2, l = n.height / 2) : (c = Math.random() * n.width, l = Math.random() * n.height);
218
+ const b = p[E % p.length], m = H(b, n.width, n.height, { x: c, y: l });
219
+ if (!m) return;
220
+ const h = X === "all" ? [...d, m] : [m];
221
+ g(h), R((C) => (C + 1) % p.length), v(e.clientX, e.clientY, h);
222
+ }, Y = F === "custom" && A !== "none";
223
+ return /* @__PURE__ */ Z(ne, { children: [
224
+ /* @__PURE__ */ M("style", { dangerouslySetInnerHTML: { __html: ee } }),
225
+ /* @__PURE__ */ Z(
226
+ "div",
227
+ {
228
+ ref: f,
229
+ onClick: te,
230
+ onMouseEnter: () => q(!0),
231
+ onMouseLeave: () => q(!1),
232
+ className: `${r}-root`,
233
+ style: { cursor: Y ? "none" : "default" },
234
+ children: [
235
+ d.map((e) => /* @__PURE__ */ M(
236
+ "div",
237
+ {
238
+ className: `${r}-wrapper`,
239
+ style: {
240
+ top: `${e.y}px`,
241
+ left: `${e.x}px`,
242
+ width: `${e.widthPx}px`,
243
+ cursor: Y ? "none" : "default"
244
+ },
245
+ children: S === "area" && e.link ? /* @__PURE__ */ M("a", { href: e.link, target: "_blank", rel: "noreferrer", className: `${r}-link`, children: /* @__PURE__ */ M("img", { src: e.assetId, alt: e.name, className: `${r}-image` }) }) : /* @__PURE__ */ M("img", { src: e.assetId, alt: e.name, className: `${r}-image` })
246
+ },
247
+ e.id
248
+ )),
249
+ x && Y && /* @__PURE__ */ M(
250
+ "div",
251
+ {
252
+ className: `${r}-cursor`,
253
+ style: {
254
+ left: `${U.x}px`,
255
+ top: `${U.y}px`,
256
+ transform: "translate(-50%, -50%)",
257
+ backgroundImage: `url('${A}')`,
258
+ backgroundSize: "cover",
259
+ backgroundPosition: "center"
260
+ }
261
+ }
262
+ )
263
+ ]
264
+ }
265
+ )
266
+ ] });
267
+ }
268
+ export {
269
+ he as ClickGallerie
270
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),u=require("react"),D=require("./useScopedStyles-Bf6yohVQ.js"),ee={sizeType:"custom",value:700,min:400,max:700};function z(o,a){return{widthPx:o,heightPx:o*a}}function F(o,a,i,s,t,h){return{x:Math.min(Math.max(o,t/2),i-t/2),y:Math.min(Math.max(a,h/2),s-h/2)}}function A(o,a,i,s){const{heightPx:t}=z(i,s);return F(o/2,a/2,o,a,i,t)}function Z(o,a,i){for(const s of i){const{heightPx:t}=z(s.widthPx,s.aspectRatio),h=s.widthPx/2,f=t/2;if(o>=s.x-h&&o<=s.x+h&&a>=s.y-f&&a<=s.y+f)return!0}return!1}function te(o,a,i,s,t,h,f,p){if(t==="system")return"none";const P=s.getBoundingClientRect(),R=document.elementFromPoint(P.left+o,P.top+a);return R&&R.closest("a")?"none":Z(o,a,i)||h==="area"?f??"none":p??"none"}function H(o,a,i){var p;const{sizeType:s,value:t,min:h,max:f}=a;return s==="custom"?t:s==="as is"?((p=i.get(o))==null?void 0:p.naturalWidth)??t:Math.round(Math.random()*(f-h)+h)}function ne(o){return`
2
+ .${o}-root {
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ width: 100%;
7
+ height: 100%;
8
+ overflow: hidden;
9
+ }
10
+ .${o}-wrapper {
11
+ position: absolute;
12
+ transform: translate(-50%, -50%);
13
+ height: auto;
14
+ }
15
+ .${o}-image {
16
+ display: block;
17
+ width: 100%;
18
+ height: auto;
19
+ object-fit: cover;
20
+ position: relative;
21
+ user-select: none;
22
+ pointer-events: none;
23
+ }
24
+ .${o}-link {
25
+ width: 100%;
26
+ display: block;
27
+ }
28
+ .${o}-cursor {
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ pointer-events: none;
33
+ width: 32px;
34
+ height: 32px;
35
+ }
36
+ `}function se(o){return new Promise(a=>{const i=new Image;i.onload=()=>{a({aspectRatio:i.naturalHeight/i.naturalWidth,naturalWidth:i.naturalWidth})},i.onerror=()=>{a({aspectRatio:1,naturalWidth:700})},i.src=o})}async function re(o){const a=[...new Set(o.filter(Boolean))],i=await Promise.all(a.map(async s=>[s,await se(s)]));return new Map(i)}function oe({settings:o,content:a=[],isEditor:i}){const{prefix:s}=D.useScopedStyles(),[t,h]=u.useState(null),[f,p]=u.useState([]),[P,R]=u.useState(0),J=u.useRef(0),[O,K]=u.useState({x:0,y:0}),[X,Y]=u.useState("none"),M=u.useRef({x:0,y:0}),[w,G]=u.useState(!1),[N,T]=u.useState(!1),S=u.useRef(new Map),{imageSize:k=ee,cursor:W="system",target:$="area",position:I="random",visible:_="all",defaultCursor:b=null,hoverCursor:j=null}=o,y=a.filter(e=>{var n;return!!((n=e==null?void 0:e.image)!=null&&n.assetId)}),Q=u.useMemo(()=>ne(s),[s]),v=u.useCallback((e,n,r=f)=>{if(!t)return;const d=t.getBoundingClientRect(),c=e-d.left,l=n-d.top;K({x:c,y:l}),Y(te(c,l,r,t,W,$,j,b))},[t,f,W,$,j,b]);u.useEffect(()=>{const e=[...y.map(r=>r.image.assetId),b,j].filter(r=>!!r);if(e.length===0){S.current=new Map,T(!0);return}let n=!1;return T(!1),re(e).then(r=>{n||(S.current=r,T(!0))}),()=>{n=!0}},[a,b,j]),u.useEffect(()=>{if(!t)return;const e=r=>{r.stopPropagation(),M.current={x:r.clientX,y:r.clientY},v(r.clientX,r.clientY)},n=()=>{w&&v(M.current.x,M.current.y)};return t.addEventListener("mousemove",e),window.addEventListener("scroll",n,!0),()=>{t.removeEventListener("mousemove",e),window.removeEventListener("scroll",n,!0)}},[t,w,v]),u.useEffect(()=>{!t||!w||v(M.current.x,M.current.y)},[f,t,w,v]),u.useEffect(()=>{w||Y("none")},[w]);const U=(e,n,r,d={})=>{var C,L;if(!((C=e==null?void 0:e.image)!=null&&C.assetId))return null;const c=((L=S.current.get(e.image.assetId))==null?void 0:L.aspectRatio)??1,l=H(e.image.assetId,k,S.current),{heightPx:E}=z(l,c);let m=0,g=0;return I==="same"?{x:m,y:g}=A(n,r,l,c):(m=d.x??Math.random()*n,g=d.y??Math.random()*r,{x:m,y:g}=F(m,g,n,r,l,E)),{id:J.current++,assetId:e.image.assetId,link:e.link,name:e.image.name,x:m,y:g,xRatio:m/n,yRatio:g/r,aspectRatio:c,widthPx:l}},B=()=>{if(!t)return;const e=t.getBoundingClientRect(),n=e.width,r=e.height;n===0||r===0||p(d=>d.length===0?d:d.map(c=>{const l=k.sizeType==="random"?c.widthPx:H(c.assetId,k,S.current),{heightPx:E}=z(l,c.aspectRatio);if(I==="same"){const{x:C,y:L}=A(n,r,l,c.aspectRatio);return{...c,x:C,y:L,widthPx:l}}const{x:m,y:g}=F(c.xRatio*n,c.yRatio*r,n,r,l,E);return{...c,x:m,y:g,widthPx:l}}))};u.useEffect(()=>{if(!t||y.length===0||!N)return;const e=t.getBoundingClientRect(),n=e.width,r=e.height,d=U(y[0],n,r);d&&(p([d]),R(y.length>1?1:0))},[k,I,t,a,N]),u.useEffect(()=>{if(!t)return;B();const e=new ResizeObserver(B);return e.observe(t),window.addEventListener("resize",B),()=>{e.disconnect(),window.removeEventListener("resize",B)}},[t,I,k,f.length]),u.useEffect(()=>{_==="last One"&&p(e=>e.length>0?[e[e.length-1]]:[])},[_]);const V=e=>{if(!t||y.length===0||!N)return;const n=t.getBoundingClientRect(),r=e.clientX-n.left,d=e.clientY-n.top;if($==="image"&&!Z(r,d,f))return;let c=0,l=0;I==="on Click"?(c=r,l=d):I==="same"?(c=n.width/2,l=n.height/2):(c=Math.random()*n.width,l=Math.random()*n.height);const E=y[P%y.length],m=U(E,n.width,n.height,{x:c,y:l});if(!m)return;const g=_==="all"?[...f,m]:[m];p(g),R(C=>(C+1)%y.length),v(e.clientX,e.clientY,g)},q=W==="custom"&&X!=="none";return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:Q}}),x.jsxs("div",{ref:h,onClick:V,onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),className:`${s}-root`,style:{cursor:q?"none":"default"},children:[f.map(e=>x.jsx("div",{className:`${s}-wrapper`,style:{top:`${e.y}px`,left:`${e.x}px`,width:`${e.widthPx}px`,cursor:q?"none":"default"},children:$==="area"&&e.link?x.jsx("a",{href:e.link,target:"_blank",rel:"noreferrer",className:`${s}-link`,children:x.jsx("img",{src:e.assetId,alt:e.name,className:`${s}-image`})}):x.jsx("img",{src:e.assetId,alt:e.name,className:`${s}-image`})},e.id)),w&&q&&x.jsx("div",{className:`${s}-cursor`,style:{left:`${O.x}px`,top:`${O.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${X}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}exports.ClickGallerie=oe;
@@ -874,7 +874,6 @@ export declare const BurgerComponent: {
874
874
  states: string[];
875
875
  statePanels: string[];
876
876
  };
877
- sourceCode: string;
878
877
  assetsPaths: {
879
878
  content: never[];
880
879
  parameters: {
@@ -25,7 +25,6 @@ export declare const ClickGallerieComponent: {
25
25
  url: string;
26
26
  };
27
27
  schema: ComponentSchemaV1;
28
- sourceCode: string;
29
28
  assetsPaths: {
30
29
  content: {
31
30
  path: string;
@@ -34,5 +34,4 @@ export declare const FAQComponent: {
34
34
  answerFontSettings: string;
35
35
  };
36
36
  schema: ComponentSchemaV1;
37
- sourceCode: string;
38
37
  };
@@ -772,7 +772,6 @@ export declare const FormComponent: {
772
772
  allowedPlugins: string[];
773
773
  states: string[];
774
774
  };
775
- sourceCode: string;
776
775
  fontRelations: {
777
776
  inputFontSettings: string;
778
777
  buttonFontSettings: string;
@@ -38,5 +38,4 @@ export declare const GridComponent: {
38
38
  lightboxCounterFontSettings: string;
39
39
  };
40
40
  schema: ComponentSchemaV1;
41
- sourceCode: string;
42
41
  };
@@ -18,7 +18,6 @@ export declare const HelixComponent: {
18
18
  };
19
19
  };
20
20
  schema: ComponentSchemaV1;
21
- sourceCode: string;
22
21
  assetsPaths: {
23
22
  content: {
24
23
  path: string;
@@ -34,5 +34,4 @@ export declare const HiveComponent: {
34
34
  };
35
35
  fontRelations: {};
36
36
  schema: ComponentSchemaV1;
37
- sourceCode: string;
38
37
  };
@@ -28,7 +28,6 @@ export declare const LightboxJournalComponent: {
28
28
  url: string;
29
29
  };
30
30
  schema: ComponentSchemaV1;
31
- sourceCode: string;
32
31
  assetsPaths: {
33
32
  content: {
34
33
  path: string;
@@ -28,7 +28,6 @@ export declare const LightboxStripComponent: {
28
28
  url: string;
29
29
  };
30
30
  schema: ComponentSchemaV1;
31
- sourceCode: string;
32
31
  assetsPaths: {
33
32
  content: {
34
33
  path: string;
@@ -33,5 +33,4 @@ export declare const ListComponent: {
33
33
  };
34
34
  fontRelations: {};
35
35
  schema: ComponentSchemaV1;
36
- sourceCode: string;
37
36
  };
@@ -27,7 +27,6 @@ export declare const MarqueeComponent: {
27
27
  url: string;
28
28
  };
29
29
  schema: ComponentSchemaV1;
30
- sourceCode: string;
31
30
  assetsPaths: {
32
31
  content: {
33
32
  path: string;
@@ -27,7 +27,6 @@ export declare const MarqueeTextComponent: {
27
27
  url: string;
28
28
  };
29
29
  schema: ComponentSchemaV1;
30
- sourceCode: string;
31
30
  assetsPaths: {
32
31
  content: {
33
32
  path: string;
@@ -18,7 +18,6 @@ export declare const MercuryComponent: {
18
18
  url: string;
19
19
  };
20
20
  schema: ComponentSchemaV1;
21
- sourceCode: string;
22
21
  assetsPaths: {
23
22
  content: {
24
23
  path: string;
@@ -653,5 +653,4 @@ export declare const OnelinerFormComponent: {
653
653
  allowedPlugins: string[];
654
654
  states: string[];
655
655
  };
656
- sourceCode: string;
657
656
  };
@@ -26,7 +26,6 @@ export declare const PretextComponent: {
26
26
  url: string;
27
27
  };
28
28
  schema: ComponentSchemaV1;
29
- sourceCode: string;
30
29
  assetsPaths: {
31
30
  content: never[];
32
31
  parameters: {
@@ -21,7 +21,6 @@ export declare const ScaleComponent: {
21
21
  url: string;
22
22
  };
23
23
  schema: ComponentSchemaV1;
24
- sourceCode: string;
25
24
  assetsPaths: {
26
25
  content: {
27
26
  path: string;
@@ -601,7 +601,6 @@ export declare const SimpleButtonComponent: {
601
601
  };
602
602
  states: string[];
603
603
  };
604
- sourceCode: string;
605
604
  assetsPaths: {
606
605
  content: never[];
607
606
  parameters: {
@@ -25,7 +25,6 @@ export declare const Slider20Component: {
25
25
  url: string;
26
26
  };
27
27
  schema: ComponentSchemaV1;
28
- sourceCode: string;
29
28
  assetsPaths: {
30
29
  content: {
31
30
  path: string;
@@ -43,7 +43,6 @@ export declare const TestimonialGridComponent: {
43
43
  };
44
44
  };
45
45
  schema: ComponentSchemaV1;
46
- sourceCode: string;
47
46
  assetsPaths: {
48
47
  content: {
49
48
  path: string;
@@ -43,7 +43,6 @@ export declare const TestimonialSingleComponent: {
43
43
  };
44
44
  };
45
45
  schema: ComponentSchemaV1;
46
- sourceCode: string;
47
46
  assetsPaths: {
48
47
  content: {
49
48
  path: string;
@@ -36,5 +36,4 @@ export declare const WaterfallComponent: {
36
36
  titleFontSettings: string;
37
37
  };
38
38
  schema: ComponentSchemaV1;
39
- sourceCode: string;
40
39
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),L=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const d=require("classnames"),M=require("./RichTextRenderer-CIy6yI8U.js"),s=require("./scalingValue-CSHYgTZl.js"),k=require("./SvgImage-DFlmxAoL.js"),U=require("./textStylesToCss-CNN3zZTV.js"),H="ControlSlider-module__wrapper___sHEkd",Y="ControlSlider-module__hoverArrow___A-dOH",K="ControlSlider-module__sliderItem___QQSkR",Q="ControlSlider-module__sliderImage___9hRl-",Z="ControlSlider-module__arrow___05ghY",G="ControlSlider-module__arrowVertical___tBfVN",J="ControlSlider-module__nextArrow___-30Yc",X="ControlSlider-module__arrowInner___aEra3",E="ControlSlider-module__arrowIcon___S4ztF",ee="ControlSlider-module__arrowImg___2dwJW",te="ControlSlider-module__mirror___brd6U",oe="ControlSlider-module__pagination___bicLF",ne="ControlSlider-module__paginationInner___bT-P-",ie="ControlSlider-module__paginationVertical___zYqKw",re="ControlSlider-module__paginationItem___nTRbk",le="ControlSlider-module__dot___p1Qun",ae="ControlSlider-module__activeDot___LHFaj",se="ControlSlider-module__paginationInsideBottom___R3FWn",ce="ControlSlider-module__paginationInsideTop___V-qb-",de="ControlSlider-module__paginationOutsideBottom___14w8D",_e="ControlSlider-module__paginationOutsideTop___SCLqB",me="ControlSlider-module__paginationInsideLeft___yOBRZ",ge="ControlSlider-module__paginationInsideRight___Rtt3o",pe="ControlSlider-module__paginationOutsideLeft___lahaw",ue="ControlSlider-module__paginationOutsideRight___EtuQa",he="ControlSlider-module__imgWrapper___UjEgB",fe="ControlSlider-module__captionBlock___dJ6-j",Ce="ControlSlider-module__captionTextWrapper___HFlpf",Se="ControlSlider-module__captionText___uGBVc",ve="ControlSlider-module__active___WZK4G",we="ControlSlider-module__withPointerEvents___t-18M",Ie="ControlSlider-module__topLeftAlignment___zjnGM",xe="ControlSlider-module__topCenterAlignment___gD1xW",Ae="ControlSlider-module__topRightAlignment___NMapS",ye="ControlSlider-module__middleLeftAlignment___OnUrY",Re="ControlSlider-module__middleCenterAlignment___Tdkl0",be="ControlSlider-module__middleRightAlignment___wEbfX",je="ControlSlider-module__bottomLeftAlignment___cTP2-",Le="ControlSlider-module__bottomCenterAlignment___c54fB",ke="ControlSlider-module__bottomRightAlignment___kEwrz",Ve="ControlSlider-module__clickOverlay___DZA28",Te="ControlSlider-module__contain___pLyq7",Oe="ControlSlider-module__cover___KdDat",e={wrapper:H,hoverArrow:Y,sliderItem:K,sliderImage:Q,arrow:Z,arrowVertical:G,nextArrow:J,arrowInner:X,arrowIcon:E,arrowImg:ee,mirror:te,pagination:oe,paginationInner:ne,paginationVertical:ie,paginationItem:re,dot:le,activeDot:ae,paginationInsideBottom:se,paginationInsideTop:ce,paginationOutsideBottom:de,paginationOutsideTop:_e,paginationInsideLeft:me,paginationInsideRight:ge,paginationOutsideLeft:pe,paginationOutsideRight:ue,imgWrapper:he,captionBlock:fe,captionTextWrapper:Ce,captionText:Se,active:ve,withPointerEvents:we,topLeftAlignment:Ie,topCenterAlignment:xe,topRightAlignment:Ae,middleLeftAlignment:ye,middleCenterAlignment:Re,middleRightAlignment:be,bottomLeftAlignment:je,bottomCenterAlignment:Le,bottomRightAlignment:ke,clickOverlay:Ve,contain:Te,cover:Oe},Ne={"top-left":e.topLeftAlignment,"top-center":e.topCenterAlignment,"top-right":e.topRightAlignment,"middle-left":e.middleLeftAlignment,"middle-center":e.middleCenterAlignment,"middle-right":e.middleRightAlignment,"bottom-left":e.bottomLeftAlignment,"bottom-center":e.bottomCenterAlignment,"bottom-right":e.bottomRightAlignment};function ze({settings:p,content:u,styles:T,isEditor:l}){const[_,O]=g.useState(null),{widthSettings:I,fontSettings:v,letterSpacing:N,textAlign:z,wordSpacing:B,fontSizeLineHeight:x,textAppearance:w,color:W}=T.imageCaption??{},[m,F]=g.useState(void 0),[C,q]=g.useState(null),[S,D]=g.useState(0),[$,P]=g.useState(0),{direction:n,transition:a,controls:o,pagination:i,imageCaption:h,triggers:f}=p,A=g.useRef(a.type),{x:y,y:R}=p.controls.offset,b=r=>{_&&_.go(r)};return g.useEffect(()=>{if(!C)return;const r=new ResizeObserver(c=>{if(!_)return;const[j]=c;F({width:Math.round(j.contentRect.width),height:Math.round(j.contentRect.height)})});return r.observe(C),()=>r.unobserve(C)},[C]),g.useEffect(()=>{!_||A.current===a.type||(P(r=>r+1),A.current=a.type)},[a.type]),t.jsx("div",{className:d(e.wrapper,{[e.editor]:l}),ref:q,children:t.jsxs("div",{className:e.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:a.backgroundColor&&a.type==="fade in"?a.backgroundColor:"transparent"},children:[p.imageCaption.isActive&&t.jsx("div",{className:d(e.captionBlock),children:t.jsx("div",{className:e.captionTextWrapper,children:u.map((r,c)=>t.jsx("div",{className:d(e.captionText,Ne[h.alignment],{[e.withPointerEvents]:c===S&&l,[e.active]:c===S}),style:{fontFamily:U.normalizeFontFamilyCssValue(v.fontFamily),fontWeight:v.fontWeight,fontStyle:v.fontStyle,width:I.sizing==="auto"?"max-content":s.scalingValue(I.width,l),letterSpacing:s.scalingValue(N,l),wordSpacing:s.scalingValue(B,l),textAlign:z,fontSize:s.scalingValue(x.fontSize,l),lineHeight:s.scalingValue(x.lineHeight,l),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:W,transitionDuration:a.duration?`${Math.round(parseInt(a.duration)/2)}ms`:"500ms"},children:t.jsx("div",{"data-styles":"imageCaption",className:e.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:s.scalingValue(h.offset.y,l),left:s.scalingValue(h.offset.x,l)},children:t.jsx(M.RichTextRenderer,{content:r.imageCaption})})},c))})}),t.jsx(L.Splide2,{onMove:r=>{D(r.index)},ref:O,options:{arrows:!1,speed:a.duration?parseInt(a.duration):500,autoplay:f.autoPlay!==null,...f.autoPlay!==null&&{interval:parseInt(f.autoPlay)*1e3},direction:n==="horiz"||a.type==="fade in"?"ltr":"ttb",pagination:!1,drag:f.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:a.type==="fade in"?"fade":"loop",rewind:!0},children:u.map((r,c)=>t.jsx(L.SplideSlide,{children:t.jsx("div",{className:e.sliderItem,children:t.jsx("div",{className:e.imgWrapper,children:t.jsx("img",{className:d(e.sliderImage,{[e.contain]:r.image.objectFit==="contain",[e.cover]:r.image.objectFit==="cover"}),src:r.image.assetId,alt:r.image.name??""})})})},c))},$),o.isActive&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:d(e.arrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{onClick:()=>{b("-1")},className:e.arrowInner,style:{transform:`translate(${s.scalingValue(y,l)}, ${s.scalingValue(R*(n==="horiz"?1:-1),l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:d(e.arrowImg,e.mirror)}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg,e.mirror)})]})}),t.jsx("div",{className:d(e.arrow,e.nextArrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{className:e.arrowInner,onClick:()=>b("+1"),style:{transform:`translate(${s.scalingValue(y*(n==="horiz"?-1:1),l)}, ${s.scalingValue(R,l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:e.arrowImg}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg)})]})})]}),f.triggersList.click&&t.jsx("div",{className:e.clickOverlay,onClick:()=>{_&&_.go("+1")}}),i.isActive&&t.jsx("div",{className:d(e.pagination,{[e.paginationInsideBottom]:i.position==="inside-1"&&n==="horiz",[e.paginationInsideTop]:i.position==="inside-2"&&n==="horiz",[e.paginationOutsideBottom]:i.position==="outside-1"&&n==="horiz",[e.paginationOutsideTop]:i.position==="outside-2"&&n==="horiz",[e.paginationInsideLeft]:i.position==="inside-1"&&n==="vert",[e.paginationInsideRight]:i.position==="inside-2"&&n==="vert",[e.paginationOutsideLeft]:i.position==="outside-1"&&n==="vert",[e.paginationOutsideRight]:i.position==="outside-2"&&n==="vert",[e.paginationVertical]:n==="vert"}),children:t.jsx("div",{className:e.paginationInner,style:{backgroundColor:i.colors[2],transform:`scale(${i.scale/100}) translate(${s.scalingValue(i.offset.x,l)}, ${s.scalingValue(i.offset.y,l)}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:u.map((r,c)=>t.jsx("button",{onClick:()=>{_&&_.go(c)},className:d(e.paginationItem),children:t.jsx("div",{className:d(e.dot,{[e.activeDot]:c===S}),style:{backgroundColor:c===S?i.colors[0]:i.colors[1],"--pagination-hover-color":i.hover}})},c))})})]})})}function V({color:p,className:u}){return t.jsx("svg",{viewBox:"0 0 10 18",className:u,children:t.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:t.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:p,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}exports.ControlSlider=ze;