spatial-ui-universe 0.1.3 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spatial-ui-universe",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -26,6 +26,7 @@
26
26
  "next": "16.2.0",
27
27
  "react": "19.2.4",
28
28
  "react-dom": "19.2.4",
29
+ "spatial-ui-universe": "^0.1.4",
29
30
  "three": "^0.183.2"
30
31
  },
31
32
  "devDependencies": {
@@ -0,0 +1,87 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+ import { motion, AnimatePresence } from "framer-motion";
5
+ import Link from "next/link";
6
+
7
+ export default function AccessModal({ isOpen, onClose }: { isOpen: boolean; onClose: () => void }) {
8
+ const [copied, setCopied] = useState(false);
9
+
10
+ const handleCopy = () => {
11
+ navigator.clipboard.writeText("npm install spatial-ui-universe three @react-three/fiber framer-motion");
12
+ setCopied(true);
13
+ setTimeout(() => setCopied(false), 2000);
14
+ };
15
+
16
+ return (
17
+ <AnimatePresence>
18
+ {isOpen && (
19
+ <div className="fixed inset-0 z-[100] flex items-center justify-center p-4">
20
+ <motion.div
21
+ initial={{ opacity: 0 }}
22
+ animate={{ opacity: 1 }}
23
+ exit={{ opacity: 0 }}
24
+ onClick={onClose}
25
+ className="absolute inset-0 bg-black/60 backdrop-blur-md"
26
+ />
27
+ <motion.div
28
+ initial={{ opacity: 0, scale: 0.95, y: 20 }}
29
+ animate={{ opacity: 1, scale: 1, y: 0 }}
30
+ exit={{ opacity: 0, scale: 0.95, y: 20 }}
31
+ className="relative w-full max-w-lg overflow-hidden rounded-3xl bg-[#050508] border border-white/10 shadow-2xl p-8"
32
+ >
33
+ {/* Background Glow */}
34
+ <div className="absolute -top-32 -left-32 w-64 h-64 bg-indigo-500/20 blur-[80px] rounded-full" />
35
+ <div className="absolute -bottom-32 -right-32 w-64 h-64 bg-fuchsia-500/20 blur-[80px] rounded-full" />
36
+
37
+ <div className="relative z-10">
38
+ <div className="flex justify-between items-center mb-8">
39
+ <h2 className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-zinc-500">
40
+ Quick Install
41
+ </h2>
42
+ <button
43
+ onClick={onClose}
44
+ className="text-zinc-500 hover:text-white transition-colors"
45
+ >
46
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
47
+ <path d="M18 6L6 18M6 6l12 12" strokeLinecap="round" strokeLinejoin="round"/>
48
+ </svg>
49
+ </button>
50
+ </div>
51
+
52
+ <div className="space-y-6">
53
+ <div>
54
+ <label className="block text-xs font-bold text-zinc-400 mb-3 uppercase tracking-wider">Run this in your terminal</label>
55
+ <div className="flex bg-[#0a0a0f] border border-white/10 rounded-xl p-2 items-center">
56
+ <div className="flex-1 px-3 py-2 font-mono text-sm text-zinc-300 overflow-x-auto whitespace-nowrap">
57
+ <span className="text-indigo-400 mr-3">~</span>
58
+ npm install spatial-ui-universe three @react-three/fiber
59
+ </div>
60
+ <button
61
+ onClick={handleCopy}
62
+ className="ml-2 px-4 py-2 bg-white/10 hover:bg-white/20 flex-shrink-0 rounded-lg text-white text-xs font-bold transition-all w-24 flex justify-center items-center"
63
+ >
64
+ {copied ? "COPIED!" : "COPY"}
65
+ </button>
66
+ </div>
67
+ </div>
68
+
69
+ <Link
70
+ href="/docs"
71
+ onClick={onClose}
72
+ className="flex items-center justify-center w-full py-4 mt-6 bg-white text-black font-bold rounded-xl hover:bg-zinc-200 transition-transform hover:scale-[1.02]"
73
+ >
74
+ Read the Documentation
75
+ </Link>
76
+
77
+ <div className="text-center mt-4">
78
+ <p className="text-xs text-zinc-500">Require Node.js, React 18+, and Tailwind CSS.</p>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </motion.div>
83
+ </div>
84
+ )}
85
+ </AnimatePresence>
86
+ );
87
+ }