your-ai-workflow-firebase-os 1.2.1
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 +236 -0
- package/dist/FirebaseOS.d.ts +33 -0
- package/dist/_redirects +1 -0
- package/dist/contactForm.config-BHvMbfxM.js +42 -0
- package/dist/contactForm.config-DLeI_ZEj.js +2 -0
- package/dist/contactForm.config-Y2AYSH9s.cjs +1 -0
- package/dist/contactForm.config-ki9OzidM.cjs +1 -0
- package/dist/favicon.svg +5 -0
- package/dist/icons.svg +24 -0
- package/dist/index.d.ts +9 -0
- package/dist/lib/AuthContext.d.ts +25 -0
- package/dist/lib/ConfigContext.d.ts +31 -0
- package/dist/lib/ThemeContext.d.ts +18 -0
- package/dist/supportForm.config-74T-eSSH.js +2 -0
- package/dist/supportForm.config-BwZqJ5CZ.cjs +1 -0
- package/dist/supportForm.config-D5ZRFZtU.js +35 -0
- package/dist/supportForm.config-NfLDtLTB.cjs +1 -0
- package/dist/theme.config-BbEzcEDR.js +2 -0
- package/dist/theme.config-DJqqr_kx.cjs +1 -0
- package/dist/theme.config-DKqbHSSM.cjs +1 -0
- package/dist/theme.config-q93xMCw6.js +68 -0
- package/dist/your-ai-workflow-firebase-os.cjs.js +618 -0
- package/dist/your-ai-workflow-firebase-os.css +2 -0
- package/dist/your-ai-workflow-firebase-os.es.js +90443 -0
- package/package.json +81 -0
- package/scripts/postinstall.js +245 -0
- package/src/App.css +184 -0
- package/src/App.tsx +214 -0
- package/src/FirebaseOS.tsx +87 -0
- package/src/assets/hero.png +0 -0
- package/src/assets/react.svg +1 -0
- package/src/assets/vite.svg +1 -0
- package/src/components/AdminNotifications.test.tsx +98 -0
- package/src/components/AdminNotifications.tsx +194 -0
- package/src/components/Button.test.tsx +22 -0
- package/src/components/Button.tsx +53 -0
- package/src/components/ConfirmModal.test.tsx +98 -0
- package/src/components/ConfirmModal.tsx +73 -0
- package/src/components/ContactPopup.test.tsx +98 -0
- package/src/components/ContactPopup.tsx +437 -0
- package/src/components/CustomSelect.test.tsx +47 -0
- package/src/components/CustomSelect.tsx +89 -0
- package/src/components/DashboardNav.test.tsx +98 -0
- package/src/components/DashboardNav.tsx +281 -0
- package/src/components/Input.test.tsx +33 -0
- package/src/components/Input.tsx +61 -0
- package/src/components/JsonEditor.tsx +579 -0
- package/src/components/Navbar.test.tsx +98 -0
- package/src/components/Navbar.tsx +563 -0
- package/src/configs/forms/contactForm.config.ts +15 -0
- package/src/configs/forms/index.ts +29 -0
- package/src/configs/forms/pubForm.config.ts +11 -0
- package/src/configs/forms/supportForm.config.ts +14 -0
- package/src/configs/forms/userForm.config.ts +11 -0
- package/src/configs/pages/admin.config.ts +29 -0
- package/src/configs/pages/contact.config.ts +6 -0
- package/src/configs/pages/home.config.ts +18 -0
- package/src/configs/pages/mem.config.ts +2 -0
- package/src/configs/pages/menuOrders.config.ts +11 -0
- package/src/configs/pages/pub.config.ts +11 -0
- package/src/configs/pages/shared.config.ts +29 -0
- package/src/configs/pages/support.config.ts +7 -0
- package/src/configs/pages/tabOrders.config.ts +33 -0
- package/src/configs/pages/user.config.ts +29 -0
- package/src/configs/theme.config.ts +93 -0
- package/src/index.css +403 -0
- package/src/index.ts +22 -0
- package/src/lib/AuthContext.test.tsx +88 -0
- package/src/lib/AuthContext.tsx +191 -0
- package/src/lib/ConfigContext.tsx +45 -0
- package/src/lib/ThemeContext.tsx +233 -0
- package/src/lib/firebase.ts +91 -0
- package/src/main.tsx +22 -0
- package/src/microcomponents/AdminExampleContent.tsx +44 -0
- package/src/microcomponents/PrivateExampleContent.tsx +39 -0
- package/src/microcomponents/Public.tsx +126 -0
- package/src/microcomponents/SharedExampleContent.tsx +53 -0
- package/src/pages/Dashboard.test.tsx +98 -0
- package/src/pages/Dashboard.tsx +60 -0
- package/src/pages/DynamicPage.tsx +237 -0
- package/src/pages/FormsAdmin.test.tsx +98 -0
- package/src/pages/FormsAdmin.tsx +459 -0
- package/src/pages/Home.test.tsx +98 -0
- package/src/pages/Home.tsx +144 -0
- package/src/pages/Login.test.tsx +98 -0
- package/src/pages/Login.tsx +108 -0
- package/src/pages/PagesAdmin.test.tsx +98 -0
- package/src/pages/PagesAdmin.tsx +1022 -0
- package/src/pages/Profile.test.tsx +98 -0
- package/src/pages/Profile.tsx +319 -0
- package/src/pages/Register.test.tsx +98 -0
- package/src/pages/Register.tsx +116 -0
- package/src/pages/Requests.test.tsx +95 -0
- package/src/pages/Requests.tsx +422 -0
- package/src/pages/ResetPassword.test.tsx +98 -0
- package/src/pages/ResetPassword.tsx +92 -0
- package/src/pages/Settings.test.tsx +98 -0
- package/src/pages/Settings.tsx +393 -0
- package/src/pages/Setup.tsx +413 -0
- package/src/pages/StorageAdmin.test.tsx +150 -0
- package/src/pages/StorageAdmin.tsx +769 -0
- package/src/pages/Submissions.test.tsx +95 -0
- package/src/pages/Submissions.tsx +378 -0
- package/src/pages/Templates.test.tsx +98 -0
- package/src/pages/Templates.tsx +103 -0
- package/src/pages/ThemeAdmin.test.tsx +144 -0
- package/src/pages/ThemeAdmin.tsx +1000 -0
- package/src/pages/Users.test.tsx +95 -0
- package/src/pages/Users.tsx +334 -0
- package/src/pages/Verify.test.tsx +98 -0
- package/src/pages/Verify.tsx +95 -0
- package/src/prompts/index.ts +13 -0
- package/src/prompts/pages/publicPage.ts +44 -0
- package/src/prompts/sharedConstants.ts +12 -0
- package/src/prompts/tabs/board/adminboard.ts +32 -0
- package/src/prompts/tabs/board/privateboard.ts +36 -0
- package/src/prompts/tabs/board/publicboard.ts +36 -0
- package/src/prompts/tabs/calendar/admincalendar.ts +32 -0
- package/src/prompts/tabs/calendar/privatecalendar.ts +36 -0
- package/src/prompts/tabs/calendar/publiccalendar.ts +36 -0
- package/src/prompts/tabs/crud/admin.ts +54 -0
- package/src/prompts/tabs/crud/private.ts +55 -0
- package/src/prompts/tabs/crud/shared.ts +53 -0
- package/src/prompts/tabs/table/admintable.ts +32 -0
- package/src/prompts/tabs/table/privatetable.ts +36 -0
- package/src/prompts/tabs/table/publictable.ts +36 -0
- package/src/setupTests.ts +1 -0
- package/src/templates/AdminPageTemplate.tsx +678 -0
- package/src/templates/PrivatePageTemplate.tsx +594 -0
- package/src/templates/PublicPageTemplate.tsx +92 -0
- package/src/templates/SharedPageTemplate.tsx +551 -0
- package/src/templates/TemplateBoard.test.tsx +106 -0
- package/src/templates/TemplateBoard.tsx +642 -0
- package/src/templates/TemplateCalendar.test.tsx +106 -0
- package/src/templates/TemplateCalendar.tsx +848 -0
- package/src/templates/TemplateConfirmation.test.tsx +106 -0
- package/src/templates/TemplateConfirmation.tsx +145 -0
- package/src/templates/TemplateInlineForm.test.tsx +106 -0
- package/src/templates/TemplateInlineForm.tsx +129 -0
- package/src/templates/TemplatePopupForm.test.tsx +106 -0
- package/src/templates/TemplatePopupForm.tsx +174 -0
- package/src/templates/TemplateTable.test.tsx +106 -0
- package/src/templates/TemplateTable.tsx +675 -0
package/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# 🔥 Firebase OS
|
|
2
|
+
|
|
3
|
+
**A complete, production-ready Firebase admin OS — packaged as a single React component.**
|
|
4
|
+
|
|
5
|
+
Authentication, user management, role-based access control, file storage, dynamic pages, form builder, theme customisation, and more — all behind one import.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { FirebaseOS } from 'firebase-os';
|
|
9
|
+
import 'firebase-os/styles.css';
|
|
10
|
+
|
|
11
|
+
export default function App() {
|
|
12
|
+
return <FirebaseOS />;
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
That's it. **One component. Zero configuration files.**
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## ✨ What you get
|
|
21
|
+
|
|
22
|
+
| Feature | Details |
|
|
23
|
+
|:--------|:--------|
|
|
24
|
+
| 🔐 **Authentication** | Email/password, email verification, password reset |
|
|
25
|
+
| 👥 **User Management** | Admin panel, role assignment, inactive user blocking |
|
|
26
|
+
| 🗂️ **Dynamic Pages** | Create pages from the admin panel — no code needed |
|
|
27
|
+
| 📋 **Templates** | Board (Kanban), Calendar, Table, Inline Form, Popup Form, Confirmation |
|
|
28
|
+
| 🎨 **Theme Engine** | Full dark/light mode, custom accent colours, fonts, corner radii, logo |
|
|
29
|
+
| 📁 **File Storage** | Firebase Storage drive with folder structure |
|
|
30
|
+
| 📬 **Form Builder** | Contact forms, support forms — fully customisable |
|
|
31
|
+
| ⚙️ **Settings** | All admin settings via UI — no `.env` editing needed after setup |
|
|
32
|
+
| 📊 **Dashboard** | Personalised user dashboard |
|
|
33
|
+
| 🧑💼 **Submissions & Requests** | Track form submissions and user requests |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 📦 Installation
|
|
38
|
+
|
|
39
|
+
### Peer dependencies (install these in your project)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install firebase react react-dom react-router-dom
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Install the library
|
|
46
|
+
|
|
47
|
+
**From npm:**
|
|
48
|
+
```bash
|
|
49
|
+
npm install firebase-os
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**From a local build (development):**
|
|
53
|
+
```bash
|
|
54
|
+
npm pack # in the firebase-os repo
|
|
55
|
+
npm install /path/to/firebase-os-1.0.0.tgz # in your app
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 🚀 Quick Start
|
|
61
|
+
|
|
62
|
+
### Option A — Zero config (recommended)
|
|
63
|
+
|
|
64
|
+
On first load, Firebase OS shows a **Setup Wizard** that guides you through pasting your Firebase project credentials. Nothing is stored on any server — keys are saved in your browser's `localStorage`.
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
// App.tsx
|
|
68
|
+
import { FirebaseOS } from 'firebase-os';
|
|
69
|
+
import 'firebase-os/styles.css';
|
|
70
|
+
|
|
71
|
+
export default function App() {
|
|
72
|
+
return <FirebaseOS />;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
1. Run your app
|
|
77
|
+
2. The Setup Wizard opens automatically
|
|
78
|
+
3. Paste your Firebase config (from the Firebase Console)
|
|
79
|
+
4. Done — the full OS loads
|
|
80
|
+
|
|
81
|
+
### Option B — Pre-configured (CI/CD, teams)
|
|
82
|
+
|
|
83
|
+
Skip the wizard entirely by passing your Firebase config as props:
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { FirebaseOS } from 'firebase-os';
|
|
87
|
+
import 'firebase-os/styles.css';
|
|
88
|
+
|
|
89
|
+
export default function App() {
|
|
90
|
+
return (
|
|
91
|
+
<FirebaseOS
|
|
92
|
+
firebaseConfig={{
|
|
93
|
+
apiKey: import.meta.env.VITE_API_KEY,
|
|
94
|
+
authDomain: import.meta.env.VITE_AUTH_DOMAIN,
|
|
95
|
+
projectId: import.meta.env.VITE_PROJECT_ID,
|
|
96
|
+
storageBucket: import.meta.env.VITE_STORAGE_BUCKET,
|
|
97
|
+
messagingSenderId: import.meta.env.VITE_MESSAGING_SENDER_ID,
|
|
98
|
+
appId: import.meta.env.VITE_APP_ID,
|
|
99
|
+
}}
|
|
100
|
+
adminEmails={['you@yourcompany.com']}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 🎛️ Props API
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
interface FirebaseOSProps {
|
|
112
|
+
/**
|
|
113
|
+
* Pass Firebase config directly to skip the Setup Wizard.
|
|
114
|
+
* If omitted, the wizard runs on first load and saves config to localStorage.
|
|
115
|
+
*/
|
|
116
|
+
firebaseConfig?: {
|
|
117
|
+
apiKey: string;
|
|
118
|
+
authDomain: string;
|
|
119
|
+
projectId: string;
|
|
120
|
+
storageBucket: string;
|
|
121
|
+
messagingSenderId: string;
|
|
122
|
+
appId: string;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Email addresses that are automatically assigned the 'admin' role
|
|
127
|
+
* on their first login. Replaces the VITE_ADMIN_EMAILS env var.
|
|
128
|
+
*/
|
|
129
|
+
adminEmails?: string[];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Custom router basename (e.g. "/app" if your app lives at a subdirectory).
|
|
133
|
+
*/
|
|
134
|
+
basename?: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Callback fired whenever the Firebase auth state changes.
|
|
138
|
+
* Useful for integrating with your own auth layer.
|
|
139
|
+
*/
|
|
140
|
+
onAuthChange?: (user: any) => void;
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 🪝 Advanced: Hooks
|
|
147
|
+
|
|
148
|
+
For advanced integrations, two hooks are exported from the library:
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import { useAuth, useTheme } from 'firebase-os';
|
|
152
|
+
|
|
153
|
+
// Access auth state anywhere inside <FirebaseOS />
|
|
154
|
+
function MyWidget() {
|
|
155
|
+
const { user, userRole, signOut } = useAuth();
|
|
156
|
+
const { theme, toggleTheme, activeConfig } = useTheme();
|
|
157
|
+
// ...
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
> **Note:** These hooks only work when rendered inside the `<FirebaseOS />` component tree.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 🔥 Getting your Firebase config
|
|
166
|
+
|
|
167
|
+
1. Go to [Firebase Console](https://console.firebase.google.com/)
|
|
168
|
+
2. Create or select a project
|
|
169
|
+
3. Go to **Project Settings** → **Your apps** → **Web app**
|
|
170
|
+
4. Copy the `firebaseConfig` object
|
|
171
|
+
5. Enable **Authentication** (Email/Password), **Firestore**, and **Storage** in your project
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 🎨 Theming
|
|
176
|
+
|
|
177
|
+
The theme is managed entirely through the admin UI at `/theme`. No code changes needed.
|
|
178
|
+
|
|
179
|
+
All CSS is scoped to `.firebase-os` — the library's styles **do not leak** into your own application's CSS.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 📐 CSS Isolation
|
|
184
|
+
|
|
185
|
+
Firebase OS uses a `.firebase-os` container div for all its CSS variable scope. This means:
|
|
186
|
+
|
|
187
|
+
- ✅ Library's theme variables stay inside `.firebase-os`
|
|
188
|
+
- ✅ Your own `:root` variables are untouched
|
|
189
|
+
- ✅ `data-theme` attribute is set on the container, not `<html>`
|
|
190
|
+
- ✅ No Tailwind class pollution on your global styles
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 🔒 How data is stored
|
|
195
|
+
|
|
196
|
+
- **Firebase credentials** — `localStorage` (your browser only, never any server)
|
|
197
|
+
- **User data** — your own Firebase Firestore
|
|
198
|
+
- **Files** — your own Firebase Storage
|
|
199
|
+
- **Theme / page config** — your own Firestore (`sys_configs` collection)
|
|
200
|
+
|
|
201
|
+
You own all your data. Firebase OS is just the UI layer.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 📁 Project structure (for contributors)
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
src/
|
|
209
|
+
├── index.ts ← Public API (only exports FirebaseOS + hooks)
|
|
210
|
+
├── FirebaseOS.tsx ← The library component wrapper
|
|
211
|
+
├── App.tsx ← Router + route guards (internal)
|
|
212
|
+
├── lib/
|
|
213
|
+
│ ├── firebase.ts ← Dynamic Firebase init (env OR props)
|
|
214
|
+
│ ├── AuthContext ← Auth lifecycle (internal)
|
|
215
|
+
│ ├── ThemeContext ← CSS variable injection (internal)
|
|
216
|
+
│ └── ConfigContext ← Library props → internal bridge
|
|
217
|
+
├── pages/ ← 17 page components (internal)
|
|
218
|
+
├── templates/ ← 8 template components (internal)
|
|
219
|
+
├── components/ ← Shared UI (internal)
|
|
220
|
+
└── configs/ ← Default configurations (internal)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Scripts
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npm run dev # Run standalone app (for development)
|
|
227
|
+
npm run test # Run test suite (47 tests)
|
|
228
|
+
npm run build:lib # Build the distributable library
|
|
229
|
+
npm pack # Create .tgz for local testing
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 📄 License
|
|
235
|
+
|
|
236
|
+
MIT
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FirebaseOSProps {
|
|
3
|
+
/** Skip the setup wizard — pass Firebase config directly */
|
|
4
|
+
firebaseConfig?: {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
authDomain: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
storageBucket: string;
|
|
9
|
+
messagingSenderId: string;
|
|
10
|
+
appId: string;
|
|
11
|
+
};
|
|
12
|
+
/** Admin email addresses (replaces VITE_ADMIN_EMAILS env var) */
|
|
13
|
+
adminEmails?: string[];
|
|
14
|
+
/** Custom basename for the router (e.g., "/app") */
|
|
15
|
+
basename?: string;
|
|
16
|
+
/** Called when auth state changes */
|
|
17
|
+
onAuthChange?: (user: any) => void;
|
|
18
|
+
/** Override the theme configuration */
|
|
19
|
+
themeConfig?: any;
|
|
20
|
+
/** Component overrides for the hybrid template architecture */
|
|
21
|
+
components?: {
|
|
22
|
+
Home?: React.ComponentType<any>;
|
|
23
|
+
TemplateBoard?: React.ComponentType<any>;
|
|
24
|
+
TemplateTable?: React.ComponentType<any>;
|
|
25
|
+
TemplateCalendar?: React.ComponentType<any>;
|
|
26
|
+
TemplatePopupForm?: React.ComponentType<any>;
|
|
27
|
+
TemplateInlineForm?: React.ComponentType<any>;
|
|
28
|
+
TemplatePages?: React.ComponentType<any>;
|
|
29
|
+
TemplateStorage?: React.ComponentType<any>;
|
|
30
|
+
TemplateNone?: React.ComponentType<any>;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function FirebaseOS(props: FirebaseOSProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/_redirects
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* /index.html 200
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/configs/forms/contactForm.config.ts
|
|
2
|
+
var e = {
|
|
3
|
+
systemName: "contact",
|
|
4
|
+
formType: "public",
|
|
5
|
+
submitPage: "submissions",
|
|
6
|
+
redirectTo: "/",
|
|
7
|
+
title: "Get in Touch",
|
|
8
|
+
buttonName: "Contact Us",
|
|
9
|
+
submitText: "Send Message",
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
name: "name",
|
|
13
|
+
type: "text",
|
|
14
|
+
label: "Full Name",
|
|
15
|
+
placeholder: "John Doe",
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "email",
|
|
20
|
+
type: "email",
|
|
21
|
+
label: "Email Address",
|
|
22
|
+
placeholder: "john@example.com",
|
|
23
|
+
required: !0
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "phone",
|
|
27
|
+
type: "tel",
|
|
28
|
+
label: "Phone Number",
|
|
29
|
+
placeholder: "+1 (555) 000-0000",
|
|
30
|
+
required: !1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "questions",
|
|
34
|
+
type: "textarea",
|
|
35
|
+
label: "Your Questions",
|
|
36
|
+
placeholder: "How can we help you?",
|
|
37
|
+
required: !0
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { e as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={systemName:`contact`,formType:`public`,submitPage:`submissions`,redirectTo:`/`,title:`Get in Touch`,buttonName:`Contact Us`,submitText:`Send Message`,fields:[{name:`name`,type:`text`,label:`Full Name`,placeholder:`John Doe`,required:!0},{name:`email`,type:`email`,label:`Email Address`,placeholder:`john@example.com`,required:!0},{name:`phone`,type:`tel`,label:`Phone Number`,placeholder:`+1 (555) 000-0000`,required:!1},{name:`questions`,type:`textarea`,label:`Your Questions`,placeholder:`How can we help you?`,required:!0}]};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./contactForm.config-Y2AYSH9s.cjs`);require(`./your-ai-workflow-firebase-os.cjs.js`),exports.contactFormConfig=e.t;
|
package/dist/favicon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#7c3aed" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse>
|
|
3
|
+
<path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path>
|
|
4
|
+
<path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path>
|
|
5
|
+
</svg>
|
package/dist/icons.svg
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<symbol id="bluesky-icon" viewBox="0 0 16 17">
|
|
3
|
+
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
|
|
4
|
+
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
|
|
5
|
+
</symbol>
|
|
6
|
+
<symbol id="discord-icon" viewBox="0 0 20 19">
|
|
7
|
+
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
|
|
8
|
+
</symbol>
|
|
9
|
+
<symbol id="documentation-icon" viewBox="0 0 21 20">
|
|
10
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
|
|
11
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
|
|
12
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
|
|
13
|
+
</symbol>
|
|
14
|
+
<symbol id="github-icon" viewBox="0 0 19 19">
|
|
15
|
+
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
|
|
16
|
+
</symbol>
|
|
17
|
+
<symbol id="social-icon" viewBox="0 0 20 20">
|
|
18
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
|
|
19
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
|
|
20
|
+
</symbol>
|
|
21
|
+
<symbol id="x-icon" viewBox="0 0 19 19">
|
|
22
|
+
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
|
|
23
|
+
</symbol>
|
|
24
|
+
</svg>
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { FirebaseOS } from './FirebaseOS';
|
|
2
|
+
export type { FirebaseOSProps } from './FirebaseOS';
|
|
3
|
+
export { useAuth } from './lib/AuthContext';
|
|
4
|
+
export { useTheme } from './lib/ThemeContext';
|
|
5
|
+
export { useConfig } from './lib/ConfigContext';
|
|
6
|
+
export type { FirebaseOSConfig } from './lib/ConfigContext';
|
|
7
|
+
export { db, auth, storage } from './lib/firebase';
|
|
8
|
+
export { ContactPopup } from './components/ContactPopup';
|
|
9
|
+
export { defaultHomeConfig } from './configs/pages/home.config';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { User } from 'firebase/auth';
|
|
3
|
+
interface AuthContextType {
|
|
4
|
+
user: User | null;
|
|
5
|
+
userRole: string | null;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
signOut: () => Promise<void>;
|
|
8
|
+
registerUser: (email: string, password: string, firstName: string, lastName: string) => Promise<void>;
|
|
9
|
+
userInactive: boolean;
|
|
10
|
+
roleResolved: boolean;
|
|
11
|
+
refreshUser: () => Promise<void>;
|
|
12
|
+
activeOrg?: any;
|
|
13
|
+
activeWorkspace?: any;
|
|
14
|
+
checkOrg?: any;
|
|
15
|
+
workspaceAccess?: any;
|
|
16
|
+
userWorkspaces?: any;
|
|
17
|
+
switchWorkspace?: any;
|
|
18
|
+
createWorkspace?: any;
|
|
19
|
+
createOrg?: any;
|
|
20
|
+
}
|
|
21
|
+
export declare function AuthProvider({ children }: {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const useAuth: () => AuthContextType;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FirebaseOSConfig {
|
|
3
|
+
firebaseConfig?: {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
authDomain: string;
|
|
6
|
+
projectId: string;
|
|
7
|
+
storageBucket: string;
|
|
8
|
+
messagingSenderId: string;
|
|
9
|
+
appId: string;
|
|
10
|
+
};
|
|
11
|
+
adminEmails?: string[];
|
|
12
|
+
basename?: string;
|
|
13
|
+
onAuthChange?: (user: any) => void;
|
|
14
|
+
themeConfig?: any;
|
|
15
|
+
components?: {
|
|
16
|
+
Home?: React.ComponentType<any>;
|
|
17
|
+
TemplateBoard?: React.ComponentType<any>;
|
|
18
|
+
TemplateTable?: React.ComponentType<any>;
|
|
19
|
+
TemplateCalendar?: React.ComponentType<any>;
|
|
20
|
+
TemplatePopupForm?: React.ComponentType<any>;
|
|
21
|
+
TemplateInlineForm?: React.ComponentType<any>;
|
|
22
|
+
TemplatePages?: React.ComponentType<any>;
|
|
23
|
+
TemplateStorage?: React.ComponentType<any>;
|
|
24
|
+
TemplateNone?: React.ComponentType<any>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare function ConfigProvider({ config, children }: {
|
|
28
|
+
config: FirebaseOSConfig;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const useConfig: () => FirebaseOSConfig;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { themeConfig } from '../configs/theme.config';
|
|
3
|
+
type Theme = 'light' | 'dark';
|
|
4
|
+
interface ThemeContextType {
|
|
5
|
+
theme: Theme;
|
|
6
|
+
setTheme: (theme: Theme) => void;
|
|
7
|
+
toggleTheme: () => void;
|
|
8
|
+
isSystem: boolean;
|
|
9
|
+
setIsSystem: (is: boolean) => void;
|
|
10
|
+
config: typeof themeConfig;
|
|
11
|
+
activeConfig: any;
|
|
12
|
+
}
|
|
13
|
+
export declare function ThemeProvider({ children, scopeSelector }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
scopeSelector?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const useTheme: () => ThemeContextType;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./supportForm.config-NfLDtLTB.cjs`);require(`./your-ai-workflow-firebase-os.cjs.js`),exports.supportFormConfig=e.t;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/configs/forms/supportForm.config.ts
|
|
2
|
+
var e = {
|
|
3
|
+
systemName: "support",
|
|
4
|
+
formType: "private",
|
|
5
|
+
submitPage: "requests",
|
|
6
|
+
redirectTo: "/dashboard",
|
|
7
|
+
title: "Request Assistance",
|
|
8
|
+
buttonName: "Get Assistance",
|
|
9
|
+
submitText: "Submit Request",
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
name: "topic",
|
|
13
|
+
type: "text",
|
|
14
|
+
label: "Topic",
|
|
15
|
+
placeholder: "E.g. Password reset issue",
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "contactEmail",
|
|
20
|
+
type: "email",
|
|
21
|
+
label: "Contact Email",
|
|
22
|
+
placeholder: "your@email.com",
|
|
23
|
+
required: !0
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "description",
|
|
27
|
+
type: "textarea",
|
|
28
|
+
label: "Description",
|
|
29
|
+
placeholder: "Please describe your issue in detail...",
|
|
30
|
+
required: !0
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { e as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={systemName:`support`,formType:`private`,submitPage:`requests`,redirectTo:`/dashboard`,title:`Request Assistance`,buttonName:`Get Assistance`,submitText:`Submit Request`,fields:[{name:`topic`,type:`text`,label:`Topic`,placeholder:`E.g. Password reset issue`,required:!0},{name:`contactEmail`,type:`email`,label:`Contact Email`,placeholder:`your@email.com`,required:!0},{name:`description`,type:`textarea`,label:`Description`,placeholder:`Please describe your issue in detail...`,required:!0}]};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={appName:`Firebase OS.`,defaultTheme:`system`,showThemeToggle:!0,logoUrl:`https://firebasestorage.googleapis.com/v0/b/fir-os-47863.firebasestorage.app/o/pub_files%2F1776321238933_favicon_smaller.png?alt=media&token=efecb55c-2456-4cbe-a20a-b86db54a1e55`,faviconUrl:`https://firebasestorage.googleapis.com/v0/b/fir-os-47863.firebasestorage.app/o/pub_files%2F1776321238933_favicon_smaller.png?alt=media&token=efecb55c-2456-4cbe-a20a-b86db54a1e55`,colors:{dark:{background:`#07070f`,backgroundSecondary:`#0a0a18`,foreground:`#f0eeff`,accent:`#a78bfa`,panelBg:`rgba(167, 139, 250, 0.05)`,panelBorder:`rgba(167, 139, 250, 0.15)`,buttonGradient:[`#6d28d9`,`#a78bfa`],secondaryButton:{bg:`rgba(255, 255, 255, 0.05)`,border:`rgba(255, 255, 255, 0.1)`,text:`#f0eeff`},buttonHoverGradient:[`#7c3aed`,`#c4b5fd`],glowColor:`rgba(167, 139, 250, 0.40)`,notificationIconColor:`#a78bfa`,textGradient:[`#f0eeff`,`#c4b5fd`,`#a78bfa`],selectionBg:`rgba(167, 139, 250, 0.40)`,selectionText:`#ffffff`},light:{background:`#fcfaff`,backgroundSecondary:`#f7f3ff`,foreground:`#1e1b4b`,accent:`#7c3aed`,panelBg:`rgba(255, 255, 255, 0.70)`,panelBorder:`rgba(124, 58, 237, 0.08)`,buttonGradient:[`#5b21b6`,`#a78bfa`],secondaryButton:{bg:`rgba(0, 0, 0, 0.03)`,border:`rgba(0, 0, 0, 0.06)`,text:`#1e1b4b`},buttonHoverGradient:[`#6d28d9`,`#a78bfa`],glowColor:`rgba(124, 58, 237, 0.30)`,notificationIconColor:`#7c3aed`,textGradient:[`#2e1065`,`#6d28d9`,`#cdc1ff`],selectionBg:`rgba(124, 58, 237, 0.30)`,selectionText:`#ffffff`}},fontFamily:`Inter`,cornerRounding:`default`,cornerRadii:{buttonRadius:.75,inputRadius:.75,cardRadius:1.5,modalRadius:2.5}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./theme.config-DJqqr_kx.cjs`);require(`./your-ai-workflow-firebase-os.cjs.js`),exports.themeConfig=e.t;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/configs/theme.config.ts
|
|
2
|
+
var e = {
|
|
3
|
+
appName: "Firebase OS.",
|
|
4
|
+
defaultTheme: "system",
|
|
5
|
+
showThemeToggle: !0,
|
|
6
|
+
logoUrl: "https://firebasestorage.googleapis.com/v0/b/fir-os-47863.firebasestorage.app/o/pub_files%2F1776321238933_favicon_smaller.png?alt=media&token=efecb55c-2456-4cbe-a20a-b86db54a1e55",
|
|
7
|
+
faviconUrl: "https://firebasestorage.googleapis.com/v0/b/fir-os-47863.firebasestorage.app/o/pub_files%2F1776321238933_favicon_smaller.png?alt=media&token=efecb55c-2456-4cbe-a20a-b86db54a1e55",
|
|
8
|
+
colors: {
|
|
9
|
+
dark: {
|
|
10
|
+
background: "#07070f",
|
|
11
|
+
backgroundSecondary: "#0a0a18",
|
|
12
|
+
foreground: "#f0eeff",
|
|
13
|
+
accent: "#a78bfa",
|
|
14
|
+
panelBg: "rgba(167, 139, 250, 0.05)",
|
|
15
|
+
panelBorder: "rgba(167, 139, 250, 0.15)",
|
|
16
|
+
buttonGradient: ["#6d28d9", "#a78bfa"],
|
|
17
|
+
secondaryButton: {
|
|
18
|
+
bg: "rgba(255, 255, 255, 0.05)",
|
|
19
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
20
|
+
text: "#f0eeff"
|
|
21
|
+
},
|
|
22
|
+
buttonHoverGradient: ["#7c3aed", "#c4b5fd"],
|
|
23
|
+
glowColor: "rgba(167, 139, 250, 0.40)",
|
|
24
|
+
notificationIconColor: "#a78bfa",
|
|
25
|
+
textGradient: [
|
|
26
|
+
"#f0eeff",
|
|
27
|
+
"#c4b5fd",
|
|
28
|
+
"#a78bfa"
|
|
29
|
+
],
|
|
30
|
+
selectionBg: "rgba(167, 139, 250, 0.40)",
|
|
31
|
+
selectionText: "#ffffff"
|
|
32
|
+
},
|
|
33
|
+
light: {
|
|
34
|
+
background: "#fcfaff",
|
|
35
|
+
backgroundSecondary: "#f7f3ff",
|
|
36
|
+
foreground: "#1e1b4b",
|
|
37
|
+
accent: "#7c3aed",
|
|
38
|
+
panelBg: "rgba(255, 255, 255, 0.70)",
|
|
39
|
+
panelBorder: "rgba(124, 58, 237, 0.08)",
|
|
40
|
+
buttonGradient: ["#5b21b6", "#a78bfa"],
|
|
41
|
+
secondaryButton: {
|
|
42
|
+
bg: "rgba(0, 0, 0, 0.03)",
|
|
43
|
+
border: "rgba(0, 0, 0, 0.06)",
|
|
44
|
+
text: "#1e1b4b"
|
|
45
|
+
},
|
|
46
|
+
buttonHoverGradient: ["#6d28d9", "#a78bfa"],
|
|
47
|
+
glowColor: "rgba(124, 58, 237, 0.30)",
|
|
48
|
+
notificationIconColor: "#7c3aed",
|
|
49
|
+
textGradient: [
|
|
50
|
+
"#2e1065",
|
|
51
|
+
"#6d28d9",
|
|
52
|
+
"#cdc1ff"
|
|
53
|
+
],
|
|
54
|
+
selectionBg: "rgba(124, 58, 237, 0.30)",
|
|
55
|
+
selectionText: "#ffffff"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
fontFamily: "Inter",
|
|
59
|
+
cornerRounding: "default",
|
|
60
|
+
cornerRadii: {
|
|
61
|
+
buttonRadius: .75,
|
|
62
|
+
inputRadius: .75,
|
|
63
|
+
cardRadius: 1.5,
|
|
64
|
+
modalRadius: 2.5
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { e as t };
|