your-ai-workflow-firebase-os 1.2.21 → 1.2.23
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/dist/FirebaseOS.d.ts +2 -0
- package/dist/lib/ConfigContext.d.ts +2 -0
- package/dist/your-ai-workflow-firebase-os.cjs.js +58 -201
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +1925 -2087
- package/package.json +1 -1
- package/scripts/postinstall.js +19 -0
- package/src/FirebaseOS.tsx +4 -0
- package/src/lib/ConfigContext.tsx +2 -0
- package/src/microcomponents/registry.ts +39 -0
- package/src/pages/DynamicPage.tsx +18 -7
- package/src/pages/PagesAdmin.tsx +64 -56
- package/src/prompts/pages/publicPage.ts +11 -36
- package/src/prompts/tabs/crud/admin.ts +13 -55
- package/src/prompts/tabs/crud/private.ts +14 -58
- package/src/prompts/tabs/crud/shared.ts +13 -55
- package/src/templates/AdminPageTemplate.tsx +116 -110
- package/src/templates/PrivatePageTemplate.tsx +46 -40
- package/src/templates/PublicPageTemplate.tsx +13 -7
- package/src/templates/SharedPageTemplate.tsx +24 -18
- package/src/microcomponents/AdminExampleContent.tsx +0 -44
- package/src/microcomponents/PrivateExampleContent.tsx +0 -39
- package/src/microcomponents/Public.tsx +0 -126
- package/src/microcomponents/SharedExampleContent.tsx +0 -53
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { motion } from 'framer-motion';
|
|
3
|
-
import { ArrowRight, Layers, Zap, Shield, Code, Layout, Sparkles, CheckCircle2 } from 'lucide-react';
|
|
4
|
-
import { Button } from '../components/Button';
|
|
5
|
-
|
|
6
|
-
// This is an example of what gets injected inside the PublicPageTemplate.tsx content box.
|
|
7
|
-
// It relies on infinite height expansion native to the page container.
|
|
8
|
-
export default function PublicExample() {
|
|
9
|
-
return (
|
|
10
|
-
<div className="flex flex-col gap-10 p-4 md:p-8 w-full max-w-5xl mx-auto">
|
|
11
|
-
|
|
12
|
-
{/* Hero Section */}
|
|
13
|
-
<div className="flex flex-col md:flex-row justify-between items-start md:items-center gap-6">
|
|
14
|
-
<div className="max-w-2xl">
|
|
15
|
-
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-accent/10 border border-accent/20 text-accent text-[12px] font-bold tracking-wide mb-4">
|
|
16
|
-
<Sparkles className="w-3.5 h-3.5" />
|
|
17
|
-
<span>v2.0 Architecture</span>
|
|
18
|
-
</div>
|
|
19
|
-
<h2 className="text-3xl md:text-5xl font-extrabold tracking-tight text-foreground mb-4">
|
|
20
|
-
Custom Page Injection
|
|
21
|
-
</h2>
|
|
22
|
-
<p className="text-foreground/60 text-[15px] leading-relaxed max-w-xl font-medium">
|
|
23
|
-
Seamlessly build and deploy custom React components directly into the Firebase OS dashboard.
|
|
24
|
-
Enjoy native theming, routing, and deep authentication out of the box.
|
|
25
|
-
</p>
|
|
26
|
-
</div>
|
|
27
|
-
<div className="flex shrink-0 gap-3">
|
|
28
|
-
<Button variant="secondary" className="px-6 py-2.5 rounded-xl font-bold shadow-sm">View Docs</Button>
|
|
29
|
-
<Button className="px-6 py-2.5 rounded-xl shadow-lg shadow-accent/20 font-bold">Start Building</Button>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
{/* Code Banner */}
|
|
34
|
-
<motion.div
|
|
35
|
-
initial={{ opacity: 0, y: 10 }}
|
|
36
|
-
animate={{ opacity: 1, y: 0 }}
|
|
37
|
-
className="glass-panel border border-[var(--panel-border)] rounded-3xl p-6 md:p-10 relative overflow-hidden bg-gradient-to-br from-background/50 to-foreground/[0.02]"
|
|
38
|
-
>
|
|
39
|
-
<div className="absolute top-0 right-0 p-8 opacity-[0.03] pointer-events-none transform translate-x-1/4 -translate-y-1/4">
|
|
40
|
-
<Code className="w-64 h-64" />
|
|
41
|
-
</div>
|
|
42
|
-
<div className="relative z-10 flex flex-col md:flex-row gap-10 items-center">
|
|
43
|
-
<div className="flex-1 space-y-4">
|
|
44
|
-
<h3 className="text-2xl font-bold text-foreground tracking-tight">Zero-Config Deployment</h3>
|
|
45
|
-
<p className="text-[14px] text-foreground/60 leading-relaxed max-w-md">
|
|
46
|
-
When you prompt the AI to generate a component for this page, it automatically wires up your component inside the <code className="bg-foreground/5 px-2 py-0.5 rounded-md text-accent font-mono text-[12px] border border-accent/10">src/components/pages/</code> directory and dynamically mounts it here.
|
|
47
|
-
</p>
|
|
48
|
-
<ul className="space-y-3 mt-6 pt-4 border-t border-[var(--panel-border)]/50">
|
|
49
|
-
{[
|
|
50
|
-
'Full access to global CSS variables & tokens',
|
|
51
|
-
'Native Light / Dark mode compatibility',
|
|
52
|
-
'Responsive mobile-first structural integrity'
|
|
53
|
-
].map((item, i) => (
|
|
54
|
-
<li key={i} className="flex items-center gap-3 text-[13px] text-foreground/80 font-medium">
|
|
55
|
-
<div className="w-5 h-5 rounded-full bg-emerald-500/10 flex items-center justify-center shrink-0">
|
|
56
|
-
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-500" />
|
|
57
|
-
</div>
|
|
58
|
-
{item}
|
|
59
|
-
</li>
|
|
60
|
-
))}
|
|
61
|
-
</ul>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<div className="w-full md:w-5/12 bg-background border border-[var(--panel-border)] rounded-2xl p-5 shadow-2xl relative group">
|
|
65
|
-
<div className="absolute inset-0 bg-gradient-to-tr from-accent/5 to-transparent rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none" />
|
|
66
|
-
<div className="flex items-center gap-2 mb-4 pb-4 border-b border-[var(--panel-border)]">
|
|
67
|
-
<div className="w-3 h-3 rounded-full bg-red-400/80 shadow-[0_0_10px_rgba(248,113,113,0.5)]" />
|
|
68
|
-
<div className="w-3 h-3 rounded-full bg-yellow-400/80 shadow-[0_0_10px_rgba(250,204,21,0.5)]" />
|
|
69
|
-
<div className="w-3 h-3 rounded-full bg-green-400/80 shadow-[0_0_10px_rgba(74,222,128,0.5)]" />
|
|
70
|
-
<span className="ml-3 text-[10px] font-mono tracking-widest text-foreground/40 uppercase font-bold">page_content.tsx</span>
|
|
71
|
-
</div>
|
|
72
|
-
<pre className="font-mono text-[12px] text-foreground/70 leading-loose overflow-x-auto selection:bg-accent/20">
|
|
73
|
-
<span className="text-accent">export default function</span> <span className="text-blue-400 font-bold">CustomPage</span>() {'{\n'}
|
|
74
|
-
{' '}<span className="text-accent">return</span> (<br/>
|
|
75
|
-
{' '}<<span className="text-emerald-500">div</span> <span className="text-purple-400">className</span>=<span className="text-orange-400">"glass-panel border-..."</span>><br/>
|
|
76
|
-
{' '}<span className="text-foreground/40 italic">{'// Your injected logic here'}</span><br/>
|
|
77
|
-
{' '}</<span className="text-emerald-500">div</span>><br/>
|
|
78
|
-
{' '});<br/>
|
|
79
|
-
{'}'}
|
|
80
|
-
</pre>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</motion.div>
|
|
84
|
-
|
|
85
|
-
{/* Features Grid */}
|
|
86
|
-
<div className="pt-4">
|
|
87
|
-
<h3 className="text-xl font-bold mb-6 px-1 tracking-tight">Core Capabilities</h3>
|
|
88
|
-
<div className="grid grid-cols-1 md:grid-cols-3 gap-5">
|
|
89
|
-
{[
|
|
90
|
-
{ icon: Layout, title: 'Glassmorphism', desc: 'Beautiful transparent blurred panels seamlessly mirroring system visuals globally.' },
|
|
91
|
-
{ icon: Shield, title: 'Secure Context', desc: 'Components inherit active Firebase auth sessions and role states automatically.' },
|
|
92
|
-
{ icon: Zap, title: 'Hot Loaded', desc: 'Every layout change updates instantly without disrupting the application state.' }
|
|
93
|
-
].map((feature, idx) => (
|
|
94
|
-
<motion.div
|
|
95
|
-
key={idx}
|
|
96
|
-
whileHover={{ y: -5 }}
|
|
97
|
-
className="glass-panel border border-[var(--panel-border)] bg-background/40 p-6 rounded-3xl flex flex-col group hover:border-accent/40 transition-all cursor-default shadow-sm hover:shadow-xl hover:shadow-accent/5"
|
|
98
|
-
>
|
|
99
|
-
<div className="w-12 h-12 rounded-xl bg-accent/10 border border-accent/20 flex items-center justify-center text-accent mb-5 group-hover:scale-110 transition-transform duration-300 shadow-inner">
|
|
100
|
-
<feature.icon className="w-6 h-6" />
|
|
101
|
-
</div>
|
|
102
|
-
<h4 className="text-[16px] font-bold tracking-tight mb-2 text-foreground">{feature.title}</h4>
|
|
103
|
-
<p className="text-[13.5px] text-foreground/60 leading-relaxed flex-1">
|
|
104
|
-
{feature.desc}
|
|
105
|
-
</p>
|
|
106
|
-
</motion.div>
|
|
107
|
-
))}
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
{/* Bottom CTA */}
|
|
112
|
-
<div className="mt-6 flex flex-col items-center text-center p-10 glass-panel border border-[var(--panel-border)] rounded-3xl bg-gradient-to-b from-transparent to-accent/[0.03] relative overflow-hidden">
|
|
113
|
-
<div className="w-full h-1 bg-gradient-to-r from-transparent via-accent/30 to-transparent absolute top-0 left-0" />
|
|
114
|
-
<Layers className="w-12 h-12 text-accent/40 mb-5" />
|
|
115
|
-
<h3 className="text-2xl font-bold mb-3 tracking-tight">Ready to inject your custom code?</h3>
|
|
116
|
-
<p className="text-[15px] text-foreground/60 max-w-lg mx-auto mb-8 leading-relaxed font-medium">
|
|
117
|
-
Click the <strong className="text-foreground">robot icon</strong> at the top of this template to copy the exact AI prompt needed to scaffold your next integration.
|
|
118
|
-
</p>
|
|
119
|
-
<button className="flex items-center gap-2 group text-[14px] font-bold text-accent hover:text-accent/80 transition-colors bg-accent/10 hover:bg-accent/15 px-6 py-2.5 rounded-xl border border-accent/20">
|
|
120
|
-
Show documentation <ArrowRight className="w-4 h-4 group-hover:translate-x-1 transition-transform" />
|
|
121
|
-
</button>
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
</div>
|
|
125
|
-
);
|
|
126
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { motion } from 'framer-motion';
|
|
3
|
-
import { MessageSquare, ThumbsUp, User } from 'lucide-react';
|
|
4
|
-
import { Button } from '../components/Button';
|
|
5
|
-
import { Input } from '../components/Input';
|
|
6
|
-
|
|
7
|
-
export default function SharedExampleContent() {
|
|
8
|
-
return (
|
|
9
|
-
<div className="flex flex-col gap-6 p-4 md:p-8 w-full max-w-4xl mx-auto">
|
|
10
|
-
<div className="glass-panel border border-[var(--panel-border)] p-6 rounded-3xl">
|
|
11
|
-
<h2 className="text-xl font-bold tracking-tight text-foreground mb-4">Community Discussion</h2>
|
|
12
|
-
<div className="flex gap-4">
|
|
13
|
-
<div className="w-10 h-10 rounded-full bg-accent/20 flex items-center justify-center text-accent shrink-0 border border-accent/30">
|
|
14
|
-
<User className="w-5 h-5" />
|
|
15
|
-
</div>
|
|
16
|
-
<div className="flex-1 flex flex-col gap-3">
|
|
17
|
-
<Input placeholder="Share something with the team..." className="w-full" />
|
|
18
|
-
<div className="flex justify-end">
|
|
19
|
-
<Button className="px-6 rounded-xl">Post</Button>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div className="flex flex-col gap-4 mt-2">
|
|
26
|
-
{[1, 2].map((i) => (
|
|
27
|
-
<div key={i} className="glass-panel border border-[var(--panel-border)] p-5 rounded-2xl flex gap-4">
|
|
28
|
-
<div className="w-10 h-10 rounded-full bg-foreground/10 flex items-center justify-center text-foreground/60 shrink-0">
|
|
29
|
-
<User className="w-5 h-5" />
|
|
30
|
-
</div>
|
|
31
|
-
<div className="flex-1">
|
|
32
|
-
<div className="flex items-center gap-2 mb-1">
|
|
33
|
-
<span className="font-bold text-[14px]">Team Member {i}</span>
|
|
34
|
-
<span className="text-[12px] text-foreground/40 font-medium">2 hours ago</span>
|
|
35
|
-
</div>
|
|
36
|
-
<p className="text-foreground/80 text-[14px] leading-relaxed">
|
|
37
|
-
This is an example of a shared component where all authenticated members can see and interact with the data.
|
|
38
|
-
</p>
|
|
39
|
-
<div className="flex items-center gap-4 mt-4 text-foreground/50">
|
|
40
|
-
<button className="flex items-center gap-1.5 text-[12px] font-bold hover:text-accent transition-colors">
|
|
41
|
-
<ThumbsUp className="w-4 h-4" /> Like
|
|
42
|
-
</button>
|
|
43
|
-
<button className="flex items-center gap-1.5 text-[12px] font-bold hover:text-accent transition-colors">
|
|
44
|
-
<MessageSquare className="w-4 h-4" /> Reply
|
|
45
|
-
</button>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
))}
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
}
|