@linktr.ee/linkapp 0.0.9 → 0.0.11

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 (82) hide show
  1. package/dev-server/classic/main.tsx +46 -8
  2. package/dev-server/classic.html +58 -0
  3. package/dev-server/components/ui/dialog.tsx +19 -42
  4. package/dev-server/components/ui/tabs.tsx +6 -6
  5. package/dev-server/featured/main.tsx +46 -8
  6. package/dev-server/featured.html +58 -0
  7. package/dev-server/lib/utils.ts +2 -2
  8. package/dev-server/preview/Preview.tsx +428 -15
  9. package/dev-server/vite.config.ts +11 -11
  10. package/dist/cli.js +5 -7
  11. package/dist/cli.js.map +1 -1
  12. package/dist/commands/add.d.ts.map +1 -1
  13. package/dist/commands/add.js +3 -3
  14. package/dist/commands/add.js.map +1 -1
  15. package/dist/commands/deploy.d.ts.map +1 -1
  16. package/dist/commands/deploy.js +10 -4
  17. package/dist/commands/deploy.js.map +1 -1
  18. package/dist/commands/dev.d.ts.map +1 -1
  19. package/dist/commands/dev.js +15 -1
  20. package/dist/commands/dev.js.map +1 -1
  21. package/dist/commands/login.d.ts.map +1 -1
  22. package/dist/commands/login.js.map +1 -1
  23. package/dist/components/ThemeStyle.d.ts +30 -0
  24. package/dist/components/ThemeStyle.d.ts.map +1 -0
  25. package/dist/components/ThemeStyle.js +33 -0
  26. package/dist/components/ThemeStyle.js.map +1 -0
  27. package/dist/components/index.d.ts +2 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/components/index.js +2 -0
  30. package/dist/components/index.js.map +1 -0
  31. package/dist/lib/build/detect-layouts.d.ts +2 -2
  32. package/dist/lib/build/detect-layouts.d.ts.map +1 -1
  33. package/dist/lib/build/detect-layouts.js +14 -25
  34. package/dist/lib/build/detect-layouts.js.map +1 -1
  35. package/dist/lib/config/load-config.d.ts +9 -0
  36. package/dist/lib/config/load-config.d.ts.map +1 -0
  37. package/dist/lib/config/load-config.js +31 -0
  38. package/dist/lib/config/load-config.js.map +1 -0
  39. package/dist/lib/deploy/generate-manifest-files.d.ts.map +1 -1
  40. package/dist/lib/deploy/generate-manifest-files.js +20 -35
  41. package/dist/lib/deploy/generate-manifest-files.js.map +1 -1
  42. package/dist/lib/deploy/pack-project.d.ts.map +1 -1
  43. package/dist/lib/deploy/pack-project.js +32 -5
  44. package/dist/lib/deploy/pack-project.js.map +1 -1
  45. package/dist/lib/deploy/upload.d.ts +1 -0
  46. package/dist/lib/deploy/upload.d.ts.map +1 -1
  47. package/dist/lib/deploy/upload.js +17 -7
  48. package/dist/lib/deploy/upload.js.map +1 -1
  49. package/dist/lib/deploy/validation.d.ts.map +1 -1
  50. package/dist/lib/deploy/validation.js +4 -61
  51. package/dist/lib/deploy/validation.js.map +1 -1
  52. package/dist/lib/utils/setup-runtime.d.ts.map +1 -1
  53. package/dist/lib/utils/setup-runtime.js +46 -19
  54. package/dist/lib/utils/setup-runtime.js.map +1 -1
  55. package/dist/lib/vite/config-factory.d.ts.map +1 -1
  56. package/dist/lib/vite/config-factory.js +2 -2
  57. package/dist/lib/vite/config-factory.js.map +1 -1
  58. package/dist/lib/vite/plugins/asset-versioning.d.ts.map +1 -1
  59. package/dist/lib/vite/plugins/asset-versioning.js +4 -2
  60. package/dist/lib/vite/plugins/asset-versioning.js.map +1 -1
  61. package/dist/schema/config.schema.d.ts +126 -99
  62. package/dist/schema/config.schema.d.ts.map +1 -1
  63. package/dist/schema/config.schema.js +140 -20
  64. package/dist/schema/config.schema.js.map +1 -1
  65. package/dist/sdk/index.d.ts +21 -0
  66. package/dist/sdk/index.d.ts.map +1 -0
  67. package/dist/sdk/index.js +21 -0
  68. package/dist/sdk/index.js.map +1 -0
  69. package/dist/sdk/send-message.d.ts +16 -0
  70. package/dist/sdk/send-message.d.ts.map +1 -0
  71. package/dist/sdk/send-message.js +34 -0
  72. package/dist/sdk/send-message.js.map +1 -0
  73. package/dist/sdk/use-open-popup.d.ts +23 -0
  74. package/dist/sdk/use-open-popup.d.ts.map +1 -0
  75. package/dist/sdk/use-open-popup.js +29 -0
  76. package/dist/sdk/use-open-popup.js.map +1 -0
  77. package/dist/types.d.ts +162 -30
  78. package/dist/types.d.ts.map +1 -1
  79. package/dist/types.js +41 -1
  80. package/dist/types.js.map +1 -1
  81. package/package.json +11 -3
  82. package/runtime/index.html +58 -0
@@ -1,24 +1,432 @@
1
- import { useState } from 'react'
2
- import { Dialog, DialogContent, DialogHeader, DialogTitle } from '../components/ui/dialog'
3
- import { Tabs, TabsList, TabsTrigger, TabsContent } from '../components/ui/tabs'
4
- import { Portal } from '@radix-ui/react-portal'
5
- import { cn } from '../lib/utils'
1
+ import { Portal } from "@radix-ui/react-portal";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ import {
4
+ Dialog,
5
+ DialogContent,
6
+ DialogHeader,
7
+ DialogTitle,
8
+ } from "../components/ui/dialog";
9
+ import {
10
+ Tabs,
11
+ TabsContent,
12
+ TabsList,
13
+ TabsTrigger,
14
+ } from "../components/ui/tabs";
15
+ import { cn } from "../lib/utils";
16
+
17
+ // Theme presets for testing
18
+ // Based on actual CSS variables from live Linktree profiles
19
+ const THEME_PRESETS = {
20
+ default: {
21
+ name: "Default (Light)",
22
+ variables: {
23
+ "--button-style-text": "#000000",
24
+ "--button-style-background": "#ffffff",
25
+ "--button-style-background-hover":
26
+ "color-mix(in srgb, #ffffff 93%, #000000 7%)",
27
+ "--button-style-border": "none",
28
+ "--button-style-border-color": "transparent",
29
+ "--button-style-shadow": "none",
30
+ "--button-style-shadow-color": "#000000",
31
+ "--button-style-contrast-color": "#000000",
32
+ "--button-style-radius": "8px",
33
+ "--button-style-inner-radius": "min(8px, max(4px, calc(8px - 8px)))",
34
+ "--button-style-skeleton-color": "rgba(0, 0, 0, 0.05)",
35
+ "--link-gap": "14px",
36
+ "--link-inner-padding": "7px",
37
+ "--link-preview-thumbnail-width": "160px",
38
+ "--linkRadius": "8px",
39
+ "--profile-container-desktop-width": "580px",
40
+ "--profileBackground": "#eceef1",
41
+ "--background-contrast-color": "#000000",
42
+ "--bodyText": "#000000",
43
+ "--profileTitleText": "#000000",
44
+ "--profileDescriptionText": "#000000",
45
+ "--defaultAvatarBackground": "#000000",
46
+ "--defaultAvatarText": "#ffffff",
47
+ "--socialLinkFill": "#000000",
48
+ "--linkBackground": "#ffffff",
49
+ "--linkText": "#000000",
50
+ "--linkHoverBackground": "color-mix(in srgb, #ffffff 93%, #000000 7%)",
51
+ "--linkHoverText": "#000000",
52
+ "--linkShadow": "#000000",
53
+ "--bannerBackground": "#ffffff",
54
+ "--bannerText": "#000000",
55
+ "--desktop-frame-color": "color-mix(in srgb, #eceef1 88%, black 12%)",
56
+ "--profileFontFamilyPrimary":
57
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
58
+ "--profileFontFamilySecondary":
59
+ 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
60
+ "--header-font-family":
61
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
62
+ "--profileFontWeightNormal": "500",
63
+ "--profileFontWeightBold": "700",
64
+ "--profileDescriptionFontWeight": "500",
65
+ "--linkTextFontWeight": "500",
66
+ "--headerFontWeight": "700",
67
+ "--header-font-weight": "600",
68
+ "--embedLinkTextFontWeight": "500",
69
+ "--signupSubmitTextFontWeight": "700",
70
+ "--bannerFontWeight": "700",
71
+ "--headerFontSize": "normal",
72
+ "--header-bio-font-size": "16px",
73
+ "--embedLinkTextFontSize": "14px",
74
+ "--signupSubmitTextFontSize": "14px",
75
+ "--linkHeaderFontSize": "14px",
76
+ "--bannerFontSize": "14px",
77
+ "--profileDescriptionLineHeight": "1.5",
78
+ "--headerLineHeight": "1.5",
79
+ "--header-text-color": "#000000",
80
+ },
81
+ },
82
+ dark: {
83
+ name: "Dark",
84
+ variables: {
85
+ "--button-style-text": "#ffffff",
86
+ "--button-style-background": "#1f2937",
87
+ "--button-style-background-hover":
88
+ "color-mix(in srgb, #1f2937 93%, #ffffff 7%)",
89
+ "--button-style-border": "none",
90
+ "--button-style-border-color": "transparent",
91
+ "--button-style-shadow": "none",
92
+ "--button-style-shadow-color": "#000000",
93
+ "--button-style-contrast-color": "#ffffff",
94
+ "--button-style-radius": "8px",
95
+ "--button-style-inner-radius": "min(8px, max(4px, calc(8px - 8px)))",
96
+ "--button-style-skeleton-color": "rgba(255, 255, 255, 0.1)",
97
+ "--link-gap": "14px",
98
+ "--link-inner-padding": "7px",
99
+ "--link-preview-thumbnail-width": "160px",
100
+ "--linkRadius": "8px",
101
+ "--profile-container-desktop-width": "580px",
102
+ "--profileBackground": "#111827",
103
+ "--background-contrast-color": "#ffffff",
104
+ "--bodyText": "#ffffff",
105
+ "--profileTitleText": "#ffffff",
106
+ "--profileDescriptionText": "#ffffff",
107
+ "--defaultAvatarBackground": "#ffffff",
108
+ "--defaultAvatarText": "#000000",
109
+ "--socialLinkFill": "#ffffff",
110
+ "--linkBackground": "#1f2937",
111
+ "--linkText": "#ffffff",
112
+ "--linkHoverBackground": "color-mix(in srgb, #1f2937 93%, #ffffff 7%)",
113
+ "--linkHoverText": "#ffffff",
114
+ "--linkShadow": "#000000",
115
+ "--bannerBackground": "#1f2937",
116
+ "--bannerText": "#ffffff",
117
+ "--desktop-frame-color": "color-mix(in srgb, #111827 88%, white 12%)",
118
+ "--profileFontFamilyPrimary":
119
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
120
+ "--profileFontFamilySecondary":
121
+ 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
122
+ "--header-font-family":
123
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
124
+ "--profileFontWeightNormal": "500",
125
+ "--profileFontWeightBold": "700",
126
+ "--profileDescriptionFontWeight": "500",
127
+ "--linkTextFontWeight": "500",
128
+ "--headerFontWeight": "700",
129
+ "--header-font-weight": "600",
130
+ "--embedLinkTextFontWeight": "500",
131
+ "--signupSubmitTextFontWeight": "700",
132
+ "--bannerFontWeight": "700",
133
+ "--headerFontSize": "normal",
134
+ "--header-bio-font-size": "16px",
135
+ "--embedLinkTextFontSize": "14px",
136
+ "--signupSubmitTextFontSize": "14px",
137
+ "--linkHeaderFontSize": "14px",
138
+ "--bannerFontSize": "14px",
139
+ "--profileDescriptionLineHeight": "1.5",
140
+ "--headerLineHeight": "1.5",
141
+ "--header-text-color": "#ffffff",
142
+ },
143
+ },
144
+ purple: {
145
+ name: "Purple",
146
+ variables: {
147
+ "--button-style-text": "#ffffff",
148
+ "--button-style-background": "#7c3aed",
149
+ "--button-style-background-hover":
150
+ "color-mix(in srgb, #7c3aed 93%, #ffffff 7%)",
151
+ "--button-style-border": "none",
152
+ "--button-style-border-color": "transparent",
153
+ "--button-style-shadow": "none",
154
+ "--button-style-shadow-color": "#000000",
155
+ "--button-style-contrast-color": "#ede9fe",
156
+ "--button-style-radius": "16px",
157
+ "--button-style-inner-radius": "min(16px, max(4px, calc(16px - 8px)))",
158
+ "--button-style-skeleton-color": "rgba(124, 58, 237, 0.1)",
159
+ "--link-gap": "14px",
160
+ "--link-inner-padding": "7px",
161
+ "--link-preview-thumbnail-width": "160px",
162
+ "--linkRadius": "16px",
163
+ "--profile-container-desktop-width": "580px",
164
+ "--profileBackground": "#faf5ff",
165
+ "--background-contrast-color": "#1f2937",
166
+ "--bodyText": "#1f2937",
167
+ "--profileTitleText": "#1f2937",
168
+ "--profileDescriptionText": "#1f2937",
169
+ "--defaultAvatarBackground": "#7c3aed",
170
+ "--defaultAvatarText": "#ffffff",
171
+ "--socialLinkFill": "#1f2937",
172
+ "--linkBackground": "#7c3aed",
173
+ "--linkText": "#ffffff",
174
+ "--linkHoverBackground": "color-mix(in srgb, #7c3aed 93%, #ffffff 7%)",
175
+ "--linkHoverText": "#ffffff",
176
+ "--linkShadow": "#7c3aed",
177
+ "--bannerBackground": "#7c3aed",
178
+ "--bannerText": "#ffffff",
179
+ "--desktop-frame-color": "color-mix(in srgb, #faf5ff 88%, black 12%)",
180
+ "--profileFontFamilyPrimary":
181
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
182
+ "--profileFontFamilySecondary":
183
+ 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
184
+ "--header-font-family":
185
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
186
+ "--profileFontWeightNormal": "500",
187
+ "--profileFontWeightBold": "700",
188
+ "--profileDescriptionFontWeight": "500",
189
+ "--linkTextFontWeight": "500",
190
+ "--headerFontWeight": "700",
191
+ "--header-font-weight": "600",
192
+ "--embedLinkTextFontWeight": "500",
193
+ "--signupSubmitTextFontWeight": "700",
194
+ "--bannerFontWeight": "700",
195
+ "--headerFontSize": "normal",
196
+ "--header-bio-font-size": "16px",
197
+ "--embedLinkTextFontSize": "14px",
198
+ "--signupSubmitTextFontSize": "14px",
199
+ "--linkHeaderFontSize": "14px",
200
+ "--bannerFontSize": "14px",
201
+ "--profileDescriptionLineHeight": "1.5",
202
+ "--headerLineHeight": "1.5",
203
+ "--header-text-color": "#1f2937",
204
+ },
205
+ },
206
+ outline: {
207
+ name: "Outline Style",
208
+ variables: {
209
+ "--button-style-text": "#000000",
210
+ "--button-style-background": "transparent",
211
+ "--button-style-background-hover": "rgba(0, 0, 0, 0.05)",
212
+ "--button-style-border": "2px solid currentColor",
213
+ "--button-style-border-color": "#000000",
214
+ "--button-style-shadow": "none",
215
+ "--button-style-shadow-color": "#000000",
216
+ "--button-style-contrast-color": "#ffffff",
217
+ "--button-style-radius": "24px",
218
+ "--button-style-inner-radius": "min(24px, max(4px, calc(24px - 8px)))",
219
+ "--button-style-skeleton-color": "rgba(0, 0, 0, 0.05)",
220
+ "--link-gap": "14px",
221
+ "--link-inner-padding": "7px",
222
+ "--link-preview-thumbnail-width": "160px",
223
+ "--linkRadius": "24px",
224
+ "--profile-container-desktop-width": "580px",
225
+ "--profileBackground": "#ffffff",
226
+ "--background-contrast-color": "#000000",
227
+ "--bodyText": "#000000",
228
+ "--profileTitleText": "#000000",
229
+ "--profileDescriptionText": "#000000",
230
+ "--defaultAvatarBackground": "#000000",
231
+ "--defaultAvatarText": "#ffffff",
232
+ "--socialLinkFill": "#000000",
233
+ "--linkBackground": "transparent",
234
+ "--linkText": "#000000",
235
+ "--linkHoverBackground": "rgba(0, 0, 0, 0.05)",
236
+ "--linkHoverText": "#000000",
237
+ "--linkShadow": "#000000",
238
+ "--bannerBackground": "#ffffff",
239
+ "--bannerText": "#000000",
240
+ "--desktop-frame-color": "color-mix(in srgb, #ffffff 88%, black 12%)",
241
+ "--profileFontFamilyPrimary":
242
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
243
+ "--profileFontFamilySecondary":
244
+ 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
245
+ "--header-font-family":
246
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
247
+ "--profileFontWeightNormal": "500",
248
+ "--profileFontWeightBold": "700",
249
+ "--profileDescriptionFontWeight": "500",
250
+ "--linkTextFontWeight": "500",
251
+ "--headerFontWeight": "700",
252
+ "--header-font-weight": "600",
253
+ "--embedLinkTextFontWeight": "500",
254
+ "--signupSubmitTextFontWeight": "700",
255
+ "--bannerFontWeight": "700",
256
+ "--headerFontSize": "normal",
257
+ "--header-bio-font-size": "16px",
258
+ "--embedLinkTextFontSize": "14px",
259
+ "--signupSubmitTextFontSize": "14px",
260
+ "--linkHeaderFontSize": "14px",
261
+ "--bannerFontSize": "14px",
262
+ "--profileDescriptionLineHeight": "1.5",
263
+ "--headerLineHeight": "1.5",
264
+ "--header-text-color": "#000000",
265
+ },
266
+ },
267
+ rounded: {
268
+ name: "Fully Rounded",
269
+ variables: {
270
+ "--button-style-text": "#ffffff",
271
+ "--button-style-background": "#059669",
272
+ "--button-style-background-hover":
273
+ "color-mix(in srgb, #059669 93%, #ffffff 7%)",
274
+ "--button-style-border": "none",
275
+ "--button-style-border-color": "transparent",
276
+ "--button-style-shadow": "none",
277
+ "--button-style-shadow-color": "#000000",
278
+ "--button-style-contrast-color": "#d1fae5",
279
+ "--button-style-radius": "9999px",
280
+ "--button-style-inner-radius": "9999px",
281
+ "--button-style-skeleton-color": "rgba(5, 150, 105, 0.1)",
282
+ "--link-gap": "14px",
283
+ "--link-inner-padding": "7px",
284
+ "--link-preview-thumbnail-width": "160px",
285
+ "--linkRadius": "9999px",
286
+ "--profile-container-desktop-width": "580px",
287
+ "--profileBackground": "#ecfdf5",
288
+ "--background-contrast-color": "#1f2937",
289
+ "--bodyText": "#1f2937",
290
+ "--profileTitleText": "#1f2937",
291
+ "--profileDescriptionText": "#1f2937",
292
+ "--defaultAvatarBackground": "#059669",
293
+ "--defaultAvatarText": "#ffffff",
294
+ "--socialLinkFill": "#1f2937",
295
+ "--linkBackground": "#059669",
296
+ "--linkText": "#ffffff",
297
+ "--linkHoverBackground": "color-mix(in srgb, #059669 93%, #ffffff 7%)",
298
+ "--linkHoverText": "#ffffff",
299
+ "--linkShadow": "#059669",
300
+ "--bannerBackground": "#059669",
301
+ "--bannerText": "#ffffff",
302
+ "--desktop-frame-color": "color-mix(in srgb, #ecfdf5 88%, black 12%)",
303
+ "--profileFontFamilyPrimary":
304
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
305
+ "--profileFontFamilySecondary":
306
+ 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
307
+ "--header-font-family":
308
+ 'Link Sans Product, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
309
+ "--profileFontWeightNormal": "500",
310
+ "--profileFontWeightBold": "700",
311
+ "--profileDescriptionFontWeight": "500",
312
+ "--linkTextFontWeight": "500",
313
+ "--headerFontWeight": "700",
314
+ "--header-font-weight": "600",
315
+ "--embedLinkTextFontWeight": "500",
316
+ "--signupSubmitTextFontWeight": "700",
317
+ "--bannerFontWeight": "700",
318
+ "--headerFontSize": "normal",
319
+ "--header-bio-font-size": "16px",
320
+ "--embedLinkTextFontSize": "14px",
321
+ "--signupSubmitTextFontSize": "14px",
322
+ "--linkHeaderFontSize": "14px",
323
+ "--bannerFontSize": "14px",
324
+ "--profileDescriptionLineHeight": "1.5",
325
+ "--headerLineHeight": "1.5",
326
+ "--header-text-color": "#1f2937",
327
+ },
328
+ },
329
+ };
6
330
 
7
331
  export default function Preview() {
8
- const [selectedTab, setSelectedTab] = useState<'classic' | 'featured'>('classic')
332
+ const [selectedTab, setSelectedTab] = useState<"classic" | "featured">(
333
+ "classic",
334
+ );
335
+ const [selectedTheme, setSelectedTheme] =
336
+ useState<keyof typeof THEME_PRESETS>("default");
337
+ const classicIframeRef = useRef<HTMLIFrameElement>(null);
338
+ const featuredIframeRef = useRef<HTMLIFrameElement>(null);
339
+
340
+ // Send theme update to iframe
341
+ const sendThemeUpdate = useCallback(
342
+ (
343
+ iframe: HTMLIFrameElement | null,
344
+ themeName: keyof typeof THEME_PRESETS,
345
+ ) => {
346
+ if (!iframe || !iframe.contentWindow) return;
347
+
348
+ const theme = THEME_PRESETS[themeName];
349
+ const message = {
350
+ type: "THEME_UPDATE",
351
+ payload: {
352
+ name: themeName,
353
+ variables: theme.variables,
354
+ },
355
+ };
356
+
357
+ iframe.contentWindow.postMessage(message, "*");
358
+ },
359
+ [],
360
+ );
361
+
362
+ // Send theme update when theme changes or iframes load
363
+ useEffect(() => {
364
+ const classicIframe = classicIframeRef.current;
365
+ const featuredIframe = featuredIframeRef.current;
366
+
367
+ const handleClassicLoad = () =>
368
+ sendThemeUpdate(classicIframe, selectedTheme);
369
+ const handleFeaturedLoad = () =>
370
+ sendThemeUpdate(featuredIframe, selectedTheme);
371
+
372
+ // Send to already loaded iframes
373
+ sendThemeUpdate(classicIframe, selectedTheme);
374
+ sendThemeUpdate(featuredIframe, selectedTheme);
375
+
376
+ // Listen for iframe load events
377
+ classicIframe?.addEventListener("load", handleClassicLoad);
378
+ featuredIframe?.addEventListener("load", handleFeaturedLoad);
379
+
380
+ return () => {
381
+ classicIframe?.removeEventListener("load", handleClassicLoad);
382
+ featuredIframe?.removeEventListener("load", handleFeaturedLoad);
383
+ };
384
+ }, [selectedTheme, sendThemeUpdate]);
9
385
 
10
386
  return (
11
- <div className={cn("min-h-screen", {
12
- "bg-black/50": selectedTab === 'classic',
13
- "bg-gray-200": selectedTab === 'featured'
14
- })} id="preview">
15
- <Tabs value={selectedTab} onValueChange={(value) => setSelectedTab(value as 'classic' | 'featured')}>
387
+ <div
388
+ className={cn("min-h-screen", {
389
+ "bg-black/50": selectedTab === "classic",
390
+ "bg-gray-200": selectedTab === "featured",
391
+ })}
392
+ id="preview"
393
+ >
394
+ <Tabs
395
+ value={selectedTab}
396
+ onValueChange={(value) =>
397
+ setSelectedTab(value as "classic" | "featured")
398
+ }
399
+ >
16
400
  <Portal>
17
- <div className="fixed top-0 left-0 right-0 p-4 flex justify-center bg-background border-b" style={{ zIndex: 1000000 }}>
401
+ <div
402
+ className="fixed top-0 left-0 right-0 p-4 flex justify-center gap-4 bg-background border-b"
403
+ style={{ zIndex: 1000000 }}
404
+ >
18
405
  <TabsList>
19
406
  <TabsTrigger value="classic">Classic</TabsTrigger>
20
407
  <TabsTrigger value="featured">Featured</TabsTrigger>
21
408
  </TabsList>
409
+
410
+ {/* Theme Switcher */}
411
+ <div className="flex items-center gap-2">
412
+ <label htmlFor="theme-select" className="text-sm font-medium">
413
+ Theme:
414
+ </label>
415
+ <select
416
+ id="theme-select"
417
+ value={selectedTheme}
418
+ onChange={(e) =>
419
+ setSelectedTheme(e.target.value as keyof typeof THEME_PRESETS)
420
+ }
421
+ className="h-9 px-3 py-1 text-sm border border-input bg-background rounded-md focus:outline-none focus:ring-2 focus:ring-ring"
422
+ >
423
+ {Object.entries(THEME_PRESETS).map(([key, theme]) => (
424
+ <option key={key} value={key}>
425
+ {theme.name}
426
+ </option>
427
+ ))}
428
+ </select>
429
+ </div>
22
430
  </div>
23
431
  </Portal>
24
432
 
@@ -27,13 +435,17 @@ export default function Preview() {
27
435
  <TabsContent value="classic" className="m-0">
28
436
  {/* Classic Modal - Always Open */}
29
437
  <Dialog open={true} modal={false}>
30
- <DialogContent className="max-w-[512px] max-h-[calc(100%-64px)] overflow-auto" showCloseButton={false}>
31
- <DialogHeader className='sticky top-0 bg-white px-4'>
438
+ <DialogContent
439
+ className="max-w-[512px] max-h-[calc(100%-64px)] overflow-auto"
440
+ showCloseButton={false}
441
+ >
442
+ <DialogHeader className="sticky top-0 bg-white px-4">
32
443
  <DialogTitle>Classic Layout Preview</DialogTitle>
33
444
  </DialogHeader>
34
445
 
35
446
  <div className="mt-4">
36
447
  <iframe
448
+ ref={classicIframeRef}
37
449
  src="/classic"
38
450
  className="w-full h-[600px] border-0 rounded-lg"
39
451
  title="Classic Layout Preview"
@@ -48,6 +460,7 @@ export default function Preview() {
48
460
  <div className="w-full max-w-[580px] shadow-xl flex flex-col rounded-3xl px-[28px] py-7 items-center bg-gray-100">
49
461
  <div className="w-full max-w-[524px]">
50
462
  <iframe
463
+ ref={featuredIframeRef}
51
464
  src="/featured"
52
465
  className="w-full border-0 rounded-lg"
53
466
  title="Featured Layout Preview"
@@ -58,5 +471,5 @@ export default function Preview() {
58
471
  </div>
59
472
  </Tabs>
60
473
  </div>
61
- )
474
+ );
62
475
  }
@@ -1,7 +1,7 @@
1
- import { defineConfig } from "vite";
2
- import react from "@vitejs/plugin-react";
3
- import tailwindcss from "@tailwindcss/vite";
4
- import { resolve } from "path";
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ import tailwindcss from '@tailwindcss/vite'
4
+ import { resolve } from 'path'
5
5
 
6
6
  export default defineConfig({
7
7
  plugins: [react(), tailwindcss()],
@@ -12,18 +12,18 @@ export default defineConfig({
12
12
  },
13
13
  resolve: {
14
14
  alias: {
15
- "@": resolve(__dirname, ".."),
16
- "@/components": resolve(__dirname, "components"),
17
- "@/lib": resolve(__dirname, "lib"),
15
+ '@': resolve(__dirname, '..'),
16
+ '@/components': resolve(__dirname, 'components'),
17
+ '@/lib': resolve(__dirname, 'lib'),
18
18
  },
19
19
  },
20
20
  build: {
21
21
  rollupOptions: {
22
22
  input: {
23
- main: resolve(__dirname, "index.html"),
24
- classic: resolve(__dirname, "classic.html"),
25
- featured: resolve(__dirname, "featured.html"),
23
+ main: resolve(__dirname, 'index.html'),
24
+ classic: resolve(__dirname, 'classic.html'),
25
+ featured: resolve(__dirname, 'featured.html'),
26
26
  },
27
27
  },
28
28
  },
29
- });
29
+ })
package/dist/cli.js CHANGED
@@ -10,9 +10,7 @@ import { testUrlMatchRulesCommand } from './commands/test-url-match-rules.js';
10
10
  const cli = cac('linkapp');
11
11
  // Package info
12
12
  const version = '0.0.1';
13
- cli
14
- .version(version)
15
- .help();
13
+ cli.version(version).help();
16
14
  // Dev command
17
15
  cli
18
16
  .command('dev', 'Start development server with preview')
@@ -28,7 +26,7 @@ cli
28
26
  // Deploy command
29
27
  cli
30
28
  .command('deploy', 'Deploy LinkApp to Linktree')
31
- .option('--env <environment>', 'Deployment environment (production or qa)', { default: 'production' })
29
+ .option('--qa', 'Deploy to QA environment instead of production')
32
30
  .action(deployCommand);
33
31
  // Add command
34
32
  cli
@@ -40,15 +38,15 @@ cli
40
38
  // Login command
41
39
  cli
42
40
  .command('login', 'Authenticate with Linktree')
41
+ .option('--qa', 'Login to QA environment instead of production')
43
42
  .action(loginCommand);
44
43
  // Logout command
45
44
  cli
46
45
  .command('logout', 'Sign out of Linktree')
46
+ .option('--qa', 'Logout from QA environment instead of production')
47
47
  .action(logoutCommand);
48
48
  // Test URL match rules
49
- cli
50
- .command('test-url-match-rules <url>', 'Test URL match rules against a URL')
51
- .action(testUrlMatchRulesCommand);
49
+ cli.command('test-url-match-rules <url>', 'Test URL match rules against a URL').action(testUrlMatchRulesCommand);
52
50
  // Parse and run
53
51
  cli.parse();
54
52
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@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C,4BAA4B,EAAE,oCAAoC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAA;AAEhH,gBAAgB;AAChB,GAAG,CAAC,KAAK,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAKD,wBAAsB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,iBAgE5E"}
1
+ {"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAKD,wBAAsB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,iBA+D5E"}
@@ -3,8 +3,8 @@ import * as p from '@clack/prompts';
3
3
  import { existsSync } from 'node:fs';
4
4
  import { join } from 'node:path';
5
5
  import { spawn } from 'node:child_process';
6
- // Default registry URL - can be overridden with --registry flag
7
- const DEFAULT_REGISTRY = 'http://localhost:3001/r';
6
+ // Default registry URL - can be overridden with --registry flag or LINKAPP_REGISTRY_URL env var
7
+ const DEFAULT_REGISTRY = process.env.LINKAPP_REGISTRY_URL || 'https://create-linkapp-registry.vercel.app/r';
8
8
  export async function addCommand(component, options = {}) {
9
9
  console.log(pc.cyan('📦 Adding components from LinkApp registry...\n'));
10
10
  try {
@@ -16,7 +16,7 @@ export async function addCommand(component, options = {}) {
16
16
  console.log(pc.dim('Please run this command from a LinkApp project root'));
17
17
  process.exit(1);
18
18
  }
19
- // Determine the registry URL
19
+ // Determine the registry URL (priority: CLI flag > env var > default)
20
20
  const registryUrl = options.registry || DEFAULT_REGISTRY;
21
21
  // Build the component URL
22
22
  let componentUrl;
@@ -1 +1 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAQ1C,gEAAgE;AAChE,MAAM,gBAAgB,GAAG,yBAAyB,CAAA;AAElD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAkB,EAAE,UAAsB,EAAE;IAC3E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC,CAAA;IAEvE,IAAI,CAAC;QACH,kCAAkC;QAClC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;QACjC,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAA;QAE/D,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAA;YAClD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC,CAAA;YAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;QAED,6BAA6B;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAAA;QAExD,0BAA0B;QAC1B,IAAI,YAAoB,CAAA;QAExB,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,EAAE,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1B,MAAM,CAAC,KAAK,CAAC,CAAA;QACf,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAYA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,iBAgLzD"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAYA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,iBAuLzD"}
@@ -95,6 +95,7 @@ export async function deployCommand(options) {
95
95
  const result = await uploadAssets({
96
96
  projectPath,
97
97
  apiUrl,
98
+ linkAppId,
98
99
  accessToken,
99
100
  isUpdate: exists,
100
101
  forceUpdate: options.force,
@@ -118,18 +119,23 @@ export async function deployCommand(options) {
118
119
  const date = new Date(timestampMs);
119
120
  console.log(pc.dim(` Updated: ${date.toLocaleString()}`));
120
121
  }
122
+ console.log();
123
+ console.log(pc.bold('Next steps:'));
124
+ // Step 1: Build is happening
121
125
  if (result.build?.id) {
122
126
  const buildUrl = options.qa
123
127
  ? `https://buildkite.com/linktree/link-types-ci-service/builds/${result.build.id}`
124
128
  : `https://linkapp-ci.replit.app/?linkTypeId=${result.linkType.linkTypeId}&buildId=${result.build.id}`;
125
- console.log(pc.dim(` Build: ${buildUrl}`));
129
+ console.log(pc.cyan(` 1. Building your LinkApp (this may take a few minutes):`));
130
+ console.log(pc.dim(` ${buildUrl}`));
131
+ console.log();
126
132
  }
133
+ // Step 2: Add to page (only after build completes)
127
134
  const createUrl = options.qa
128
135
  ? `https://qa.linktr.ee/admin?action=create-link&linkType=${result.linkType.linkTypeId}`
129
136
  : `https://linktr.ee/admin?action=create-link&linkType=${result.linkType.linkTypeId}`;
130
- console.log();
131
- console.log(pc.bold('Next steps:'));
132
- console.log(pc.cyan(` → ${createUrl}\n`));
137
+ console.log(pc.cyan(` 2. Once the build completes, add it to your page:`));
138
+ console.log(pc.dim(` ${createUrl}\n`));
133
139
  }
134
140
  catch (error) {
135
141
  console.log();