@linktr.ee/linkapp 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev-server/README.md +82 -0
- package/dev-server/classic/main.tsx +24 -0
- package/dev-server/classic.html +12 -0
- package/dev-server/components/ui/dialog.tsx +142 -0
- package/dev-server/components/ui/tabs.tsx +52 -0
- package/dev-server/components.json +21 -0
- package/dev-server/featured/main.tsx +24 -0
- package/dev-server/featured.html +12 -0
- package/dev-server/index.html +12 -0
- package/dev-server/lib/utils.ts +6 -0
- package/dev-server/package-lock.json +3070 -0
- package/dev-server/package.json +29 -0
- package/dev-server/preview/Preview.tsx +62 -0
- package/dev-server/preview/main.tsx +15 -0
- package/dev-server/preview/preview.css +122 -0
- package/dev-server/vite.config.ts +29 -0
- package/package.json +2 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "linkapp-dev-server",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "node server.ts"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
11
|
+
"@radix-ui/react-tabs": "^1.1.7",
|
|
12
|
+
"class-variance-authority": "^0.7.1",
|
|
13
|
+
"clsx": "^2.1.1",
|
|
14
|
+
"lucide-react": "^0.545.0",
|
|
15
|
+
"react": "^19.1.0",
|
|
16
|
+
"react-dom": "^19.1.0",
|
|
17
|
+
"tailwind-merge": "^3.3.1"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
21
|
+
"@types/react": "^19.2.2",
|
|
22
|
+
"@types/react-dom": "^19",
|
|
23
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
24
|
+
"tailwindcss": "^4",
|
|
25
|
+
"tw-animate-css": "^1.4.0",
|
|
26
|
+
"typescript": "^5",
|
|
27
|
+
"vite": "^6.0.3"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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'
|
|
6
|
+
|
|
7
|
+
export default function Preview() {
|
|
8
|
+
const [selectedTab, setSelectedTab] = useState<'classic' | 'featured'>('classic')
|
|
9
|
+
|
|
10
|
+
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')}>
|
|
16
|
+
<Portal>
|
|
17
|
+
<div className="fixed top-0 left-0 right-0 p-4 flex justify-center bg-background border-b" style={{ zIndex: 1000000 }}>
|
|
18
|
+
<TabsList>
|
|
19
|
+
<TabsTrigger value="classic">Classic</TabsTrigger>
|
|
20
|
+
<TabsTrigger value="featured">Featured</TabsTrigger>
|
|
21
|
+
</TabsList>
|
|
22
|
+
</div>
|
|
23
|
+
</Portal>
|
|
24
|
+
|
|
25
|
+
{/* Main Content with Padding for Fixed Tabs */}
|
|
26
|
+
<div className="pt-20">
|
|
27
|
+
<TabsContent value="classic" className="m-0">
|
|
28
|
+
{/* Classic Modal - Always Open */}
|
|
29
|
+
<Dialog open={true} modal={false}>
|
|
30
|
+
<DialogContent className="max-w-[512px] max-h-[calc(100%-64px)] overflow-auto">
|
|
31
|
+
<DialogHeader className='sticky top-0 bg-white px-4'>
|
|
32
|
+
<DialogTitle>Classic Layout Preview</DialogTitle>
|
|
33
|
+
</DialogHeader>
|
|
34
|
+
|
|
35
|
+
<div className="mt-4">
|
|
36
|
+
<iframe
|
|
37
|
+
src="/classic"
|
|
38
|
+
className="w-full h-[600px] border-0 rounded-lg"
|
|
39
|
+
title="Classic Layout Preview"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</DialogContent>
|
|
43
|
+
</Dialog>
|
|
44
|
+
</TabsContent>
|
|
45
|
+
|
|
46
|
+
<TabsContent value="featured" className="m-0 flex justify-center p-8">
|
|
47
|
+
{/* Featured Iframe - Max Width 524px */}
|
|
48
|
+
<div className="w-full max-w-[580px] shadow-xl flex flex-col rounded-3xl px-[28px] py-7 items-center bg-gray-100">
|
|
49
|
+
<div className="w-full max-w-[524px]">
|
|
50
|
+
<iframe
|
|
51
|
+
src="/featured"
|
|
52
|
+
className="w-full border-0 rounded-lg"
|
|
53
|
+
title="Featured Layout Preview"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</TabsContent>
|
|
58
|
+
</div>
|
|
59
|
+
</Tabs>
|
|
60
|
+
</div>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StrictMode } from 'react'
|
|
2
|
+
import { createRoot } from 'react-dom/client'
|
|
3
|
+
import Preview from './Preview'
|
|
4
|
+
import './preview.css'
|
|
5
|
+
|
|
6
|
+
const rootElement = document.getElementById('root')
|
|
7
|
+
if (!rootElement) {
|
|
8
|
+
throw new Error('Root element not found')
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
createRoot(rootElement).render(
|
|
12
|
+
<StrictMode>
|
|
13
|
+
<Preview />
|
|
14
|
+
</StrictMode>
|
|
15
|
+
)
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
@theme inline {
|
|
7
|
+
--color-background: var(--background);
|
|
8
|
+
--color-foreground: var(--foreground);
|
|
9
|
+
--font-sans: var(--font-geist-sans);
|
|
10
|
+
--font-mono: var(--font-geist-mono);
|
|
11
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
12
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
13
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
14
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
15
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
16
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
17
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
18
|
+
--color-sidebar: var(--sidebar);
|
|
19
|
+
--color-chart-5: var(--chart-5);
|
|
20
|
+
--color-chart-4: var(--chart-4);
|
|
21
|
+
--color-chart-3: var(--chart-3);
|
|
22
|
+
--color-chart-2: var(--chart-2);
|
|
23
|
+
--color-chart-1: var(--chart-1);
|
|
24
|
+
--color-ring: var(--ring);
|
|
25
|
+
--color-input: var(--input);
|
|
26
|
+
--color-border: var(--border);
|
|
27
|
+
--color-destructive: var(--destructive);
|
|
28
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
29
|
+
--color-accent: var(--accent);
|
|
30
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
31
|
+
--color-muted: var(--muted);
|
|
32
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
33
|
+
--color-secondary: var(--secondary);
|
|
34
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
35
|
+
--color-primary: var(--primary);
|
|
36
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
37
|
+
--color-popover: var(--popover);
|
|
38
|
+
--color-card-foreground: var(--card-foreground);
|
|
39
|
+
--color-card: var(--card);
|
|
40
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
41
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
42
|
+
--radius-lg: var(--radius);
|
|
43
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:root {
|
|
47
|
+
--radius: 0.625rem;
|
|
48
|
+
--background: oklch(1 0 0);
|
|
49
|
+
--foreground: oklch(0.145 0 0);
|
|
50
|
+
--card: oklch(1 0 0);
|
|
51
|
+
--card-foreground: oklch(0.145 0 0);
|
|
52
|
+
--popover: oklch(1 0 0);
|
|
53
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
54
|
+
--primary: oklch(0.205 0 0);
|
|
55
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
56
|
+
--secondary: oklch(0.97 0 0);
|
|
57
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
58
|
+
--muted: oklch(0.97 0 0);
|
|
59
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
60
|
+
--accent: oklch(0.97 0 0);
|
|
61
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
62
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
63
|
+
--border: oklch(0.922 0 0);
|
|
64
|
+
--input: oklch(0.922 0 0);
|
|
65
|
+
--ring: oklch(0.708 0 0);
|
|
66
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
67
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
68
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
69
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
70
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
71
|
+
--sidebar: oklch(0.985 0 0);
|
|
72
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
73
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
74
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
76
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
77
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
78
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dark {
|
|
82
|
+
--background: oklch(0.145 0 0);
|
|
83
|
+
--foreground: oklch(0.985 0 0);
|
|
84
|
+
--card: oklch(0.205 0 0);
|
|
85
|
+
--card-foreground: oklch(0.985 0 0);
|
|
86
|
+
--popover: oklch(0.205 0 0);
|
|
87
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
88
|
+
--primary: oklch(0.922 0 0);
|
|
89
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
90
|
+
--secondary: oklch(0.269 0 0);
|
|
91
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
92
|
+
--muted: oklch(0.269 0 0);
|
|
93
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
94
|
+
--accent: oklch(0.269 0 0);
|
|
95
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
96
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
97
|
+
--border: oklch(1 0 0 / 10%);
|
|
98
|
+
--input: oklch(1 0 0 / 15%);
|
|
99
|
+
--ring: oklch(0.556 0 0);
|
|
100
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
101
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
102
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
103
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
104
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
105
|
+
--sidebar: oklch(0.205 0 0);
|
|
106
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
107
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
108
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
109
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
110
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
111
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
112
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@layer base {
|
|
116
|
+
* {
|
|
117
|
+
@apply border-border outline-ring/50;
|
|
118
|
+
}
|
|
119
|
+
body {
|
|
120
|
+
@apply bg-background text-foreground;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
4
|
+
import { resolve } from "path";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [react(), tailwindcss()],
|
|
8
|
+
root: resolve(__dirname),
|
|
9
|
+
server: {
|
|
10
|
+
port: 3000,
|
|
11
|
+
strictPort: true,
|
|
12
|
+
},
|
|
13
|
+
resolve: {
|
|
14
|
+
alias: {
|
|
15
|
+
"@": resolve(__dirname, ".."),
|
|
16
|
+
"@/components": resolve(__dirname, "components"),
|
|
17
|
+
"@/lib": resolve(__dirname, "lib"),
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
build: {
|
|
21
|
+
rollupOptions: {
|
|
22
|
+
input: {
|
|
23
|
+
main: resolve(__dirname, "index.html"),
|
|
24
|
+
classic: resolve(__dirname, "classic.html"),
|
|
25
|
+
featured: resolve(__dirname, "featured.html"),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/linkapp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Development, build, and deployment tooling for LinkApps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"dist",
|
|
11
11
|
"bin",
|
|
12
12
|
"runtime",
|
|
13
|
+
"dev-server",
|
|
13
14
|
"linkapp-preview"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|