@jxrstudios/jxr 1.0.3 → 1.0.5
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/README.md +6 -2
- package/bin/jxr.js +60 -0
- package/dist/deployer.d.ts +8 -12
- package/dist/deployer.d.ts.map +1 -1
- package/dist/deployer.js +69 -106
- package/dist/deployer.js.map +1 -1
- package/dist/enhanced-transpiler.d.ts +36 -0
- package/dist/enhanced-transpiler.d.ts.map +1 -0
- package/dist/enhanced-transpiler.js +272 -0
- package/dist/enhanced-transpiler.js.map +1 -0
- package/dist/entry-point-detection.d.ts +22 -0
- package/dist/entry-point-detection.d.ts.map +1 -0
- package/dist/entry-point-detection.js +415 -0
- package/dist/entry-point-detection.js.map +1 -0
- package/dist/index.d.ts +19 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2119 -16
- package/dist/index.js.map +1 -1
- package/dist/jxr-server-manager.d.ts +32 -0
- package/dist/jxr-server-manager.d.ts.map +1 -0
- package/dist/jxr-server-manager.js +353 -0
- package/dist/jxr-server-manager.js.map +1 -0
- package/dist/runtime.d.ts +9 -9
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +3 -3
- package/package.json +15 -4
- package/src/deployer.ts +231 -0
- package/src/enhanced-transpiler.ts +331 -0
- package/src/entry-point-detection.ts +470 -0
- package/src/index.ts +63 -0
- package/src/jxr-server-manager.ts +410 -0
- package/src/module-resolver.ts +520 -0
- package/src/moq-transport.ts +267 -0
- package/src/runtime.ts +188 -0
- package/src/web-crypto.ts +279 -0
- package/src/worker-pool.ts +321 -0
- package/zzz_react_template/App.tsx +160 -0
- package/zzz_react_template/index.css +16 -0
- package/zzz_react_template/index.html +12 -0
- package/zzz_react_template/main.tsx +10 -0
- package/zzz_react_template/package.json +25 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
const FEATURES = [
|
|
4
|
+
{ icon: '⚡', title: 'React 19', desc: 'Latest React with automatic batching and concurrent features' },
|
|
5
|
+
{ icon: '🎨', title: 'Tailwind CSS', desc: 'Utility-first styling with the Tailwind CDN in preview' },
|
|
6
|
+
{ icon: '📦', title: 'TypeScript', desc: 'Full type safety across your entire codebase' },
|
|
7
|
+
{ icon: '🚀', title: 'Vite', desc: 'Lightning-fast HMR and optimized production builds' },
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
export default function App() {
|
|
11
|
+
const [count, setCount] = useState(0)
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div style={{
|
|
15
|
+
minHeight: '100vh',
|
|
16
|
+
background: 'linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%)',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
padding: '2rem',
|
|
22
|
+
fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
|
|
23
|
+
color: '#e2e8f0',
|
|
24
|
+
}}>
|
|
25
|
+
{/* Hero Card */}
|
|
26
|
+
<div style={{
|
|
27
|
+
background: 'rgba(255,255,255,0.05)',
|
|
28
|
+
backdropFilter: 'blur(20px)',
|
|
29
|
+
borderRadius: '1.5rem',
|
|
30
|
+
border: '1px solid rgba(255,255,255,0.1)',
|
|
31
|
+
padding: '3rem',
|
|
32
|
+
maxWidth: '640px',
|
|
33
|
+
width: '100%',
|
|
34
|
+
textAlign: 'center',
|
|
35
|
+
boxShadow: '0 25px 50px -12px rgba(0,0,0,0.5)',
|
|
36
|
+
}}>
|
|
37
|
+
{/* Logo */}
|
|
38
|
+
<div style={{
|
|
39
|
+
width: '64px',
|
|
40
|
+
height: '64px',
|
|
41
|
+
borderRadius: '16px',
|
|
42
|
+
background: 'linear-gradient(135deg, #6366f1, #a855f7, #ec4899)',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
margin: '0 auto 1.5rem',
|
|
47
|
+
fontSize: '1.5rem',
|
|
48
|
+
fontWeight: 'bold',
|
|
49
|
+
color: 'white',
|
|
50
|
+
boxShadow: '0 0 30px rgba(99,102,241,0.4)',
|
|
51
|
+
}}>
|
|
52
|
+
x0
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<h1 style={{
|
|
56
|
+
fontSize: '2.25rem',
|
|
57
|
+
fontWeight: 800,
|
|
58
|
+
marginBottom: '0.75rem',
|
|
59
|
+
background: 'linear-gradient(135deg, #c7d2fe, #e9d5ff, #fbcfe8)',
|
|
60
|
+
WebkitBackgroundClip: 'text',
|
|
61
|
+
WebkitTextFillColor: 'transparent',
|
|
62
|
+
lineHeight: 1.2,
|
|
63
|
+
}}>
|
|
64
|
+
Your App is Live
|
|
65
|
+
</h1>
|
|
66
|
+
|
|
67
|
+
<p style={{
|
|
68
|
+
fontSize: '1.1rem',
|
|
69
|
+
color: 'rgba(226,232,240,0.7)',
|
|
70
|
+
marginBottom: '2rem',
|
|
71
|
+
lineHeight: 1.6,
|
|
72
|
+
}}>
|
|
73
|
+
This project is ready for development. Use the AI chat to describe
|
|
74
|
+
what you want to build, or start editing files directly.
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
{/* Interactive Counter */}
|
|
78
|
+
<div style={{
|
|
79
|
+
display: 'flex',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
justifyContent: 'center',
|
|
82
|
+
gap: '1rem',
|
|
83
|
+
marginBottom: '2.5rem',
|
|
84
|
+
}}>
|
|
85
|
+
<button
|
|
86
|
+
onClick={() => setCount(c => c - 1)}
|
|
87
|
+
style={{
|
|
88
|
+
width: '40px', height: '40px', borderRadius: '12px',
|
|
89
|
+
background: 'rgba(255,255,255,0.1)', border: '1px solid rgba(255,255,255,0.15)',
|
|
90
|
+
color: '#e2e8f0', fontSize: '1.25rem', cursor: 'pointer',
|
|
91
|
+
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
92
|
+
transition: 'all 0.15s',
|
|
93
|
+
}}
|
|
94
|
+
onMouseEnter={e => (e.currentTarget.style.background = 'rgba(255,255,255,0.2)')}
|
|
95
|
+
onMouseLeave={e => (e.currentTarget.style.background = 'rgba(255,255,255,0.1)')}
|
|
96
|
+
>
|
|
97
|
+
−
|
|
98
|
+
</button>
|
|
99
|
+
<div style={{
|
|
100
|
+
padding: '0.5rem 1.5rem',
|
|
101
|
+
borderRadius: '12px',
|
|
102
|
+
background: 'rgba(99,102,241,0.2)',
|
|
103
|
+
border: '1px solid rgba(99,102,241,0.3)',
|
|
104
|
+
fontSize: '1.25rem',
|
|
105
|
+
fontWeight: 700,
|
|
106
|
+
fontVariantNumeric: 'tabular-nums',
|
|
107
|
+
minWidth: '80px',
|
|
108
|
+
}}>
|
|
109
|
+
{count}
|
|
110
|
+
</div>
|
|
111
|
+
<button
|
|
112
|
+
onClick={() => setCount(c => c + 1)}
|
|
113
|
+
style={{
|
|
114
|
+
width: '40px', height: '40px', borderRadius: '12px',
|
|
115
|
+
background: 'linear-gradient(135deg, #6366f1, #a855f7)',
|
|
116
|
+
border: 'none', color: 'white', fontSize: '1.25rem', cursor: 'pointer',
|
|
117
|
+
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
118
|
+
boxShadow: '0 0 20px rgba(99,102,241,0.3)',
|
|
119
|
+
transition: 'all 0.15s',
|
|
120
|
+
}}
|
|
121
|
+
onMouseEnter={e => (e.currentTarget.style.transform = 'scale(1.1)')}
|
|
122
|
+
onMouseLeave={e => (e.currentTarget.style.transform = 'scale(1)')}
|
|
123
|
+
>
|
|
124
|
+
+
|
|
125
|
+
</button>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{/* Feature Grid */}
|
|
129
|
+
<div style={{
|
|
130
|
+
display: 'grid',
|
|
131
|
+
gridTemplateColumns: 'repeat(2, 1fr)',
|
|
132
|
+
gap: '0.75rem',
|
|
133
|
+
textAlign: 'left',
|
|
134
|
+
}}>
|
|
135
|
+
{FEATURES.map((f) => (
|
|
136
|
+
<div key={f.title} style={{
|
|
137
|
+
padding: '1rem',
|
|
138
|
+
borderRadius: '12px',
|
|
139
|
+
background: 'rgba(255,255,255,0.04)',
|
|
140
|
+
border: '1px solid rgba(255,255,255,0.06)',
|
|
141
|
+
}}>
|
|
142
|
+
<div style={{ fontSize: '1.25rem', marginBottom: '0.25rem' }}>{f.icon}</div>
|
|
143
|
+
<div style={{ fontWeight: 600, fontSize: '0.875rem', marginBottom: '0.25rem' }}>{f.title}</div>
|
|
144
|
+
<div style={{ fontSize: '0.75rem', color: 'rgba(226,232,240,0.5)', lineHeight: 1.4 }}>{f.desc}</div>
|
|
145
|
+
</div>
|
|
146
|
+
))}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
{/* Footer */}
|
|
151
|
+
<p style={{
|
|
152
|
+
marginTop: '2rem',
|
|
153
|
+
fontSize: '0.8rem',
|
|
154
|
+
color: 'rgba(226,232,240,0.3)',
|
|
155
|
+
}}>
|
|
156
|
+
Built with x0 · React 19 · TypeScript · Tailwind CSS
|
|
157
|
+
</p>
|
|
158
|
+
</div>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--background: 0 0% 100%;
|
|
5
|
+
--foreground: 222.2 84% 4.9%;
|
|
6
|
+
--primary: 222.2 47.4% 11.2%;
|
|
7
|
+
--primary-foreground: 210 40% 98%;
|
|
8
|
+
--muted: 210 40% 96.1%;
|
|
9
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>React App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "jxr",
|
|
7
|
+
"preview": "jxr preview"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"react": "19.2.4",
|
|
11
|
+
"react-dom": "19.2.4",
|
|
12
|
+
"lucide-react": "^0.575.0"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/react": "^19.2.14",
|
|
16
|
+
"@types/react-dom": "^19.2.3",
|
|
17
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
18
|
+
"typescript": "^5.9.3",
|
|
19
|
+
"tailwindcss": "^4.2.1",
|
|
20
|
+
"@tailwindcss/postcss": "^4.2.1",
|
|
21
|
+
"autoprefixer": "^10.4.24",
|
|
22
|
+
"postcss": "^8.5.6",
|
|
23
|
+
"tw-animate-css": "^1.4.0"
|
|
24
|
+
}
|
|
25
|
+
}
|