@drawbridge/components 0.1.37 → 0.1.38

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 (328) hide show
  1. package/components/styles.css +68 -355
  2. package/dist/advertisement.js +15 -20
  3. package/dist/advertisement.mjs +15 -20
  4. package/dist/bridge/advertisements.js +4 -2
  5. package/dist/bridge/advertisements.mjs +5 -3
  6. package/dist/bridge/fields.js +89 -6
  7. package/dist/bridge/fields.mjs +89 -7
  8. package/dist/bridge/form-subdomain-agreement.js +165 -0
  9. package/dist/bridge/form-subdomain-agreement.mjs +132 -0
  10. package/dist/bridge/form-subdomain-embed.js +5 -1
  11. package/dist/bridge/form-subdomain-embed.mjs +5 -1
  12. package/dist/bridge/form-subdomain-header.js +21 -14
  13. package/dist/bridge/form-subdomain-header.mjs +20 -14
  14. package/dist/bridge/form-subdomain-issue.js +17 -8
  15. package/dist/bridge/form-subdomain-issue.mjs +17 -8
  16. package/dist/bridge/form-subdomain-missions.js +58 -52
  17. package/dist/bridge/form-subdomain-missions.mjs +60 -54
  18. package/dist/bridge/form-subdomain.js +223 -94
  19. package/dist/bridge/form-subdomain.mjs +222 -96
  20. package/dist/bridge/lib/entry.js +61 -6
  21. package/dist/bridge/lib/entry.mjs +51 -5
  22. package/dist/bridge/lib/order.js +23 -0
  23. package/dist/bridge/lib/order.mjs +20 -0
  24. package/dist/bridge/template-layout.js +5 -2
  25. package/dist/bridge/template-layout.mjs +6 -3
  26. package/dist/bridge/template-modal.js +82 -15
  27. package/dist/bridge/template-modal.mjs +83 -16
  28. package/dist/bridge/template-subdomain-gallery.js +126 -75
  29. package/dist/bridge/template-subdomain-gallery.mjs +122 -75
  30. package/dist/bridge/template-subdomain.js +16 -14
  31. package/dist/bridge/template-subdomain.mjs +17 -15
  32. package/dist/dashboard/avatar.js +5 -0
  33. package/dist/dashboard/avatar.mjs +5 -0
  34. package/dist/dashboard/campaign-form.js +1798 -0
  35. package/dist/dashboard/campaign-form.mjs +1769 -0
  36. package/dist/dashboard/card-affiliate.js +3 -2
  37. package/dist/dashboard/card-affiliate.mjs +3 -2
  38. package/dist/dashboard/card-campaign-agreement.js +172 -0
  39. package/dist/dashboard/card-campaign-agreement.mjs +139 -0
  40. package/dist/dashboard/card-campaign-switch.js +34 -9
  41. package/dist/dashboard/card-campaign-switch.mjs +32 -8
  42. package/dist/dashboard/card-order.js +6 -14
  43. package/dist/dashboard/card-order.mjs +6 -14
  44. package/dist/dashboard/card-section.js +69 -26
  45. package/dist/dashboard/card-section.mjs +65 -26
  46. package/dist/dashboard/card-shortcut.js +181 -0
  47. package/dist/dashboard/card-shortcut.mjs +152 -0
  48. package/dist/dashboard/card-tile.js +3 -35
  49. package/dist/dashboard/card-tile.mjs +3 -34
  50. package/dist/dashboard/document-blocks.js +305 -0
  51. package/dist/dashboard/document-blocks.mjs +270 -0
  52. package/dist/dashboard/drawer-subscription.js +52 -14
  53. package/dist/dashboard/drawer-subscription.mjs +52 -14
  54. package/dist/dashboard/drawer.js +20 -3
  55. package/dist/dashboard/drawer.mjs +21 -4
  56. package/dist/dashboard/dropdown.js +6 -2
  57. package/dist/dashboard/dropdown.mjs +6 -2
  58. package/dist/dashboard/form-admin-subscription-custom.js +72 -8
  59. package/dist/dashboard/form-admin-subscription-custom.mjs +72 -8
  60. package/dist/dashboard/form-ai.js +0 -148
  61. package/dist/dashboard/form-ai.mjs +1 -148
  62. package/dist/dashboard/form-filters-analytics.js +86 -38
  63. package/dist/dashboard/form-filters-analytics.mjs +85 -38
  64. package/dist/dashboard/form-organization-brand.js +30 -13
  65. package/dist/dashboard/form-organization-brand.mjs +30 -13
  66. package/dist/dashboard/form-organization-campaign-advertisement.js +38 -112
  67. package/dist/dashboard/form-organization-campaign-advertisement.mjs +38 -112
  68. package/dist/dashboard/form-organization-campaign-advertisements.js +374 -0
  69. package/dist/dashboard/form-organization-campaign-advertisements.mjs +345 -0
  70. package/dist/dashboard/form-organization-campaign-agreement.js +402 -210
  71. package/dist/dashboard/form-organization-campaign-agreement.mjs +398 -211
  72. package/dist/dashboard/form-organization-campaign-design.js +258 -0
  73. package/dist/dashboard/form-organization-campaign-design.mjs +223 -0
  74. package/dist/dashboard/form-organization-campaign-field-item.js +585 -0
  75. package/dist/dashboard/form-organization-campaign-field-item.mjs +552 -0
  76. package/dist/dashboard/form-organization-campaign-field-number.js +48 -7
  77. package/dist/dashboard/form-organization-campaign-field-number.mjs +48 -7
  78. package/dist/dashboard/form-organization-campaign-field-select.js +15 -4
  79. package/dist/dashboard/form-organization-campaign-field-select.mjs +15 -4
  80. package/dist/dashboard/form-organization-campaign-field-skill.js +359 -0
  81. package/dist/dashboard/form-organization-campaign-field-skill.mjs +330 -0
  82. package/dist/dashboard/form-organization-campaign-field-text.js +46 -6
  83. package/dist/dashboard/form-organization-campaign-field-text.mjs +46 -6
  84. package/dist/dashboard/form-organization-campaign-field-textarea.js +22 -13
  85. package/dist/dashboard/form-organization-campaign-field-textarea.mjs +22 -13
  86. package/dist/dashboard/form-organization-campaign-footer.js +178 -0
  87. package/dist/dashboard/form-organization-campaign-footer.mjs +149 -0
  88. package/dist/dashboard/form-organization-campaign-integration-age.js +2 -35
  89. package/dist/dashboard/form-organization-campaign-integration-age.mjs +2 -35
  90. package/dist/dashboard/form-organization-campaign-integration-geocode.js +4 -1
  91. package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +4 -1
  92. package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
  93. package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
  94. package/dist/dashboard/form-organization-campaign-page-preview.js +1 -2
  95. package/dist/dashboard/form-organization-campaign-page-preview.mjs +1 -2
  96. package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
  97. package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
  98. package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
  99. package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
  100. package/dist/dashboard/form-organization-campaign-page-slug.js +2 -3
  101. package/dist/dashboard/form-organization-campaign-page-slug.mjs +2 -3
  102. package/dist/dashboard/form-organization-campaign-page.js +168 -265
  103. package/dist/dashboard/form-organization-campaign-page.mjs +170 -266
  104. package/dist/dashboard/form-organization-campaign-section.js +125 -107
  105. package/dist/dashboard/form-organization-campaign-section.mjs +121 -107
  106. package/dist/dashboard/form-organization-campaign.js +119 -9
  107. package/dist/dashboard/form-organization-campaign.mjs +118 -9
  108. package/dist/dashboard/form-organization-file-frame.js +7 -1
  109. package/dist/dashboard/form-organization-file-frame.mjs +7 -1
  110. package/dist/dashboard/form-organization-workflow.js +587 -530
  111. package/dist/dashboard/form-organization-workflow.mjs +588 -531
  112. package/dist/dashboard/form-organization.js +22 -0
  113. package/dist/dashboard/form-organization.mjs +22 -0
  114. package/dist/dashboard/form-reposition.js +396 -0
  115. package/dist/dashboard/form-reposition.mjs +359 -0
  116. package/dist/dashboard/form-support.js +189 -0
  117. package/dist/dashboard/form-support.mjs +160 -0
  118. package/dist/dashboard/form-tests.js +683 -0
  119. package/dist/dashboard/form-tests.mjs +646 -0
  120. package/dist/dashboard/form-verify-prize.js +114 -34
  121. package/dist/dashboard/form-verify-prize.mjs +111 -34
  122. package/dist/dashboard/google.js +8 -1
  123. package/dist/dashboard/google.mjs +8 -1
  124. package/dist/dashboard/input-array.js +2 -0
  125. package/dist/dashboard/input-array.mjs +2 -0
  126. package/dist/dashboard/input-editor.js +17 -6
  127. package/dist/dashboard/input-editor.mjs +17 -6
  128. package/dist/dashboard/input-fields.js +287 -437
  129. package/dist/dashboard/input-fields.mjs +287 -436
  130. package/dist/dashboard/input-file.js +70 -2
  131. package/dist/dashboard/input-file.mjs +70 -2
  132. package/dist/dashboard/input-font.js +64 -55
  133. package/dist/dashboard/input-font.mjs +64 -55
  134. package/dist/dashboard/input-resource.js +4 -1
  135. package/dist/dashboard/input-resource.mjs +4 -1
  136. package/dist/dashboard/lib/ab-tests.js +130 -0
  137. package/dist/dashboard/lib/ab-tests.mjs +94 -0
  138. package/dist/dashboard/lib/features.js +1 -1
  139. package/dist/dashboard/lib/features.mjs +1 -1
  140. package/dist/dashboard/lib/focus.js +93 -0
  141. package/dist/dashboard/lib/focus.mjs +69 -0
  142. package/dist/dashboard/lib/form-page.js +203 -0
  143. package/dist/dashboard/lib/form-page.mjs +155 -0
  144. package/dist/dashboard/lib/item-list.js +0 -15
  145. package/dist/dashboard/lib/item-list.mjs +0 -14
  146. package/dist/dashboard/lib/rail.js +16 -17
  147. package/dist/dashboard/lib/rail.mjs +15 -16
  148. package/dist/dashboard/lib/sms.js +8 -2
  149. package/dist/dashboard/lib/sms.mjs +6 -1
  150. package/dist/dashboard/list-resource.js +2 -0
  151. package/dist/dashboard/list-resource.mjs +2 -0
  152. package/dist/dashboard/menu.js +54 -5
  153. package/dist/dashboard/menu.mjs +53 -5
  154. package/dist/dashboard/modal.js +19 -4
  155. package/dist/dashboard/modal.mjs +20 -5
  156. package/dist/dashboard/order-sections.js +4 -0
  157. package/dist/dashboard/order-sections.mjs +4 -0
  158. package/dist/dashboard/preview.js +838 -324
  159. package/dist/dashboard/preview.mjs +826 -324
  160. package/dist/dashboard/provider-ui.js +20 -12
  161. package/dist/dashboard/provider-ui.mjs +21 -13
  162. package/dist/dashboard/recharts.js +53 -28
  163. package/dist/dashboard/recharts.mjs +53 -28
  164. package/dist/dashboard/swatch.js +35 -0
  165. package/dist/dashboard/swatch.mjs +31 -0
  166. package/dist/dashboard/table-contacts.js +6 -10
  167. package/dist/dashboard/table-contacts.mjs +6 -10
  168. package/dist/dashboard/table.js +10 -3
  169. package/dist/dashboard/table.mjs +9 -3
  170. package/dist/dashboard/template-dashboard.js +12 -7
  171. package/dist/dashboard/template-dashboard.mjs +11 -7
  172. package/dist/dashboard/template-design.js +564 -0
  173. package/dist/dashboard/template-design.mjs +531 -0
  174. package/dist/dashboard/template-rail.js +198 -126
  175. package/dist/dashboard/template-rail.mjs +196 -125
  176. package/dist/dashboard/template-socket.js +0 -3
  177. package/dist/dashboard/template-socket.mjs +0 -3
  178. package/dist/dashboard/template-test-page.js +436 -0
  179. package/dist/dashboard/template-test-page.mjs +407 -0
  180. package/dist/dashboard/template-tests.js +141 -0
  181. package/dist/dashboard/template-tests.mjs +112 -0
  182. package/dist/dashboard/template-ui.js +20 -11
  183. package/dist/dashboard/template-ui.mjs +22 -13
  184. package/dist/dashboard/template-variant.js +185 -0
  185. package/dist/dashboard/template-variant.mjs +156 -0
  186. package/dist/icons/arrow-down-long.js +47 -0
  187. package/dist/icons/arrow-down-long.mjs +28 -0
  188. package/dist/icons/arrows-pointing-out.js +46 -0
  189. package/dist/icons/arrows-pointing-out.mjs +27 -0
  190. package/dist/icons/beaker.js +46 -0
  191. package/dist/icons/beaker.mjs +27 -0
  192. package/dist/icons/identification.js +46 -0
  193. package/dist/icons/identification.mjs +27 -0
  194. package/dist/icons/lifebuoy.js +46 -0
  195. package/dist/icons/lifebuoy.mjs +27 -0
  196. package/dist/icons/rectangle-group.js +46 -0
  197. package/dist/icons/rectangle-group.mjs +27 -0
  198. package/dist/icons/rectangle-stack.js +46 -0
  199. package/dist/icons/rectangle-stack.mjs +27 -0
  200. package/dist/icons/shopping-bag.js +46 -0
  201. package/dist/icons/shopping-bag.mjs +27 -0
  202. package/dist/icons/swatch.js +46 -0
  203. package/dist/icons/swatch.mjs +27 -0
  204. package/dist/icons/window.js +46 -0
  205. package/dist/icons/window.mjs +27 -0
  206. package/dist/icons/zoom-in.js +46 -0
  207. package/dist/icons/zoom-in.mjs +27 -0
  208. package/dist/input-answer.js +60 -0
  209. package/dist/input-answer.mjs +27 -0
  210. package/dist/input-checkbox.js +7 -1
  211. package/dist/input-checkbox.mjs +7 -1
  212. package/dist/input-name.js +3 -3
  213. package/dist/input-name.mjs +3 -3
  214. package/dist/input-select.js +3 -1
  215. package/dist/input-select.mjs +3 -1
  216. package/dist/provider-font.js +4 -3
  217. package/dist/provider-font.mjs +4 -3
  218. package/dist/shared/badge.js +15 -0
  219. package/dist/shared/badge.mjs +11 -0
  220. package/dist/shared/carousel.js +11 -7
  221. package/dist/shared/carousel.mjs +11 -7
  222. package/dist/shared/document-pieces.js +295 -0
  223. package/dist/shared/document-pieces.mjs +260 -0
  224. package/dist/shared/lib/campaign.js +3 -9
  225. package/dist/shared/lib/campaign.mjs +3 -9
  226. package/dist/shared/lib/helpers.js +24 -0
  227. package/dist/shared/lib/helpers.mjs +22 -0
  228. package/dist/shared/lib/video.js +6 -0
  229. package/dist/shared/lib/video.mjs +5 -0
  230. package/dist/shared/sortable.js +27 -10
  231. package/dist/shared/sortable.mjs +27 -10
  232. package/dist/shared/tabs.js +1 -1
  233. package/dist/shared/tabs.mjs +1 -1
  234. package/dist/video.js +127 -9
  235. package/dist/video.mjs +125 -11
  236. package/package.json +176 -20
  237. package/types/bridge/fields.d.ts +6 -1
  238. package/types/bridge/form-subdomain-agreement.d.ts +27 -0
  239. package/types/bridge/form-subdomain-missions.d.ts +2 -0
  240. package/types/bridge/form-subdomain.d.ts +62 -3
  241. package/types/bridge/lib/entry.d.ts +44 -7
  242. package/types/bridge/lib/order.d.ts +13 -2
  243. package/types/bridge/subdomain-content.d.ts +1 -0
  244. package/types/bridge/template-subdomain-gallery.d.ts +13 -1
  245. package/types/dashboard/campaign-form.d.ts +42 -0
  246. package/types/dashboard/card-campaign-agreement.d.ts +26 -0
  247. package/types/dashboard/card-campaign-switch.d.ts +20 -1
  248. package/types/dashboard/card-order.d.ts +2 -2
  249. package/types/dashboard/card-section.d.ts +9 -1
  250. package/types/dashboard/card-shortcut.d.ts +38 -0
  251. package/types/dashboard/card-tile.d.ts +4 -9
  252. package/types/dashboard/document-blocks.d.ts +14 -0
  253. package/types/dashboard/drawer.d.ts +3 -0
  254. package/types/dashboard/form-ai.d.ts +0 -17
  255. package/types/dashboard/form-organization-brand.d.ts +3 -0
  256. package/types/dashboard/form-organization-campaign-advertisements.d.ts +15 -0
  257. package/types/dashboard/form-organization-campaign-agreement.d.ts +53 -10
  258. package/types/dashboard/form-organization-campaign-design.d.ts +46 -0
  259. package/types/dashboard/form-organization-campaign-field-item.d.ts +36 -0
  260. package/types/dashboard/form-organization-campaign-field-number.d.ts +4 -1
  261. package/types/dashboard/form-organization-campaign-field-select.d.ts +6 -1
  262. package/types/dashboard/form-organization-campaign-field-skill.d.ts +36 -0
  263. package/types/dashboard/form-organization-campaign-field-text.d.ts +5 -1
  264. package/types/dashboard/form-organization-campaign-field-textarea.d.ts +4 -1
  265. package/types/dashboard/form-organization-campaign-footer.d.ts +23 -0
  266. package/types/dashboard/form-organization-campaign-integration-age.d.ts +2 -1
  267. package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +2 -0
  268. package/types/dashboard/form-organization-campaign-page.d.ts +9 -15
  269. package/types/dashboard/form-organization-campaign-section.d.ts +24 -8
  270. package/types/dashboard/form-organization-campaign.d.ts +3 -0
  271. package/types/dashboard/form-organization-workflow.d.ts +3 -0
  272. package/types/dashboard/form-organization.d.ts +2 -2
  273. package/types/dashboard/form-reposition.d.ts +29 -0
  274. package/types/dashboard/form-support.d.ts +14 -0
  275. package/types/dashboard/form-tests.d.ts +78 -0
  276. package/types/dashboard/form-verify-prize.d.ts +30 -3
  277. package/types/dashboard/input-editor.d.ts +9 -0
  278. package/types/dashboard/input-fields.d.ts +8 -5
  279. package/types/dashboard/input-file.d.ts +4 -0
  280. package/types/dashboard/input-resource.d.ts +1 -0
  281. package/types/dashboard/lib/ab-tests.d.ts +50 -0
  282. package/types/dashboard/lib/escape.d.ts +4 -0
  283. package/types/dashboard/lib/focus.d.ts +16 -0
  284. package/types/dashboard/lib/form-page.d.ts +25 -0
  285. package/types/dashboard/lib/item-list.d.ts +10 -5
  286. package/types/dashboard/lib/rail.d.ts +0 -1
  287. package/types/dashboard/lib/sms.d.ts +7 -0
  288. package/types/dashboard/modal.d.ts +3 -1
  289. package/types/dashboard/preview.d.ts +65 -10
  290. package/types/dashboard/recharts.d.ts +3 -0
  291. package/types/dashboard/swatch.d.ts +4 -0
  292. package/types/dashboard/template-dashboard.d.ts +3 -0
  293. package/types/dashboard/template-design.d.ts +30 -0
  294. package/types/dashboard/template-test-page.d.ts +69 -0
  295. package/types/dashboard/template-tests.d.ts +30 -0
  296. package/types/dashboard/template-variant.d.ts +18 -0
  297. package/types/icons/arrow-down-long.d.ts +5 -0
  298. package/types/icons/arrows-pointing-out.d.ts +5 -0
  299. package/types/icons/beaker.d.ts +5 -0
  300. package/types/icons/identification.d.ts +5 -0
  301. package/types/icons/lifebuoy.d.ts +5 -0
  302. package/types/icons/rectangle-group.d.ts +5 -0
  303. package/types/icons/rectangle-stack.d.ts +5 -0
  304. package/types/icons/shopping-bag.d.ts +5 -0
  305. package/types/icons/swatch.d.ts +5 -0
  306. package/types/icons/window.d.ts +5 -0
  307. package/types/icons/zoom-in.d.ts +5 -0
  308. package/types/input-answer.d.ts +15 -0
  309. package/types/input-select.d.ts +2 -0
  310. package/types/shared/button.d.ts +1 -1
  311. package/types/shared/document-pieces.d.ts +34 -0
  312. package/types/shared/lib/helpers.d.ts +22 -1
  313. package/types/shared/lib/motion.d.ts +2 -0
  314. package/types/shared/lib/video.d.ts +3 -0
  315. package/types/shared/sortable.d.ts +6 -0
  316. package/types/video.d.ts +18 -2
  317. package/dist/bridge/template-preview.js +0 -208
  318. package/dist/bridge/template-preview.mjs +0 -173
  319. package/dist/dashboard/device.js +0 -95
  320. package/dist/dashboard/device.mjs +0 -72
  321. package/dist/dashboard/form-organization-campaign-field-list.js +0 -425
  322. package/dist/dashboard/form-organization-campaign-field-list.mjs +0 -396
  323. package/dist/dashboard/item-row.js +0 -92
  324. package/dist/dashboard/item-row.mjs +0 -63
  325. package/types/bridge/template-preview.d.ts +0 -10
  326. package/types/dashboard/device.d.ts +0 -12
  327. package/types/dashboard/form-organization-campaign-field-list.d.ts +0 -36
  328. package/types/dashboard/item-row.d.ts +0 -25
@@ -10,6 +10,45 @@ import Warning from "../icons/warning.mjs";
10
10
  import { backgroundStyle } from "../styles.mjs";
11
11
  import { imageAlt } from "../shared/lib/helpers.mjs";
12
12
  const ms = 1e4;
13
+ const cropBox = ({ height, width, x, y }) => ({
14
+ height: 1e4 / height + "%",
15
+ left: -x / width * 100 + "%",
16
+ top: -y / height * 100 + "%",
17
+ width: 1e4 / width + "%"
18
+ });
19
+ const Crop = ({ children, position }) => /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ ...{
23
+ className: "absolute inset-0 overflow-hidden",
24
+ style: {
25
+ containerType: "size"
26
+ }
27
+ },
28
+ children: /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ ...{
32
+ className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
33
+ style: {
34
+ aspectRatio: "9 / 16",
35
+ width: "max(100cqw, 56.25cqh)"
36
+ }
37
+ },
38
+ children: /* @__PURE__ */ jsx(
39
+ "div",
40
+ {
41
+ ...{
42
+ className: "absolute",
43
+ style: cropBox(position)
44
+ },
45
+ children
46
+ }
47
+ )
48
+ }
49
+ )
50
+ }
51
+ );
13
52
  const GalleryImage = ({
14
53
  alt,
15
54
  className,
@@ -111,7 +150,6 @@ const GalleryImage = ({
111
150
  const TemplateSubdomainGallery = ({
112
151
  children,
113
152
  compact,
114
- descriptions,
115
153
  gallery,
116
154
  modal,
117
155
  overlay,
@@ -129,7 +167,8 @@ const TemplateSubdomainGallery = ({
129
167
  useEffect(() => {
130
168
  if (length < 2 || typeof window === "undefined") return;
131
169
  const warm = () => {
132
- const next = gallery[(index + 1) % length];
170
+ var _a2;
171
+ const next = (_a2 = gallery[(index + 1) % length]) == null ? void 0 : _a2.file;
133
172
  if (!(next == null ? void 0 : next.id) || !(next == null ? void 0 : next.mimetype)) return;
134
173
  const src = next.mimetype.includes("video") ? (() => {
135
174
  const frame = (next.frames || [])[0];
@@ -145,9 +184,9 @@ const TemplateSubdomainGallery = ({
145
184
  return () => clearTimeout(handle);
146
185
  }, [gallery, index, length]);
147
186
  const activePosterSrc = (() => {
148
- var _a2;
149
- const item = gallery[index];
150
- if (!((_a2 = item == null ? void 0 : item.mimetype) == null ? void 0 : _a2.includes("video"))) return null;
187
+ var _a2, _b;
188
+ const item = (_a2 = gallery[index]) == null ? void 0 : _a2.file;
189
+ if (!((_b = item == null ? void 0 : item.mimetype) == null ? void 0 : _b.includes("video"))) return null;
151
190
  const frame = (item.frames || [])[0];
152
191
  return frame && cdnSrc(frame, "1080x1920", item.updatedAt) || null;
153
192
  })();
@@ -276,8 +315,11 @@ const TemplateSubdomainGallery = ({
276
315
  },
277
316
  [animations, decrement, increment, index]
278
317
  );
279
- const renderItem = ({ filename, id, mimetype, sizes, updatedAt, frames }, key) => {
318
+ const renderItem = ({ description, file, position }, key) => {
319
+ const { filename, id, mimetype, sizes, updatedAt, frames } = file || {};
280
320
  if (id && mimetype) {
321
+ const cropped = Boolean(position) && (mimetype.includes("video") || Boolean(sizes == null ? void 0 : sizes.gallery));
322
+ const framed = (node) => cropped ? /* @__PURE__ */ jsx(Crop, { ...{ position }, children: node }) : node;
281
323
  const posterFrame = (frames || [])[0];
282
324
  const posterSrc = posterFrame && cdnSrc(posterFrame, "1080x1920", updatedAt);
283
325
  return /* @__PURE__ */ jsxs(
@@ -287,75 +329,79 @@ const TemplateSubdomainGallery = ({
287
329
  className: "relative w-full h-full transition-all duration-500 " + (Boolean(key === index) ? "visible " : "hidden ")
288
330
  },
289
331
  children: [
290
- mimetype.includes("image") && ((sizes == null ? void 0 : sizes["1440x2560"]) || (sizes == null ? void 0 : sizes["1080x1920"]) || (sizes == null ? void 0 : sizes.original)) && /* @__PURE__ */ jsx(
291
- GalleryImage,
292
- {
293
- ...{
294
- // Keyed by file id: each gallery item has its own.
295
- alt: imageAlt({ filename }, descriptions == null ? void 0 : descriptions[id]),
296
- className: "object-cover object-top transition duration-200",
297
- fill: true,
298
- // Only the visible first slide is the LCP candidate;
299
- // later slides are hidden (display:none) and lazy, so
300
- // they don't compete with the hero for bandwidth. The
301
- // warmer effect above prefetches the next slide at idle.
302
- priority: key === 0,
303
- sizes: "(min-width: 1024px) 33vw, 100vw",
304
- // Prefer the retina 9:16 tier (1080x1920 upscaled ~33% on
305
- // phones where this hero fills the screen); fall back to
306
- // 1080x1920 for assets resized before that tier existed.
307
- //
308
- // Last resort is the unbounded original — a freshly
309
- // uploaded or AI-generated image gets its variants
310
- // asynchronously, so for a window it has ONLY `original`.
311
- // Rendering it costs LCP; rendering nothing costs the
312
- // page, because onLoad never fires and the gallery never
313
- // reveals. Same fallback template-subdomain.js uses.
314
- src: cdnSrc({ sizes }, "1440x2560", updatedAt) || cdnSrc({ sizes }, "1080x1920", updatedAt) || cdnSrc({ sizes }, "original", updatedAt),
315
- style,
316
- onLoad: () => {
317
- setHeroPainted(true);
318
- onLoad(id, key, ms);
332
+ mimetype.includes("image") && ((sizes == null ? void 0 : sizes["1440x2560"]) || (sizes == null ? void 0 : sizes["1080x1920"]) || (sizes == null ? void 0 : sizes.original)) && framed(
333
+ /* @__PURE__ */ jsx(
334
+ GalleryImage,
335
+ {
336
+ ...{
337
+ // Each gallery item's own description.
338
+ alt: imageAlt({ filename }, description),
339
+ className: (cropped ? "object-cover" : "object-cover object-top") + " transition duration-200",
340
+ fill: true,
341
+ // Only the visible first slide is the LCP candidate;
342
+ // later slides are hidden (display:none) and lazy, so
343
+ // they don't compete with the hero for bandwidth. The
344
+ // warmer effect above prefetches the next slide at idle.
345
+ priority: key === 0,
346
+ sizes: "(min-width: 1024px) 33vw, 100vw",
347
+ // Prefer the retina 9:16 tier (1080x1920 upscaled ~33% on
348
+ // phones where this hero fills the screen); fall back to
349
+ // 1080x1920 for assets resized before that tier existed.
350
+ //
351
+ // Last resort is the unbounded original — a freshly
352
+ // uploaded or AI-generated image gets its variants
353
+ // asynchronously, so for a window it has ONLY `original`.
354
+ // Rendering it costs LCP; rendering nothing costs the
355
+ // page, because onLoad never fires and the gallery never
356
+ // reveals. Same fallback template-subdomain.js uses.
357
+ src: cropped && cdnSrc({ sizes }, "gallery", updatedAt) || cdnSrc({ sizes }, "1440x2560", updatedAt) || cdnSrc({ sizes }, "1080x1920", updatedAt) || cdnSrc({ sizes }, "original", updatedAt),
358
+ style,
359
+ onLoad: () => {
360
+ setHeroPainted(true);
361
+ onLoad(id, key, ms);
362
+ }
319
363
  }
320
- }
321
- },
322
- id + "-" + key + "-gallery-item-image"
364
+ },
365
+ id + "-" + key + "-gallery-item-image"
366
+ )
323
367
  ),
324
- mimetype.includes("video") && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
325
- Video,
326
- {
327
- ...{
328
- loop: Boolean(length === 1),
329
- onDuration: (value) => onLoad(id, key, value * 1e3),
330
- // Terminal source failure (components 0.0.61): the
331
- // poster stays as a still image; register the slide
332
- // at the DEFAULT duration so the carousel treats it
333
- // like an image slide and still advances — without
334
- // this, a dead video stalls the whole gallery
335
- // (onDuration never fires → no animation → no
336
- // onfinish → no next slide). onLoad's first-write-
337
- // wins guard makes this a no-op if the real
338
- // duration already registered.
339
- onError: () => onLoad(id, key, ms),
340
- playing: Boolean(key === index),
341
- // The component owns the placeholder now: it renders
342
- // (and SSRs) this poster immediately, keeps it through
343
- // every pre-playback state, leaves it in place if the
344
- // sources die, and hands off to the native poster
345
- // attribute at player-ready. `defer` moves the old
346
- // gallery-level mount gate inside the component so the
347
- // placeholder still paints in the first byte.
348
- defer: true,
349
- poster: posterSrc,
350
- priority: key === 0,
351
- reset: Boolean(key !== index),
352
- style,
353
- hls: cdnSrc({ sizes }, "hls", updatedAt),
354
- mp4: cdnSrc({ sizes }, "original", updatedAt)
355
- }
356
- },
357
- id + "-" + key + "-gallery-item-video"
358
- ) })
368
+ mimetype.includes("video") && framed(
369
+ /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
370
+ Video,
371
+ {
372
+ ...{
373
+ loop: Boolean(length === 1),
374
+ onDuration: (value) => onLoad(id, key, value * 1e3),
375
+ // Terminal source failure (components 0.0.61): the
376
+ // poster stays as a still image; register the slide
377
+ // at the DEFAULT duration so the carousel treats it
378
+ // like an image slide and still advances — without
379
+ // this, a dead video stalls the whole gallery
380
+ // (onDuration never fires → no animation → no
381
+ // onfinish → no next slide). onLoad's first-write-
382
+ // wins guard makes this a no-op if the real
383
+ // duration already registered.
384
+ onError: () => onLoad(id, key, ms),
385
+ playing: Boolean(key === index),
386
+ // The component owns the placeholder now: it renders
387
+ // (and SSRs) this poster immediately, keeps it through
388
+ // every pre-playback state, leaves it in place if the
389
+ // sources die, and hands off to the native poster
390
+ // attribute at player-ready. `defer` moves the old
391
+ // gallery-level mount gate inside the component so the
392
+ // placeholder still paints in the first byte.
393
+ defer: true,
394
+ poster: posterSrc,
395
+ priority: key === 0,
396
+ reset: Boolean(key !== index),
397
+ style,
398
+ hls: cdnSrc({ sizes }, "hls", updatedAt),
399
+ mp4: cdnSrc({ sizes }, "original", updatedAt)
400
+ }
401
+ },
402
+ id + "-" + key + "-gallery-item-video"
403
+ ) })
404
+ )
359
405
  ]
360
406
  },
361
407
  id + "-" + key + "-gallery-item"
@@ -436,7 +482,7 @@ const TemplateSubdomainGallery = ({
436
482
  "aria-hidden": true,
437
483
  className: "items-center absolute top-0 left-0 z-50 flex w-full px-3 py-5 lg:p-5 pointer-events-none " + (length > 1 ? "flex" : "hidden")
438
484
  },
439
- children: gallery.map(({ id }, key) => /* @__PURE__ */ jsx(
485
+ children: gallery.map(({ file }, key) => /* @__PURE__ */ jsx(
440
486
  "div",
441
487
  {
442
488
  ...{
@@ -461,7 +507,7 @@ const TemplateSubdomainGallery = ({
461
507
  }
462
508
  )
463
509
  },
464
- id + "-control"
510
+ (file == null ? void 0 : file.id) + "-control"
465
511
  ))
466
512
  }
467
513
  ),
@@ -497,5 +543,6 @@ const TemplateSubdomainGallery = ({
497
543
  };
498
544
  var template_subdomain_gallery_default = TemplateSubdomainGallery;
499
545
  export {
546
+ cropBox,
500
547
  template_subdomain_gallery_default as default
501
548
  };
@@ -58,7 +58,7 @@ const TemplateSubdomain = ({
58
58
  style,
59
59
  tracking
60
60
  }) => {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
61
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
62
62
  const [scrollProgress, setScrollProgress] = (0, import_react.useState)(0);
63
63
  (0, import_react.useEffect)(() => {
64
64
  let ticking = false;
@@ -77,10 +77,10 @@ const TemplateSubdomain = ({
77
77
  window.addEventListener("scroll", onScroll, { passive: true });
78
78
  return () => window.removeEventListener("scroll", onScroll);
79
79
  }, []);
80
- const gallery = (data == null ? void 0 : data.gallery) || [];
80
+ const gallery = (0, import_helpers.galleryItems)(data == null ? void 0 : data.gallery, (_a = data == null ? void 0 : data.descriptions) == null ? void 0 : _a.gallery);
81
81
  const countdown = (0, import_entry.giveawayOn)(data) ? data == null ? void 0 : data.countdown : null;
82
- const logo = (_a = data == null ? void 0 : data.images) == null ? void 0 : _a.logo;
83
- const opacity = (_d = (_c = (_b = style == null ? void 0 : style.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) == null ? void 0 : _d.replace(")", ",.9)");
82
+ const logo = (_b = data == null ? void 0 : data.images) == null ? void 0 : _b.logo;
83
+ const opacity = (_e = (_d = (_c = style == null ? void 0 : style.background) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) == null ? void 0 : _e.replace(")", ",.9)");
84
84
  const controlPaddingTop = 56 - 32 * scrollProgress;
85
85
  const controlBackgroundOpacity = 0.8 * scrollProgress;
86
86
  const classes = (0, import_react.useMemo)(
@@ -111,12 +111,12 @@ const TemplateSubdomain = ({
111
111
  ...{
112
112
  className: [
113
113
  "relative w-full min-h-dvh",
114
- ...((_e = data == null ? void 0 : data.links) == null ? void 0 : _e.length) > 0 || ((_f = data == null ? void 0 : data.products) == null ? void 0 : _f.length) > 0 ? ["space-y-4 lg:space-y-0"] : [""]
114
+ ...((_f = data == null ? void 0 : data.links) == null ? void 0 : _f.length) > 0 || ((_g = data == null ? void 0 : data.products) == null ? void 0 : _g.length) > 0 ? ["space-y-4 lg:space-y-0"] : [""]
115
115
  ].join(" "),
116
116
  style: {
117
117
  ...fonts.body,
118
118
  ...(style == null ? void 0 : style.background) && {
119
- backgroundColor: (_h = (_g = style == null ? void 0 : style.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb
119
+ backgroundColor: (_i = (_h = style == null ? void 0 : style.background) == null ? void 0 : _h.color) == null ? void 0 : _i.rgb
120
120
  }
121
121
  }
122
122
  },
@@ -142,7 +142,7 @@ const TemplateSubdomain = ({
142
142
  ...{
143
143
  className: "lg:hidden absolute inset-0",
144
144
  style: {
145
- background: "linear-gradient(to bottom, " + ((_j = (_i = style.background.color) == null ? void 0 : _i.rgb) == null ? void 0 : _j.replace(")", ", " + controlBackgroundOpacity + ")")) + ", transparent)"
145
+ background: "linear-gradient(to bottom, " + ((_k = (_j = style.background.color) == null ? void 0 : _j.rgb) == null ? void 0 : _k.replace(")", ", " + controlBackgroundOpacity + ")")) + ", transparent)"
146
146
  }
147
147
  }
148
148
  }
@@ -164,7 +164,7 @@ const TemplateSubdomain = ({
164
164
  import_image.default,
165
165
  {
166
166
  ...{
167
- alt: (0, import_helpers.imageAlt)(logo, (_k = data == null ? void 0 : data.descriptions) == null ? void 0 : _k.logo),
167
+ alt: (0, import_helpers.imageAlt)(logo, (_l = data == null ? void 0 : data.descriptions) == null ? void 0 : _l.logo),
168
168
  className: "object-cover object-center rounded-full overflow-hidden ml-1 lg:ml-0",
169
169
  fill: true,
170
170
  priority: true,
@@ -183,7 +183,7 @@ const TemplateSubdomain = ({
183
183
  className: "flex items-center space-x-2 z-30"
184
184
  },
185
185
  children: [
186
- ((_l = data == null ? void 0 : data.products) == null ? void 0 : _l.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
186
+ ((_m = data == null ? void 0 : data.products) == null ? void 0 : _m.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
187
187
  buttons.menu
188
188
  ]
189
189
  }
@@ -199,7 +199,6 @@ const TemplateSubdomain = ({
199
199
  {
200
200
  ...{
201
201
  compact: ((_n = data == null ? void 0 : data.links) == null ? void 0 : _n.length) > 0 || ((_o = data == null ? void 0 : data.products) == null ? void 0 : _o.length) > 0,
202
- descriptions: (_p = data == null ? void 0 : data.descriptions) == null ? void 0 : _p.gallery,
203
202
  gallery,
204
203
  modal,
205
204
  preview,
@@ -219,7 +218,7 @@ const TemplateSubdomain = ({
219
218
  },
220
219
  children: [
221
220
  render,
222
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
221
+ gallery.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
223
222
  "div",
224
223
  {
225
224
  ...{
@@ -326,7 +325,7 @@ const TemplateSubdomain = ({
326
325
  fonts,
327
326
  gallery,
328
327
  linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ descriptions, file, icon, slug, title, url }, key) => {
329
- var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p2, _q, _r;
328
+ var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p, _q, _r;
330
329
  return (0, import_url.safeHref)(url) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
331
330
  import_template_subdomain_link.default,
332
331
  {
@@ -363,7 +362,7 @@ const TemplateSubdomain = ({
363
362
  backgroundColor: ((_e3 = (_d3 = (_c3 = style == null ? void 0 : style.button) == null ? void 0 : _c3.background) == null ? void 0 : _d3.color) == null ? void 0 : _e3.rgb) || ((_g3 = (_f3 = style == null ? void 0 : style.text) == null ? void 0 : _f3.color) == null ? void 0 : _g3.rgb),
364
363
  borderColor: ((_j3 = (_i3 = (_h3 = style == null ? void 0 : style.button) == null ? void 0 : _h3.background) == null ? void 0 : _i3.color) == null ? void 0 : _j3.rgb) || ((_l3 = (_k3 = style == null ? void 0 : style.text) == null ? void 0 : _k3.color) == null ? void 0 : _l3.rgb),
365
364
  borderRadius: ((_m3 = style == null ? void 0 : style.button) == null ? void 0 : _m3.radius) != null ? style.button.radius / 4 + "px" : void 0,
366
- color: ((_p2 = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p2.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
365
+ color: ((_p = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
367
366
  }
368
367
  },
369
368
  target: "_blank",
@@ -425,7 +424,10 @@ const TemplateSubdomain = ({
425
424
  ] });
426
425
  }
427
426
  },
428
- (_m = data == null ? void 0 : data.gallery) == null ? void 0 : _m.map((item) => item.id).join(",")
427
+ gallery.map((item) => {
428
+ var _a2;
429
+ return (_a2 = item.file) == null ? void 0 : _a2.id;
430
+ }).join(",")
429
431
  )
430
432
  ]
431
433
  }
@@ -12,7 +12,7 @@ import Countdown from "./countdown.mjs";
12
12
  import FormSubdomainShop from "./form-subdomain-shop.mjs";
13
13
  import Image from "next/image";
14
14
  import SubdomainContent from "./subdomain-content.mjs";
15
- import { imageAlt } from "../shared/lib/helpers.mjs";
15
+ import { galleryItems, imageAlt } from "../shared/lib/helpers.mjs";
16
16
  const TemplateSubdomain = ({
17
17
  buttons,
18
18
  cart,
@@ -26,7 +26,7 @@ const TemplateSubdomain = ({
26
26
  style,
27
27
  tracking
28
28
  }) => {
29
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
29
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
30
30
  const [scrollProgress, setScrollProgress] = useState(0);
31
31
  useEffect(() => {
32
32
  let ticking = false;
@@ -45,10 +45,10 @@ const TemplateSubdomain = ({
45
45
  window.addEventListener("scroll", onScroll, { passive: true });
46
46
  return () => window.removeEventListener("scroll", onScroll);
47
47
  }, []);
48
- const gallery = (data == null ? void 0 : data.gallery) || [];
48
+ const gallery = galleryItems(data == null ? void 0 : data.gallery, (_a = data == null ? void 0 : data.descriptions) == null ? void 0 : _a.gallery);
49
49
  const countdown = giveawayOn(data) ? data == null ? void 0 : data.countdown : null;
50
- const logo = (_a = data == null ? void 0 : data.images) == null ? void 0 : _a.logo;
51
- const opacity = (_d = (_c = (_b = style == null ? void 0 : style.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) == null ? void 0 : _d.replace(")", ",.9)");
50
+ const logo = (_b = data == null ? void 0 : data.images) == null ? void 0 : _b.logo;
51
+ const opacity = (_e = (_d = (_c = style == null ? void 0 : style.background) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb) == null ? void 0 : _e.replace(")", ",.9)");
52
52
  const controlPaddingTop = 56 - 32 * scrollProgress;
53
53
  const controlBackgroundOpacity = 0.8 * scrollProgress;
54
54
  const classes = useMemo(
@@ -79,12 +79,12 @@ const TemplateSubdomain = ({
79
79
  ...{
80
80
  className: [
81
81
  "relative w-full min-h-dvh",
82
- ...((_e = data == null ? void 0 : data.links) == null ? void 0 : _e.length) > 0 || ((_f = data == null ? void 0 : data.products) == null ? void 0 : _f.length) > 0 ? ["space-y-4 lg:space-y-0"] : [""]
82
+ ...((_f = data == null ? void 0 : data.links) == null ? void 0 : _f.length) > 0 || ((_g = data == null ? void 0 : data.products) == null ? void 0 : _g.length) > 0 ? ["space-y-4 lg:space-y-0"] : [""]
83
83
  ].join(" "),
84
84
  style: {
85
85
  ...fonts.body,
86
86
  ...(style == null ? void 0 : style.background) && {
87
- backgroundColor: (_h = (_g = style == null ? void 0 : style.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb
87
+ backgroundColor: (_i = (_h = style == null ? void 0 : style.background) == null ? void 0 : _h.color) == null ? void 0 : _i.rgb
88
88
  }
89
89
  }
90
90
  },
@@ -110,7 +110,7 @@ const TemplateSubdomain = ({
110
110
  ...{
111
111
  className: "lg:hidden absolute inset-0",
112
112
  style: {
113
- background: "linear-gradient(to bottom, " + ((_j = (_i = style.background.color) == null ? void 0 : _i.rgb) == null ? void 0 : _j.replace(")", ", " + controlBackgroundOpacity + ")")) + ", transparent)"
113
+ background: "linear-gradient(to bottom, " + ((_k = (_j = style.background.color) == null ? void 0 : _j.rgb) == null ? void 0 : _k.replace(")", ", " + controlBackgroundOpacity + ")")) + ", transparent)"
114
114
  }
115
115
  }
116
116
  }
@@ -132,7 +132,7 @@ const TemplateSubdomain = ({
132
132
  Image,
133
133
  {
134
134
  ...{
135
- alt: imageAlt(logo, (_k = data == null ? void 0 : data.descriptions) == null ? void 0 : _k.logo),
135
+ alt: imageAlt(logo, (_l = data == null ? void 0 : data.descriptions) == null ? void 0 : _l.logo),
136
136
  className: "object-cover object-center rounded-full overflow-hidden ml-1 lg:ml-0",
137
137
  fill: true,
138
138
  priority: true,
@@ -151,7 +151,7 @@ const TemplateSubdomain = ({
151
151
  className: "flex items-center space-x-2 z-30"
152
152
  },
153
153
  children: [
154
- ((_l = data == null ? void 0 : data.products) == null ? void 0 : _l.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
154
+ ((_m = data == null ? void 0 : data.products) == null ? void 0 : _m.some((product) => !(product == null ? void 0 : product.sample))) && buttons.shop("cart"),
155
155
  buttons.menu
156
156
  ]
157
157
  }
@@ -167,7 +167,6 @@ const TemplateSubdomain = ({
167
167
  {
168
168
  ...{
169
169
  compact: ((_n = data == null ? void 0 : data.links) == null ? void 0 : _n.length) > 0 || ((_o = data == null ? void 0 : data.products) == null ? void 0 : _o.length) > 0,
170
- descriptions: (_p = data == null ? void 0 : data.descriptions) == null ? void 0 : _p.gallery,
171
170
  gallery,
172
171
  modal,
173
172
  preview,
@@ -187,7 +186,7 @@ const TemplateSubdomain = ({
187
186
  },
188
187
  children: [
189
188
  render,
190
- /* @__PURE__ */ jsxs(
189
+ gallery.length > 0 && /* @__PURE__ */ jsxs(
191
190
  "div",
192
191
  {
193
192
  ...{
@@ -294,7 +293,7 @@ const TemplateSubdomain = ({
294
293
  fonts,
295
294
  gallery,
296
295
  linksSection: ((data == null ? void 0 : data.links) || []).length > 0 ? data.links.map(({ descriptions, file, icon, slug, title, url }, key) => {
297
- var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p2, _q, _r;
296
+ var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i3, _j3, _k3, _l3, _m3, _n3, _o2, _p, _q, _r;
298
297
  return safeHref(url) && /* @__PURE__ */ jsx(
299
298
  TemplateSubdomainLink,
300
299
  {
@@ -331,7 +330,7 @@ const TemplateSubdomain = ({
331
330
  backgroundColor: ((_e3 = (_d3 = (_c3 = style == null ? void 0 : style.button) == null ? void 0 : _c3.background) == null ? void 0 : _d3.color) == null ? void 0 : _e3.rgb) || ((_g3 = (_f3 = style == null ? void 0 : style.text) == null ? void 0 : _f3.color) == null ? void 0 : _g3.rgb),
332
331
  borderColor: ((_j3 = (_i3 = (_h3 = style == null ? void 0 : style.button) == null ? void 0 : _h3.background) == null ? void 0 : _i3.color) == null ? void 0 : _j3.rgb) || ((_l3 = (_k3 = style == null ? void 0 : style.text) == null ? void 0 : _k3.color) == null ? void 0 : _l3.rgb),
333
332
  borderRadius: ((_m3 = style == null ? void 0 : style.button) == null ? void 0 : _m3.radius) != null ? style.button.radius / 4 + "px" : void 0,
334
- color: ((_p2 = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p2.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
333
+ color: ((_p = (_o2 = (_n3 = style == null ? void 0 : style.button) == null ? void 0 : _n3.text) == null ? void 0 : _o2.color) == null ? void 0 : _p.rgb) || ((_r = (_q = style == null ? void 0 : style.background) == null ? void 0 : _q.color) == null ? void 0 : _r.rgb)
335
334
  }
336
335
  },
337
336
  target: "_blank",
@@ -393,7 +392,10 @@ const TemplateSubdomain = ({
393
392
  ] });
394
393
  }
395
394
  },
396
- (_m = data == null ? void 0 : data.gallery) == null ? void 0 : _m.map((item) => item.id).join(",")
395
+ gallery.map((item) => {
396
+ var _a2;
397
+ return (_a2 = item.file) == null ? void 0 : _a2.id;
398
+ }).join(",")
397
399
  )
398
400
  ]
399
401
  }
@@ -70,6 +70,11 @@ const Avatar = ({
70
70
  ...{
71
71
  alt: name || title || email || "",
72
72
  fill: true,
73
+ // A large avatar heads its page ( the account, a member ) and can be
74
+ // its largest paint: load it at once ( the console's LCP warning ).
75
+ ...size === "large" && {
76
+ loading: "eager"
77
+ },
73
78
  sizes: px + "px",
74
79
  src,
75
80
  unoptimized: Boolean(url)
@@ -37,6 +37,11 @@ const Avatar = ({
37
37
  ...{
38
38
  alt: name || title || email || "",
39
39
  fill: true,
40
+ // A large avatar heads its page ( the account, a member ) and can be
41
+ // its largest paint: load it at once ( the console's LCP warning ).
42
+ ...size === "large" && {
43
+ loading: "eager"
44
+ },
40
45
  sizes: px + "px",
41
46
  src,
42
47
  unoptimized: Boolean(url)