@fayz-ai/plugin-linkinbio 0.9.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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/dist/index.cjs +33 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +10 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +31 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/public/BioPage.d.ts +8 -0
  10. package/dist/public/BioPage.d.ts.map +1 -0
  11. package/dist/public/BioPageRenderer.d.ts +11 -0
  12. package/dist/public/BioPageRenderer.d.ts.map +1 -0
  13. package/dist/public/__tests__/manifest.test.d.ts +2 -0
  14. package/dist/public/__tests__/manifest.test.d.ts.map +1 -0
  15. package/dist/public/blocks/BioSection.d.ts +7 -0
  16. package/dist/public/blocks/BioSection.d.ts.map +1 -0
  17. package/dist/public/blocks/CTASection.d.ts +7 -0
  18. package/dist/public/blocks/CTASection.d.ts.map +1 -0
  19. package/dist/public/blocks/EmbedSection.d.ts +7 -0
  20. package/dist/public/blocks/EmbedSection.d.ts.map +1 -0
  21. package/dist/public/blocks/FeaturedBlock.d.ts +7 -0
  22. package/dist/public/blocks/FeaturedBlock.d.ts.map +1 -0
  23. package/dist/public/blocks/GallerySection.d.ts +7 -0
  24. package/dist/public/blocks/GallerySection.d.ts.map +1 -0
  25. package/dist/public/blocks/HeroSection.d.ts +9 -0
  26. package/dist/public/blocks/HeroSection.d.ts.map +1 -0
  27. package/dist/public/blocks/LinksBlock.d.ts +7 -0
  28. package/dist/public/blocks/LinksBlock.d.ts.map +1 -0
  29. package/dist/public/blocks/MusicReleasesBlock.d.ts +7 -0
  30. package/dist/public/blocks/MusicReleasesBlock.d.ts.map +1 -0
  31. package/dist/public/blocks/ProfileHeader.d.ts +8 -0
  32. package/dist/public/blocks/ProfileHeader.d.ts.map +1 -0
  33. package/dist/public/blocks/ProjectSection.d.ts +7 -0
  34. package/dist/public/blocks/ProjectSection.d.ts.map +1 -0
  35. package/dist/public/blocks/SocialLinksSection.d.ts +7 -0
  36. package/dist/public/blocks/SocialLinksSection.d.ts.map +1 -0
  37. package/dist/public/blocks/StatsSection.d.ts +7 -0
  38. package/dist/public/blocks/StatsSection.d.ts.map +1 -0
  39. package/dist/public/blocks/TextSection.d.ts +7 -0
  40. package/dist/public/blocks/TextSection.d.ts.map +1 -0
  41. package/dist/public/blocks/TourDatesBlock.d.ts +7 -0
  42. package/dist/public/blocks/TourDatesBlock.d.ts.map +1 -0
  43. package/dist/public/blocks/VenueListSection.d.ts +7 -0
  44. package/dist/public/blocks/VenueListSection.d.ts.map +1 -0
  45. package/dist/public/blocks/VideoGridSection.d.ts +7 -0
  46. package/dist/public/blocks/VideoGridSection.d.ts.map +1 -0
  47. package/dist/public/blocks/index.d.ts +17 -0
  48. package/dist/public/blocks/index.d.ts.map +1 -0
  49. package/dist/public/components/Carousel.d.ts +11 -0
  50. package/dist/public/components/Carousel.d.ts.map +1 -0
  51. package/dist/public/components/PlatformIcon.d.ts +9 -0
  52. package/dist/public/components/PlatformIcon.d.ts.map +1 -0
  53. package/dist/public/components/Reveal.d.ts +13 -0
  54. package/dist/public/components/Reveal.d.ts.map +1 -0
  55. package/dist/public/context.d.ts +18 -0
  56. package/dist/public/context.d.ts.map +1 -0
  57. package/dist/public/createPublicLinkInBioPlugin.d.ts +38 -0
  58. package/dist/public/createPublicLinkInBioPlugin.d.ts.map +1 -0
  59. package/dist/public/data.d.ts +11 -0
  60. package/dist/public/data.d.ts.map +1 -0
  61. package/dist/public/data.supabase.d.ts +11 -0
  62. package/dist/public/data.supabase.d.ts.map +1 -0
  63. package/dist/public/index.cjs +1750 -0
  64. package/dist/public/index.cjs.map +1 -0
  65. package/dist/public/index.d.ts +18 -0
  66. package/dist/public/index.d.ts.map +1 -0
  67. package/dist/public/index.js +1731 -0
  68. package/dist/public/index.js.map +1 -0
  69. package/dist/public/registry.d.ts +17 -0
  70. package/dist/public/registry.d.ts.map +1 -0
  71. package/dist/public/utils.d.ts +9 -0
  72. package/dist/public/utils.d.ts.map +1 -0
  73. package/dist/types.d.ts +251 -0
  74. package/dist/types.d.ts.map +1 -0
  75. package/package.json +68 -0
  76. package/src/index.ts +56 -0
  77. package/src/public/BioPage.tsx +123 -0
  78. package/src/public/BioPageRenderer.tsx +249 -0
  79. package/src/public/__tests__/manifest.test.ts +39 -0
  80. package/src/public/blocks/BioSection.tsx +66 -0
  81. package/src/public/blocks/CTASection.tsx +56 -0
  82. package/src/public/blocks/EmbedSection.tsx +53 -0
  83. package/src/public/blocks/FeaturedBlock.tsx +70 -0
  84. package/src/public/blocks/GallerySection.tsx +148 -0
  85. package/src/public/blocks/HeroSection.tsx +107 -0
  86. package/src/public/blocks/LinksBlock.tsx +80 -0
  87. package/src/public/blocks/MusicReleasesBlock.tsx +83 -0
  88. package/src/public/blocks/ProfileHeader.tsx +176 -0
  89. package/src/public/blocks/ProjectSection.tsx +158 -0
  90. package/src/public/blocks/SocialLinksSection.tsx +125 -0
  91. package/src/public/blocks/StatsSection.tsx +46 -0
  92. package/src/public/blocks/TextSection.tsx +29 -0
  93. package/src/public/blocks/TourDatesBlock.tsx +83 -0
  94. package/src/public/blocks/VenueListSection.tsx +91 -0
  95. package/src/public/blocks/VideoGridSection.tsx +105 -0
  96. package/src/public/blocks/index.ts +16 -0
  97. package/src/public/components/Carousel.tsx +90 -0
  98. package/src/public/components/PlatformIcon.tsx +56 -0
  99. package/src/public/components/Reveal.tsx +58 -0
  100. package/src/public/context.tsx +30 -0
  101. package/src/public/createPublicLinkInBioPlugin.ts +81 -0
  102. package/src/public/data.supabase.ts +31 -0
  103. package/src/public/data.ts +29 -0
  104. package/src/public/index.ts +75 -0
  105. package/src/public/registry.ts +40 -0
  106. package/src/public/utils.ts +102 -0
  107. package/src/types.ts +328 -0
@@ -0,0 +1,1731 @@
1
+ import { createContext, useContext, useRef, useState, useEffect, createElement } from 'react';
2
+ import { getSupabaseClientOptional, createSafeDataProvider } from '@fayz-ai/core';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import { useParams } from 'react-router-dom';
5
+ import { Globe, Music, Facebook, Twitter, Mail, Phone, Youtube, Instagram, ChevronLeft, ChevronRight, ChevronUp, MessageCircle, ArrowUpRight, ExternalLink, ChevronDown, MapPin, Play } from 'lucide-react';
6
+ import { SiGoogledrive, SiMixcloud, SiBeatport, SiTelegram, SiX, SiFacebook, SiBandcamp, SiApplemusic, SiWhatsapp, SiSpotify, SiTiktok, SiSoundcloud, SiYoutube, SiInstagram } from 'react-icons/si';
7
+
8
+ // src/public/createPublicLinkInBioPlugin.ts
9
+
10
+ // src/public/data.ts
11
+ function createMockBioPageProvider(options = {}) {
12
+ const seed = options.seed ?? {};
13
+ return {
14
+ async getBySlug(slug) {
15
+ return seed[slug] ?? null;
16
+ }
17
+ };
18
+ }
19
+ function createSupabaseBioPageProvider(options = {}) {
20
+ const table = options.table ?? "press_kits";
21
+ return {
22
+ async getBySlug(slug) {
23
+ const client = getSupabaseClientOptional();
24
+ if (!client) return null;
25
+ const { data, error } = await client.from(table).select("data, is_published").eq("slug", slug).maybeSingle();
26
+ if (error || !data) return null;
27
+ if (!data.is_published) return null;
28
+ return data.data;
29
+ }
30
+ };
31
+ }
32
+ var LinkInBioContext = createContext(null);
33
+ function LinkInBioProvider({
34
+ value,
35
+ children
36
+ }) {
37
+ return /* @__PURE__ */ jsx(LinkInBioContext.Provider, { value, children });
38
+ }
39
+ function useLinkInBio() {
40
+ const ctx = useContext(LinkInBioContext);
41
+ if (!ctx) {
42
+ throw new Error("useLinkInBio must be used within a LinkInBioProvider (mount the plugin Provider).");
43
+ }
44
+ return ctx;
45
+ }
46
+ function renderMarkdown(md) {
47
+ return md.split(/\n\n+/).map((block) => {
48
+ const html = block.replace(/\*\*\*(.+?)\*\*\*/g, "<strong><em>$1</em></strong>").replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*(.+?)\*/g, "<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\n/g, "<br />");
49
+ return `<p>${html}</p>`;
50
+ }).join("");
51
+ }
52
+ var platformColors = {
53
+ instagram: "#E4405F",
54
+ spotify: "#1DB954",
55
+ soundcloud: "#FF5500",
56
+ youtube: "#FF0000",
57
+ tiktok: "#000000",
58
+ whatsapp: "#25D366",
59
+ email: "#EA4335",
60
+ twitter: "#1DA1F2",
61
+ facebook: "#1877F2",
62
+ bandcamp: "#629AA9",
63
+ mixcloud: "#5000FF",
64
+ beatport: "#94D500",
65
+ "apple-music": "#FC3C44",
66
+ deezer: "#FEAA2D",
67
+ telegram: "#0088CC",
68
+ website: "#888888",
69
+ custom: "#888888"
70
+ };
71
+ var platformLabels = {
72
+ instagram: "Instagram",
73
+ spotify: "Spotify",
74
+ soundcloud: "SoundCloud",
75
+ youtube: "YouTube",
76
+ tiktok: "TikTok",
77
+ whatsapp: "WhatsApp",
78
+ email: "Email",
79
+ twitter: "Twitter / X",
80
+ facebook: "Facebook",
81
+ bandcamp: "Bandcamp",
82
+ mixcloud: "Mixcloud",
83
+ beatport: "Beatport",
84
+ "apple-music": "Apple Music",
85
+ deezer: "Deezer",
86
+ telegram: "Telegram",
87
+ website: "Website",
88
+ custom: "Link"
89
+ };
90
+ var platformIconMap = {
91
+ instagram: Instagram,
92
+ spotify: Music,
93
+ soundcloud: Music,
94
+ youtube: Youtube,
95
+ tiktok: Music,
96
+ whatsapp: Phone,
97
+ email: Mail,
98
+ twitter: Twitter,
99
+ facebook: Facebook,
100
+ bandcamp: Music,
101
+ mixcloud: Music,
102
+ beatport: Music,
103
+ "apple-music": Music,
104
+ deezer: Music,
105
+ telegram: Globe,
106
+ website: Globe,
107
+ custom: Globe
108
+ };
109
+ var borderRadiusMap = {
110
+ none: "0px",
111
+ sm: "4px",
112
+ md: "8px",
113
+ lg: "16px",
114
+ full: "9999px"
115
+ };
116
+ function getBrandingVars(branding) {
117
+ return {
118
+ "--pk-primary": branding.primaryColor,
119
+ "--pk-secondary": branding.secondaryColor,
120
+ "--pk-accent": branding.accentColor,
121
+ "--pk-bg": branding.backgroundColor,
122
+ "--pk-text": branding.textColor,
123
+ "--pk-muted": branding.mutedTextColor,
124
+ "--pk-radius": borderRadiusMap[branding.borderRadius ?? "md"],
125
+ "--pk-font-heading": branding.fontHeading ?? "'Space Grotesk', sans-serif",
126
+ "--pk-font-body": branding.fontBody ?? "'DM Sans', sans-serif",
127
+ "--pk-alt-bg": branding.sectionAltBg ?? branding.backgroundColor,
128
+ "--pk-alt-bg2": branding.sectionAltBg2 ?? branding.backgroundColor
129
+ };
130
+ }
131
+
132
+ // src/public/registry.ts
133
+ var registry = /* @__PURE__ */ new Map();
134
+ function registerBlock(type, component) {
135
+ registry.set(type, component);
136
+ }
137
+ function getBlock(type) {
138
+ return registry.get(type);
139
+ }
140
+ function hasBlock(type) {
141
+ return registry.has(type);
142
+ }
143
+ function Reveal({
144
+ children,
145
+ delay = 0,
146
+ className
147
+ }) {
148
+ const ref = useRef(null);
149
+ const [shown, setShown] = useState(false);
150
+ useEffect(() => {
151
+ const el = ref.current;
152
+ if (!el) return;
153
+ const reduce = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
154
+ if (reduce || typeof IntersectionObserver === "undefined") {
155
+ setShown(true);
156
+ return;
157
+ }
158
+ const io = new IntersectionObserver(
159
+ ([entry]) => {
160
+ if (entry.isIntersecting) {
161
+ setShown(true);
162
+ io.disconnect();
163
+ }
164
+ },
165
+ { threshold: 0.1, rootMargin: "0px 0px -6% 0px" }
166
+ );
167
+ io.observe(el);
168
+ return () => io.disconnect();
169
+ }, []);
170
+ return /* @__PURE__ */ jsx(
171
+ "div",
172
+ {
173
+ ref,
174
+ className,
175
+ style: {
176
+ opacity: shown ? 1 : 0,
177
+ transform: shown ? "none" : "translateY(22px)",
178
+ transition: `opacity 0.6s ease ${delay}ms, transform 0.6s cubic-bezier(0.2,0.7,0.2,1) ${delay}ms`,
179
+ willChange: "opacity, transform"
180
+ },
181
+ children
182
+ }
183
+ );
184
+ }
185
+ function HeroSection({ section, identity, branding }) {
186
+ const hasLogo = section.showLogo && branding.logoUrl;
187
+ return /* @__PURE__ */ jsxs(
188
+ "section",
189
+ {
190
+ className: "relative flex flex-col items-center justify-center min-h-screen overflow-hidden",
191
+ id: section.id,
192
+ children: [
193
+ /* @__PURE__ */ jsxs("div", { className: "absolute inset-0", children: [
194
+ section.backgroundImageUrl && /* @__PURE__ */ jsx(
195
+ "img",
196
+ {
197
+ src: section.backgroundImageUrl,
198
+ alt: identity.name,
199
+ className: "h-full w-full object-cover"
200
+ }
201
+ ),
202
+ section.overlayGradient && /* @__PURE__ */ jsx("div", { className: "absolute inset-0", style: { background: section.overlayGradient } })
203
+ ] }),
204
+ /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex flex-col items-center text-center px-6 pt-20 pb-24", children: [
205
+ hasLogo ? /* @__PURE__ */ jsx(
206
+ "img",
207
+ {
208
+ src: branding.logoUrl,
209
+ alt: `${identity.name} logo`,
210
+ className: "mb-6 h-48 w-auto md:h-64 lg:h-80 object-contain drop-shadow-2xl"
211
+ }
212
+ ) : /* @__PURE__ */ jsx(
213
+ "h1",
214
+ {
215
+ className: "text-5xl md:text-7xl lg:text-8xl font-bold tracking-tight mb-4 drop-shadow-lg",
216
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
217
+ children: identity.name
218
+ }
219
+ ),
220
+ identity.tagline && /* @__PURE__ */ jsx(
221
+ "p",
222
+ {
223
+ className: "text-lg md:text-xl mb-6 max-w-lg opacity-70",
224
+ style: { color: "var(--pk-text)" },
225
+ children: identity.tagline
226
+ }
227
+ ),
228
+ section.showGenres && identity.genres.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-2 mb-4", children: identity.genres.map((genre) => /* @__PURE__ */ jsx(
229
+ "span",
230
+ {
231
+ className: "px-4 py-1.5 text-sm font-semibold backdrop-blur-sm",
232
+ style: {
233
+ backgroundColor: "rgba(255,255,255,0.08)",
234
+ color: "var(--pk-primary)",
235
+ border: "1px solid rgba(255,255,255,0.12)",
236
+ borderRadius: "9999px"
237
+ },
238
+ children: genre
239
+ },
240
+ genre
241
+ )) }),
242
+ section.showLocation && identity.location && /* @__PURE__ */ jsx("p", { className: "text-sm mt-2 opacity-50", style: { color: "var(--pk-text)" }, children: identity.location }),
243
+ section.ctaText && section.ctaUrl && /* @__PURE__ */ jsx(
244
+ "a",
245
+ {
246
+ href: section.ctaUrl,
247
+ target: "_blank",
248
+ rel: "noopener noreferrer",
249
+ className: "mt-8 inline-block px-10 py-4 font-bold text-lg tracking-wider transition-transform hover:scale-105",
250
+ style: {
251
+ backgroundColor: "var(--pk-primary)",
252
+ color: "var(--pk-bg)",
253
+ borderRadius: "9999px"
254
+ },
255
+ children: section.ctaText
256
+ }
257
+ )
258
+ ] }),
259
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-8 left-1/2 -translate-x-1/2 z-10 animate-bounce opacity-40", children: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "var(--pk-text)" }, children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12l7 7 7-7" }) }) })
260
+ ]
261
+ }
262
+ );
263
+ }
264
+ function BioSection({ section }) {
265
+ const hasImage = section.imageUrl && section.imagePosition !== "none";
266
+ const isTop = section.imagePosition === "top";
267
+ const isSide = section.imagePosition === "left" || section.imagePosition === "right";
268
+ const isRight = section.imagePosition === "right";
269
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl mx-auto", children: [
270
+ section.title && /* @__PURE__ */ jsx(
271
+ "h2",
272
+ {
273
+ className: "text-3xl md:text-4xl font-bold mb-8",
274
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
275
+ children: section.title
276
+ }
277
+ ),
278
+ /* @__PURE__ */ jsxs("div", { className: isSide && hasImage ? `grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12 items-start` : "", children: [
279
+ hasImage && isTop && /* @__PURE__ */ jsx(
280
+ "img",
281
+ {
282
+ src: section.imageUrl,
283
+ alt: "",
284
+ className: "w-full max-h-96 object-cover mb-8",
285
+ style: { borderRadius: "var(--pk-radius)" },
286
+ loading: "lazy"
287
+ }
288
+ ),
289
+ hasImage && isSide && !isRight && /* @__PURE__ */ jsx(
290
+ "img",
291
+ {
292
+ src: section.imageUrl,
293
+ alt: "",
294
+ className: "w-full aspect-[3/4] object-cover",
295
+ style: { borderRadius: "var(--pk-radius)" },
296
+ loading: "lazy"
297
+ }
298
+ ),
299
+ /* @__PURE__ */ jsx(
300
+ "div",
301
+ {
302
+ className: "prose prose-invert max-w-none text-base md:text-lg leading-relaxed [&_p]:mb-4 [&_strong]:font-semibold [&_a]:underline [&_a]:decoration-[var(--pk-primary)]",
303
+ style: { color: "var(--pk-muted)" },
304
+ dangerouslySetInnerHTML: { __html: renderMarkdown(section.content) }
305
+ }
306
+ ),
307
+ hasImage && isSide && isRight && /* @__PURE__ */ jsx(
308
+ "img",
309
+ {
310
+ src: section.imageUrl,
311
+ alt: "",
312
+ className: "w-full aspect-[3/4] object-cover",
313
+ style: { borderRadius: "var(--pk-radius)" },
314
+ loading: "lazy"
315
+ }
316
+ )
317
+ ] })
318
+ ] }) });
319
+ }
320
+ function isInstagramEmbed(item) {
321
+ return item.url.includes("instagram.com");
322
+ }
323
+ function getInstagramEmbedUrl(url) {
324
+ const match = url.match(/instagram\.com\/(reel|p)\/([^/?]+)/);
325
+ if (match) return `https://www.instagram.com/${match[1]}/${match[2]}/embed`;
326
+ return url;
327
+ }
328
+ function MediaItem({ item, index, cols, isFeatured, onImageClick }) {
329
+ if (isInstagramEmbed(item)) {
330
+ return /* @__PURE__ */ jsx(
331
+ "div",
332
+ {
333
+ className: `overflow-hidden ${isFeatured && index === 0 ? "col-span-2" : ""}`,
334
+ style: { borderRadius: "var(--pk-radius)" },
335
+ children: /* @__PURE__ */ jsx(
336
+ "iframe",
337
+ {
338
+ src: getInstagramEmbedUrl(item.url),
339
+ className: "w-full border-0",
340
+ style: { minHeight: cols <= 2 ? "500px" : "420px" },
341
+ loading: "lazy",
342
+ allowtransparency: "true",
343
+ allow: "encrypted-media",
344
+ title: item.alt ?? "Instagram"
345
+ }
346
+ )
347
+ }
348
+ );
349
+ }
350
+ return /* @__PURE__ */ jsx(
351
+ "img",
352
+ {
353
+ src: item.url,
354
+ alt: item.alt ?? "",
355
+ className: `w-full object-cover cursor-pointer hover:opacity-90 transition-opacity ${isFeatured && index === 0 ? "col-span-2 aspect-[16/9]" : "aspect-square"}`,
356
+ style: { borderRadius: "var(--pk-radius)" },
357
+ loading: "lazy",
358
+ onClick: () => onImageClick(index)
359
+ }
360
+ );
361
+ }
362
+ function GallerySection({ section }) {
363
+ const [lightboxIdx, setLightboxIdx] = useState(null);
364
+ const cols = section.columns ?? 3;
365
+ const isFeatured = section.layout === "featured-grid";
366
+ const isCarousel = section.layout === "carousel";
367
+ const imageItems = section.media.filter((m) => !isInstagramEmbed(m));
368
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-5xl mx-auto", children: [
369
+ section.title && /* @__PURE__ */ jsx(
370
+ "h2",
371
+ {
372
+ className: "text-3xl md:text-4xl font-bold mb-8",
373
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
374
+ children: section.title
375
+ }
376
+ ),
377
+ isCarousel ? /* @__PURE__ */ jsx("div", { className: "flex gap-4 overflow-x-auto snap-x snap-mandatory pb-4 -mx-6 px-6 scrollbar-hide", children: section.media.map((item, i) => /* @__PURE__ */ jsx("div", { className: "flex-none w-72 md:w-96 snap-center", children: /* @__PURE__ */ jsx(MediaItem, { item, index: i, cols, isFeatured: false, onImageClick: setLightboxIdx }) }, i)) }) : /* @__PURE__ */ jsx(
378
+ "div",
379
+ {
380
+ className: `grid gap-3 md:gap-4 ${isFeatured ? "grid-cols-2" : cols === 2 ? "grid-cols-1 sm:grid-cols-2" : cols === 4 ? "grid-cols-2 md:grid-cols-4" : "grid-cols-2 md:grid-cols-3"}`,
381
+ children: section.media.map((item, i) => /* @__PURE__ */ jsx(MediaItem, { item, index: i, cols, isFeatured, onImageClick: setLightboxIdx }, i))
382
+ }
383
+ ),
384
+ lightboxIdx !== null && imageItems[lightboxIdx] && /* @__PURE__ */ jsxs(
385
+ "div",
386
+ {
387
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/90 p-4",
388
+ onClick: () => setLightboxIdx(null),
389
+ children: [
390
+ /* @__PURE__ */ jsx(
391
+ "button",
392
+ {
393
+ className: "absolute top-4 right-4 text-white text-3xl font-light hover:opacity-70 z-10",
394
+ onClick: () => setLightboxIdx(null),
395
+ children: "\xD7"
396
+ }
397
+ ),
398
+ /* @__PURE__ */ jsx(
399
+ "button",
400
+ {
401
+ className: "absolute left-4 top-1/2 -translate-y-1/2 text-white text-4xl font-light hover:opacity-70 z-10",
402
+ onClick: (e) => {
403
+ e.stopPropagation();
404
+ setLightboxIdx((lightboxIdx - 1 + imageItems.length) % imageItems.length);
405
+ },
406
+ children: "\u2039"
407
+ }
408
+ ),
409
+ /* @__PURE__ */ jsx(
410
+ "button",
411
+ {
412
+ className: "absolute right-4 top-1/2 -translate-y-1/2 text-white text-4xl font-light hover:opacity-70 z-10",
413
+ onClick: (e) => {
414
+ e.stopPropagation();
415
+ setLightboxIdx((lightboxIdx + 1) % imageItems.length);
416
+ },
417
+ children: "\u203A"
418
+ }
419
+ ),
420
+ /* @__PURE__ */ jsx(
421
+ "img",
422
+ {
423
+ src: imageItems[lightboxIdx].url,
424
+ alt: imageItems[lightboxIdx].alt ?? "",
425
+ className: "max-h-[85vh] max-w-[90vw] object-contain",
426
+ onClick: (e) => e.stopPropagation()
427
+ }
428
+ )
429
+ ]
430
+ }
431
+ )
432
+ ] }) });
433
+ }
434
+ function VideoGridSection({ section }) {
435
+ const isFeatured = section.layout === "featured";
436
+ const isList = section.layout === "list";
437
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-5xl mx-auto", children: [
438
+ section.title && /* @__PURE__ */ jsx(
439
+ "h2",
440
+ {
441
+ className: "text-3xl md:text-4xl font-bold mb-8",
442
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
443
+ children: section.title
444
+ }
445
+ ),
446
+ isFeatured && section.videos.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
447
+ /* @__PURE__ */ jsx("div", { className: "aspect-video w-full overflow-hidden", style: { borderRadius: "var(--pk-radius)" }, children: /* @__PURE__ */ jsx(
448
+ "iframe",
449
+ {
450
+ src: `https://www.youtube.com/embed/${section.videos[0].videoId}`,
451
+ title: section.videos[0].title ?? "Video",
452
+ className: "h-full w-full",
453
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
454
+ allowFullScreen: true,
455
+ loading: "lazy"
456
+ }
457
+ ) }),
458
+ section.videos[0].title && /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", style: { color: "var(--pk-muted)" }, children: section.videos[0].title }),
459
+ section.videos.length > 1 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: section.videos.slice(1).map((video, i) => /* @__PURE__ */ jsxs("div", { children: [
460
+ /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden", style: { borderRadius: "var(--pk-radius)" }, children: /* @__PURE__ */ jsx(
461
+ "iframe",
462
+ {
463
+ src: `https://www.youtube.com/embed/${video.videoId}`,
464
+ title: video.title ?? "Video",
465
+ className: "h-full w-full",
466
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
467
+ allowFullScreen: true,
468
+ loading: "lazy"
469
+ }
470
+ ) }),
471
+ video.title && /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm", style: { color: "var(--pk-muted)" }, children: video.title })
472
+ ] }, i)) })
473
+ ] }) : /* @__PURE__ */ jsxs("div", { className: `grid gap-4 md:gap-6 ${isList ? "grid-cols-1" : "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`, children: [
474
+ section.videos.map((video, i) => /* @__PURE__ */ jsxs("div", { children: [
475
+ /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden", style: { borderRadius: "var(--pk-radius)" }, children: /* @__PURE__ */ jsx(
476
+ "iframe",
477
+ {
478
+ src: `https://www.youtube.com/embed/${video.videoId}`,
479
+ title: video.title ?? "Video",
480
+ className: "h-full w-full",
481
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
482
+ allowFullScreen: true,
483
+ loading: "lazy"
484
+ }
485
+ ) }),
486
+ video.title && /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm", style: { color: "var(--pk-muted)" }, children: video.title })
487
+ ] }, i)),
488
+ section.channelUrl && /* @__PURE__ */ jsx(
489
+ "a",
490
+ {
491
+ href: section.channelUrl,
492
+ target: "_blank",
493
+ rel: "noopener noreferrer",
494
+ className: "aspect-video overflow-hidden flex items-center justify-center border border-white/10 hover:border-white/30 transition-colors",
495
+ style: { borderRadius: "var(--pk-radius)", background: "var(--pk-alt-bg, rgba(255,255,255,0.05))" },
496
+ children: /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold", style: { color: "var(--pk-text)", fontFamily: "var(--pk-font-heading)" }, children: "Ver todos \u2192" })
497
+ }
498
+ )
499
+ ] })
500
+ ] }) });
501
+ }
502
+ var BRAND = {
503
+ instagram: SiInstagram,
504
+ youtube: SiYoutube,
505
+ soundcloud: SiSoundcloud,
506
+ tiktok: SiTiktok,
507
+ spotify: SiSpotify,
508
+ whatsapp: SiWhatsapp,
509
+ "apple-music": SiApplemusic,
510
+ bandcamp: SiBandcamp,
511
+ facebook: SiFacebook,
512
+ twitter: SiX,
513
+ telegram: SiTelegram,
514
+ beatport: SiBeatport,
515
+ mixcloud: SiMixcloud,
516
+ drive: SiGoogledrive,
517
+ email: Mail,
518
+ website: Globe
519
+ };
520
+ function PlatformIcon({
521
+ platform,
522
+ size = 20,
523
+ style,
524
+ className
525
+ }) {
526
+ const Icon = BRAND[platform] ?? ExternalLink;
527
+ return /* @__PURE__ */ jsx(Icon, { size, style, className });
528
+ }
529
+ function SocialLinksSection({ section }) {
530
+ const layout = section.layout ?? "buttons";
531
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-xl mx-auto", children: [
532
+ section.title && /* @__PURE__ */ jsx(
533
+ "h2",
534
+ {
535
+ className: "text-3xl md:text-4xl font-bold mb-10 text-center",
536
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
537
+ children: section.title
538
+ }
539
+ ),
540
+ layout === "icons" && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-5", children: section.links.map((link) => {
541
+ const color = platformColors[link.platform];
542
+ return /* @__PURE__ */ jsx(
543
+ "a",
544
+ {
545
+ href: link.url,
546
+ target: "_blank",
547
+ rel: "noopener noreferrer",
548
+ className: "group flex items-center justify-center w-16 h-16 rounded-full transition-all duration-300 hover:scale-110 hover:shadow-lg",
549
+ style: {
550
+ backgroundColor: color + "15",
551
+ boxShadow: `0 0 0 1px ${color}25`
552
+ },
553
+ title: link.label ?? platformLabels[link.platform],
554
+ children: /* @__PURE__ */ jsx(PlatformIcon, { platform: link.platform, size: 26, style: { color } })
555
+ },
556
+ link.platform + link.url
557
+ );
558
+ }) }),
559
+ layout === "buttons" && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: section.links.map((link) => {
560
+ const color = platformColors[link.platform];
561
+ return /* @__PURE__ */ jsxs(
562
+ "a",
563
+ {
564
+ href: link.url,
565
+ target: "_blank",
566
+ rel: "noopener noreferrer",
567
+ className: "group relative flex items-center gap-5 px-6 py-4 font-medium transition-all duration-300 hover:scale-[1.02] overflow-hidden",
568
+ style: {
569
+ backgroundColor: color + "10",
570
+ color: "var(--pk-text)",
571
+ borderRadius: "var(--pk-radius)",
572
+ border: `1px solid ${color}30`
573
+ },
574
+ children: [
575
+ /* @__PURE__ */ jsx(
576
+ "div",
577
+ {
578
+ className: "absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",
579
+ style: { background: `linear-gradient(135deg, ${color}18, transparent 60%)` }
580
+ }
581
+ ),
582
+ /* @__PURE__ */ jsx(
583
+ "div",
584
+ {
585
+ className: "relative z-10 flex items-center justify-center w-10 h-10 rounded-full shrink-0",
586
+ style: { backgroundColor: color + "20" },
587
+ children: /* @__PURE__ */ jsx(PlatformIcon, { platform: link.platform, size: 20, style: { color } })
588
+ }
589
+ ),
590
+ /* @__PURE__ */ jsx("span", { className: "relative z-10 text-base", children: link.label ?? platformLabels[link.platform] }),
591
+ /* @__PURE__ */ jsx(
592
+ ExternalLink,
593
+ {
594
+ size: 16,
595
+ className: "relative z-10 ml-auto opacity-0 group-hover:opacity-50 transition-opacity duration-300",
596
+ style: { color: "var(--pk-text)" }
597
+ }
598
+ )
599
+ ]
600
+ },
601
+ link.platform + link.url
602
+ );
603
+ }) }),
604
+ layout === "list" && /* @__PURE__ */ jsx("div", { className: "space-y-1", children: section.links.map((link) => {
605
+ const color = platformColors[link.platform];
606
+ return /* @__PURE__ */ jsxs(
607
+ "a",
608
+ {
609
+ href: link.url,
610
+ target: "_blank",
611
+ rel: "noopener noreferrer",
612
+ className: "group flex items-center gap-4 py-4 px-3 transition-all duration-200 hover:bg-white/5 rounded-lg",
613
+ children: [
614
+ /* @__PURE__ */ jsx(
615
+ "div",
616
+ {
617
+ className: "flex items-center justify-center w-9 h-9 rounded-full shrink-0",
618
+ style: { backgroundColor: color + "18" },
619
+ children: /* @__PURE__ */ jsx(PlatformIcon, { platform: link.platform, size: 18, style: { color } })
620
+ }
621
+ ),
622
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", style: { color: "var(--pk-text)" }, children: link.label ?? platformLabels[link.platform] }),
623
+ /* @__PURE__ */ jsx(
624
+ ExternalLink,
625
+ {
626
+ size: 14,
627
+ className: "ml-auto opacity-0 group-hover:opacity-40 transition-opacity",
628
+ style: { color: "var(--pk-text)" }
629
+ }
630
+ )
631
+ ]
632
+ },
633
+ link.platform + link.url
634
+ );
635
+ }) })
636
+ ] }) });
637
+ }
638
+ function EmbedSection({ section }) {
639
+ const isVideo = section.aspectRatio === "16:9" || section.embedType === "youtube";
640
+ const height = section.height ?? (isVideo ? void 0 : 352);
641
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl mx-auto", children: [
642
+ section.title && /* @__PURE__ */ jsx(
643
+ "h2",
644
+ {
645
+ className: "text-3xl md:text-4xl font-bold mb-8",
646
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
647
+ children: section.title
648
+ }
649
+ ),
650
+ section.embedHtml && section.embedType === "custom" ? /* @__PURE__ */ jsx(
651
+ "div",
652
+ {
653
+ className: "overflow-hidden",
654
+ style: { borderRadius: "var(--pk-radius)" },
655
+ dangerouslySetInnerHTML: { __html: section.embedHtml }
656
+ }
657
+ ) : isVideo ? /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden", style: { borderRadius: "var(--pk-radius)" }, children: /* @__PURE__ */ jsx(
658
+ "iframe",
659
+ {
660
+ src: section.embedUrl,
661
+ className: "h-full w-full",
662
+ allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",
663
+ loading: "lazy",
664
+ title: section.title ?? "Embed"
665
+ }
666
+ ) }) : /* @__PURE__ */ jsx("div", { className: "overflow-hidden", style: { borderRadius: "var(--pk-radius)", height }, children: /* @__PURE__ */ jsx(
667
+ "iframe",
668
+ {
669
+ src: section.embedUrl,
670
+ className: "w-full h-full",
671
+ allow: "autoplay; clipboard-write; encrypted-media; fullscreen",
672
+ loading: "lazy",
673
+ title: section.title ?? "Embed"
674
+ }
675
+ ) })
676
+ ] }) });
677
+ }
678
+ function ProjectSection({ section }) {
679
+ const isSideBySide = section.layout === "side-by-side";
680
+ const hasMedia = section.media && section.media.length > 0;
681
+ const firstMedia = hasMedia ? section.media[0] : null;
682
+ const isVideo = firstMedia?.type === "video";
683
+ const MediaBlock = () => {
684
+ if (!firstMedia) return null;
685
+ if (isVideo) {
686
+ return /* @__PURE__ */ jsx("div", { className: "relative w-full", style: { paddingBottom: "56.25%", borderRadius: "var(--pk-radius)", overflow: "hidden" }, children: /* @__PURE__ */ jsx(
687
+ "iframe",
688
+ {
689
+ src: firstMedia.url,
690
+ className: "absolute inset-0 w-full h-full",
691
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
692
+ allowFullScreen: true,
693
+ loading: "lazy",
694
+ title: firstMedia.alt ?? section.title ?? "Video"
695
+ }
696
+ ) });
697
+ }
698
+ return /* @__PURE__ */ jsx(
699
+ "img",
700
+ {
701
+ src: firstMedia.url,
702
+ alt: firstMedia.alt ?? "",
703
+ className: "w-full h-full object-cover",
704
+ style: { borderRadius: "var(--pk-radius)" },
705
+ loading: "lazy"
706
+ }
707
+ );
708
+ };
709
+ const ContentBlock = () => /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
710
+ section.label && /* @__PURE__ */ jsx(
711
+ "span",
712
+ {
713
+ className: "inline-block self-start px-4 py-1.5 text-xs font-bold uppercase tracking-[0.15em] mb-5",
714
+ style: {
715
+ backgroundColor: "transparent",
716
+ color: "var(--pk-accent)",
717
+ border: "1px solid var(--pk-accent)",
718
+ borderRadius: "4px"
719
+ },
720
+ children: section.label
721
+ }
722
+ ),
723
+ section.title && /* @__PURE__ */ jsx(
724
+ "h2",
725
+ {
726
+ className: "text-3xl md:text-4xl lg:text-5xl font-bold mb-5",
727
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
728
+ children: section.title
729
+ }
730
+ ),
731
+ section.content && /* @__PURE__ */ jsx(
732
+ "div",
733
+ {
734
+ className: "text-base md:text-lg leading-relaxed [&_p]:mb-4 [&_strong]:font-semibold [&_strong]:text-white [&_em]:italic",
735
+ style: { color: "var(--pk-muted)" },
736
+ dangerouslySetInnerHTML: { __html: renderMarkdown(section.content) }
737
+ }
738
+ ),
739
+ section.tags && section.tags.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 mt-5", children: section.tags.map((tag) => /* @__PURE__ */ jsx(
740
+ "span",
741
+ {
742
+ className: "px-3 py-1 text-xs font-medium",
743
+ style: {
744
+ color: "var(--pk-muted)",
745
+ border: "1px solid rgba(255,255,255,0.1)",
746
+ borderRadius: "var(--pk-radius)"
747
+ },
748
+ children: tag
749
+ },
750
+ tag
751
+ )) }),
752
+ section.links && section.links.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4 mt-6", children: section.links.map((link) => /* @__PURE__ */ jsx(
753
+ "a",
754
+ {
755
+ href: link.url,
756
+ target: "_blank",
757
+ rel: "noopener noreferrer",
758
+ className: "text-sm font-medium underline underline-offset-4 hover:opacity-80 transition-opacity",
759
+ style: { color: "var(--pk-primary)" },
760
+ children: link.label
761
+ },
762
+ link.url
763
+ )) })
764
+ ] });
765
+ return /* @__PURE__ */ jsx("section", { className: "py-20 md:py-28 px-6", id: section.id, children: /* @__PURE__ */ jsx("div", { className: "max-w-5xl mx-auto", children: isSideBySide && hasMedia ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-16 items-center", children: [
766
+ /* @__PURE__ */ jsx("div", { className: "order-1", children: /* @__PURE__ */ jsx(ContentBlock, {}) }),
767
+ /* @__PURE__ */ jsx("div", { className: "order-2", children: /* @__PURE__ */ jsx(MediaBlock, {}) })
768
+ ] }) : /* @__PURE__ */ jsxs("div", { children: [
769
+ /* @__PURE__ */ jsx(ContentBlock, {}),
770
+ hasMedia && /* @__PURE__ */ jsx("div", { className: `grid grid-cols-1 gap-4 mt-8 ${section.media.length > 1 ? "md:grid-cols-2" : ""}`, children: section.media.map(
771
+ (item, i) => item.type === "video" ? /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden", style: { borderRadius: "var(--pk-radius)" }, children: /* @__PURE__ */ jsx(
772
+ "iframe",
773
+ {
774
+ src: item.url,
775
+ className: "h-full w-full",
776
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
777
+ allowFullScreen: true,
778
+ loading: "lazy",
779
+ title: item.alt ?? "Video"
780
+ }
781
+ ) }, i) : /* @__PURE__ */ jsx(
782
+ "img",
783
+ {
784
+ src: item.url,
785
+ alt: item.alt ?? "",
786
+ className: "w-full aspect-[4/3] object-cover",
787
+ style: { borderRadius: "var(--pk-radius)" },
788
+ loading: "lazy"
789
+ },
790
+ i
791
+ )
792
+ ) })
793
+ ] }) }) });
794
+ }
795
+ function StatsSection({ section }) {
796
+ const isGrid = section.layout === "grid";
797
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-4xl mx-auto", children: [
798
+ section.title && /* @__PURE__ */ jsx(
799
+ "h2",
800
+ {
801
+ className: "text-3xl md:text-4xl font-bold mb-8 text-center",
802
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
803
+ children: section.title
804
+ }
805
+ ),
806
+ /* @__PURE__ */ jsx(
807
+ "div",
808
+ {
809
+ className: isGrid ? "grid grid-cols-2 md:grid-cols-4 gap-6" : "flex flex-wrap justify-center gap-8 md:gap-12",
810
+ children: section.stats.map((stat, i) => /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
811
+ /* @__PURE__ */ jsx(
812
+ "div",
813
+ {
814
+ className: "text-3xl md:text-4xl font-bold mb-1",
815
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-primary)" },
816
+ children: stat.value
817
+ }
818
+ ),
819
+ /* @__PURE__ */ jsx("div", { className: "text-sm", style: { color: "var(--pk-muted)" }, children: stat.label })
820
+ ] }, i))
821
+ }
822
+ )
823
+ ] }) });
824
+ }
825
+ function VenueListSection({ section }) {
826
+ const layout = section.layout ?? "grid";
827
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-5xl mx-auto", children: [
828
+ section.title && /* @__PURE__ */ jsx(
829
+ "h2",
830
+ {
831
+ className: "text-3xl md:text-4xl font-bold mb-10",
832
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
833
+ children: section.title
834
+ }
835
+ ),
836
+ layout === "logo-cloud" ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-6 md:gap-8", children: section.venues.map((venue, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
837
+ venue.logoUrl ? /* @__PURE__ */ jsx("img", { src: venue.logoUrl, alt: venue.name, className: "h-12 w-12 object-contain opacity-70", loading: "lazy" }) : /* @__PURE__ */ jsx(
838
+ "div",
839
+ {
840
+ className: "h-12 w-12 flex items-center justify-center text-lg font-bold opacity-70",
841
+ style: { backgroundColor: "rgba(255,255,255,0.06)", color: "var(--pk-text)", borderRadius: "var(--pk-radius)" },
842
+ children: venue.name[0]
843
+ }
844
+ ),
845
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-center", style: { color: "var(--pk-muted)" }, children: venue.name })
846
+ ] }, i)) }) : layout === "list" ? /* @__PURE__ */ jsx("div", { className: "space-y-3", children: section.venues.map((venue, i) => /* @__PURE__ */ jsxs(
847
+ "div",
848
+ {
849
+ className: "flex items-center justify-between py-3 px-4",
850
+ style: { backgroundColor: "rgba(255,255,255,0.04)", borderRadius: "var(--pk-radius)" },
851
+ children: [
852
+ /* @__PURE__ */ jsx("span", { className: "font-medium", style: { color: "var(--pk-text)" }, children: venue.name }),
853
+ /* @__PURE__ */ jsx("span", { className: "text-sm", style: { color: "var(--pk-muted)" }, children: [venue.city, venue.year].filter(Boolean).join(" \xB7 ") })
854
+ ]
855
+ },
856
+ i
857
+ )) }) : (
858
+ /* Organic flowing tag cloud */
859
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3", children: section.venues.map((venue, i) => {
860
+ const isLong = venue.name.length > 12;
861
+ const isShort = venue.name.length < 6;
862
+ const sizeClass = isLong ? "text-base md:text-lg px-6 py-3" : isShort ? "text-sm px-4 py-2.5" : "text-sm md:text-base px-5 py-3";
863
+ const isHighlight = i % 5 === 0 || i % 7 === 0;
864
+ return /* @__PURE__ */ jsx(
865
+ "div",
866
+ {
867
+ className: `inline-flex flex-col items-start transition-all duration-300 hover:scale-105 ${sizeClass}`,
868
+ style: {
869
+ backgroundColor: isHighlight ? "rgba(255,255,255,0.08)" : "rgba(255,255,255,0.03)",
870
+ border: isHighlight ? "1px solid rgba(255,255,255,0.12)" : "1px solid rgba(255,255,255,0.06)",
871
+ borderRadius: "9999px"
872
+ },
873
+ children: /* @__PURE__ */ jsxs("span", { className: "font-semibold whitespace-nowrap", style: { color: "var(--pk-text)" }, children: [
874
+ venue.name,
875
+ venue.city && /* @__PURE__ */ jsx("span", { className: "font-normal ml-2 opacity-50", style: { color: "var(--pk-muted)", fontSize: "0.8em" }, children: venue.city })
876
+ ] })
877
+ },
878
+ i
879
+ );
880
+ }) })
881
+ )
882
+ ] }) });
883
+ }
884
+ function CTASection({ section }) {
885
+ return /* @__PURE__ */ jsx("section", { className: "py-24 md:py-36 px-6 text-center", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-2xl mx-auto", children: [
886
+ section.title && /* @__PURE__ */ jsx(
887
+ "h2",
888
+ {
889
+ className: "text-4xl md:text-5xl lg:text-6xl font-bold mb-6",
890
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
891
+ children: section.title
892
+ }
893
+ ),
894
+ section.content && /* @__PURE__ */ jsx(
895
+ "div",
896
+ {
897
+ className: "text-base md:text-lg mb-10 [&_p]:mb-2",
898
+ style: { color: "var(--pk-muted)" },
899
+ dangerouslySetInnerHTML: { __html: renderMarkdown(section.content) }
900
+ }
901
+ ),
902
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row items-center justify-center gap-5", children: section.ctaButtons.map((btn) => {
903
+ const isPrimary = btn.variant === "primary";
904
+ const isOutline = btn.variant === "outline";
905
+ return /* @__PURE__ */ jsx(
906
+ "a",
907
+ {
908
+ href: btn.url,
909
+ target: "_blank",
910
+ rel: "noopener noreferrer",
911
+ className: "inline-flex items-center justify-center px-10 py-4 text-base font-bold tracking-[0.1em] uppercase transition-all duration-300 hover:scale-105 min-w-[200px]",
912
+ style: {
913
+ backgroundColor: isPrimary ? "var(--pk-primary)" : isOutline ? "transparent" : "var(--pk-secondary)",
914
+ color: isPrimary ? "var(--pk-bg)" : "var(--pk-text)",
915
+ border: isOutline ? "2px solid rgba(255,255,255,0.2)" : "none",
916
+ borderRadius: "9999px",
917
+ boxShadow: isPrimary ? "0 8px 32px rgba(0,0,0,0.3)" : "none"
918
+ },
919
+ children: btn.label
920
+ },
921
+ btn.url
922
+ );
923
+ }) })
924
+ ] }) });
925
+ }
926
+ function TextSection({ section }) {
927
+ return /* @__PURE__ */ jsx("section", { className: "py-16 md:py-24 px-6", id: section.id, children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl mx-auto", children: [
928
+ section.title && /* @__PURE__ */ jsx(
929
+ "h2",
930
+ {
931
+ className: "text-3xl md:text-4xl font-bold mb-8",
932
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
933
+ children: section.title
934
+ }
935
+ ),
936
+ /* @__PURE__ */ jsx(
937
+ "div",
938
+ {
939
+ className: "text-base md:text-lg leading-relaxed [&_p]:mb-4 [&_strong]:font-semibold [&_em]:italic [&_a]:underline [&_a]:decoration-[var(--pk-primary)]",
940
+ style: { color: "var(--pk-muted)" },
941
+ dangerouslySetInnerHTML: { __html: renderMarkdown(section.content) }
942
+ }
943
+ )
944
+ ] }) });
945
+ }
946
+ function ProfileHeader({ section, page }) {
947
+ const { identity, branding } = page;
948
+ const isHub = page.layout === "hub";
949
+ const socials = section.socials ?? page.socialLinks ?? [];
950
+ const hasLogo = section.showLogo && branding.logoUrl;
951
+ const heroRef = useRef(null);
952
+ const [sy, setSy] = useState(0);
953
+ useEffect(() => {
954
+ const container = document.querySelector(".fixed.inset-0");
955
+ if (!container) return;
956
+ const reduce = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
957
+ if (reduce) return;
958
+ let raf = 0;
959
+ const onScroll = () => {
960
+ if (raf) return;
961
+ raf = requestAnimationFrame(() => {
962
+ setSy(container.scrollTop);
963
+ raf = 0;
964
+ });
965
+ };
966
+ container.addEventListener("scroll", onScroll, { passive: true });
967
+ return () => {
968
+ container.removeEventListener("scroll", onScroll);
969
+ if (raf) cancelAnimationFrame(raf);
970
+ };
971
+ }, []);
972
+ const heroH = heroRef.current?.offsetHeight ?? 700;
973
+ const p = Math.min(1, sy / heroH);
974
+ const imageOffsetTop = section.imageOffsetTop ?? "0px";
975
+ const imageTransform = `translateY(calc(${imageOffsetTop} + ${sy * 0.22}px)) scale(1.18)`;
976
+ const logoTransform = `translateY(${-sy * 0.5}px) scale(${1 - p * 0.12})`;
977
+ const logoOpacity = Math.max(0, 1 - p * 1.25);
978
+ const hintOpacity = Math.max(0, 1 - p * 4);
979
+ const scrollTo = (id) => {
980
+ const el = typeof document !== "undefined" ? document.getElementById(id) : null;
981
+ el?.scrollIntoView({ behavior: "smooth", block: "start" });
982
+ };
983
+ return /* @__PURE__ */ jsxs("header", { id: section.id, className: "relative", children: [
984
+ /* @__PURE__ */ jsxs(
985
+ "div",
986
+ {
987
+ ref: heroRef,
988
+ className: `relative w-full h-[86vh] max-h-[880px] overflow-hidden ${isHub ? "sm:rounded-[26px]" : ""}`,
989
+ children: [
990
+ section.imageUrl && /* @__PURE__ */ jsx(
991
+ "img",
992
+ {
993
+ src: section.imageUrl,
994
+ alt: identity.name,
995
+ className: "absolute inset-0 h-full w-full object-cover will-change-transform",
996
+ style: { transform: imageTransform, objectPosition: section.imageObjectPosition }
997
+ }
998
+ ),
999
+ /* @__PURE__ */ jsx(
1000
+ "div",
1001
+ {
1002
+ className: "absolute inset-0",
1003
+ style: {
1004
+ background: section.overlayGradient ?? "linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 60%, var(--pk-bg) 100%)"
1005
+ }
1006
+ }
1007
+ ),
1008
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 bottom-0 flex flex-col items-center text-center px-6 pb-14", children: hasLogo ? /* @__PURE__ */ jsx(
1009
+ "img",
1010
+ {
1011
+ src: branding.logoUrl,
1012
+ alt: `${identity.name} logo`,
1013
+ className: "w-[82%] max-w-[380px] h-auto object-contain drop-shadow-[0_4px_24px_rgba(0,0,0,0.55)] will-change-transform",
1014
+ style: { transform: logoTransform, opacity: logoOpacity }
1015
+ }
1016
+ ) : /* @__PURE__ */ jsx(
1017
+ "h1",
1018
+ {
1019
+ className: "text-5xl sm:text-6xl font-bold tracking-tight drop-shadow-lg will-change-transform",
1020
+ style: {
1021
+ fontFamily: "var(--pk-font-heading)",
1022
+ color: "var(--pk-text)",
1023
+ transform: logoTransform,
1024
+ opacity: logoOpacity
1025
+ },
1026
+ children: identity.name
1027
+ }
1028
+ ) }),
1029
+ /* @__PURE__ */ jsx(
1030
+ "div",
1031
+ {
1032
+ className: "absolute bottom-4 left-1/2 -translate-x-1/2 animate-bounce",
1033
+ style: { opacity: hintOpacity, color: "var(--pk-text)" },
1034
+ children: /* @__PURE__ */ jsx(ChevronDown, { size: 22 })
1035
+ }
1036
+ )
1037
+ ]
1038
+ }
1039
+ ),
1040
+ (identity.tagline || section.showLocation && identity.location) && /* @__PURE__ */ jsxs("div", { className: "text-center mt-5 px-4", children: [
1041
+ identity.tagline && /* @__PURE__ */ jsx("p", { className: "text-base font-medium", style: { color: "var(--pk-text)" }, children: identity.tagline }),
1042
+ section.showLocation && identity.location && /* @__PURE__ */ jsx("p", { className: "text-xs mt-1 opacity-60", style: { color: "var(--pk-muted)" }, children: identity.location })
1043
+ ] }),
1044
+ socials.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-3 mt-4 px-4", children: socials.map((link) => /* @__PURE__ */ jsx(
1045
+ "a",
1046
+ {
1047
+ href: link.url,
1048
+ target: "_blank",
1049
+ rel: "noopener noreferrer",
1050
+ "aria-label": link.label ?? platformLabels[link.platform] ?? "Link",
1051
+ className: "flex items-center justify-center w-11 h-11 rounded-full transition-transform hover:scale-110",
1052
+ style: { backgroundColor: "rgba(255,255,255,0.07)", color: "var(--pk-text)" },
1053
+ children: /* @__PURE__ */ jsx(PlatformIcon, { platform: link.platform, size: 19 })
1054
+ },
1055
+ link.platform + link.url
1056
+ )) }),
1057
+ section.navPills && section.navPills.length > 0 && /* @__PURE__ */ jsx(
1058
+ "nav",
1059
+ {
1060
+ className: "flex gap-2 overflow-x-auto scrollbar-hide mt-4 px-4 pb-1 justify-start sm:justify-center",
1061
+ "aria-label": "Se\xE7\xF5es",
1062
+ children: section.navPills.map((pill) => /* @__PURE__ */ jsx(
1063
+ "button",
1064
+ {
1065
+ type: "button",
1066
+ onClick: () => scrollTo(pill.targetId),
1067
+ className: "whitespace-nowrap px-4 py-2 text-sm font-medium rounded-full transition-colors shrink-0",
1068
+ style: {
1069
+ backgroundColor: "rgba(255,255,255,0.06)",
1070
+ color: "var(--pk-text)",
1071
+ border: "1px solid rgba(255,255,255,0.08)"
1072
+ },
1073
+ children: pill.label
1074
+ },
1075
+ pill.targetId
1076
+ ))
1077
+ }
1078
+ )
1079
+ ] });
1080
+ }
1081
+ function LinkCard({ item }) {
1082
+ return /* @__PURE__ */ jsxs(
1083
+ "a",
1084
+ {
1085
+ href: item.url,
1086
+ target: "_blank",
1087
+ rel: "noopener noreferrer",
1088
+ className: "group flex items-center gap-4 p-3 transition-all duration-200 hover:scale-[1.015] active:scale-[0.99]",
1089
+ style: {
1090
+ backgroundColor: "rgba(255,255,255,0.05)",
1091
+ border: "1px solid rgba(255,255,255,0.07)",
1092
+ borderRadius: "var(--pk-radius)"
1093
+ },
1094
+ children: [
1095
+ /* @__PURE__ */ jsx(
1096
+ "div",
1097
+ {
1098
+ className: "shrink-0 flex items-center justify-center w-12 h-12 overflow-hidden",
1099
+ style: { borderRadius: "calc(var(--pk-radius) - 4px)", backgroundColor: "rgba(255,255,255,0.06)" },
1100
+ children: item.thumbnailUrl ? /* @__PURE__ */ jsx("img", { src: item.thumbnailUrl, alt: "", className: "w-full h-full object-cover", loading: "lazy" }) : /* @__PURE__ */ jsx(PlatformIcon, { platform: item.icon ?? "custom", size: 20, style: { color: "var(--pk-primary)" } })
1101
+ }
1102
+ ),
1103
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1104
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1105
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold truncate", style: { color: "var(--pk-text)" }, children: item.title }),
1106
+ item.badge && /* @__PURE__ */ jsx(
1107
+ "span",
1108
+ {
1109
+ className: "text-[10px] font-bold uppercase tracking-wide px-2 py-0.5 rounded-full shrink-0",
1110
+ style: { backgroundColor: "var(--pk-primary)", color: "var(--pk-bg)" },
1111
+ children: item.badge
1112
+ }
1113
+ )
1114
+ ] }),
1115
+ item.subtitle && /* @__PURE__ */ jsx("p", { className: "text-xs truncate mt-0.5", style: { color: "var(--pk-muted)" }, children: item.subtitle })
1116
+ ] }),
1117
+ /* @__PURE__ */ jsx(
1118
+ ChevronRight,
1119
+ {
1120
+ size: 18,
1121
+ className: "shrink-0 opacity-40 group-hover:opacity-80 group-hover:translate-x-0.5 transition-all",
1122
+ style: { color: "var(--pk-text)" }
1123
+ }
1124
+ )
1125
+ ]
1126
+ }
1127
+ );
1128
+ }
1129
+ function LinksBlock({ section }) {
1130
+ const isGrid = section.layout === "grid";
1131
+ return /* @__PURE__ */ jsxs("section", { className: "py-6", id: section.id, children: [
1132
+ section.title && /* @__PURE__ */ jsx(
1133
+ "h2",
1134
+ {
1135
+ className: "text-xl md:text-2xl font-bold mb-4 px-1",
1136
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
1137
+ children: section.title
1138
+ }
1139
+ ),
1140
+ /* @__PURE__ */ jsx("div", { className: isGrid ? "grid grid-cols-2 gap-3" : "flex flex-col gap-3", children: section.links.map((item, i) => /* @__PURE__ */ jsx(LinkCard, { item }, item.url + i)) })
1141
+ ] });
1142
+ }
1143
+ function Carousel({ title, children }) {
1144
+ const trackRef = useRef(null);
1145
+ const [atStart, setAtStart] = useState(true);
1146
+ const [atEnd, setAtEnd] = useState(false);
1147
+ const update = () => {
1148
+ const el = trackRef.current;
1149
+ if (!el) return;
1150
+ setAtStart(el.scrollLeft <= 2);
1151
+ setAtEnd(el.scrollLeft + el.clientWidth >= el.scrollWidth - 2);
1152
+ };
1153
+ useEffect(() => {
1154
+ update();
1155
+ const el = trackRef.current;
1156
+ if (!el) return;
1157
+ el.addEventListener("scroll", update, { passive: true });
1158
+ window.addEventListener("resize", update);
1159
+ return () => {
1160
+ el.removeEventListener("scroll", update);
1161
+ window.removeEventListener("resize", update);
1162
+ };
1163
+ }, []);
1164
+ const nudge = (dir) => {
1165
+ const el = trackRef.current;
1166
+ if (!el) return;
1167
+ el.scrollBy({ left: dir * el.clientWidth * 0.8, behavior: "smooth" });
1168
+ };
1169
+ const arrowStyle = (disabled) => ({
1170
+ backgroundColor: "rgba(255,255,255,0.06)",
1171
+ color: "var(--pk-text)",
1172
+ opacity: disabled ? 0.25 : 1,
1173
+ borderRadius: "9999px"
1174
+ });
1175
+ return /* @__PURE__ */ jsxs("div", { children: [
1176
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4 px-1", children: [
1177
+ title && /* @__PURE__ */ jsx(
1178
+ "h2",
1179
+ {
1180
+ className: "text-xl md:text-2xl font-bold",
1181
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
1182
+ children: title
1183
+ }
1184
+ ),
1185
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1186
+ /* @__PURE__ */ jsx(
1187
+ "button",
1188
+ {
1189
+ type: "button",
1190
+ "aria-label": "Anterior",
1191
+ onClick: () => nudge(-1),
1192
+ disabled: atStart,
1193
+ className: "flex items-center justify-center w-9 h-9 transition-opacity",
1194
+ style: arrowStyle(atStart),
1195
+ children: /* @__PURE__ */ jsx(ChevronLeft, { size: 18 })
1196
+ }
1197
+ ),
1198
+ /* @__PURE__ */ jsx(
1199
+ "button",
1200
+ {
1201
+ type: "button",
1202
+ "aria-label": "Pr\xF3ximo",
1203
+ onClick: () => nudge(1),
1204
+ disabled: atEnd,
1205
+ className: "flex items-center justify-center w-9 h-9 transition-opacity",
1206
+ style: arrowStyle(atEnd),
1207
+ children: /* @__PURE__ */ jsx(ChevronRight, { size: 18 })
1208
+ }
1209
+ )
1210
+ ] })
1211
+ ] }),
1212
+ /* @__PURE__ */ jsx(
1213
+ "div",
1214
+ {
1215
+ ref: trackRef,
1216
+ className: "flex gap-3 overflow-x-auto snap-x snap-mandatory scrollbar-hide pb-1",
1217
+ children
1218
+ }
1219
+ )
1220
+ ] });
1221
+ }
1222
+ function ReleaseCard({ item, cta, wide }) {
1223
+ return /* @__PURE__ */ jsxs(
1224
+ "a",
1225
+ {
1226
+ href: item.url,
1227
+ target: "_blank",
1228
+ rel: "noopener noreferrer",
1229
+ className: `group ${wide ? "flex-none w-40 snap-start" : ""} flex flex-col transition-transform hover:scale-[1.02]`,
1230
+ children: [
1231
+ /* @__PURE__ */ jsxs(
1232
+ "div",
1233
+ {
1234
+ className: "relative w-full aspect-square overflow-hidden",
1235
+ style: { borderRadius: "var(--pk-radius)", backgroundColor: "rgba(255,255,255,0.05)" },
1236
+ children: [
1237
+ /* @__PURE__ */ jsx("img", { src: item.artworkUrl, alt: item.title, className: "w-full h-full object-cover", loading: "lazy" }),
1238
+ /* @__PURE__ */ jsx(
1239
+ "div",
1240
+ {
1241
+ className: "absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",
1242
+ style: { background: "rgba(0,0,0,0.35)" },
1243
+ children: /* @__PURE__ */ jsx(
1244
+ "span",
1245
+ {
1246
+ className: "flex items-center justify-center w-11 h-11 rounded-full",
1247
+ style: { backgroundColor: "var(--pk-primary)", color: "var(--pk-bg)" },
1248
+ children: /* @__PURE__ */ jsx(Play, { size: 20, fill: "currentColor" })
1249
+ }
1250
+ )
1251
+ }
1252
+ )
1253
+ ]
1254
+ }
1255
+ ),
1256
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 px-0.5", children: [
1257
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold truncate", style: { color: "var(--pk-text)" }, children: item.title }),
1258
+ item.artist && /* @__PURE__ */ jsx("p", { className: "text-xs truncate", style: { color: "var(--pk-muted)" }, children: item.artist }),
1259
+ /* @__PURE__ */ jsxs(
1260
+ "span",
1261
+ {
1262
+ className: "inline-flex items-center gap-1 mt-1.5 px-3 py-1 text-xs font-semibold rounded-full",
1263
+ style: { backgroundColor: "rgba(255,255,255,0.08)", color: "var(--pk-text)" },
1264
+ children: [
1265
+ /* @__PURE__ */ jsx(Play, { size: 11, fill: "currentColor" }),
1266
+ " ",
1267
+ cta
1268
+ ]
1269
+ }
1270
+ )
1271
+ ] })
1272
+ ]
1273
+ }
1274
+ );
1275
+ }
1276
+ function MusicReleasesBlock({ section }) {
1277
+ const cta = section.ctaLabel ?? "Ouvir";
1278
+ if (section.layout === "grid") {
1279
+ return /* @__PURE__ */ jsxs("section", { className: "py-6", id: section.id, children: [
1280
+ section.title && /* @__PURE__ */ jsx(
1281
+ "h2",
1282
+ {
1283
+ className: "text-xl md:text-2xl font-bold mb-4 px-1",
1284
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
1285
+ children: section.title
1286
+ }
1287
+ ),
1288
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: section.releases.map((item, i) => /* @__PURE__ */ jsx(ReleaseCard, { item, cta }, item.url + i)) })
1289
+ ] });
1290
+ }
1291
+ return /* @__PURE__ */ jsx("section", { className: "py-6", id: section.id, children: /* @__PURE__ */ jsx(Carousel, { title: section.title, children: section.releases.map((item, i) => /* @__PURE__ */ jsx(ReleaseCard, { item, cta, wide: true }, item.url + i)) }) });
1292
+ }
1293
+ var MONTHS_PT = ["JAN", "FEV", "MAR", "ABR", "MAI", "JUN", "JUL", "AGO", "SET", "OUT", "NOV", "DEZ"];
1294
+ function parseDate(date) {
1295
+ const m = date.match(/^(\d{4})-(\d{2})-(\d{2})/);
1296
+ if (m) {
1297
+ const monthIdx = Math.min(11, Math.max(0, parseInt(m[2], 10) - 1));
1298
+ return { month: MONTHS_PT[monthIdx], day: String(parseInt(m[3], 10)), year: m[1] };
1299
+ }
1300
+ return { month: "", day: date, year: "" };
1301
+ }
1302
+ function DateRow({ item, cta }) {
1303
+ const { month, day, year } = parseDate(item.date);
1304
+ const hasLink = !!item.url;
1305
+ const label = hasLink ? cta : item.soldOut ? "Esgotado" : "Em breve";
1306
+ const Tag = hasLink ? "a" : "div";
1307
+ return /* @__PURE__ */ jsxs(
1308
+ Tag,
1309
+ {
1310
+ ...hasLink ? { href: item.url, target: "_blank", rel: "noopener noreferrer" } : {},
1311
+ className: `flex items-center gap-4 p-3 transition-all duration-200 ${hasLink ? "hover:scale-[1.01]" : "cursor-default"}`,
1312
+ style: {
1313
+ backgroundColor: "rgba(255,255,255,0.04)",
1314
+ border: "1px solid rgba(255,255,255,0.07)",
1315
+ borderRadius: "var(--pk-radius)"
1316
+ },
1317
+ children: [
1318
+ /* @__PURE__ */ jsxs(
1319
+ "div",
1320
+ {
1321
+ className: "shrink-0 flex flex-col items-center justify-center w-14 h-16",
1322
+ style: { backgroundColor: "rgba(255,255,255,0.05)", borderRadius: "calc(var(--pk-radius) - 4px)" },
1323
+ children: [
1324
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold tracking-wider", style: { color: "var(--pk-primary)" }, children: month }),
1325
+ /* @__PURE__ */ jsx("span", { className: "text-xl font-bold leading-none", style: { color: "var(--pk-text)", fontFamily: "var(--pk-font-heading)" }, children: day }),
1326
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] opacity-60", style: { color: "var(--pk-muted)" }, children: year })
1327
+ ]
1328
+ }
1329
+ ),
1330
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1331
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold truncate", style: { color: "var(--pk-text)" }, children: item.venue }),
1332
+ item.city && /* @__PURE__ */ jsxs("p", { className: "text-xs truncate flex items-center gap-1 mt-0.5", style: { color: "var(--pk-muted)" }, children: [
1333
+ /* @__PURE__ */ jsx(MapPin, { size: 11 }),
1334
+ " ",
1335
+ item.city
1336
+ ] })
1337
+ ] }),
1338
+ /* @__PURE__ */ jsx(
1339
+ "span",
1340
+ {
1341
+ className: "shrink-0 px-4 py-1.5 text-xs font-semibold rounded-full",
1342
+ style: hasLink ? { backgroundColor: "var(--pk-primary)", color: "var(--pk-bg)" } : { backgroundColor: "transparent", color: "var(--pk-muted)", border: "1px solid rgba(255,255,255,0.12)" },
1343
+ children: label
1344
+ }
1345
+ )
1346
+ ]
1347
+ }
1348
+ );
1349
+ }
1350
+ function TourDatesBlock({ section }) {
1351
+ const cta = section.ctaLabel ?? "Ingressos";
1352
+ return /* @__PURE__ */ jsxs("section", { className: "py-6", id: section.id, children: [
1353
+ section.title && /* @__PURE__ */ jsx(
1354
+ "h2",
1355
+ {
1356
+ className: "text-xl md:text-2xl font-bold mb-4 px-1",
1357
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
1358
+ children: section.title
1359
+ }
1360
+ ),
1361
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: section.dates.map((item, i) => /* @__PURE__ */ jsx(DateRow, { item, cta }, item.date + item.venue + i)) })
1362
+ ] });
1363
+ }
1364
+ function FeaturedBlock({ section }) {
1365
+ return /* @__PURE__ */ jsxs("section", { className: "py-6", id: section.id, children: [
1366
+ section.title && /* @__PURE__ */ jsx(
1367
+ "h2",
1368
+ {
1369
+ className: "text-xl md:text-2xl font-bold mb-4 px-1",
1370
+ style: { fontFamily: "var(--pk-font-heading)", color: "var(--pk-text)" },
1371
+ children: section.title
1372
+ }
1373
+ ),
1374
+ /* @__PURE__ */ jsxs(
1375
+ "a",
1376
+ {
1377
+ href: section.url,
1378
+ target: "_blank",
1379
+ rel: "noopener noreferrer",
1380
+ className: "group flex items-center gap-4 p-4 overflow-hidden transition-all duration-300 hover:scale-[1.01]",
1381
+ style: {
1382
+ borderRadius: "var(--pk-radius)",
1383
+ border: "1px solid rgba(255,255,255,0.09)",
1384
+ background: "linear-gradient(135deg, color-mix(in srgb, var(--pk-primary) 14%, transparent), rgba(255,255,255,0.03) 55%)"
1385
+ },
1386
+ children: [
1387
+ section.imageUrl && /* @__PURE__ */ jsx(
1388
+ "div",
1389
+ {
1390
+ className: "shrink-0 w-20 h-20 overflow-hidden",
1391
+ style: { borderRadius: "calc(var(--pk-radius) - 4px)" },
1392
+ children: /* @__PURE__ */ jsx(
1393
+ "img",
1394
+ {
1395
+ src: section.imageUrl,
1396
+ alt: section.headline,
1397
+ className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",
1398
+ loading: "lazy"
1399
+ }
1400
+ )
1401
+ }
1402
+ ),
1403
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1404
+ /* @__PURE__ */ jsx("p", { className: "text-base font-bold leading-tight", style: { color: "var(--pk-text)", fontFamily: "var(--pk-font-heading)" }, children: section.headline }),
1405
+ section.subtitle && /* @__PURE__ */ jsx("p", { className: "text-xs mt-1 line-clamp-2", style: { color: "var(--pk-muted)" }, children: section.subtitle }),
1406
+ section.ctaLabel && /* @__PURE__ */ jsx(
1407
+ "span",
1408
+ {
1409
+ className: "inline-flex items-center gap-1 mt-2 px-3 py-1 text-xs font-semibold rounded-full",
1410
+ style: { backgroundColor: "var(--pk-primary)", color: "var(--pk-bg)" },
1411
+ children: section.ctaLabel
1412
+ }
1413
+ )
1414
+ ] }),
1415
+ /* @__PURE__ */ jsx(
1416
+ ArrowUpRight,
1417
+ {
1418
+ size: 20,
1419
+ className: "shrink-0 opacity-50 group-hover:opacity-90 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-all",
1420
+ style: { color: "var(--pk-text)" }
1421
+ }
1422
+ )
1423
+ ]
1424
+ }
1425
+ )
1426
+ ] });
1427
+ }
1428
+ var ALT_BG_TYPES = /* @__PURE__ */ new Set(["bio", "gallery", "video-grid", "project", "embed", "stats", "venue-list", "text", "social-links"]);
1429
+ function BioPageRenderer({ page, poweredBy }) {
1430
+ const { identity, branding, sections, floatingCta } = page;
1431
+ const isHub = page.layout === "hub";
1432
+ const scrollRef = useRef(null);
1433
+ const [scrollProgress, setScrollProgress] = useState(0);
1434
+ const [showFloatingCta, setShowFloatingCta] = useState(false);
1435
+ useEffect(() => {
1436
+ const container = scrollRef.current?.closest(".fixed.inset-0");
1437
+ if (!container) return;
1438
+ const onScroll = () => {
1439
+ const { scrollTop, scrollHeight, clientHeight } = container;
1440
+ const progress = scrollHeight > clientHeight ? scrollTop / (scrollHeight - clientHeight) : 0;
1441
+ setScrollProgress(progress);
1442
+ setShowFloatingCta(scrollTop > clientHeight * 0.5);
1443
+ };
1444
+ container.addEventListener("scroll", onScroll, { passive: true });
1445
+ return () => container.removeEventListener("scroll", onScroll);
1446
+ }, []);
1447
+ let altIndex = 0;
1448
+ const sectionBgs = /* @__PURE__ */ new Map();
1449
+ if (!isHub) {
1450
+ for (const s of sections) {
1451
+ if (s.visible === false) continue;
1452
+ if (ALT_BG_TYPES.has(s.type)) {
1453
+ const bgs = [void 0, "var(--pk-alt-bg)", "var(--pk-alt-bg2)"];
1454
+ sectionBgs.set(s.id, bgs[altIndex % bgs.length]);
1455
+ altIndex++;
1456
+ }
1457
+ }
1458
+ }
1459
+ function renderInner(section) {
1460
+ const Custom = getBlock(section.type);
1461
+ if (Custom) return /* @__PURE__ */ jsx(Custom, { block: section, page });
1462
+ switch (section.type) {
1463
+ case "hero":
1464
+ return /* @__PURE__ */ jsx(HeroSection, { section, identity, branding });
1465
+ case "profile-header":
1466
+ return /* @__PURE__ */ jsx(ProfileHeader, { section, page });
1467
+ case "bio":
1468
+ return /* @__PURE__ */ jsx(BioSection, { section });
1469
+ case "gallery":
1470
+ return /* @__PURE__ */ jsx(GallerySection, { section });
1471
+ case "video-grid":
1472
+ return /* @__PURE__ */ jsx(VideoGridSection, { section });
1473
+ case "social-links":
1474
+ return /* @__PURE__ */ jsx(SocialLinksSection, { section });
1475
+ case "embed":
1476
+ return /* @__PURE__ */ jsx(EmbedSection, { section });
1477
+ case "project":
1478
+ return /* @__PURE__ */ jsx(ProjectSection, { section });
1479
+ case "stats":
1480
+ return /* @__PURE__ */ jsx(StatsSection, { section });
1481
+ case "venue-list":
1482
+ return /* @__PURE__ */ jsx(VenueListSection, { section });
1483
+ case "cta":
1484
+ return /* @__PURE__ */ jsx(CTASection, { section });
1485
+ case "text":
1486
+ return /* @__PURE__ */ jsx(TextSection, { section });
1487
+ case "links":
1488
+ return /* @__PURE__ */ jsx(LinksBlock, { section });
1489
+ case "music-releases":
1490
+ return /* @__PURE__ */ jsx(MusicReleasesBlock, { section });
1491
+ case "tour-dates":
1492
+ return /* @__PURE__ */ jsx(TourDatesBlock, { section });
1493
+ case "featured":
1494
+ return /* @__PURE__ */ jsx(FeaturedBlock, { section });
1495
+ default:
1496
+ return null;
1497
+ }
1498
+ }
1499
+ function renderSection(section, index) {
1500
+ if (section.visible === false) return null;
1501
+ const inner = renderInner(section);
1502
+ if (inner === null) return null;
1503
+ if (isHub) {
1504
+ if (section.type === "profile-header")
1505
+ return /* @__PURE__ */ jsx("div", { className: "-mx-3 -mt-3 sm:mx-0 sm:mt-0", children: inner }, section.id);
1506
+ return /* @__PURE__ */ jsx(Reveal, { children: inner }, section.id);
1507
+ }
1508
+ if (section.type === "hero") return /* @__PURE__ */ jsx("div", { children: inner }, section.id);
1509
+ const bg = sectionBgs.get(section.id);
1510
+ return /* @__PURE__ */ jsx("div", { style: bg ? { backgroundColor: bg } : void 0, children: /* @__PURE__ */ jsx(Reveal, { delay: index === 0 ? 0 : 40, children: inner }) }, section.id);
1511
+ }
1512
+ return /* @__PURE__ */ jsxs("div", { ref: scrollRef, className: "min-h-full", children: [
1513
+ /* @__PURE__ */ jsx("div", { className: "fixed top-0 left-0 right-0 z-50 h-[3px]", style: { backgroundColor: "transparent" }, children: /* @__PURE__ */ jsx(
1514
+ "div",
1515
+ {
1516
+ className: "h-full transition-[width] duration-100 ease-out",
1517
+ style: {
1518
+ width: `${scrollProgress * 100}%`,
1519
+ background: `linear-gradient(90deg, var(--pk-primary), var(--pk-accent))`
1520
+ }
1521
+ }
1522
+ ) }),
1523
+ /* @__PURE__ */ jsxs("div", { className: isHub ? "max-w-[480px] mx-auto px-3 sm:px-4 pt-3 pb-6" : "", children: [
1524
+ sections.map(renderSection),
1525
+ /* @__PURE__ */ jsxs("footer", { className: "pt-10 pb-24 px-6 text-center", style: { backgroundColor: "var(--pk-bg)" }, children: [
1526
+ /* @__PURE__ */ jsxs("p", { className: "text-xs opacity-40", style: { color: "var(--pk-muted)" }, children: [
1527
+ "\xA9 ",
1528
+ (/* @__PURE__ */ new Date()).getFullYear(),
1529
+ " ",
1530
+ identity.name
1531
+ ] }),
1532
+ poweredBy && /* @__PURE__ */ jsx(
1533
+ "a",
1534
+ {
1535
+ href: poweredBy.url,
1536
+ className: "text-xs opacity-25 mt-1 hover:opacity-40 transition-opacity",
1537
+ style: { color: "var(--pk-muted)" },
1538
+ children: poweredBy.label
1539
+ }
1540
+ )
1541
+ ] })
1542
+ ] }),
1543
+ isHub ? /* @__PURE__ */ jsxs("div", { className: "fixed z-50 right-4 bottom-6 flex flex-col items-center gap-3", children: [
1544
+ /* @__PURE__ */ jsx(
1545
+ "button",
1546
+ {
1547
+ type: "button",
1548
+ "aria-label": "Voltar ao topo",
1549
+ onClick: () => scrollRef.current?.closest(".fixed.inset-0")?.scrollTo({
1550
+ top: 0,
1551
+ behavior: "smooth"
1552
+ }),
1553
+ className: "flex items-center justify-center w-11 h-11 rounded-full transition-all duration-300",
1554
+ style: {
1555
+ opacity: showFloatingCta ? 1 : 0,
1556
+ transform: showFloatingCta ? "none" : "translateY(12px)",
1557
+ pointerEvents: showFloatingCta ? "auto" : "none",
1558
+ color: "var(--pk-primary)",
1559
+ border: "1.5px solid var(--pk-primary)",
1560
+ backgroundColor: "color-mix(in srgb, var(--pk-bg) 70%, transparent)",
1561
+ backdropFilter: "blur(6px)"
1562
+ },
1563
+ children: /* @__PURE__ */ jsx(ChevronUp, { size: 20 })
1564
+ }
1565
+ ),
1566
+ floatingCta && /* @__PURE__ */ jsx(
1567
+ "a",
1568
+ {
1569
+ href: floatingCta.url,
1570
+ target: "_blank",
1571
+ rel: "noopener noreferrer",
1572
+ "aria-label": floatingCta.label,
1573
+ className: "flex items-center justify-center w-14 h-14 rounded-full transition-transform hover:scale-105",
1574
+ style: {
1575
+ backgroundColor: "var(--pk-primary)",
1576
+ color: "var(--pk-bg)",
1577
+ boxShadow: "0 8px 28px rgba(0,0,0,0.45)"
1578
+ },
1579
+ children: /* @__PURE__ */ jsx(MessageCircle, { size: 24 })
1580
+ }
1581
+ )
1582
+ ] }) : floatingCta && /* @__PURE__ */ jsx(
1583
+ "a",
1584
+ {
1585
+ href: floatingCta.url,
1586
+ target: "_blank",
1587
+ rel: "noopener noreferrer",
1588
+ className: "fixed z-50 transition-all duration-500 ease-out",
1589
+ style: {
1590
+ bottom: showFloatingCta ? "2rem" : "-4rem",
1591
+ left: "50%",
1592
+ transform: "translateX(-50%)",
1593
+ opacity: showFloatingCta ? 1 : 0,
1594
+ backgroundColor: "var(--pk-primary)",
1595
+ color: "var(--pk-bg)",
1596
+ fontFamily: "var(--pk-font-heading)",
1597
+ borderRadius: "9999px",
1598
+ padding: "1rem 2.5rem",
1599
+ fontSize: "1rem",
1600
+ fontWeight: 700,
1601
+ letterSpacing: "0.1em",
1602
+ boxShadow: "0 8px 32px rgba(0,0,0,0.4)"
1603
+ },
1604
+ children: floatingCta.label
1605
+ }
1606
+ )
1607
+ ] });
1608
+ }
1609
+ function BioPage() {
1610
+ const { slug } = useParams();
1611
+ const { provider, poweredBy, titleSuffix } = useLinkInBio();
1612
+ const [page, setPage] = useState(null);
1613
+ const [resolved, setResolved] = useState(false);
1614
+ useEffect(() => {
1615
+ if (!slug) {
1616
+ setResolved(true);
1617
+ return;
1618
+ }
1619
+ let cancelled = false;
1620
+ setResolved(false);
1621
+ provider.getBySlug(slug).then((pk) => {
1622
+ if (cancelled) return;
1623
+ setPage(pk);
1624
+ setResolved(true);
1625
+ }).catch(() => {
1626
+ if (cancelled) return;
1627
+ setResolved(true);
1628
+ });
1629
+ return () => {
1630
+ cancelled = true;
1631
+ };
1632
+ }, [slug, provider]);
1633
+ useEffect(() => {
1634
+ if (!page) return;
1635
+ document.title = page.seo.title ?? `${page.identity.name} | ${titleSuffix}`;
1636
+ const metaDesc = document.querySelector('meta[name="description"]');
1637
+ if (metaDesc && page.seo.description) {
1638
+ metaDesc.setAttribute("content", page.seo.description);
1639
+ }
1640
+ const fontsToLoad = [];
1641
+ const { fontHeading, fontBody } = page.branding;
1642
+ if (fontHeading && !fontHeading.includes("Space Grotesk")) {
1643
+ const family = fontHeading.replace(/['"]/g, "").split(",")[0].trim();
1644
+ fontsToLoad.push(family);
1645
+ }
1646
+ if (fontBody && !fontBody.includes("DM Sans")) {
1647
+ const family = fontBody.replace(/['"]/g, "").split(",")[0].trim();
1648
+ fontsToLoad.push(family);
1649
+ }
1650
+ const linkElements = [];
1651
+ if (fontsToLoad.length > 0) {
1652
+ const families = fontsToLoad.map((f) => `family=${f.replace(/\s/g, "+")}:wght@400;600;700`).join("&");
1653
+ const link = document.createElement("link");
1654
+ link.rel = "stylesheet";
1655
+ link.href = `https://fonts.googleapis.com/css2?${families}&display=swap`;
1656
+ document.head.appendChild(link);
1657
+ linkElements.push(link);
1658
+ }
1659
+ return () => {
1660
+ linkElements.forEach((el) => el.remove());
1661
+ };
1662
+ }, [page, titleSuffix]);
1663
+ if (!resolved) {
1664
+ return /* @__PURE__ */ jsx("div", { className: "dark fixed inset-0 flex items-center justify-center bg-background text-foreground", children: /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-foreground/40 animate-pulse", "aria-label": "carregando" }) });
1665
+ }
1666
+ if (!page) {
1667
+ return /* @__PURE__ */ jsx("div", { className: "dark fixed inset-0 flex items-center justify-center bg-background text-foreground", children: /* @__PURE__ */ jsxs("div", { className: "text-center px-6", children: [
1668
+ /* @__PURE__ */ jsx("h1", { className: "text-large font-bold mb-4", style: { fontFamily: "var(--font-display)" }, children: "404" }),
1669
+ /* @__PURE__ */ jsx("p", { className: "text-foreground-secondary mb-6", children: "P\xE1gina n\xE3o encontrada." }),
1670
+ /* @__PURE__ */ jsx(
1671
+ "a",
1672
+ {
1673
+ href: "/",
1674
+ className: "text-sm underline underline-offset-4 text-foreground-secondary hover:text-foreground transition-colors",
1675
+ children: "voltar ao in\xEDcio"
1676
+ }
1677
+ )
1678
+ ] }) });
1679
+ }
1680
+ const brandingVars = getBrandingVars(page.branding);
1681
+ return /* @__PURE__ */ jsx(
1682
+ "div",
1683
+ {
1684
+ className: "fixed inset-0 overflow-y-auto overflow-x-hidden",
1685
+ style: {
1686
+ ...brandingVars,
1687
+ backgroundColor: "var(--pk-bg)",
1688
+ color: "var(--pk-text)",
1689
+ fontFamily: "var(--pk-font-body)"
1690
+ },
1691
+ children: /* @__PURE__ */ jsx(BioPageRenderer, { page, poweredBy })
1692
+ }
1693
+ );
1694
+ }
1695
+
1696
+ // src/public/createPublicLinkInBioPlugin.ts
1697
+ function createPublicLinkInBioPlugin(options = {}) {
1698
+ const basePath = options.basePath ?? "/p";
1699
+ const table = options.table ?? "press_kits";
1700
+ const seed = options.seed ?? {};
1701
+ const provider = options.dataProvider ?? (options.useSupabase === false ? createMockBioPageProvider({ seed }) : createSafeDataProvider(
1702
+ () => createSupabaseBioPageProvider({ table }),
1703
+ () => createMockBioPageProvider({ seed })
1704
+ ));
1705
+ const contextValue = {
1706
+ provider,
1707
+ poweredBy: options.poweredBy,
1708
+ titleSuffix: options.titleSuffix ?? "Bio"
1709
+ };
1710
+ const Provider = ({ children }) => createElement(LinkInBioProvider, { value: contextValue, children });
1711
+ Provider.displayName = "LinkInBioProvider";
1712
+ const manifest = {
1713
+ id: "linkinbio",
1714
+ name: "Link in Bio",
1715
+ icon: "Link",
1716
+ version: "0.1.0",
1717
+ scope: options.scope ?? "universal",
1718
+ verticalId: options.verticalId,
1719
+ scaffolds: ["website", "landing_page"],
1720
+ defaultEnabled: options.defaultEnabled ?? true,
1721
+ dependencies: [],
1722
+ navigation: [],
1723
+ routes: [{ path: `${basePath}/:slug`, component: BioPage, guard: "public", fullBleed: true }],
1724
+ widgets: []
1725
+ };
1726
+ return { manifest, Provider, dataProvider: provider };
1727
+ }
1728
+
1729
+ export { BioPage, BioPageRenderer, Carousel, LinkInBioProvider, Reveal, borderRadiusMap, createMockBioPageProvider, createPublicLinkInBioPlugin, createSupabaseBioPageProvider, getBlock, getBrandingVars, hasBlock, platformColors, platformIconMap, platformLabels, registerBlock, renderMarkdown, useLinkInBio };
1730
+ //# sourceMappingURL=index.js.map
1731
+ //# sourceMappingURL=index.js.map