cyrus-studio 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 +97 -21
- package/dist/assets/{AuthDialog-D9kQLZ1c.js → AuthDialog-B03ebZW3.js} +1 -1
- package/dist/assets/CanvaSaveModal---DLe6sk.js +1 -0
- package/dist/assets/{CodingWorkspace-C6jZprS0.js → CodingWorkspace-Bp3Xn7dV.js} +1 -1
- package/dist/assets/{CreateAppDialog-CcsTnMUR.js → CreateAppDialog-aeo418v9.js} +2 -2
- package/dist/assets/{CreateProjectDialog-BqWwij5-.js → CreateProjectDialog-osNHeVX4.js} +1 -1
- package/dist/assets/{HistoryTimelineDialog-BEoD5f3q.js → HistoryTimelineDialog-DPbIRdCf.js} +1 -1
- package/dist/assets/{ImportModal-CPWkoEYS.js → ImportModal-69EavD-n.js} +1 -1
- package/dist/assets/{KeyboardShortcutsDialog-HNBNVkqd.js → KeyboardShortcutsDialog-CG2dNBJ-.js} +1 -1
- package/dist/assets/{LiveRuntimeWorkspace-DWfY9g1r.js → LiveRuntimeWorkspace-Bz13Ad0r.js} +1 -1
- package/dist/assets/{ShareExportDialog-DhJdhGSQ.js → ShareExportDialog-DMSzEbpj.js} +1 -1
- package/dist/assets/{UserProfileDialog-ecw1PuFr.js → UserProfileDialog-BcUs54wd.js} +1 -1
- package/dist/assets/{WelcomeOnboardingModal-1PoWSZj-.js → WelcomeOnboardingModal-CYrLzJ0Y.js} +1 -1
- package/dist/assets/index-COkFr0Rf.css +2 -0
- package/dist/assets/{index-BXzyxyPX.js → index-DvPq7fF5.js} +17 -17
- package/dist/assets/{reactTsGenerator-DQSsCAVQ.js → reactTsGenerator-a0llqmE2.js} +1 -1
- package/dist/assets/themes-Cn_1tMt7.js +1 -0
- package/dist/assets/{vendor-firebase-DHYCsgNh.js → vendor-firebase-DNMzpOGz.js} +1 -1
- package/dist/index.html +4 -4
- package/package.json +6 -1
- package/dist/assets/CanvaSaveModal-DsU_PDqd.js +0 -9
- package/dist/assets/index-Ci4Kj5Ez.css +0 -2
- package/dist/assets/themes-CrOKZlbV.js +0 -1
package/README.md
CHANGED
|
@@ -1,37 +1,113 @@
|
|
|
1
|
-
# Cyrus — Visual Product Builder
|
|
1
|
+
# Cyrus Studio — AI Visual Product Builder & Multi-Framework Code Generator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://cyrustudio.vercel.app"><img src="https://img.shields.io/badge/Live_App-cyrustudio.vercel.app-6366f1?style=for-the-badge&logo=vercel&logoColor=white" alt="Live Demo" /></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/cyrus-studio"><img src="https://img.shields.io/npm/v/cyrus-studio?style=for-the-badge&color=blue" alt="NPM Version" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/cyrus-studio"><img src="https://img.shields.io/npm/dm/cyrus-studio?style=for-the-badge&color=green" alt="NPM Downloads" /></a>
|
|
7
|
+
<a href="https://github.com/cyrus-studio/cyrus"><img src="https://img.shields.io/badge/License-MIT-amber?style=for-the-badge" alt="License" /></a>
|
|
8
|
+
</p>
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
**Cyrus Studio** is a modern visual product builder that lets designers and developers create production-ready user interfaces on a visual canvas, preview them in real time, and export clean, maintainable source code for **React / Next.js**, **Flutter**, **SwiftUI**, and **HTML / Tailwind CSS**.
|
|
13
|
+
|
|
14
|
+
🚀 **Try the Live Cloud App**: **[https://cyrustudio.vercel.app](https://cyrustudio.vercel.app)**
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## ✨ Features
|
|
19
|
+
|
|
20
|
+
- 🎨 **Visual Canvas & Drag-and-Drop Editor**: Build complex UIs with intuitive positioning, flex layouts, smart alignment guides, multi-selection, and layered hierarchy.
|
|
21
|
+
- ⚡ **Multi-Framework Code Generation**:
|
|
22
|
+
- ⚛️ **React / Next.js** (Tailwind CSS, TypeScript)
|
|
23
|
+
- 📱 **Flutter / Dart** (Widget tree with theme binding)
|
|
24
|
+
- 🍎 **SwiftUI** (Native declarative iOS/macOS views)
|
|
25
|
+
- 🌐 **Clean HTML5 / CSS** (Semantic layout with Tailwind)
|
|
26
|
+
- 🤖 **AI Design & Code Copilot**: Integrate OpenAI, Google Gemini, Anthropic Claude, or local Ollama models to generate layouts, copy, and components via natural language.
|
|
27
|
+
- 👥 **Real-Time Multiplayer Collaboration**: Multiplayer room with live cursor tracking, conflict resolution, and commenting.
|
|
28
|
+
- 📐 **Responsive Viewport Controls**: Instant switching between Desktop (1440px), Tablet (768px), and Mobile (390px) viewports with auto-scaling.
|
|
29
|
+
- 🌗 **Design Systems & Theme Engine**: Global color palettes, typography tokens, component instances, and dynamic light/dark mode preview.
|
|
30
|
+
- 📦 **One-Click Export**: Download structured ZIP bundles, export individual page source files, or save high-resolution PNG/PDF artboards.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🚀 Quick Start
|
|
35
|
+
|
|
36
|
+
### Option 1: Use the Live Web App (No Setup Required)
|
|
37
|
+
Open **[https://cyrustudio.vercel.app](https://cyrustudio.vercel.app)** in your browser and start designing immediately.
|
|
38
|
+
|
|
39
|
+
### Option 2: Run Locally via Git / NPM
|
|
6
40
|
|
|
7
41
|
```bash
|
|
42
|
+
# 1. Clone the repository
|
|
43
|
+
git clone https://github.com/cyrus-studio/cyrus.git
|
|
44
|
+
cd cyrus
|
|
45
|
+
|
|
46
|
+
# 2. Install dependencies
|
|
8
47
|
npm install
|
|
48
|
+
|
|
49
|
+
# 3. Start development server
|
|
9
50
|
npm run dev
|
|
10
51
|
```
|
|
11
52
|
|
|
12
|
-
|
|
53
|
+
Once started, open **`http://localhost:5173`** in your browser.
|
|
54
|
+
|
|
55
|
+
- **Vite Web App**: Port `5173`
|
|
56
|
+
- **Backend API Gateway**: Port `8787` (`/api` proxy)
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## ⚙️ Configuration & Environment Variables
|
|
61
|
+
|
|
62
|
+
Copy `.env.example` to `.env` to configure optional integrations:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
cp .env.example .env
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| Variable | Description |
|
|
69
|
+
| :--- | :--- |
|
|
70
|
+
| `VITE_STRIPE_PUBLISHABLE_KEY` | Stripe Publishable Key for billing checkout. |
|
|
71
|
+
| `STRIPE_SECRET_KEY` | Stripe Secret Key for serverless subscription sessions. |
|
|
72
|
+
| `GEMINI_API_KEY` | Google Gemini API key for AI generation. |
|
|
73
|
+
| `OPENAI_API_KEY` | OpenAI API key for GPT-4o design assistant. |
|
|
74
|
+
| `ANTHROPIC_API_KEY` | Anthropic Claude API key. |
|
|
75
|
+
| `JWT_SECRET` | Secret string for production session token signing. |
|
|
76
|
+
|
|
77
|
+
> **Note**: Cyrus Studio runs fully locally even without external API keys. Features requiring a specific provider will prompt for the key when used.
|
|
78
|
+
|
|
79
|
+
---
|
|
13
80
|
|
|
14
|
-
|
|
15
|
-
- API: port 8787 (`/api` is proxied)
|
|
81
|
+
## 🛠️ Development & Testing Scripts
|
|
16
82
|
|
|
17
|
-
|
|
83
|
+
```bash
|
|
84
|
+
# Start local development server (Client + Server concurrently)
|
|
85
|
+
npm run dev
|
|
86
|
+
|
|
87
|
+
# Run TypeScript type checking
|
|
88
|
+
npm run typecheck
|
|
89
|
+
|
|
90
|
+
# Run test suite with Vitest (90+ unit and integration tests)
|
|
91
|
+
npm run test
|
|
92
|
+
|
|
93
|
+
# Build production bundle
|
|
94
|
+
npm run build
|
|
95
|
+
|
|
96
|
+
# Preview production build locally
|
|
97
|
+
npm run preview
|
|
98
|
+
```
|
|
18
99
|
|
|
19
|
-
|
|
100
|
+
---
|
|
20
101
|
|
|
21
|
-
|
|
102
|
+
## 📦 Tech Stack
|
|
22
103
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| `STRIPE_SECRET_KEY` + `STRIPE_PRICE_PRO` | Real paid plans |
|
|
28
|
-
| `VERCEL_TOKEN` / `NETLIFY_AUTH_TOKEN` / `GITHUB_TOKEN` | Real deploys of exported apps |
|
|
29
|
-
| Custom domain CNAME | Point your domain at `cname.cyrus.design` then click Verify |
|
|
104
|
+
- **Frontend**: React 19, TypeScript, Tailwind CSS v4, Zustand, Lucide Icons, JSZip
|
|
105
|
+
- **Build System**: Vite, PostCSS, Oxlint
|
|
106
|
+
- **Backend & APIs**: Node.js, Vercel Serverless Functions, Firebase Auth / Cloud Firestore
|
|
107
|
+
- **Testing**: Vitest, React Testing Library
|
|
30
108
|
|
|
31
|
-
|
|
109
|
+
---
|
|
32
110
|
|
|
33
|
-
##
|
|
111
|
+
## 📄 License
|
|
34
112
|
|
|
35
|
-
|
|
36
|
-
- `npm run build` — production UI build
|
|
37
|
-
- `npm test` — Vitest
|
|
113
|
+
This project is licensed under the **[MIT License](LICENSE)**.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{an as t,cn as n,di as r,h as i,oi as a}from"./vendor-icons-M_KBtuE-.js";import{t as o}from"./vendor-react-BTEcvIpc.js";import{a as s}from"./themes-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{an as t,cn as n,di as r,h as i,oi as a}from"./vendor-icons-M_KBtuE-.js";import{t as o}from"./vendor-react-BTEcvIpc.js";import{a as s}from"./themes-Cn_1tMt7.js";import{f as c,h as l,m as u}from"./index-DvPq7fF5.js";var d=e(r(),1),f=o(),p=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/AuthDialog.tsx`;function m(){let{isAuthDialogOpen:e,closeAuthDialog:r,signIn:o,signUp:m,signInWithProvider:h}=l(),{addToast:g}=s(),[_,v]=(0,d.useState)(`signin`),[y,b]=(0,d.useState)(``),[x,S]=(0,d.useState)(``),[C,w]=(0,d.useState)(``),[T,E]=(0,d.useState)(!1),[D,O]=(0,d.useState)(null),[k,A]=(0,d.useState)(null),j=async e=>{if(e.preventDefault(),!y.trim()){A(`Please enter a valid email address.`);return}if(C.length<8){A(`Password must be at least 8 characters.`);return}E(!0),A(null);try{_===`signup`?(await m(y,x,C),g(`Account created successfully`,`success`)):(await o(y,C),g(`Signed in to Cyrus Workspace`,`success`)),b(``),S(``),w(``),r()}catch(e){let t=e instanceof Error?e.message:`Authentication failed. Please try again.`;A(t)}finally{E(!1)}},M=async e=>{O(e),A(null);try{await h(e),g(`Successfully signed in with ${e.charAt(0).toUpperCase()+e.slice(1)}`,`success`),r()}catch(t){let n=t instanceof Error?t.message:`Failed to sign in with ${e}`;A(n)}finally{O(null)}};return(0,f.jsxDEV)(c,{isOpen:e,onClose:r,title:_===`signin`?`Sign In to Cyrus`:`Create Cyrus Account`,subtitle:_===`signin`?`Enter your work email to access your cloud projects and team workspaces.`:`Create an account to save, sync, and deploy your visual products.`,maxWidth:`sm`,children:[(0,f.jsxDEV)(`div`,{className:`flex flex-col gap-3 mb-4`,children:[(0,f.jsxDEV)(`button`,{type:`button`,onClick:()=>M(`google`),disabled:D!==null||T,className:`w-full h-10 px-3 rounded-lg border border-[#e5e5ea] hover:border-[#d1d1d6] bg-white text-[#1d1d1f] font-medium text-xs flex items-center justify-center gap-2.5 transition-all shadow-sm cursor-pointer disabled:opacity-50`,children:[D===`google`?(0,f.jsxDEV)(`div`,{className:`w-3.5 h-3.5 border-2 border-slate-300 border-t-slate-700 rounded-full animate-spin`},void 0,!1,{fileName:p,lineNumber:90,columnNumber:13},this):(0,f.jsxDEV)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,children:[(0,f.jsxDEV)(`path`,{fill:`#4285F4`,d:`M23.745 12.27c0-.7-.06-1.4-.19-2.07H12v4.51h6.6c-.29 1.52-1.14 2.82-2.4 3.68v3.05h3.88c2.27-2.09 3.665-5.17 3.665-9.17z`},void 0,!1,{fileName:p,lineNumber:93,columnNumber:15},this),(0,f.jsxDEV)(`path`,{fill:`#34A853`,d:`M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.88-3.05c-1.08.72-2.45 1.16-4.05 1.16-3.12 0-5.77-2.1-6.72-4.93H1.29v3.15C3.26 21.3 7.31 24 12 24z`},void 0,!1,{fileName:p,lineNumber:94,columnNumber:15},this),(0,f.jsxDEV)(`path`,{fill:`#FBBC05`,d:`M5.28 14.27A7.17 7.17 0 0 1 4.9 12c0-.79.14-1.56.38-2.27V6.58H1.29A11.96 11.96 0 0 0 0 12c0 1.92.46 3.74 1.29 5.42l3.99-3.15z`},void 0,!1,{fileName:p,lineNumber:95,columnNumber:15},this),(0,f.jsxDEV)(`path`,{fill:`#EA4335`,d:`M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.7 1.29 6.58l3.99 3.15c.95-2.83 3.6-4.98 6.72-4.98z`},void 0,!1,{fileName:p,lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:p,lineNumber:92,columnNumber:13},this),(0,f.jsxDEV)(`span`,{children:`Continue with Google`},void 0,!1,{fileName:p,lineNumber:99,columnNumber:11},this)]},void 0,!0,{fileName:p,lineNumber:83,columnNumber:9},this),(0,f.jsxDEV)(`button`,{type:`button`,onClick:()=>M(`github`),disabled:D!==null||T,className:`w-full h-10 px-3 rounded-lg border border-[#e5e5ea] hover:border-[#d1d1d6] bg-white text-[#1d1d1f] font-medium text-xs flex items-center justify-center gap-2.5 transition-all shadow-sm cursor-pointer disabled:opacity-50`,children:[D===`github`?(0,f.jsxDEV)(`div`,{className:`w-3.5 h-3.5 border-2 border-slate-300 border-t-slate-700 rounded-full animate-spin`},void 0,!1,{fileName:p,lineNumber:110,columnNumber:13},this):(0,f.jsxDEV)(`svg`,{className:`w-4 h-4 shrink-0 fill-current`,viewBox:`0 0 24 24`,children:(0,f.jsxDEV)(`path`,{d:`M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z`},void 0,!1,{fileName:p,lineNumber:113,columnNumber:15},this)},void 0,!1,{fileName:p,lineNumber:112,columnNumber:13},this),(0,f.jsxDEV)(`span`,{children:`Continue with GitHub`},void 0,!1,{fileName:p,lineNumber:116,columnNumber:11},this)]},void 0,!0,{fileName:p,lineNumber:103,columnNumber:9},this)]},void 0,!0,{fileName:p,lineNumber:81,columnNumber:7},this),(0,f.jsxDEV)(`div`,{className:`relative flex items-center justify-center my-4`,children:[(0,f.jsxDEV)(`div`,{className:`border-t border-[#e5e5ea] w-full`},void 0,!1,{fileName:p,lineNumber:121,columnNumber:9},this),(0,f.jsxDEV)(`span`,{className:`bg-white px-2.5 text-[10px] uppercase tracking-wider text-[#86868b] font-mono absolute`,children:`Or continue with email`},void 0,!1,{fileName:p,lineNumber:122,columnNumber:9},this)]},void 0,!0,{fileName:p,lineNumber:120,columnNumber:7},this),(0,f.jsxDEV)(`form`,{onSubmit:j,className:`flex flex-col gap-4`,children:[k&&(0,f.jsxDEV)(`div`,{className:`p-3 rounded-[10px] bg-[#ff3b30]/10 border border-[#ff3b30]/20 text-[#ff3b30] text-[12px]`,children:k},void 0,!1,{fileName:p,lineNumber:129,columnNumber:11},this),_===`signup`&&(0,f.jsxDEV)(`div`,{className:`flex flex-col gap-1`,children:[(0,f.jsxDEV)(`label`,{className:`text-[12px] font-medium text-[#1d1d1f]`,children:`Your Name`},void 0,!1,{fileName:p,lineNumber:136,columnNumber:13},this),(0,f.jsxDEV)(`div`,{className:`relative flex items-center`,children:[(0,f.jsxDEV)(i,{className:`w-4 h-4 text-[#86868b] absolute left-3 pointer-events-none`},void 0,!1,{fileName:p,lineNumber:138,columnNumber:15},this),(0,f.jsxDEV)(`input`,{type:`text`,value:x,onChange:e=>S(e.target.value),placeholder:`Alex Rivera`,className:`w-full h-10 pl-9 pr-3 rounded-[8px] border border-[#e5e5ea] bg-[#f4f4f6] focus:bg-white focus:border-[#0071e3] text-[13px] text-[#1d1d1f] focus:outline-none transition-apple`},void 0,!1,{fileName:p,lineNumber:139,columnNumber:15},this)]},void 0,!0,{fileName:p,lineNumber:137,columnNumber:13},this)]},void 0,!0,{fileName:p,lineNumber:135,columnNumber:11},this),(0,f.jsxDEV)(`div`,{className:`flex flex-col gap-1`,children:[(0,f.jsxDEV)(`label`,{className:`text-[12px] font-medium text-[#1d1d1f]`,children:`Work Email`},void 0,!1,{fileName:p,lineNumber:151,columnNumber:11},this),(0,f.jsxDEV)(`div`,{className:`relative flex items-center`,children:[(0,f.jsxDEV)(t,{className:`w-4 h-4 text-[#86868b] absolute left-3 pointer-events-none`},void 0,!1,{fileName:p,lineNumber:153,columnNumber:13},this),(0,f.jsxDEV)(`input`,{type:`email`,value:y,onChange:e=>b(e.target.value),placeholder:`alex@company.com`,required:!0,className:`w-full h-10 pl-9 pr-3 rounded-[8px] border border-[#e5e5ea] bg-[#f4f4f6] focus:bg-white focus:border-[#0071e3] text-[13px] text-[#1d1d1f] focus:outline-none transition-apple`},void 0,!1,{fileName:p,lineNumber:154,columnNumber:13},this)]},void 0,!0,{fileName:p,lineNumber:152,columnNumber:11},this)]},void 0,!0,{fileName:p,lineNumber:150,columnNumber:9},this),(0,f.jsxDEV)(`div`,{className:`flex flex-col gap-1`,children:[(0,f.jsxDEV)(`label`,{className:`text-[12px] font-medium text-[#1d1d1f]`,children:`Password`},void 0,!1,{fileName:p,lineNumber:166,columnNumber:11},this),(0,f.jsxDEV)(`div`,{className:`relative flex items-center`,children:[(0,f.jsxDEV)(n,{className:`w-4 h-4 text-[#86868b] absolute left-3 pointer-events-none`},void 0,!1,{fileName:p,lineNumber:168,columnNumber:13},this),(0,f.jsxDEV)(`input`,{type:`password`,value:C,onChange:e=>w(e.target.value),placeholder:`••••••••••••`,required:!0,minLength:8,className:`w-full h-10 pl-9 pr-3 rounded-[8px] border border-[#e5e5ea] bg-[#f4f4f6] focus:bg-white focus:border-[#0071e3] text-[13px] text-[#1d1d1f] focus:outline-none transition-apple`},void 0,!1,{fileName:p,lineNumber:169,columnNumber:13},this)]},void 0,!0,{fileName:p,lineNumber:167,columnNumber:11},this)]},void 0,!0,{fileName:p,lineNumber:165,columnNumber:9},this),(0,f.jsxDEV)(u,{variant:`primary`,size:`md`,type:`submit`,isLoading:T,icon:(0,f.jsxDEV)(a,{className:`w-4 h-4`},void 0,!1,{fileName:p,lineNumber:186,columnNumber:17},this),className:`mt-2 w-full justify-center`,children:_===`signin`?`Sign In`:`Create Account`},void 0,!1,{fileName:p,lineNumber:181,columnNumber:9},this),(0,f.jsxDEV)(`div`,{className:`pt-2 border-t border-[#f4f4f6] text-center text-[12px] text-[#86868b]`,children:_===`signin`?(0,f.jsxDEV)(`span`,{children:[`Don't have an account?`,` `,(0,f.jsxDEV)(`button`,{type:`button`,onClick:()=>v(`signup`),className:`text-[#0071e3] font-semibold hover:underline cursor-pointer`,children:`Create one`},void 0,!1,{fileName:p,lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:p,lineNumber:194,columnNumber:13},this):(0,f.jsxDEV)(`span`,{children:[`Already have an account?`,` `,(0,f.jsxDEV)(`button`,{type:`button`,onClick:()=>v(`signin`),className:`text-[#0071e3] font-semibold hover:underline cursor-pointer`,children:`Sign in`},void 0,!1,{fileName:p,lineNumber:207,columnNumber:15},this)]},void 0,!0,{fileName:p,lineNumber:205,columnNumber:13},this)},void 0,!1,{fileName:p,lineNumber:192,columnNumber:9},this)]},void 0,!0,{fileName:p,lineNumber:127,columnNumber:7},this)]},void 0,!0,{fileName:p,lineNumber:70,columnNumber:5},this)}export{m as AuthDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{J as t,Rr as n,Xn as r,di as i,er as a,ht as o,lr as s,vn as c,wn as l,zr as u}from"./vendor-icons-M_KBtuE-.js";import{t as d}from"./vendor-react-BTEcvIpc.js";import{c as f}from"./vendor-utils-3OgY5Lif.js";import{a as p}from"./themes-Cn_1tMt7.js";import{f as m,i as h,l as g,n as _,r as v}from"./index-DvPq7fF5.js";import{i as y,r as b,t as x}from"./reactTsGenerator-a0llqmE2.js";var S=e(i(),1);function C(e,t,n,r,i,a){let o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}async function w(e,t={}){let n=t.scale||1,r=t.transparentBackground||!1,i=(e.settings?.width||1440)*n,a=(e.settings?.height||900)*n,o=document.createElement(`canvas`);o.width=i,o.height=a;let s=o.getContext(`2d`);if(!s)throw Error(`Canvas 2D context not available`);s.imageSmoothingEnabled=!0,s.imageSmoothingQuality=`high`,r||(s.fillStyle=e.settings?.backgroundColor||`#ffffff`,s.fillRect(0,0,i,a));let c=[...e.elements||[]].sort((e,t)=>(e.zIndex||1)-(t.zIndex||1)),l=Array.from(new Set(c.map(e=>e.type===`image`&&(e.content?.url||e.content?.src)||null).filter(Boolean))),u={};l.length>0&&(await Promise.all(l.map(e=>new Promise(t=>{let n=new Image;n.crossOrigin=`anonymous`,n.onload=()=>t({url:e,img:n}),n.onerror=()=>t({url:e,img:null}),n.src=e})))).forEach(e=>{e.img&&(u[e.url]=e.img)});for(let e of c){s.save();let t=e.x*n,r=e.y*n,i=e.width*n,a=e.height*n,o=e.styles?.backgroundColor||`transparent`,c=e.styles?.borderColor||`transparent`,l=(e.styles?.borderWidth||0)*n,d=(e.styles?.borderRadius||0)*n,f=e.styles?.textColor||`#1d1d1f`,p=(e.styles?.fontSize||14)*n,m=e.styles?.fontWeight||`normal`;if(e.rotation&&(s.translate(t+i/2,r+a/2),s.rotate(e.rotation*Math.PI/180),s.translate(-(t+i/2),-(r+a/2))),e.content?.pathD||e.type===`svg`){let i=e.styles?.strokeColor||e.styles?.textColor||`#ff3b30`;if((e.styles?.strokeWidth||3.5)*n,e.content?.pathD)try{let a=new Path2D(e.content.pathD);s.save(),s.translate(t,r),s.scale(n,n),s.strokeStyle=i,s.lineWidth=e.styles?.strokeWidth||3.5,s.lineCap=`round`,s.lineJoin=`round`,s.stroke(a),s.restore()}catch{}s.restore();continue}if((o!==`transparent`||l>0)&&(d>0?C(s,t,r,i,a,d):(s.beginPath(),s.rect(t,r,i,a)),o!==`transparent`&&(s.fillStyle=o,s.fill()),l>0&&c!==`transparent`&&(s.strokeStyle=c,s.lineWidth=l,s.stroke())),e.type===`image`){let n=e.content?.url||e.content?.src;n&&u[n]&&(d>0?(s.save(),C(s,t,r,i,a,d),s.clip(),s.drawImage(u[n],t,r,i,a),s.restore()):s.drawImage(u[n],t,r,i,a))}let h=e.content?.text||e.content?.label||e.content?.title||e.content?.headline||``;if(h){s.fillStyle=f,s.font=`${m} ${p}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,s.textBaseline=`middle`;let o=e.styles?.textAlign||`left`;o===`center`?(s.textAlign=`center`,s.fillText(h,t+i/2,r+a/2)):o===`right`?(s.textAlign=`right`,s.fillText(h,t+i-12*n,r+a/2)):(s.textAlign=`left`,s.fillText(h,t+12*n,r+a/2))}e.content?.badge&&(s.font=`600 ${11*n}px -apple-system, sans-serif`,s.fillStyle=`#0071e3`,s.textAlign=`left`,s.fillText(String(e.content.badge),t+16*n,r+24*n)),e.content?.value&&(s.font=`bold ${28*n}px -apple-system, sans-serif`,s.fillStyle=f,s.textAlign=`left`,s.fillText(String(e.content.value),t+16*n,r+60*n)),e.content?.change&&(s.font=`600 ${12*n}px -apple-system, sans-serif`,s.fillStyle=`#34c759`,s.textAlign=`left`,s.fillText(String(e.content.change),t+16*n,r+90*n)),s.restore()}return o}async function T(e,t,n,r=.95){return new Promise((i,a)=>{e.toBlob(e=>{if(!e){a(Error(`Failed to create image blob`));return}let r=URL.createObjectURL(e),o=document.createElement(`a`);o.href=r,o.download=`${t}.${n===`jpeg`?`jpg`:`png`}`,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(r),1e3),i()},n===`jpeg`?`image/jpeg`:`image/png`,r)})}var E=d(),D=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/CanvaSaveModal.tsx`,O=[{id:`png`,name:`PNG`,badge:`Suggested`,description:`High quality image. Best for complex designs & graphics`,icon:(0,E.jsxDEV)(l,{className:`w-4 h-4 text-[#7d2ae8]`},void 0,!1,{fileName:D,lineNumber:48,columnNumber:11},void 0)},{id:`jpeg`,name:`JPG`,description:`Small file size image. Best for quick sharing & web`,icon:(0,E.jsxDEV)(l,{className:`w-4 h-4 text-emerald-600`},void 0,!1,{fileName:D,lineNumber:54,columnNumber:11},void 0)},{id:`pdf`,name:`PDF Standard`,description:`Best for multi-page documents and emailing`,icon:(0,E.jsxDEV)(r,{className:`w-4 h-4 text-[#ff2d55]`},void 0,!1,{fileName:D,lineNumber:60,columnNumber:11},void 0)},{id:`svg`,name:`SVG`,description:`Sharp vector graphics at any screen resolution`,icon:(0,E.jsxDEV)(t,{className:`w-4 h-4 text-amber-500`},void 0,!1,{fileName:D,lineNumber:66,columnNumber:11},void 0)},{id:`cyrus`,name:`Cyrus Project (.cyrus)`,description:`Raw editable project backup for laptop & phone`,icon:(0,E.jsxDEV)(c,{className:`w-4 h-4 text-[#0071e3]`},void 0,!1,{fileName:D,lineNumber:72,columnNumber:11},void 0)},{id:`html`,name:`Standalone Web App (.html)`,description:`Self-contained offline webpage prototype`,icon:(0,E.jsxDEV)(a,{className:`w-4 h-4 text-indigo-500`},void 0,!1,{fileName:D,lineNumber:78,columnNumber:11},void 0)},{id:`zip`,name:`React App Code (.zip)`,description:`Production React 19 + TypeScript + Tailwind bundle`,icon:(0,E.jsxDEV)(a,{className:`w-4 h-4 text-[#7d2ae8]`},void 0,!1,{fileName:D,lineNumber:84,columnNumber:11},void 0)}];function k({isOpen:e,onClose:t}){let{activeProject:r,activePageId:i}=g(),{addToast:a}=p(),[c,l]=(0,S.useState)(`png`),[d,C]=(0,S.useState)(1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)([]),[F,I]=(0,S.useState)(!1),[L,R]=(0,S.useState)(!1),[z,B]=(0,S.useState)(0),[V,H]=(0,S.useState)(`Preparing...`),[U,W]=(0,S.useState)(!1),[G,K]=(0,S.useState)(``);if((0,S.useEffect)(()=>{r&&P(r.pages.map(e=>e.id)),W(!1),B(0)},[e,r]),!r)return null;let q=r.pages.find(e=>e.id===i)||r.pages[0],J=q?.settings?.width||1440,Y=q?.settings?.height||900,X=Math.round(J*d),Z=Math.round(Y*d),Q=O.find(e=>e.id===c)||O[0],$=async()=>{R(!0),B(15),H(`Preparing your design...`);try{let e=r.name.toLowerCase().replace(/[^a-z0-9_-]/gi,`_`),t=r.pages.filter(e=>N.includes(e.id));if(t.length===0&&t.push(q),c===`png`||c===`jpeg`){let n=j?.75:.95;for(let r=0;r<t.length;r++){let i=t[r];B(40+Math.round(r/t.length*35)),H(`Rendering high-res canvas (${r+1}/${t.length})...`);let a=await w(i,{scale:d,transparentBackground:c===`png`&&k});H(`Creating image file (${r+1}/${t.length})...`);let o=t.length>1?`_${r+1}`:``;await T(a,`${e}_${i.name.toLowerCase().replace(/[^a-z0-9_-]/gi,`_`)}${o}`,c,n)}K(`${e}.${c===`jpeg`?`jpg`:`png`} (x${t.length})`)}else if(c===`svg`){B(60),H(`Exporting vector paths...`);for(let e=0;e<t.length;e++)await v(r,t[e]);K(`${e}.svg (x${t.length})`)}else if(c===`cyrus`){B(60),H(`Saving Cyrus project...`);let e=await h(r);K(e.filename)}else if(c===`html`){B(60),H(`Generating offline webpage...`);let e=await _(r,q.id);K(e.filename)}else if(c===`pdf`){B(50),H(`Generating print document...`);let n=[];for(let e=0;e<t.length;e++){B(50+Math.round(e/t.length*35));let r=await w(t[e],{scale:2});n.push(r.toDataURL(`image/png`))}let i=window.open(``,`_blank`);if(!i)a(`Browser blocked the print window. Please allow popups for this site.`,`error`);else{let e=r.name.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),t=n.map(e=>`<img src="${e}" style="max-width:100%;height:auto;page-break-after:always;display:block;margin:0 auto;" />`).join(``);i.document.title=`${e} - PDF`;let a=i.document.body;a.style.cssText=`margin:0;background:#fff;`,a.innerHTML=t;let o=i.document.createElement(`script`);o.textContent=`window.onload = function() { setTimeout(function() { window.print(); }, 500); };`,i.document.head.appendChild(o)}K(`${e}.pdf`)}else if(c===`zip`){B(50),H(`Generating React source code...`);let t=b(r,`react`),n=x(t);B(85),H(`Zipping package...`),await y(r.name,n,`react`),K(`${e}_react_app.zip`)}B(100),H(`Download completed!`),W(!0),a(`Downloaded "${r.name}" to your device!`,`success`)}catch(e){console.error(`Download error:`,e),a(`Download failed. Please try again.`,`error`)}finally{R(!1)}};return(0,E.jsxDEV)(m,{isOpen:e,onClose:t,title:``,maxWidth:`md`,className:`p-0 overflow-hidden`,children:(0,E.jsxDEV)(`div`,{className:`flex flex-col bg-white dark:bg-[#1c1c1e] text-[#1d1d1f] dark:text-[#f5f5f7] select-none`,children:[(0,E.jsxDEV)(`div`,{className:`px-6 py-4 border-b border-[#e5e5ea] dark:border-[#2c2c2e] flex items-center justify-between`,children:(0,E.jsxDEV)(`div`,{className:`flex items-center gap-2.5`,children:[(0,E.jsxDEV)(`div`,{className:`w-8 h-8 rounded-lg bg-gradient-to-tr from-[#7d2ae8] to-[#0071e3] text-white flex items-center justify-center shadow-2xs`,children:(0,E.jsxDEV)(s,{className:`w-4 h-4`},void 0,!1,{fileName:D,lineNumber:239,columnNumber:15},this)},void 0,!1,{fileName:D,lineNumber:238,columnNumber:13},this),(0,E.jsxDEV)(`div`,{children:[(0,E.jsxDEV)(`h3`,{className:`text-[16px] font-bold tracking-tight`,children:`Download`},void 0,!1,{fileName:D,lineNumber:242,columnNumber:15},this),(0,E.jsxDEV)(`p`,{className:`text-[11.5px] text-[#86868b] dark:text-[#8e8e93]`,children:`Save high quality files directly to your laptop or phone`},void 0,!1,{fileName:D,lineNumber:243,columnNumber:15},this)]},void 0,!0,{fileName:D,lineNumber:241,columnNumber:13},this)]},void 0,!0,{fileName:D,lineNumber:237,columnNumber:11},this)},void 0,!1,{fileName:D,lineNumber:236,columnNumber:9},this),U?(0,E.jsxDEV)(`div`,{className:`p-8 flex flex-col items-center text-center gap-4 animate-fade-in`,children:[(0,E.jsxDEV)(`div`,{className:`w-16 h-16 rounded-2xl bg-gradient-to-tr from-[#7d2ae8] to-[#0071e3] text-white flex items-center justify-center shadow-apple-md text-[28px]`,children:`🎉`},void 0,!1,{fileName:D,lineNumber:446,columnNumber:13},this),(0,E.jsxDEV)(`div`,{children:[(0,E.jsxDEV)(`h3`,{className:`text-[18px] font-extrabold text-[#1d1d1f] dark:text-[#f5f5f7]`,children:`You downloaded your design!`},void 0,!1,{fileName:D,lineNumber:451,columnNumber:15},this),(0,E.jsxDEV)(`p`,{className:`text-[12.5px] text-[#6e6e73] dark:text-[#8e8e93] mt-1 max-w-sm`,children:[(0,E.jsxDEV)(`strong`,{children:G},void 0,!1,{fileName:D,lineNumber:455,columnNumber:17},this),` has been saved directly to your laptop or phone Downloads folder.`]},void 0,!0,{fileName:D,lineNumber:454,columnNumber:15},this)]},void 0,!0,{fileName:D,lineNumber:450,columnNumber:13},this),(0,E.jsxDEV)(`div`,{className:`flex flex-col sm:flex-row gap-2.5 w-full max-w-xs pt-3`,children:[(0,E.jsxDEV)(`button`,{type:`button`,onClick:$,className:`flex-1 py-2.5 px-3 rounded-xl bg-[#f4f4f6] dark:bg-[#2c2c2e] hover:bg-[#ebebee] dark:hover:bg-[#3a3a3c] text-[#1d1d1f] dark:text-[#f5f5f7] text-[12.5px] font-semibold flex items-center justify-center gap-1.5 transition-colors cursor-pointer border border-[#e5e5ea] dark:border-[#38383a]`,children:[(0,E.jsxDEV)(o,{className:`w-3.5 h-3.5`},void 0,!1,{fileName:D,lineNumber:465,columnNumber:17},this),(0,E.jsxDEV)(`span`,{children:`Download again`},void 0,!1,{fileName:D,lineNumber:466,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:460,columnNumber:15},this),(0,E.jsxDEV)(`button`,{type:`button`,onClick:t,className:`flex-1 py-2.5 px-3 rounded-xl bg-[#7d2ae8] hover:bg-[#6b21ce] text-white text-[12.5px] font-bold flex items-center justify-center gap-1.5 shadow-2xs transition-colors cursor-pointer`,children:(0,E.jsxDEV)(`span`,{children:`Continue Editing`},void 0,!1,{fileName:D,lineNumber:474,columnNumber:17},this)},void 0,!1,{fileName:D,lineNumber:469,columnNumber:15},this)]},void 0,!0,{fileName:D,lineNumber:459,columnNumber:13},this)]},void 0,!0,{fileName:D,lineNumber:445,columnNumber:11},this):(0,E.jsxDEV)(`div`,{className:`p-6 flex flex-col gap-5`,children:[(0,E.jsxDEV)(`div`,{className:`flex flex-col gap-1.5 relative`,children:[(0,E.jsxDEV)(`label`,{className:`text-[12px] font-semibold text-[#1d1d1f] dark:text-[#f5f5f7]`,children:`File type`},void 0,!1,{fileName:D,lineNumber:255,columnNumber:15},this),(0,E.jsxDEV)(`button`,{type:`button`,onClick:()=>I(!F),className:`w-full p-3 rounded-xl border border-[#e5e5ea] dark:border-[#38383a] bg-[#fbfbfd] dark:bg-[#2c2c2e] hover:border-[#7d2ae8] transition-all flex items-center justify-between cursor-pointer shadow-2xs`,children:[(0,E.jsxDEV)(`div`,{className:`flex items-center gap-3 text-left`,children:[(0,E.jsxDEV)(`div`,{className:`w-8 h-8 rounded-lg bg-white dark:bg-[#1c1c1e] border border-[#e5e5ea] dark:border-[#38383a] flex items-center justify-center shadow-2xs shrink-0`,children:Q.icon},void 0,!1,{fileName:D,lineNumber:265,columnNumber:19},this),(0,E.jsxDEV)(`div`,{children:[(0,E.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxDEV)(`span`,{className:`text-[13px] font-bold text-[#1d1d1f] dark:text-[#f5f5f7]`,children:Q.name},void 0,!1,{fileName:D,lineNumber:270,columnNumber:23},this),Q.badge&&(0,E.jsxDEV)(`span`,{className:`px-1.5 py-0.5 rounded-full bg-[#7d2ae8]/10 text-[#7d2ae8] dark:text-[#9d52ff] text-[10px] font-bold`,children:Q.badge},void 0,!1,{fileName:D,lineNumber:274,columnNumber:25},this)]},void 0,!0,{fileName:D,lineNumber:269,columnNumber:21},this),(0,E.jsxDEV)(`p`,{className:`text-[11px] text-[#86868b] dark:text-[#8e8e93]`,children:Q.description},void 0,!1,{fileName:D,lineNumber:279,columnNumber:21},this)]},void 0,!0,{fileName:D,lineNumber:268,columnNumber:19},this)]},void 0,!0,{fileName:D,lineNumber:264,columnNumber:17},this),(0,E.jsxDEV)(n,{className:f(`w-4 h-4 text-[#86868b] transition-transform shrink-0`,F&&`rotate-180`)},void 0,!1,{fileName:D,lineNumber:285,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:259,columnNumber:15},this),F&&(0,E.jsxDEV)(`div`,{className:`absolute top-full left-0 right-0 mt-1 bg-white dark:bg-[#2c2c2e] rounded-xl border border-[#e5e5ea] dark:border-[#38383a] shadow-apple-lg p-1.5 z-50 flex flex-col gap-1 max-h-72 overflow-y-auto`,children:O.map(e=>(0,E.jsxDEV)(`button`,{type:`button`,onClick:()=>{l(e.id),I(!1)},className:f(`w-full p-2.5 rounded-lg flex items-center justify-between text-left transition-colors cursor-pointer`,c===e.id?`bg-[#7d2ae8]/10 dark:bg-[#7d2ae8]/20 text-[#7d2ae8] dark:text-[#9d52ff]`:`hover:bg-[#f4f4f6] dark:hover:bg-[#38383a] text-[#1d1d1f] dark:text-[#f5f5f7]`),children:[(0,E.jsxDEV)(`div`,{className:`flex items-center gap-2.5`,children:[(0,E.jsxDEV)(`div`,{className:`w-7 h-7 rounded-md bg-white dark:bg-[#1c1c1e] border border-[#e5e5ea] dark:border-[#38383a] flex items-center justify-center shrink-0`,children:e.icon},void 0,!1,{fileName:D,lineNumber:312,columnNumber:25},this),(0,E.jsxDEV)(`div`,{children:[(0,E.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxDEV)(`span`,{className:`text-[12.5px] font-bold`,children:e.name},void 0,!1,{fileName:D,lineNumber:317,columnNumber:29},this),e.badge&&(0,E.jsxDEV)(`span`,{className:`px-1.5 py-0.5 rounded-full bg-[#7d2ae8] text-white text-[9px] font-bold`,children:e.badge},void 0,!1,{fileName:D,lineNumber:319,columnNumber:31},this)]},void 0,!0,{fileName:D,lineNumber:316,columnNumber:27},this),(0,E.jsxDEV)(`p`,{className:`text-[10.5px] text-[#86868b] dark:text-[#8e8e93]`,children:e.description},void 0,!1,{fileName:D,lineNumber:324,columnNumber:27},this)]},void 0,!0,{fileName:D,lineNumber:315,columnNumber:25},this)]},void 0,!0,{fileName:D,lineNumber:311,columnNumber:23},this),c===e.id&&(0,E.jsxDEV)(u,{className:`w-4 h-4 text-[#7d2ae8]`},void 0,!1,{fileName:D,lineNumber:330,columnNumber:53},this)]},e.id,!0,{fileName:D,lineNumber:297,columnNumber:21},this))},void 0,!1,{fileName:D,lineNumber:295,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:254,columnNumber:13},this),(c===`png`||c===`jpeg`)&&(0,E.jsxDEV)(`div`,{className:`flex flex-col gap-2 p-3.5 rounded-xl bg-[#fbfbfd] dark:bg-[#2c2c2e] border border-[#e5e5ea] dark:border-[#38383a]`,children:[(0,E.jsxDEV)(`div`,{className:`flex items-center justify-between`,children:[(0,E.jsxDEV)(`span`,{className:`text-[12px] font-semibold text-[#1d1d1f] dark:text-[#f5f5f7]`,children:[`Size (`,d,`x)`]},void 0,!0,{fileName:D,lineNumber:341,columnNumber:19},this),(0,E.jsxDEV)(`span`,{className:`text-[11.5px] font-mono text-[#7d2ae8] dark:text-[#9d52ff] font-semibold`,children:[X,` × `,Z,` px`]},void 0,!0,{fileName:D,lineNumber:344,columnNumber:19},this)]},void 0,!0,{fileName:D,lineNumber:340,columnNumber:17},this),(0,E.jsxDEV)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsxDEV)(`input`,{type:`range`,min:.5,max:3,step:.5,value:d,onChange:e=>C(Number(e.target.value)),className:`flex-1 accent-[#7d2ae8] cursor-pointer`},void 0,!1,{fileName:D,lineNumber:350,columnNumber:19},this),(0,E.jsxDEV)(`div`,{className:`flex gap-1`,children:[1,2,3].map(e=>(0,E.jsxDEV)(`button`,{type:`button`,onClick:()=>C(e),className:f(`px-2 py-0.5 rounded text-[11px] font-bold transition-colors cursor-pointer`,d===e?`bg-[#7d2ae8] text-white`:`bg-white dark:bg-[#1c1c1e] text-[#6e6e73] hover:text-[#1d1d1f]`),children:[e,`x`]},e,!0,{fileName:D,lineNumber:361,columnNumber:23},this))},void 0,!1,{fileName:D,lineNumber:359,columnNumber:19},this)]},void 0,!0,{fileName:D,lineNumber:349,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:339,columnNumber:15},this),c===`png`&&(0,E.jsxDEV)(`label`,{className:`flex items-center gap-2.5 text-[12.5px] font-medium text-[#1d1d1f] dark:text-[#f5f5f7] cursor-pointer`,children:[(0,E.jsxDEV)(`input`,{type:`checkbox`,checked:k,onChange:e=>A(e.target.checked),className:`w-4 h-4 rounded accent-[#7d2ae8] cursor-pointer`},void 0,!1,{fileName:D,lineNumber:383,columnNumber:17},this),(0,E.jsxDEV)(`span`,{children:`Transparent background`},void 0,!1,{fileName:D,lineNumber:389,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:382,columnNumber:15},this),(c===`png`||c===`jpeg`)&&(0,E.jsxDEV)(`label`,{className:`flex items-center gap-2.5 text-[12.5px] font-medium text-[#1d1d1f] dark:text-[#f5f5f7] cursor-pointer`,children:[(0,E.jsxDEV)(`input`,{type:`checkbox`,checked:j,onChange:e=>M(e.target.checked),className:`w-4 h-4 rounded accent-[#7d2ae8] cursor-pointer`},void 0,!1,{fileName:D,lineNumber:395,columnNumber:17},this),(0,E.jsxDEV)(`span`,{children:`Compress file (lower quality, smaller size)`},void 0,!1,{fileName:D,lineNumber:401,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:394,columnNumber:15},this),(0,E.jsxDEV)(`div`,{className:`flex items-center justify-between py-2 border-t border-[#e5e5ea] dark:border-[#38383a]`,children:[(0,E.jsxDEV)(`span`,{className:`text-[12px] font-medium text-[#6e6e73] dark:text-[#8e8e93]`,children:`Selected Page`},void 0,!1,{fileName:D,lineNumber:407,columnNumber:15},this),(0,E.jsxDEV)(`span`,{className:`text-[12px] font-bold text-[#1d1d1f] dark:text-[#f5f5f7]`,children:[q.name,` (1 of `,r.pages.length,`)`]},void 0,!0,{fileName:D,lineNumber:410,columnNumber:15},this)]},void 0,!0,{fileName:D,lineNumber:406,columnNumber:13},this),(0,E.jsxDEV)(`div`,{className:`pt-2`,children:(0,E.jsxDEV)(`button`,{type:`button`,onClick:$,disabled:L,className:f(`w-full py-3.5 px-4 rounded-xl text-white font-bold text-[14px] flex items-center justify-center gap-2 shadow-apple-md transition-all active:scale-[0.98] cursor-pointer relative overflow-hidden`,L?`bg-[#6b21ce]`:`bg-gradient-to-r from-[#7d2ae8] via-[#8e3ee8] to-[#0071e3] hover:opacity-95`),children:[L&&(0,E.jsxDEV)(`div`,{className:`absolute left-0 top-0 bottom-0 bg-white/25 transition-all duration-300 ease-out`,style:{width:`${z}%`}},void 0,!1,{fileName:D,lineNumber:430,columnNumber:19},this),(0,E.jsxDEV)(`div`,{className:`relative z-10 flex items-center gap-2`,children:[(0,E.jsxDEV)(s,{className:f(`w-4 h-4`,L&&`animate-bounce`)},void 0,!1,{fileName:D,lineNumber:437,columnNumber:19},this),(0,E.jsxDEV)(`span`,{children:L?`${V} (${z}%)`:`Download`},void 0,!1,{fileName:D,lineNumber:438,columnNumber:19},this)]},void 0,!0,{fileName:D,lineNumber:436,columnNumber:17},this)]},void 0,!0,{fileName:D,lineNumber:417,columnNumber:15},this)},void 0,!1,{fileName:D,lineNumber:416,columnNumber:13},this)]},void 0,!0,{fileName:D,lineNumber:252,columnNumber:11},this)]},void 0,!0,{fileName:D,lineNumber:234,columnNumber:7},this)},void 0,!1,{fileName:D,lineNumber:227,columnNumber:5},this)}export{k as CanvaSaveModal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,J as n,L as r,Nr as i,Rn as a,Rr as o,Rt as s,Un as c,Yr as l,br as u,di as d,er as f,i as p,ir as ee,l as te,lr as m,r as ne,st as re,yt as ie,zr as h}from"./vendor-icons-M_KBtuE-.js";import{t as g}from"./vendor-react-BTEcvIpc.js";import{c as _,r as v}from"./vendor-utils-3OgY5Lif.js";import{_ as y,a as ae}from"./themes-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,J as n,L as r,Nr as i,Rn as a,Rr as o,Rt as s,Un as c,Yr as l,br as u,di as d,er as f,i as p,ir as ee,l as te,lr as m,r as ne,st as re,yt as ie,zr as h}from"./vendor-icons-M_KBtuE-.js";import{t as g}from"./vendor-react-BTEcvIpc.js";import{c as _,r as v}from"./vendor-utils-3OgY5Lif.js";import{_ as y,a as ae}from"./themes-Cn_1tMt7.js";import{c as oe,l as se,m as b}from"./index-DvPq7fF5.js";import{i as ce,r as x,t as S}from"./reactTsGenerator-a0llqmE2.js";import{t as C}from"./typechecker-BbGTunMD.js";var w=e(d(),1);function T(e){let t=e.replace(/\0/g,``).replace(/\\/g,`/`);return t=t.replace(/^\/+/,``),t.split(`/`).filter(e=>e&&e!==`.`&&e!==`..`).join(`/`)}function E(e,t,n){let r=t.split(`
|
|
2
2
|
`),i=n.split(`
|
|
3
3
|
`),a=0,o=0,s=[],c=0,l=0;for(;c<r.length||l<i.length;)c<r.length&&l<i.length&&r[c]===i[l]?(s.push({type:`same`,text:r[c],oldLineNumber:c+1,newLineNumber:l+1}),c++,l++):l<i.length&&(c>=r.length||!r.includes(i[l]))?(s.push({type:`add`,text:i[l],newLineNumber:l+1}),a++,l++):c<r.length&&(s.push({type:`del`,text:r[c],oldLineNumber:c+1}),o++,c++);return{path:T(e),originalContent:t,newContent:n,addedLines:a,removedLines:o,hunks:s}}function D(e,t){return{id:y(`chk`),description:e,timestamp:new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),files:JSON.parse(JSON.stringify(t))}}var le=v((e,t)=>({files:{},activeFilePath:`src/App.tsx`,openTabs:[],isDiffView:!1,messages:[{id:`init_msg`,role:`assistant`,content:`I am the Cyrus AI Coding Agent. I can modify components, add features, refactor layouts, fix TypeScript errors, and synchronize code with your visual design.`,timestamp:new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}],isAgentThinking:!1,checkpoints:[],pendingDiffs:null,pendingFiles:null,terminalLogs:[{id:`log_1`,type:`info`,text:`Vite v5.4.0 dev server initialized in memory.`,timestamp:new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})},{id:`log_2`,type:`success`,text:`TypeScript static analysis engine active. Zero errors detected.`,timestamp:new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}],validationReport:{typecheck:!0,build:!0,errors:[],warnings:[]},initProjectFiles:t=>{let n=x(t,`react`),r=S(n),i={};for(let e of r)i[e.path]=e.content;e({files:i,checkpoints:[D(`Initial Code Generation`,i)],activeFilePath:i[`src/App.tsx`]?`src/App.tsx`:Object.keys(i)[0]||``,openTabs:[`src/App.tsx`,`src/components/Navbar.tsx`,`src/styles/globals.css`].filter(e=>i[e])})},setActiveFile:n=>{let{openTabs:r}=t();r.includes(n)?e({activeFilePath:n,isDiffView:!1}):e({openTabs:[...r,n],activeFilePath:n,isDiffView:!1})},openTab:n=>{let{openTabs:r}=t();r.includes(n)?e({activeFilePath:n}):e({openTabs:[...r,n],activeFilePath:n})},closeTab:n=>{let{openTabs:r,activeFilePath:i}=t(),a=r.filter(e=>e!==n);e({openTabs:a,activeFilePath:i===n?a[0]||``:i})},setIsDiffView:t=>e({isDiffView:t}),updateFileContent:(n,r)=>{let{files:i}=t();e({files:{...i,[n]:r}}),t().runValidation()},setPendingChanges:(t,n)=>{e({pendingDiffs:t,pendingFiles:n,isDiffView:!0})},applyPendingChanges:()=>{let{pendingFiles:n,files:r,messages:i}=t();if(!n)return;let a=D(`Applied AI Coding Agent Modifications`,n),o=i.map(e=>e.isPendingApproval?{...e,isPendingApproval:!1,applied:!0}:e);e({files:n,pendingFiles:null,pendingDiffs:null,isDiffView:!1,checkpoints:[a,...t().checkpoints],messages:o}),t().addTerminalLog(`Applied AI changes to project files.`,`success`),t().runValidation()},rejectPendingChanges:()=>{let{messages:n}=t();e({pendingFiles:null,pendingDiffs:null,isDiffView:!1,messages:n.map(e=>e.isPendingApproval?{...e,isPendingApproval:!1,applied:!1}:e)}),t().addTerminalLog(`Rejected AI modification proposal.`,`info`)},restoreCheckpoint:n=>{let{checkpoints:r}=t(),i=r.find(e=>e.id===n);i&&(e({files:JSON.parse(JSON.stringify(i.files)),pendingFiles:null,pendingDiffs:null,isDiffView:!1}),t().addTerminalLog(`Restored project checkpoint: "${i.description}"`,`success`),t().runValidation())},addMessage:t=>{e(e=>({messages:[...e.messages,t]}))},setIsAgentThinking:t=>e({isAgentThinking:t}),addTerminalLog:(t,n=`info`)=>{let r={id:y(`log`),type:n,text:t,timestamp:new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})};e(e=>({terminalLogs:[...e.terminalLogs,r]}))},runValidation:()=>{let{files:n}=t(),r=C(n);return e({validationReport:r}),r}}));async function ue(e,t,n){let r=e.toLowerCase().trim(),i={...t.files},a=[],o=[],s=[];await new Promise(e=>setTimeout(e,400));let c=`Modified application codebase according to prompt.`;if(r.includes(`sidebar`)||r.includes(`collapsible`)||r.includes(`menu`)){let e=`src/components/Navbar.tsx`;if(i[e]){let t=i[e];a.push({id:y(`call`),name:`editFile`,args:{path:e,description:`Add mobile drawer collapse toggle state and animation`}}),i[e]=t.replace(`const [mobileMenuOpen, setMobileMenuOpen] = useState(false);`,`const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
4
4
|
const [isCollapsed, setIsCollapsed] = useState(false);`),s.push(e),o.push({callId:a[a.length-1].id,toolName:`editFile`,success:!0,output:`Updated ${e} with stateful collapsible navigation drawer.`}),c=`Updated Navbar component with interactive collapsible navigation drawer.`}}else if(r.includes(`color`)||r.includes(`theme`)||r.includes(`emerald`)||r.includes(`indigo`)){let e=`src/styles/globals.css`;if(i[e]){let t=i[e],n=r.includes(`emerald`)?`#10b981`:r.includes(`indigo`)?`#6366f1`:`#0071e3`;a.push({id:y(`call`),name:`editFile`,args:{path:e,description:`Update --color-primary CSS token to ${n}`}}),i[e]=t.replace(/--color-primary:\s*[^;]+;/,`--color-primary: ${n};`),s.push(e),o.push({callId:a[a.length-1].id,toolName:`editFile`,success:!0,output:`Updated design token --color-primary to ${n} in ${e}.`}),c=`Updated primary brand color token to ${n} across application styles.`}}else if(r.includes(`fix`)||r.includes(`error`)||r.includes(`typescript`)){a.push({id:y(`call`),name:`runTypecheck`,args:{}});let e=C(i);o.push({callId:a[a.length-1].id,toolName:`runTypecheck`,success:e.typecheck,output:e.errors.length>0?`Found ${e.errors.length} diagnostic error(s).`:`0 errors detected.`});for(let[e,t]of Object.entries(i))t.includes(`import `)&&!t.includes(`import React`)&&(i[e]=`import React from 'react';\n${t}`,s.push(e));c=`Analyzed AST diagnostics and verified zero TypeScript syntax errors.`}else if(r.includes(`pricing`)||r.includes(`card`)){let e=`src/components/PricingCard.tsx`;if(i[e]){let t=i[e];a.push({id:y(`call`),name:`editFile`,args:{path:e,description:`Refine pricing card elevation and add badge`}}),i[e]=t.replace(`padding: '1.75rem',`,`padding: '1.75rem',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,J as n,Kn as r,Ln as i,Nr as a,Pn as o,X as s,_t as c,di as l,dr as u,er as d,hr as ee,i as f,l as te,lr as p,oi as m,ot as h,rt as g,si as _,un as v,zr as y}from"./vendor-icons-M_KBtuE-.js";import{t as b}from"./vendor-react-BTEcvIpc.js";import{c as x}from"./vendor-utils-3OgY5Lif.js";import{a as ne}from"./themes-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,J as n,Kn as r,Ln as i,Nr as a,Pn as o,X as s,_t as c,di as l,dr as u,er as d,hr as ee,i as f,l as te,lr as p,oi as m,ot as h,rt as g,si as _,un as v,zr as y}from"./vendor-icons-M_KBtuE-.js";import{t as b}from"./vendor-react-BTEcvIpc.js";import{c as x}from"./vendor-utils-3OgY5Lif.js";import{a as ne}from"./themes-Cn_1tMt7.js";import{l as S,m as C,v as re,y as ie}from"./index-DvPq7fF5.js";import{i as ae,n as w,r as T,t as E}from"./reactTsGenerator-a0llqmE2.js";import{t as D}from"./typechecker-BbGTunMD.js";var O=e(l(),1);function k(e){let t=[],n=[];if(!e.pages||e.pages.length===0)return t.push(`Project has no pages to generate.`),{isValid:!1,errors:t,warnings:n};let r=new Set(e.pages.map(e=>e.id)),i=new Map;for(let t of e.pages){let e=(i.get(t.slug)||0)+1;i.set(t.slug,e),e>1&&n.push(`Duplicate route slug detected: "/${t.slug}".`),t.elements.length===0&&n.push(`Page "${t.name}" contains 0 elements.`);for(let e of t.elements)if(e.interactions)for(let t of e.interactions)t.action===`navigate`&&t.target&&(r.has(t.target)||n.push(`Element "${e.name}" has navigation target pointing to missing page ID "${t.target}".`))}return{isValid:t.length===0,errors:t,warnings:n}}function A(e){let t=[];t.push({path:`package.json`,language:`json`,content:JSON.stringify({name:e.name.toLowerCase().replace(/\s+/g,`-`),version:`0.1.0`,private:!0,scripts:{dev:`next dev`,build:`next build`,start:`next start`,lint:`next lint`},dependencies:{next:`^14.2.5`,react:`^18.3.1`,"react-dom":`^18.3.1`,"lucide-react":`^1.16.0`,clsx:`^2.1.1`},devDependencies:{"@types/node":`^20.14.10`,"@types/react":`^18.3.3`,"@types/react-dom":`^18.3.0`,typescript:`^5.5.3`,tailwindcss:`^3.4.4`,postcss:`^8.4.39`,autoprefixer:`^10.4.19`}},null,2)});let n=e.designTokens;t.push({path:`styles/globals.css`,language:`css`,content:`@tailwind base;
|
|
2
2
|
@tailwind components;
|
|
3
3
|
@tailwind utilities;
|
|
4
4
|
|
|
@@ -934,7 +934,7 @@ npx expo start
|
|
|
934
934
|
|
|
935
935
|
## Safe Area & Insets
|
|
936
936
|
All screens automatically calculate device notch / Dynamic Island and home bar insets using \`useSafeAreaInsets()\`.
|
|
937
|
-
`});let u=w(e);return t.push({path:`ACCESSIBILITY_REPORT.md`,language:`markdown`,content:u.accessibilityReport}),t.push({path:`SEO_AUDIT.md`,language:`markdown`,content:u.seoAuditReport}),t}function P(e){return e.replace(/[^a-zA-Z0-9]/g,` `).split(` `).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(``)+`Screen`}function F(e,t={r:0,g:0,b:0}){if(!e||e===`transparent`)return t;let n=e.trim().replace(/^#/,``);if(n.length===3&&(n=n.split(``).map(e=>e+e).join(``)),n.length>=6){let e=parseInt(n.slice(0,2),16),t=parseInt(n.slice(2,4),16),r=parseInt(n.slice(4,6),16);if(!isNaN(e)&&!isNaN(t)&&!isNaN(r))return{r:e,g:t,b:r}}return{white:{r:255,g:255,b:255},black:{r:0,g:0,b:0},red:{r:255,g:59,b:48},blue:{r:0,g:113,b:227},gray:{r:142,g:142,b:147}}[e.toLowerCase()]||t}function I(e){let t=e.r/255,n=e.g/255,r=e.b/255,i=t<=.03928?t/12.92:((t+.055)/1.055)**2.4,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4;return .2126*i+.7152*a+.0722*o}function L(e,t){let n=F(e,{r:29,g:29,b:31}),r=F(t,{r:255,g:255,b:255}),i=I(n),a=I(r),o=Math.max(i,a),s=Math.min(i,a),c=(o+.05)/(s+.05);return Number(c.toFixed(2))}function R(e,t,n=!1){let r=L(e,t),i=n?3:4.5;return r>=(n?4.5:7)?{ratio:r,status:`pass`,minRequired:i,label:`AAA Pass (${r}:1)`}:r>=i?{ratio:r,status:`pass`,minRequired:i,label:`AA Pass (${r}:1)`}:r>=i-.8?{ratio:r,status:`warning`,minRequired:i,label:`Marginal (${r}:1 < ${i}:1)`}:{ratio:r,status:`fail`,minRequired:i,label:`Fail (${r}:1 < ${i}:1)`}}function z(e){let t=[],n=[],r=[],i={contrast:{total:0,issues:0,warnings:0,passed:0},altText:{total:0,issues:0,warnings:0,passed:0},buttonName:{total:0,issues:0,warnings:0,passed:0},formLabel:{total:0,issues:0,warnings:0,passed:0},semantics:{total:0,issues:0,warnings:0,passed:0},keyboardFocus:{total:0,issues:0,warnings:0,passed:0},structure:{total:0,issues:0,warnings:0,passed:0}},a=e=>{i[e.category].total++,e.level===`error`?(i[e.category].issues++,t.push(e)):e.level===`warning`?(i[e.category].warnings++,n.push(e)):e.level===`pass`&&(i[e.category].passed++,r.push(e))};for(let t of e.pages){let e=t.settings?.backgroundColor||`#ffffff`;for(let n of t.elements){let r=n.accessibility||{},i=n.content||{},o=n.styles||{};if(n.type===`image`||n.type===`svg`||n.type===`avatar`){let e=r.altText&&r.altText.trim().length>0,i=r.isDecorative===!0;a(e||i?{id:`pass_alt_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`altText`,level:`pass`,title:i?`Marked as decorative graphic`:`Meaningful alt text provided`,description:i?`Screen readers will skip this decorative asset.`:`Alt: "${r.altText}"`,wcagRule:`WCAG 1.1.1 Non-text Content (Level A)`,suggestion:`Good alternative text.`,autoFixable:!1}:{id:`err_alt_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`altText`,level:`error`,title:`Image missing alternative text`,description:`Element "${n.name}" has no alt text and is not marked decorative for assistive technologies.`,wcagRule:`WCAG 1.1.1 Non-text Content (Level A)`,suggestion:`Add descriptive alt text describing image contents, or mark as decorative if purely visual.`,autoFixable:!0,fixDescription:`Add contextual alt text or mark decorative`,fixAction:{accessibility:{...r,altText:n.name||`Visual illustration`}}})}if(n.type===`button`||n.type===`submitButton`||n.type===`badge`){let e=i.text||i.label||i.submitLabel||r.ariaLabel;e&&String(e).trim().length>0?a({id:`pass_btn_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`buttonName`,level:`pass`,title:`Interactive control has accessible name`,description:`Button is announced as: "${e}"`,wcagRule:`WCAG 4.1.2 Name, Role, Value (Level A)`,suggestion:`Compliant accessible name.`,autoFixable:!1}):a({id:`err_btn_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`buttonName`,level:`error`,title:`Button missing accessible label`,description:`Button "${n.name}" has no visible text and no aria-label, making it unusable for screen readers.`,wcagRule:`WCAG 4.1.2 Name, Role, Value (Level A)`,suggestion:`Provide button label text or an explicit aria-label.`,autoFixable:!0,fixDescription:`Set aria-label to element name`,fixAction:{accessibility:{...r,ariaLabel:n.name||`Action Button`}}})}if((n.type===`input`||n.type===`formField`||n.type===`textarea`||n.type===`select`||n.type===`checkbox`||n.type===`radioGroup`||n.type===`switch`||n.type===`fileUpload`)&&(i.label||r.formLabel||r.ariaLabel||i.placeholder?a({id:`pass_form_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`formLabel`,level:`pass`,title:`Form control has associated label`,description:`Identified label: "${i.label||r.formLabel||i.placeholder}"`,wcagRule:`WCAG 3.3.2 Labels or Instructions (Level A)`,suggestion:`Accessible form input.`,autoFixable:!1}):a({id:`err_form_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`formLabel`,level:`error`,title:`Form field missing label`,description:`Input element "${n.name}" lacks an associated label or aria-label for assistive software.`,wcagRule:`WCAG 3.3.2 Labels or Instructions (Level A)`,suggestion:`Attach an explicit label or configure aria-label in Accessibility inspector.`,autoFixable:!0,fixDescription:`Attach label based on input type`,fixAction:{content:{...i,label:n.name||`Form Input`},accessibility:{...r,formLabel:n.name||`Form Input`}}})),n.type===`text`||n.type===`heading`||n.type===`paragraph`||n.type===`button`||n.type===`badge`||n.type.includes(`Card`)){let r=o.textColor||o.color||(n.type===`button`?`#ffffff`:`#1d1d1f`),i=o.backgroundColor||(n.type===`button`?o.backgroundColor||`#0071e3`:e),s=o.fontSize||(n.type===`heading`?24:14),c=R(r,i,s>=18||s>=14&&(o.fontWeight===`700`||o.fontWeight===`800`));c.status===`pass`?a({id:`pass_contrast_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`contrast`,level:`pass`,title:`Sufficient contrast ratio: ${c.ratio}:1`,description:`Text color ${r} on background ${i} meets WCAG AA standards.`,wcagRule:`WCAG 1.4.3 Contrast (Minimum) (Level AA)`,contrastRatio:c.ratio,requiredRatio:c.minRequired,contrastStatus:`pass`,textColor:r,backgroundColor:i,suggestion:`High legibility contrast.`,autoFixable:!1}):c.status===`warning`?a({id:`warn_contrast_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`contrast`,level:`warning`,title:`Marginal text contrast: ${c.ratio}:1`,description:`Contrast of ${r} on ${i} is below recommended ${c.minRequired}:1.`,wcagRule:`WCAG 1.4.3 Contrast (Minimum) (Level AA)`,contrastRatio:c.ratio,requiredRatio:c.minRequired,contrastStatus:`warning`,textColor:r,backgroundColor:i,suggestion:`Adjust text color to achieve at least ${c.minRequired}:1 ratio.`,autoFixable:!0,fixDescription:`Darken text color for WCAG AA compliance`,fixAction:{styles:{...o,textColor:`#1d1d1f`}}}):a({id:`err_contrast_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`contrast`,level:`error`,title:`Insufficient text contrast (${c.ratio}:1)`,description:`Text ${r} on ${i} fails WCAG AA requirement (${c.minRequired}:1).`,wcagRule:`WCAG 1.4.3 Contrast (Minimum) (Level AA)`,contrastRatio:c.ratio,requiredRatio:c.minRequired,contrastStatus:`fail`,textColor:r,backgroundColor:i,suggestion:`Darken text or lighten background to satisfy WCAG AA (${c.minRequired}:1).`,autoFixable:!0,fixDescription:`Auto-adjust text color to meet 4.5:1 ratio`,fixAction:{styles:{...o,textColor:`#1d1d1f`}}})}if((n.type===`button`||n.type===`input`||n.type===`textarea`||n.type===`select`||n.type===`checkbox`)&&(r.focusRingStyle===`none`?a({id:`warn_focus_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`keyboardFocus`,level:`warning`,title:`Focus indicator is removed`,description:`Element "${n.name}" has focus indicator disabled, which impairs keyboard navigation.`,wcagRule:`WCAG 2.4.7 Focus Visible (Level AA)`,suggestion:`Restore default or accent focus ring style in Accessibility inspector.`,autoFixable:!0,fixDescription:`Restore Apple accent focus ring`,fixAction:{accessibility:{...r,focusRingStyle:`accent`,focusOutlineColor:`#0071e3`,focusOutlineWidth:2}}}):a({id:`pass_focus_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`keyboardFocus`,level:`pass`,title:`Focus visibility preserved`,description:`Keyboard navigation focus ring is active.`,wcagRule:`WCAG 2.4.7 Focus Visible (Level AA)`,suggestion:`Accessible focus indicator.`,autoFixable:!1})),n.type===`navbar`||n.type===`hero`||n.type===`heroSection`||n.type===`footer`||n.type===`form`||n.type===`loginForm`||n.type===`contactForm`){let e=n.type===`navbar`?`nav`:n.type===`footer`?`footer`:n.type.includes(`form`)||n.type===`form`?`form`:`section`;r.semanticTag&&r.semanticTag!==`div`?a({id:`pass_sem_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`semantics`,level:`pass`,title:`Semantic tag <${r.semanticTag}> configured`,description:`Layout container "${n.name}" has explicit landmark role.`,wcagRule:`WCAG 1.3.1 Info and Relationships (Level A)`,suggestion:`Clean semantic structure.`,autoFixable:!1}):a({id:`info_sem_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`semantics`,level:`warning`,title:`Recommend semantic tag <${e}>`,description:`Element "${n.name}" functions as a ${n.type} but defaults to a generic <div> container.`,wcagRule:`WCAG 1.3.1 Info and Relationships (Level A)`,suggestion:`Assign semantic role <${e}> for clean landmark navigation.`,autoFixable:!0,fixDescription:`Assign <${e}> semantic tag`,fixAction:{accessibility:{...r,semanticTag:e}}})}}}let o=t.length+n.length+r.length;return{score:o===0?100:Math.max(0,Math.min(100,Math.round((r.length*1+n.length*.5)/o*100))),totalChecks:o,issuesCount:t.length,warningsCount:n.length,passedCount:r.length,issues:t,warnings:n,passed:r,byCategory:i,auditedAt:Date.now()}}async function oe(e,t,n){let r=Date.now(),i=[{id:`check_structure`,name:`Project Structure & Page Hierarchy`,category:`structure`,status:`pending`},{id:`check_accessibility`,name:`WCAG 2.1 AA Accessibility Validation`,category:`accessibility`,status:`pending`},{id:`check_seo`,name:`Production SEO, Open Graph & Sitemap Generator`,category:`seo`,status:`pending`},{id:`check_assets`,name:`Asset Integrity, Image Optimization & Media References`,category:`assets`,status:`pending`},{id:`check_interactions`,name:`Interaction Triggers & Route Targets`,category:`interactions`,status:`pending`},{id:`check_codegen`,name:`Semantic Code IR Generation (${t===`nextjs`?`Next.js 14`:`React + TS`})`,category:`codegen`,status:`pending`},{id:`check_typecheck`,name:`Static TypeScript & JSX Syntax Typecheck`,category:`typecheck`,status:`pending`}],a=[],o=[],s=[],c=(e,t,r,a)=>{let o=i.find(t=>t.id===e);o&&(o.status=t,o.message=r,o.durationMs=a),n&&n(e,t,r)};c(`check_structure`,`running`);let l=Date.now();if(await new Promise(e=>setTimeout(e,60)),!e.pages||e.pages.length===0)a.push(`Project must contain at least one valid page.`),c(`check_structure`,`failed`,`Missing pages in project document model.`,Date.now()-l);else{let t=new Set,n=!1;e.pages.forEach(e=>{t.has(e.slug)&&(n=!0),t.add(e.slug)}),n?(o.push(`Duplicate page routes detected in document model.`),c(`check_structure`,`warning`,`${e.pages.length} pages verified (duplicate slug warning).`,Date.now()-l)):c(`check_structure`,`passed`,`${e.pages.length} pages verified with unique routes.`,Date.now()-l)}c(`check_accessibility`,`running`);let u=Date.now();await new Promise(e=>setTimeout(e,60));let d=z(e);d.issuesCount>0?(o.push(`Found ${d.issuesCount} potential accessibility issues. Auto-patching safe fallbacks...`),c(`check_accessibility`,`warning`,`WCAG AA Score: ${d.score}%. ${d.issuesCount} warnings automatically patched in exported code.`,Date.now()-u)):c(`check_accessibility`,`passed`,`100% WCAG 2.1 AA compliant. ${d.passedCount} accessibility checks passed.`,Date.now()-u),c(`check_seo`,`running`);let ee=Date.now();await new Promise(e=>setTimeout(e,60));let f=e.pages.filter(e=>e.settings?.metaTitle&&e.settings?.metaDescription),te=`${e.pages.length} URLs mapped to sitemap.xml and robots.txt.`;c(`check_seo`,`passed`,`Production SEO verified. ${f.length}/${e.pages.length} pages custom-configured. ${te}`,Date.now()-ee),c(`check_assets`,`running`);let p=Date.now();await new Promise(e=>setTimeout(e,60));let m=0;e.pages.forEach(e=>{e.elements.forEach(e=>{(e.type===`image`||e.type===`video`)&&m++})}),c(`check_assets`,`passed`,`${m} media assets optimized with lazy loading and async decoding.`,Date.now()-p),c(`check_interactions`,`running`);let h=Date.now();await new Promise(e=>setTimeout(e,60));let g=0,_=new Set(e.pages.map(e=>e.id));e.pages.forEach(e=>{e.elements.forEach(e=>{e.interactions?.forEach(t=>{g++,t.action===`navigate`&&t.target&&!_.has(t.target)&&o.push(`Element "${e.name}" targets non-existent page ID "${t.target}".`)})})}),c(`check_interactions`,`passed`,`${g} runtime interactions verified.`,Date.now()-h),c(`check_codegen`,`running`);let v=Date.now();await new Promise(e=>setTimeout(e,80));try{let n=k(e);if(!n.isValid)a.push(...n.errors),c(`check_codegen`,`failed`,n.errors.join(`; `),Date.now()-v);else{let n=T(e,t===`nextjs`?`nextjs`:`react`);s=t===`nextjs`?A(n):t===`react-native`?N(n):E(n);let r=n.pages.reduce((e,t)=>e+t.sections.length,0);c(`check_codegen`,`passed`,`Generated ${s.length} production files (${r} semantic sections, ${n.components.length} components).`,Date.now()-v)}}catch(e){a.push(e.message||`Failed to transform project into semantic Code IR.`),c(`check_codegen`,`failed`,e.message,Date.now()-v)}c(`check_typecheck`,`running`);let y=Date.now();if(await new Promise(e=>setTimeout(e,90)),s.length>0){let e={};s.forEach(t=>{e[t.path]=t.content});let t=D(e);t.typecheck?c(`check_typecheck`,`passed`,`0 TypeScript errors. Clean syntax across ${s.length} files.`,Date.now()-y):(t.errors.forEach(e=>{a.push(e)}),c(`check_typecheck`,`failed`,`Found ${t.errors.length} TypeScript / syntax diagnostics.`,Date.now()-y))}else c(`check_typecheck`,`failed`,`No code files available to typecheck.`,Date.now()-y);return{isValid:a.length===0&&i.every(e=>e.status===`passed`||e.status===`warning`),checks:i,errors:a,warnings:o,generatedFiles:s,totalDurationMs:Date.now()-r}}var B=b(),V=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/CreateAppDialog.tsx`;function H({isOpen:e,onClose:l}){let{activeProject:b}=S(),{addToast:w}=ne(),[T,E]=(0,O.useState)(`configure`),[D,k]=(0,O.useState)(b?.name||`My Application`),[A,j]=(0,O.useState)(`app`),[M,N]=(0,O.useState)(!1),[P,F]=(0,O.useState)(`sqlite`),[I,L]=(0,O.useState)(`node-express`),[R,z]=(0,O.useState)(`jwt`),[H,U]=(0,O.useState)(`sqlite://./database.sqlite`),[W,G]=(0,O.useState)(`super-secret-jwt-key-2026`),[K,q]=(0,O.useState)(``),[J,se]=(0,O.useState)(`5000`),[Y,X]=(0,O.useState)(!1),[Z,ce]=(0,O.useState)([]),[le,ue]=(0,O.useState)(`README_SELF_HOST.md`),[de,fe]=(0,O.useState)(!1),[pe,Q]=(0,O.useState)(!1),me=()=>{let e=localStorage.getItem(`cyrus_gemini_api_key`)?.trim(),t=localStorage.getItem(`gemini_api_key`)?.trim(),n=ie.getState().ai?.geminiApiKey?.trim();return!!(e||t||n)},he=()=>{if((A===`app`||A===`website`)&&!me()){N(!0),w(`Please enter your API Key in the AI section first before proceeding.`,`error`);return}N(!1),E(`architecture`)};if((0,O.useEffect)(()=>{e&&b&&k(b.name)},[e,b]),!e||!b)return null;let ge=async()=>{X(!0),E(`generator`);try{let e=[...(await oe(b,`react-ts`)).generatedFiles||[],{path:`database/schema.sql`,language:`sql`,content:`-- Production Database Schema for ${D} (${P.toUpperCase()})
|
|
937
|
+
`});let u=w(e);return t.push({path:`ACCESSIBILITY_REPORT.md`,language:`markdown`,content:u.accessibilityReport}),t.push({path:`SEO_AUDIT.md`,language:`markdown`,content:u.seoAuditReport}),t}function P(e){return e.replace(/[^a-zA-Z0-9]/g,` `).split(` `).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(``)+`Screen`}function F(e,t={r:0,g:0,b:0}){if(!e||e===`transparent`)return t;let n=e.trim().toLowerCase(),r=n.match(/^rgba?\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/);if(r){let e=Math.min(255,Math.max(0,Math.round(parseFloat(r[1])))),t=Math.min(255,Math.max(0,Math.round(parseFloat(r[2])))),n=Math.min(255,Math.max(0,Math.round(parseFloat(r[3]))));if(!isNaN(e)&&!isNaN(t)&&!isNaN(n))return{r:e,g:t,b:n}}let i=n.replace(/^#/,``);if(i.length===3&&(i=i.split(``).map(e=>e+e).join(``)),/^[0-9a-f]{6,8}$/.test(i)){let e=parseInt(i.slice(0,2),16),t=parseInt(i.slice(2,4),16),n=parseInt(i.slice(4,6),16);if(!isNaN(e)&&!isNaN(t)&&!isNaN(n))return{r:e,g:t,b:n}}return{white:{r:255,g:255,b:255},black:{r:0,g:0,b:0},red:{r:255,g:59,b:48},blue:{r:0,g:113,b:227},gray:{r:142,g:142,b:147}}[n]||t}function I(e){let t=e.r/255,n=e.g/255,r=e.b/255,i=t<=.03928?t/12.92:((t+.055)/1.055)**2.4,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4;return .2126*i+.7152*a+.0722*o}function L(e,t){let n=F(e,{r:29,g:29,b:31}),r=F(t,{r:255,g:255,b:255}),i=I(n),a=I(r),o=Math.max(i,a),s=Math.min(i,a),c=(o+.05)/(s+.05);return Number(c.toFixed(2))}function R(e,t,n=!1){let r=L(e,t),i=n?3:4.5;return r>=(n?4.5:7)?{ratio:r,status:`pass`,minRequired:i,label:`AAA Pass (${r}:1)`}:r>=i?{ratio:r,status:`pass`,minRequired:i,label:`AA Pass (${r}:1)`}:r>=i-.8?{ratio:r,status:`warning`,minRequired:i,label:`Marginal (${r}:1 < ${i}:1)`}:{ratio:r,status:`fail`,minRequired:i,label:`Fail (${r}:1 < ${i}:1)`}}function z(e){let t=[],n=[],r=[],i={contrast:{total:0,issues:0,warnings:0,passed:0},altText:{total:0,issues:0,warnings:0,passed:0},buttonName:{total:0,issues:0,warnings:0,passed:0},formLabel:{total:0,issues:0,warnings:0,passed:0},semantics:{total:0,issues:0,warnings:0,passed:0},keyboardFocus:{total:0,issues:0,warnings:0,passed:0},structure:{total:0,issues:0,warnings:0,passed:0}},a=e=>{i[e.category].total++,e.level===`error`?(i[e.category].issues++,t.push(e)):e.level===`warning`?(i[e.category].warnings++,n.push(e)):e.level===`pass`&&(i[e.category].passed++,r.push(e))};for(let t of e.pages){let e=t.settings?.backgroundColor||`#ffffff`;for(let n of t.elements){let r=n.accessibility||{},i=n.content||{},o=n.styles||{};if(n.type===`image`||n.type===`svg`||n.type===`avatar`){let e=r.altText&&r.altText.trim().length>0,i=r.isDecorative===!0;a(e||i?{id:`pass_alt_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`altText`,level:`pass`,title:i?`Marked as decorative graphic`:`Meaningful alt text provided`,description:i?`Screen readers will skip this decorative asset.`:`Alt: "${r.altText}"`,wcagRule:`WCAG 1.1.1 Non-text Content (Level A)`,suggestion:`Good alternative text.`,autoFixable:!1}:{id:`err_alt_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`altText`,level:`error`,title:`Image missing alternative text`,description:`Element "${n.name}" has no alt text and is not marked decorative for assistive technologies.`,wcagRule:`WCAG 1.1.1 Non-text Content (Level A)`,suggestion:`Add descriptive alt text describing image contents, or mark as decorative if purely visual.`,autoFixable:!0,fixDescription:`Add contextual alt text or mark decorative`,fixAction:{accessibility:{...r,altText:n.name||`Visual illustration`}}})}if(n.type===`button`||n.type===`submitButton`||n.type===`badge`){let e=i.text||i.label||i.submitLabel||r.ariaLabel;e&&String(e).trim().length>0?a({id:`pass_btn_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`buttonName`,level:`pass`,title:`Interactive control has accessible name`,description:`Button is announced as: "${e}"`,wcagRule:`WCAG 4.1.2 Name, Role, Value (Level A)`,suggestion:`Compliant accessible name.`,autoFixable:!1}):a({id:`err_btn_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`buttonName`,level:`error`,title:`Button missing accessible label`,description:`Button "${n.name}" has no visible text and no aria-label, making it unusable for screen readers.`,wcagRule:`WCAG 4.1.2 Name, Role, Value (Level A)`,suggestion:`Provide button label text or an explicit aria-label.`,autoFixable:!0,fixDescription:`Set aria-label to element name`,fixAction:{accessibility:{...r,ariaLabel:n.name||`Action Button`}}})}if((n.type===`input`||n.type===`formField`||n.type===`textarea`||n.type===`select`||n.type===`checkbox`||n.type===`radioGroup`||n.type===`switch`||n.type===`fileUpload`)&&(i.label||r.formLabel||r.ariaLabel||i.placeholder?a({id:`pass_form_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`formLabel`,level:`pass`,title:`Form control has associated label`,description:`Identified label: "${i.label||r.formLabel||i.placeholder}"`,wcagRule:`WCAG 3.3.2 Labels or Instructions (Level A)`,suggestion:`Accessible form input.`,autoFixable:!1}):a({id:`err_form_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`formLabel`,level:`error`,title:`Form field missing label`,description:`Input element "${n.name}" lacks an associated label or aria-label for assistive software.`,wcagRule:`WCAG 3.3.2 Labels or Instructions (Level A)`,suggestion:`Attach an explicit label or configure aria-label in Accessibility inspector.`,autoFixable:!0,fixDescription:`Attach label based on input type`,fixAction:{content:{...i,label:n.name||`Form Input`},accessibility:{...r,formLabel:n.name||`Form Input`}}})),n.type===`text`||n.type===`heading`||n.type===`paragraph`||n.type===`button`||n.type===`badge`||n.type.includes(`Card`)){let r=o.textColor||o.color||(n.type===`button`?`#ffffff`:`#1d1d1f`),i=o.backgroundColor||(n.type===`button`?o.backgroundColor||`#0071e3`:e),s=o.fontSize||(n.type===`heading`?24:14),c=R(r,i,s>=18||s>=14&&(o.fontWeight===`700`||o.fontWeight===`800`));c.status===`pass`?a({id:`pass_contrast_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`contrast`,level:`pass`,title:`Sufficient contrast ratio: ${c.ratio}:1`,description:`Text color ${r} on background ${i} meets WCAG AA standards.`,wcagRule:`WCAG 1.4.3 Contrast (Minimum) (Level AA)`,contrastRatio:c.ratio,requiredRatio:c.minRequired,contrastStatus:`pass`,textColor:r,backgroundColor:i,suggestion:`High legibility contrast.`,autoFixable:!1}):c.status===`warning`?a({id:`warn_contrast_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`contrast`,level:`warning`,title:`Marginal text contrast: ${c.ratio}:1`,description:`Contrast of ${r} on ${i} is below recommended ${c.minRequired}:1.`,wcagRule:`WCAG 1.4.3 Contrast (Minimum) (Level AA)`,contrastRatio:c.ratio,requiredRatio:c.minRequired,contrastStatus:`warning`,textColor:r,backgroundColor:i,suggestion:`Adjust text color to achieve at least ${c.minRequired}:1 ratio.`,autoFixable:!0,fixDescription:`Darken text color for WCAG AA compliance`,fixAction:{styles:{...o,textColor:`#1d1d1f`}}}):a({id:`err_contrast_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`contrast`,level:`error`,title:`Insufficient text contrast (${c.ratio}:1)`,description:`Text ${r} on ${i} fails WCAG AA requirement (${c.minRequired}:1).`,wcagRule:`WCAG 1.4.3 Contrast (Minimum) (Level AA)`,contrastRatio:c.ratio,requiredRatio:c.minRequired,contrastStatus:`fail`,textColor:r,backgroundColor:i,suggestion:`Darken text or lighten background to satisfy WCAG AA (${c.minRequired}:1).`,autoFixable:!0,fixDescription:`Auto-adjust text color to meet 4.5:1 ratio`,fixAction:{styles:{...o,textColor:`#1d1d1f`}}})}if((n.type===`button`||n.type===`input`||n.type===`textarea`||n.type===`select`||n.type===`checkbox`)&&(r.focusRingStyle===`none`?a({id:`warn_focus_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`keyboardFocus`,level:`warning`,title:`Focus indicator is removed`,description:`Element "${n.name}" has focus indicator disabled, which impairs keyboard navigation.`,wcagRule:`WCAG 2.4.7 Focus Visible (Level AA)`,suggestion:`Restore default or accent focus ring style in Accessibility inspector.`,autoFixable:!0,fixDescription:`Restore Apple accent focus ring`,fixAction:{accessibility:{...r,focusRingStyle:`accent`,focusOutlineColor:`#0071e3`,focusOutlineWidth:2}}}):a({id:`pass_focus_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`keyboardFocus`,level:`pass`,title:`Focus visibility preserved`,description:`Keyboard navigation focus ring is active.`,wcagRule:`WCAG 2.4.7 Focus Visible (Level AA)`,suggestion:`Accessible focus indicator.`,autoFixable:!1})),n.type===`navbar`||n.type===`hero`||n.type===`heroSection`||n.type===`footer`||n.type===`form`||n.type===`loginForm`||n.type===`contactForm`){let e=n.type===`navbar`?`nav`:n.type===`footer`?`footer`:n.type.includes(`form`)||n.type===`form`?`form`:`section`;r.semanticTag&&r.semanticTag!==`div`?a({id:`pass_sem_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`semantics`,level:`pass`,title:`Semantic tag <${r.semanticTag}> configured`,description:`Layout container "${n.name}" has explicit landmark role.`,wcagRule:`WCAG 1.3.1 Info and Relationships (Level A)`,suggestion:`Clean semantic structure.`,autoFixable:!1}):a({id:`info_sem_${n.id}`,elementId:n.id,elementName:n.name,pageId:t.id,pageName:t.name,category:`semantics`,level:`warning`,title:`Recommend semantic tag <${e}>`,description:`Element "${n.name}" functions as a ${n.type} but defaults to a generic <div> container.`,wcagRule:`WCAG 1.3.1 Info and Relationships (Level A)`,suggestion:`Assign semantic role <${e}> for clean landmark navigation.`,autoFixable:!0,fixDescription:`Assign <${e}> semantic tag`,fixAction:{accessibility:{...r,semanticTag:e}}})}}}let o=t.length+n.length+r.length;return{score:o===0?100:Math.max(0,Math.min(100,Math.round((r.length*1+n.length*.5)/o*100))),totalChecks:o,issuesCount:t.length,warningsCount:n.length,passedCount:r.length,issues:t,warnings:n,passed:r,byCategory:i,auditedAt:Date.now()}}async function oe(e,t,n){let r=Date.now(),i=[{id:`check_structure`,name:`Project Structure & Page Hierarchy`,category:`structure`,status:`pending`},{id:`check_accessibility`,name:`WCAG 2.1 AA Accessibility Validation`,category:`accessibility`,status:`pending`},{id:`check_seo`,name:`Production SEO, Open Graph & Sitemap Generator`,category:`seo`,status:`pending`},{id:`check_assets`,name:`Asset Integrity, Image Optimization & Media References`,category:`assets`,status:`pending`},{id:`check_interactions`,name:`Interaction Triggers & Route Targets`,category:`interactions`,status:`pending`},{id:`check_codegen`,name:`Semantic Code IR Generation (${t===`nextjs`?`Next.js 14`:`React + TS`})`,category:`codegen`,status:`pending`},{id:`check_typecheck`,name:`Static TypeScript & JSX Syntax Typecheck`,category:`typecheck`,status:`pending`}],a=[],o=[],s=[],c=(e,t,r,a)=>{let o=i.find(t=>t.id===e);o&&(o.status=t,o.message=r,o.durationMs=a),n&&n(e,t,r)};c(`check_structure`,`running`);let l=Date.now();if(await new Promise(e=>setTimeout(e,60)),!e.pages||e.pages.length===0)a.push(`Project must contain at least one valid page.`),c(`check_structure`,`failed`,`Missing pages in project document model.`,Date.now()-l);else{let t=new Set,n=!1;e.pages.forEach(e=>{t.has(e.slug)&&(n=!0),t.add(e.slug)}),n?(o.push(`Duplicate page routes detected in document model.`),c(`check_structure`,`warning`,`${e.pages.length} pages verified (duplicate slug warning).`,Date.now()-l)):c(`check_structure`,`passed`,`${e.pages.length} pages verified with unique routes.`,Date.now()-l)}c(`check_accessibility`,`running`);let u=Date.now();await new Promise(e=>setTimeout(e,60));let d=z(e);d.issuesCount>0?(o.push(`Found ${d.issuesCount} potential accessibility issues. Auto-patching safe fallbacks...`),c(`check_accessibility`,`warning`,`WCAG AA Score: ${d.score}%. ${d.issuesCount} warnings automatically patched in exported code.`,Date.now()-u)):c(`check_accessibility`,`passed`,`100% WCAG 2.1 AA compliant. ${d.passedCount} accessibility checks passed.`,Date.now()-u),c(`check_seo`,`running`);let ee=Date.now();await new Promise(e=>setTimeout(e,60));let f=e.pages.filter(e=>e.settings?.metaTitle&&e.settings?.metaDescription),te=`${e.pages.length} URLs mapped to sitemap.xml and robots.txt.`;c(`check_seo`,`passed`,`Production SEO verified. ${f.length}/${e.pages.length} pages custom-configured. ${te}`,Date.now()-ee),c(`check_assets`,`running`);let p=Date.now();await new Promise(e=>setTimeout(e,60));let m=0;e.pages.forEach(e=>{e.elements.forEach(e=>{(e.type===`image`||e.type===`video`)&&m++})}),c(`check_assets`,`passed`,`${m} media assets optimized with lazy loading and async decoding.`,Date.now()-p),c(`check_interactions`,`running`);let h=Date.now();await new Promise(e=>setTimeout(e,60));let g=0,_=new Set(e.pages.map(e=>e.id));e.pages.forEach(e=>{e.elements.forEach(e=>{e.interactions?.forEach(t=>{g++,t.action===`navigate`&&t.target&&!_.has(t.target)&&o.push(`Element "${e.name}" targets non-existent page ID "${t.target}".`)})})}),c(`check_interactions`,`passed`,`${g} runtime interactions verified.`,Date.now()-h),c(`check_codegen`,`running`);let v=Date.now();await new Promise(e=>setTimeout(e,80));try{let n=k(e);if(!n.isValid)a.push(...n.errors),c(`check_codegen`,`failed`,n.errors.join(`; `),Date.now()-v);else{let n=T(e,t===`nextjs`?`nextjs`:`react`);s=t===`nextjs`?A(n):t===`react-native`?N(n):E(n);let r=n.pages.reduce((e,t)=>e+t.sections.length,0);c(`check_codegen`,`passed`,`Generated ${s.length} production files (${r} semantic sections, ${n.components.length} components).`,Date.now()-v)}}catch(e){a.push(e.message||`Failed to transform project into semantic Code IR.`),c(`check_codegen`,`failed`,e.message,Date.now()-v)}c(`check_typecheck`,`running`);let y=Date.now();if(await new Promise(e=>setTimeout(e,90)),s.length>0){let e={};s.forEach(t=>{e[t.path]=t.content});let t=D(e);t.typecheck?c(`check_typecheck`,`passed`,`0 TypeScript errors. Clean syntax across ${s.length} files.`,Date.now()-y):(t.errors.forEach(e=>{a.push(e)}),c(`check_typecheck`,`failed`,`Found ${t.errors.length} TypeScript / syntax diagnostics.`,Date.now()-y))}else c(`check_typecheck`,`failed`,`No code files available to typecheck.`,Date.now()-y);return{isValid:a.length===0&&i.every(e=>e.status===`passed`||e.status===`warning`),checks:i,errors:a,warnings:o,generatedFiles:s,totalDurationMs:Date.now()-r}}var B=b(),V=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/CreateAppDialog.tsx`;function H({isOpen:e,onClose:l}){let{activeProject:b}=S(),{addToast:w}=ne(),[T,E]=(0,O.useState)(`configure`),[D,k]=(0,O.useState)(b?.name||`My Application`),[A,j]=(0,O.useState)(`app`),[M,N]=(0,O.useState)(!1),[P,F]=(0,O.useState)(`sqlite`),[I,L]=(0,O.useState)(`node-express`),[R,z]=(0,O.useState)(`jwt`),[H,U]=(0,O.useState)(`sqlite://./database.sqlite`),[W,G]=(0,O.useState)(`super-secret-jwt-key-2026`),[K,q]=(0,O.useState)(``),[J,se]=(0,O.useState)(`5000`),[Y,X]=(0,O.useState)(!1),[Z,ce]=(0,O.useState)([]),[le,ue]=(0,O.useState)(`README_SELF_HOST.md`),[de,fe]=(0,O.useState)(!1),[pe,Q]=(0,O.useState)(!1),me=()=>{let e=localStorage.getItem(`cyrus_gemini_api_key`)?.trim(),t=localStorage.getItem(`gemini_api_key`)?.trim(),n=ie.getState().ai?.geminiApiKey?.trim();return!!(e||t||n)},he=()=>{if((A===`app`||A===`website`)&&!me()){N(!0),w(`Please enter your API Key in the AI section first before proceeding.`,`error`);return}N(!1),E(`architecture`)};if((0,O.useEffect)(()=>{e&&b&&k(b.name)},[e,b]),!e||!b)return null;let ge=async()=>{X(!0),E(`generator`);try{let e=[...(await oe(b,`react-ts`)).generatedFiles||[],{path:`database/schema.sql`,language:`sql`,content:`-- Production Database Schema for ${D} (${P.toUpperCase()})
|
|
938
938
|
-- Security: Primary keys, unique email index, hashed passwords, cascade delete
|
|
939
939
|
CREATE TABLE IF NOT EXISTS users (
|
|
940
940
|
id VARCHAR(64) PRIMARY KEY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{Bn as t,J as n,Ln as r,Rt as i,X as a,_t as o,di as s,vn as c,zr as l}from"./vendor-icons-M_KBtuE-.js";import{t as u}from"./vendor-react-BTEcvIpc.js";import{c as d}from"./vendor-utils-3OgY5Lif.js";import{_ as f,a as p,p as m}from"./themes-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{Bn as t,J as n,Ln as r,Rt as i,X as a,_t as o,di as s,vn as c,zr as l}from"./vendor-icons-M_KBtuE-.js";import{t as u}from"./vendor-react-BTEcvIpc.js";import{c as d}from"./vendor-utils-3OgY5Lif.js";import{_ as f,a as p,p as m}from"./themes-Cn_1tMt7.js";import{f as h,l as g,m as _,p as v}from"./index-DvPq7fF5.js";var y=e(s(),1),b=u(),x=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/CreateProjectDialog.tsx`,S=[{type:`dashboard`,title:`Dashboard & Analytics`,desc:`Metrics, graphs, tables and admin panels`,icon:(0,b.jsxDEV)(t,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:40,columnNumber:11},void 0)},{type:`saas`,title:`SaaS Product`,desc:`Web application interfaces & subscription apps`,icon:(0,b.jsxDEV)(n,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:46,columnNumber:11},void 0)},{type:`landing`,title:`Landing Page`,desc:`High-conversion product showcases & heroes`,icon:(0,b.jsxDEV)(o,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:52,columnNumber:11},void 0)},{type:`webapp`,title:`Web Application`,desc:`Interactive workflows & complex web apps`,icon:(0,b.jsxDEV)(i,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:58,columnNumber:11},void 0)},{type:`mobile`,title:`Mobile App`,desc:`iOS & Android responsive screens`,icon:(0,b.jsxDEV)(a,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:64,columnNumber:11},void 0)},{type:`website`,title:`Marketing Website`,desc:`Multi-page websites & editorial layouts`,icon:(0,b.jsxDEV)(r,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:70,columnNumber:11},void 0)},{type:`custom`,title:`Blank Canvas`,desc:`Start from scratch with complete freedom`,icon:(0,b.jsxDEV)(c,{className:`w-5 h-5`},void 0,!1,{fileName:x,lineNumber:76,columnNumber:11},void 0)}];function C({isOpen:e,onClose:t,onCreated:n}){let[i,o]=(0,y.useState)(`New Digital Product`),[s,c]=(0,y.useState)(`web`),[u,C]=(0,y.useState)(`dashboard`),[w,T]=(0,y.useState)(!1),{setProject:E}=g(),{addToast:D}=p(),O=async e=>{if(e.preventDefault(),i.trim()){T(!0);try{let e=f(`proj`),r=f(`page`),a=s===`mobile`||u===`mobile`,o={id:e,name:i.trim(),type:a?`mobile`:u,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),settings:{platformTarget:a?`mobile`:`web`,safeArea:a?{top:47,bottom:34,left:0,right:0}:void 0,canvasBackground:`#f5f5f7`,primaryColor:`#0071e3`,theme:`light`},pages:[{id:r,name:a?`Screen 1`:`Page 1`,slug:a?`screen-1`:`page-1`,elements:[],settings:{backgroundColor:`#f5f5f7`,padding:a?16:32,maxWidth:a?390:1200}}]};await m(o),E(o),D(`Project "${o.name}" created (${a?`Mobile`:`Web`})`,`success`),T(!1),t(),n(e)}catch(e){console.error(`Error creating project:`,e),T(!1)}}};return(0,b.jsxDEV)(h,{isOpen:e,onClose:t,title:`Create New Project`,subtitle:`Choose a product category and give your creation a name.`,maxWidth:`lg`,footer:(0,b.jsxDEV)(b.Fragment,{children:[(0,b.jsxDEV)(_,{variant:`secondary`,onClick:t,type:`button`,children:`Cancel`},void 0,!1,{fileName:x,lineNumber:152,columnNumber:11},this),(0,b.jsxDEV)(_,{variant:`primary`,onClick:O,isLoading:w,disabled:!i.trim(),children:`Create Project`},void 0,!1,{fileName:x,lineNumber:155,columnNumber:11},this)]},void 0,!0,{fileName:x,lineNumber:151,columnNumber:9},this),children:(0,b.jsxDEV)(`form`,{onSubmit:O,className:`flex flex-col gap-5`,children:[(0,b.jsxDEV)(`div`,{children:[(0,b.jsxDEV)(`label`,{className:`text-[13px] font-medium text-[#1d1d1f] block mb-1.5`,children:`Project Name`},void 0,!1,{fileName:x,lineNumber:169,columnNumber:11},this),(0,b.jsxDEV)(v,{value:i,onChange:e=>o(e.target.value),placeholder:`e.g. Orion SaaS Dashboard`,autoFocus:!0},void 0,!1,{fileName:x,lineNumber:172,columnNumber:11},this)]},void 0,!0,{fileName:x,lineNumber:168,columnNumber:9},this),(0,b.jsxDEV)(`div`,{children:[(0,b.jsxDEV)(`label`,{className:`text-[13px] font-medium text-[#1d1d1f] block mb-1.5`,children:`Platform Target`},void 0,!1,{fileName:x,lineNumber:182,columnNumber:11},this),(0,b.jsxDEV)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,b.jsxDEV)(`button`,{type:`button`,onClick:()=>{c(`web`),u===`mobile`&&C(`dashboard`)},className:d(`p-2.5 rounded-xl border text-left flex items-center gap-2.5 transition-apple cursor-pointer`,s===`web`?`bg-[#e8f2fc] border-[#0071e3] text-[#0071e3] font-bold`:`bg-[#f5f5f7] border-[#e5e5ea] text-[#1d1d1f] hover:bg-[#e5e5ea]`),children:[(0,b.jsxDEV)(r,{className:`w-4 h-4 shrink-0`},void 0,!1,{fileName:x,lineNumber:199,columnNumber:15},this),(0,b.jsxDEV)(`div`,{children:[(0,b.jsxDEV)(`div`,{className:`text-[12px]`,children:`Web Application`},void 0,!1,{fileName:x,lineNumber:201,columnNumber:17},this),(0,b.jsxDEV)(`div`,{className:`text-[10px] text-[#86868b] font-normal`,children:`React / Next.js`},void 0,!1,{fileName:x,lineNumber:202,columnNumber:17},this)]},void 0,!0,{fileName:x,lineNumber:200,columnNumber:15},this)]},void 0,!0,{fileName:x,lineNumber:186,columnNumber:13},this),(0,b.jsxDEV)(`button`,{type:`button`,onClick:()=>{c(`mobile`),C(`mobile`)},className:d(`p-2.5 rounded-xl border text-left flex items-center gap-2.5 transition-apple cursor-pointer`,s===`mobile`?`bg-[#e8f2fc] border-[#0071e3] text-[#0071e3] font-bold`:`bg-[#f5f5f7] border-[#e5e5ea] text-[#1d1d1f] hover:bg-[#e5e5ea]`),children:[(0,b.jsxDEV)(a,{className:`w-4 h-4 shrink-0`},void 0,!1,{fileName:x,lineNumber:219,columnNumber:15},this),(0,b.jsxDEV)(`div`,{children:[(0,b.jsxDEV)(`div`,{className:`text-[12px]`,children:`Mobile App`},void 0,!1,{fileName:x,lineNumber:221,columnNumber:17},this),(0,b.jsxDEV)(`div`,{className:`text-[10px] text-[#86868b] font-normal`,children:`iOS & Android (React Native)`},void 0,!1,{fileName:x,lineNumber:222,columnNumber:17},this)]},void 0,!0,{fileName:x,lineNumber:220,columnNumber:15},this)]},void 0,!0,{fileName:x,lineNumber:206,columnNumber:13},this)]},void 0,!0,{fileName:x,lineNumber:185,columnNumber:11},this)]},void 0,!0,{fileName:x,lineNumber:181,columnNumber:9},this),(0,b.jsxDEV)(`div`,{children:[(0,b.jsxDEV)(`label`,{className:`text-[13px] font-medium text-[#1d1d1f] block mb-2`,children:`Preset Category`},void 0,!1,{fileName:x,lineNumber:230,columnNumber:11},this),(0,b.jsxDEV)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2.5 max-h-[280px] overflow-y-auto pr-1`,children:S.map(e=>{let t=u===e.type;return(0,b.jsxDEV)(`div`,{onClick:()=>C(e.type),className:d(`relative p-3 rounded-[12px] border transition-apple cursor-pointer flex items-start gap-3 select-none`,t?`bg-[#e8f2fc]/60 border-[#0071e3] ring-1 ring-[#0071e3]`:`bg-white border-[#e5e5ea] hover:bg-[#f4f4f6] hover:border-[#d1d1d6]`),children:[(0,b.jsxDEV)(`div`,{className:d(`p-2 rounded-[8px] shrink-0 transition-apple`,t?`bg-[#0071e3] text-white`:`bg-[#f4f4f6] text-[#6e6e73]`),children:e.icon},void 0,!1,{fileName:x,lineNumber:247,columnNumber:19},this),(0,b.jsxDEV)(`div`,{className:`flex-1 min-w-0`,children:[(0,b.jsxDEV)(`div`,{className:`flex items-center justify-between`,children:[(0,b.jsxDEV)(`span`,{className:`text-[13px] font-semibold text-[#1d1d1f] truncate`,children:e.title},void 0,!1,{fileName:x,lineNumber:259,columnNumber:23},this),t&&(0,b.jsxDEV)(l,{className:`w-3.5 h-3.5 text-[#0071e3] shrink-0 ml-1`},void 0,!1,{fileName:x,lineNumber:263,columnNumber:25},this)]},void 0,!0,{fileName:x,lineNumber:258,columnNumber:21},this),(0,b.jsxDEV)(`p`,{className:`text-[11px] text-[#86868b] leading-snug mt-0.5`,children:e.desc},void 0,!1,{fileName:x,lineNumber:266,columnNumber:21},this)]},void 0,!0,{fileName:x,lineNumber:257,columnNumber:19},this)]},e.type,!0,{fileName:x,lineNumber:237,columnNumber:17},this)})},void 0,!1,{fileName:x,lineNumber:233,columnNumber:11},this)]},void 0,!0,{fileName:x,lineNumber:229,columnNumber:9},this)]},void 0,!0,{fileName:x,lineNumber:166,columnNumber:7},this)},void 0,!1,{fileName:x,lineNumber:144,columnNumber:5},this)}export{C as CreateProjectDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{Dr as t,Tt as n,di as r,gt as i,ht as a}from"./vendor-icons-M_KBtuE-.js";import{t as o}from"./vendor-react-BTEcvIpc.js";import{c as s}from"./vendor-utils-3OgY5Lif.js";import{a as c}from"./themes-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{Dr as t,Tt as n,di as r,gt as i,ht as a}from"./vendor-icons-M_KBtuE-.js";import{t as o}from"./vendor-react-BTEcvIpc.js";import{c as s}from"./vendor-utils-3OgY5Lif.js";import{a as c}from"./themes-Cn_1tMt7.js";import{_ as l,f as u,h as d,l as f,m as p}from"./index-DvPq7fF5.js";var m=e(r(),1),h=o(),g=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/HistoryTimelineDialog.tsx`;function _({isOpen:e,onClose:r}){let{activeProject:o,setProject:_}=f(),{session:v}=d(),{addToast:y}=c(),[b,x]=(0,m.useState)([]),[S,C]=(0,m.useState)(``),[w,T]=(0,m.useState)(!1),[E,D]=(0,m.useState)(null),O=async()=>{if(!o)return;let e=await l.getVersions(o.id);x(e),e.length>0&&!E&&D(e[0].id)};(0,m.useEffect)(()=>{e&&o&&O()},[e,o]);let k=async()=>{if(!(!o||!S.trim())){T(!0);try{await l.createVersion(o.id,S.trim(),o,v.user),C(``),await O(),y(`Created named version checkpoint`,`success`)}catch{y(`Failed to create version checkpoint`,`error`)}finally{T(!1)}}},A=async e=>{if(o)try{let t=await l.restoreVersion(o.id,e);_(t),await O(),y(`Restored version successfully`,`success`),r()}catch(e){console.error(`Restore error:`,e),y(`Failed to restore version`,`error`)}};if(!o)return null;let j=b.find(e=>e.id===E);return(0,h.jsxDEV)(u,{isOpen:e,onClose:r,title:`Project Version History`,subtitle:`Track and restore immutable historical snapshots for "${o.name}".`,maxWidth:`xl`,children:(0,h.jsxDEV)(`div`,{className:`flex flex-col gap-4`,children:[(0,h.jsxDEV)(`div`,{className:`p-3 bg-[#fafafc] rounded-[12px] border border-[#e5e5ea] flex items-center gap-2`,children:[(0,h.jsxDEV)(`input`,{type:`text`,value:S,onChange:e=>C(e.target.value),placeholder:`Name this version (e.g. 'Before pricing revamp', 'V2 Launch ready')...`,className:`flex-1 h-8 px-3 rounded-[6px] bg-white border border-[#e5e5ea] text-[12px] text-[#1d1d1f] focus:outline-none focus:border-[#0071e3]`},void 0,!1,{fileName:g,lineNumber:100,columnNumber:11},this),(0,h.jsxDEV)(p,{variant:`primary`,size:`xs`,disabled:!S.trim(),isLoading:w,onClick:k,icon:(0,h.jsxDEV)(n,{className:`w-3.5 h-3.5`},void 0,!1,{fileName:g,lineNumber:113,columnNumber:19},this),children:`Create Version`},void 0,!1,{fileName:g,lineNumber:107,columnNumber:11},this)]},void 0,!0,{fileName:g,lineNumber:99,columnNumber:9},this),(0,h.jsxDEV)(`div`,{className:`grid grid-cols-5 gap-3 min-h-[300px] max-h-[400px]`,children:[(0,h.jsxDEV)(`div`,{className:`col-span-2 border border-[#e5e5ea] rounded-[10px] bg-white overflow-y-auto p-1.5 flex flex-col gap-1`,children:b.length===0?(0,h.jsxDEV)(`div`,{className:`p-6 text-center text-[12px] text-[#86868b]`,children:`No named versions saved yet.`},void 0,!1,{fileName:g,lineNumber:124,columnNumber:15},this):b.map((e,n)=>{let r=E===e.id,i=n===0;return(0,h.jsxDEV)(`button`,{type:`button`,onClick:()=>D(e.id),className:s(`p-2.5 rounded-[8px] text-left transition-apple cursor-pointer flex flex-col gap-1 select-none`,r?`bg-[#0071e3] text-white`:`hover:bg-[#f4f4f6] text-[#1d1d1f]`),children:[(0,h.jsxDEV)(`div`,{className:`flex items-center justify-between`,children:[(0,h.jsxDEV)(`span`,{className:`font-semibold text-[12px] truncate`,children:e.description},void 0,!1,{fileName:g,lineNumber:144,columnNumber:23},this),i&&(0,h.jsxDEV)(`span`,{className:s(`text-[9.5px] px-1.5 py-0.2 rounded-full font-medium`,r?`bg-white/20 text-white`:`bg-[#34c759]/15 text-[#34c759]`),children:`Latest`},void 0,!1,{fileName:g,lineNumber:148,columnNumber:25},this)]},void 0,!0,{fileName:g,lineNumber:143,columnNumber:21},this),(0,h.jsxDEV)(`div`,{className:s(`flex items-center gap-2 text-[10.5px]`,r?`text-white/80`:`text-[#86868b]`),children:[(0,h.jsxDEV)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsxDEV)(t,{className:`w-3 h-3`},void 0,!1,{fileName:g,lineNumber:167,columnNumber:25},this),(0,h.jsxDEV)(`span`,{children:new Date(e.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})},void 0,!1,{fileName:g,lineNumber:168,columnNumber:25},this)]},void 0,!0,{fileName:g,lineNumber:166,columnNumber:23},this),(0,h.jsxDEV)(`span`,{children:`•`},void 0,!1,{fileName:g,lineNumber:170,columnNumber:23},this),(0,h.jsxDEV)(`span`,{children:[e.snapshot.pages.length,` pages`]},void 0,!0,{fileName:g,lineNumber:171,columnNumber:23},this)]},void 0,!0,{fileName:g,lineNumber:160,columnNumber:21},this)]},e.id,!0,{fileName:g,lineNumber:132,columnNumber:19},this)})},void 0,!1,{fileName:g,lineNumber:122,columnNumber:11},this),(0,h.jsxDEV)(`div`,{className:`col-span-3 border border-[#e5e5ea] rounded-[10px] bg-[#fafafc] p-4 flex flex-col justify-between`,children:[j?(0,h.jsxDEV)(`div`,{className:`flex flex-col gap-3`,children:[(0,h.jsxDEV)(`div`,{children:[(0,h.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsxDEV)(i,{className:`w-4 h-4 text-[#0071e3]`},void 0,!1,{fileName:g,lineNumber:185,columnNumber:21},this),(0,h.jsxDEV)(`h4`,{className:`text-[14px] font-semibold text-[#1d1d1f]`,children:j.description},void 0,!1,{fileName:g,lineNumber:186,columnNumber:21},this)]},void 0,!0,{fileName:g,lineNumber:184,columnNumber:19},this),(0,h.jsxDEV)(`span`,{className:`text-[11px] text-[#86868b] mt-0.5 block`,children:[`Created on `,new Date(j.createdAt).toLocaleDateString(),` at`,` `,new Date(j.createdAt).toLocaleTimeString(),` by`,` `,(0,h.jsxDEV)(`strong`,{children:j.author?.name||`Anonymous Creator`},void 0,!1,{fileName:g,lineNumber:193,columnNumber:21},this)]},void 0,!0,{fileName:g,lineNumber:190,columnNumber:19},this)]},void 0,!0,{fileName:g,lineNumber:183,columnNumber:17},this),(0,h.jsxDEV)(`div`,{className:`p-3 bg-white rounded-[8px] border border-[#e5e5ea] flex flex-col gap-1.5 text-[12px] text-[#1d1d1f]`,children:[(0,h.jsxDEV)(`div`,{className:`flex items-center justify-between`,children:[(0,h.jsxDEV)(`span`,{className:`text-[#86868b]`,children:`Pages in Snapshot:`},void 0,!1,{fileName:g,lineNumber:199,columnNumber:21},this),(0,h.jsxDEV)(`span`,{className:`font-semibold`,children:j.snapshot.pages.length},void 0,!1,{fileName:g,lineNumber:200,columnNumber:21},this)]},void 0,!0,{fileName:g,lineNumber:198,columnNumber:19},this),(0,h.jsxDEV)(`div`,{className:`flex items-center justify-between`,children:[(0,h.jsxDEV)(`span`,{className:`text-[#86868b]`,children:`Total Elements:`},void 0,!1,{fileName:g,lineNumber:203,columnNumber:21},this),(0,h.jsxDEV)(`span`,{className:`font-semibold`,children:j.snapshot.pages.reduce((e,t)=>e+t.elements.length,0)},void 0,!1,{fileName:g,lineNumber:204,columnNumber:21},this)]},void 0,!0,{fileName:g,lineNumber:202,columnNumber:19},this),(0,h.jsxDEV)(`div`,{className:`flex items-center justify-between`,children:[(0,h.jsxDEV)(`span`,{className:`text-[#86868b]`,children:`Theme Preset:`},void 0,!1,{fileName:g,lineNumber:209,columnNumber:21},this),(0,h.jsxDEV)(`span`,{className:`font-semibold capitalize`,children:j.snapshot.settings.theme||`light`},void 0,!1,{fileName:g,lineNumber:210,columnNumber:21},this)]},void 0,!0,{fileName:g,lineNumber:208,columnNumber:19},this)]},void 0,!0,{fileName:g,lineNumber:197,columnNumber:17},this),(0,h.jsxDEV)(`p`,{className:`text-[11.5px] text-[#86868b]`,children:`Restoring will load this snapshot and automatically create a new version tracking the rollback non-destructively.`},void 0,!1,{fileName:g,lineNumber:216,columnNumber:17},this)]},void 0,!0,{fileName:g,lineNumber:182,columnNumber:15},this):(0,h.jsxDEV)(`div`,{className:`text-center text-[12px] text-[#86868b] my-auto`,children:`Select a version on the left to inspect details.`},void 0,!1,{fileName:g,lineNumber:221,columnNumber:15},this),j&&(0,h.jsxDEV)(`div`,{className:`pt-3 border-t border-[#e5e5ea] flex items-center justify-end`,children:(0,h.jsxDEV)(p,{variant:`primary`,size:`sm`,onClick:()=>A(j.id),icon:(0,h.jsxDEV)(a,{className:`w-3.5 h-3.5`},void 0,!1,{fileName:g,lineNumber:232,columnNumber:25},this),children:`Restore this Version`},void 0,!1,{fileName:g,lineNumber:228,columnNumber:17},this)},void 0,!1,{fileName:g,lineNumber:227,columnNumber:15},this)]},void 0,!0,{fileName:g,lineNumber:180,columnNumber:11},this)]},void 0,!0,{fileName:g,lineNumber:120,columnNumber:9},this)]},void 0,!0,{fileName:g,lineNumber:97,columnNumber:7},this)},void 0,!1,{fileName:g,lineNumber:90,columnNumber:5},this)}export{_ as HistoryTimelineDialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,J as n,Ln as r,Nr as i,Pr as a,Rt as o,Vt as s,di as c,i as l,oi as u,rt as d,tr as f,un as p,v as m}from"./vendor-icons-M_KBtuE-.js";import{t as h}from"./vendor-react-BTEcvIpc.js";import{c as g}from"./vendor-utils-3OgY5Lif.js";import{_,a as v,i as y,p as b,t as x,u as S}from"./themes-CrOKZlbV.js";var C=e(c(),1);function w(e,t=1){if(!e)return`transparent`;let n=Math.round(e.r*255),r=Math.round(e.g*255),i=Math.round(e.b*255),a=Math.round((e.a??1)*t*100)/100;if(a>=1){let e=e=>e.toString(16).padStart(2,`0`);return`#${e(n)}${e(r)}${e(i)}`}return`rgba(${n}, ${r}, ${i}, ${a})`}function T(e,t){let n={};if(e.fills&&e.fills.length>0){let r=e.fills.find(e=>e.visible!==!1);r&&(r.type===`SOLID`&&r.color?e.type===`TEXT`?n.textColor=w(r.color,r.opacity):n.backgroundColor=w(r.color,r.opacity):r.type.startsWith(`GRADIENT_`)&&(t.push({nodeName:e.name,property:`fills`,details:`Gradient fill (${r.type}) approximated to fallback solid color.`}),r.gradientStops&&r.gradientStops.length>0&&(n.backgroundColor=w(r.gradientStops[0].color))))}if(e.strokes&&e.strokes.length>0&&e.strokeWeight){let t=e.strokes.find(e=>e.visible!==!1);t&&t.color&&(n.borderWidth=e.strokeWeight,n.borderColor=w(t.color,t.opacity))}if(e.cornerRadius?n.borderRadius=e.cornerRadius:e.rectangleCornerRadii&&e.rectangleCornerRadii.length>0&&(n.borderRadius=e.rectangleCornerRadii[0]),e.effects&&e.effects.length>0){let t=e.effects.find(e=>e.visible!==!1&&(e.type===`DROP_SHADOW`||e.type===`INNER_SHADOW`));t&&(n.shadow=t.radius>16?`lg`:t.radius>8?`md`:t.radius>2?`sm`:`none`)}if(e.style){if(e.style.fontSize&&(n.fontSize=e.style.fontSize),e.style.fontWeight){let t=String(e.style.fontWeight);n.fontWeight=[`300`,`400`,`500`,`600`,`700`,`800`].includes(t)?t:e.style.fontWeight>=700?`700`:e.style.fontWeight>=600?`600`:e.style.fontWeight>=500?`500`:`400`}e.style.fontFamily&&(n.fontFamily=e.style.fontFamily),e.style.textAlignHorizontal&&(n.textAlign=e.style.textAlignHorizontal.toLowerCase())}return e.paddingLeft&&(n.paddingLeft=e.paddingLeft),e.paddingRight&&(n.paddingRight=e.paddingRight),e.paddingTop&&(n.paddingTop=e.paddingTop),e.paddingBottom&&(n.paddingBottom=e.paddingBottom),n}function E(e,t,n,r,i){if(e.type===`BOOLEAN_OPERATION`||e.type===`SLICE`)return r.push({nodeName:e.name,nodeType:e.type,reason:`Figma node type "${e.type}" is a destructive vector operation not supported in web HTML.`}),null;let a=e.absoluteBoundingBox||{x:0,y:0,width:200,height:100},o=Math.round(a.x-t.x),s=Math.round(a.y-t.y),c=Math.max(Math.round(a.width),20),l=Math.max(Math.round(a.height),20),u=T(e,n),d={},f=`container`,p=e.name.toLowerCase();e.type===`TEXT`?(d.text=e.characters||e.name,u.fontSize&&u.fontSize>=24?(f=`heading`,d.level=u.fontSize>=36?1:u.fontSize>=28?2:3):f=`paragraph`):e.type===`INSTANCE`?(e.componentId&&i.get(e.componentId),f=p.includes(`button`)?`button`:`card`,d.label=e.name):e.type===`COMPONENT`?(f=p.includes(`button`)?`button`:`card`,d.label=e.name):e.fills?.some(e=>e.type===`IMAGE`)?(f=`image`,d.src=`https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800&q=80`,d.alt=e.name):e.type===`VECTOR`||e.type===`STAR`||e.type===`REGULAR_POLYGON`?(f=`svg`,d.name=e.name,n.push({nodeName:e.name,property:`type`,details:`Vector shape converted to responsive SVG container.`})):e.type===`ELLIPSE`?(f=`avatar`,u.borderRadius=9999):e.type===`FRAME`||e.type===`GROUP`||e.type===`SECTION`?p.includes(`nav`)||p.includes(`header`)?(f=`navbar`,d.brandName=`Brand`,d.links=[`Home`,`Features`,`Pricing`,`About`],d.ctaLabel=`Get Started`):p.includes(`button`)||p.includes(`btn`)||p.includes(`cta`)?(f=`button`,d.label=e.name,d.icon=`ArrowRight`):p.includes(`card`)||p.includes(`item`)||p.includes(`tile`)?(f=`card`,d.title=e.name,d.description=`Imported Figma container element`):f=`container`:e.type===`RECTANGLE`&&(p.includes(`button`)||p.includes(`btn`)?(f=`button`,d.label=`Button`):f=`card`);let m=e.type===`INSTANCE`,h=e.componentId?i.get(e.componentId):void 0;return{id:_(`el`),type:f,name:e.name||`Figma Element`,x:Math.max(o,0),y:Math.max(s,0),width:c,height:l,rotation:0,zIndex:1,styles:u,content:d,isComponentInstance:m,masterComponentId:h}}function D(e){let t=performance.now(),n=[],r=[],i=new Map,a=[],o=0,s=0;e.components&&Object.entries(e.components).forEach(([e,t])=>{let n=_(`comp`);i.set(e,n);let r={id:_(`el`),type:`button`,name:t.name,x:0,y:0,width:160,height:44,rotation:0,zIndex:1,styles:{backgroundColor:`#0071e3`,textColor:`#ffffff`,borderRadius:10},content:{label:t.name}};a.push({id:n,name:t.name,category:`buttons`,templateElement:r,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()})});let c=[];(e.document?.children||[]).forEach(e=>{if(o++,e.type!==`CANVAS`)return;let t=_(`page`),a=[];(e.children||[]).forEach(e=>{o++,e.absoluteBoundingBox;let t=E(e,{x:0,y:0},n,r,i);t&&(a.push(t),s++),(e.children||[]).forEach(e=>{o++;let t=E(e,{x:0,y:0},n,r,i);t&&(a.push(t),s++)})}),c.push({id:t,name:e.name||`Page 1`,slug:(e.name||`page-1`).toLowerCase().replace(/\s+/g,`-`),elements:a,settings:{backgroundColor:`#f5f5f7`,padding:40,maxWidth:1440}})}),c.length===0&&c.push({id:_(`page`),name:`Imported Canvas`,slug:`imported-canvas`,elements:[],settings:{backgroundColor:`#f5f5f7`}});let l=Math.round((performance.now()-t)*10)/10,u={totalNodesScanned:o,convertedElementsCount:s,createdPagesCount:c.length,createdComponentsCount:a.length,unsupportedElements:r,approximationWarnings:n,executionDurationMs:l};return{project:{id:_(`proj`),name:e.name?`Figma: ${e.name}`:`Imported Figma Design`,description:`Imported from official Figma document format.`,type:`website`,pages:c,components:a,designSystem:x,settings:{canvasBackground:`#f5f5f7`,primaryColor:`#0071e3`,theme:`light`},createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},report:u}}var O={name:`Cyrus SaaS Design System & App`,version:`128.4`,lastModified:new Date().toISOString(),schemaVersion:0,components:{"comp:btn-primary":{key:`btn-primary-key`,name:`Primary Button`,description:`Main action CTA button with Cupertino radius`},"comp:feature-card":{key:`feature-card-key`,name:`Feature Metric Card`,description:`Auto-layout feature card with icon container`}},document:{id:`0:0`,name:`Document`,type:`DOCUMENT`,children:[{id:`0:1`,name:`Landing & Dashboard`,type:`CANVAS`,children:[{id:`1:10`,name:`Navigation Bar Header`,type:`FRAME`,absoluteBoundingBox:{x:40,y:30,width:1120,height:60},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,cornerRadius:12,children:[{id:`1:11`,name:`Brand Logo Title`,type:`TEXT`,absoluteBoundingBox:{x:60,y:48,width:140,height:24},characters:`Cyrus Studio Pro`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:16},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:12`,name:`Get Started CTA Button`,type:`INSTANCE`,componentId:`comp:btn-primary`,absoluteBoundingBox:{x:1e3,y:40,width:140,height:40},cornerRadius:10,fills:[{type:`SOLID`,color:{r:0,g:.44,b:.89,a:1}}]}]},{id:`1:20`,name:`Hero Section Frame`,type:`FRAME`,absoluteBoundingBox:{x:40,y:110,width:1120,height:300},fills:[{type:`SOLID`,color:{r:.98,g:.98,b:.99,a:1}}],cornerRadius:18,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,children:[{id:`1:21`,name:`Main Hero Headline`,type:`TEXT`,absoluteBoundingBox:{x:70,y:150,width:900,height:60},characters:`Next-Generation Design & Code IDE`,style:{fontFamily:`SF Pro Display`,fontWeight:800,fontSize:42},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:22`,name:`Hero Subheadline`,type:`TEXT`,absoluteBoundingBox:{x:70,y:220,width:800,height:40},characters:`Direct document mutation, live multiplayer collaboration, and production React generation.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:18},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]},{id:`1:23`,name:`Explore Demo Button`,type:`INSTANCE`,componentId:`comp:btn-primary`,absoluteBoundingBox:{x:70,y:280,width:160,height:44},cornerRadius:12,fills:[{type:`SOLID`,color:{r:0,g:.44,b:.89,a:1}}]}]},{id:`1:30`,name:`Feature Card 1`,type:`FRAME`,absoluteBoundingBox:{x:40,y:440,width:354,height:180},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],cornerRadius:16,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,effects:[{type:`DROP_SHADOW`,radius:8,visible:!0}],children:[{id:`1:31`,name:`Feature Card Title`,type:`TEXT`,absoluteBoundingBox:{x:60,y:470,width:300,height:28},characters:`Real-time Multiplayer`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:18},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:32`,name:`Feature Card Body`,type:`TEXT`,absoluteBoundingBox:{x:60,y:510,width:310,height:50},characters:`Collaborate live with cursors, selection highlights, and CRDT synchronization.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:13},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]}]},{id:`1:40`,name:`Feature Card 2`,type:`FRAME`,absoluteBoundingBox:{x:418,y:440,width:354,height:180},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],cornerRadius:16,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,effects:[{type:`DROP_SHADOW`,radius:8,visible:!0}],children:[{id:`1:41`,name:`Feature Card 2 Title`,type:`TEXT`,absoluteBoundingBox:{x:438,y:470,width:300,height:28},characters:`3-Tier Theming Engine`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:18},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:42`,name:`Feature Card 2 Body`,type:`TEXT`,absoluteBoundingBox:{x:438,y:510,width:310,height:50},characters:`Primitives, semantic decisions, and component tokens with instant light/dark modes.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:13},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]}]},{id:`1:50`,name:`Feature Card 3`,type:`FRAME`,absoluteBoundingBox:{x:796,y:440,width:364,height:180},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],cornerRadius:16,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,effects:[{type:`DROP_SHADOW`,radius:8,visible:!0}],children:[{id:`1:51`,name:`Feature Card 3 Title`,type:`TEXT`,absoluteBoundingBox:{x:816,y:470,width:300,height:28},characters:`React TypeScript Export`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:18},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:52`,name:`Feature Card 3 Body`,type:`TEXT`,absoluteBoundingBox:{x:816,y:510,width:310,height:50},characters:`Zero-lockin code generation with clean CSS variables and modular component tree.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:13},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]}]}]}]}},k=[/^127\.\d+\.\d+\.\d+$/,/^10\.\d+\.\d+\.\d+$/,/^172\.(1[6-9]|2\d|3[01])\.\d+\.\d+$/,/^192\.168\.\d+\.\d+$/,/^169\.254\.\d+\.\d+$/,/^0\.0\.0\.0$/,/^localhost$/i,/^::1$/,/^fe80:/i,/^fc00:/i],A=[`.local`,`.internal`,`.lan`,`.corp`,`.intranet`,`.home`,`.test`,`.example`,`.invalid`,`.cluster.local`,`instance-data`,`metadata.google.internal`,`169.254.169.254`];function j(e){if(!e||typeof e!=`string`)return{isValid:!1,error:`URL cannot be empty.`};let t=e.trim();/^https?:\/\//i.test(t)||(t=`https://${t}`);let n;try{n=new URL(t)}catch{return{isValid:!1,error:`Malformed or invalid URL format.`}}if(n.protocol!==`http:`&&n.protocol!==`https:`)return{isValid:!1,error:`Forbidden scheme "${n.protocol}". Only HTTP and HTTPS are permitted.`};let r=n.hostname.toLowerCase();for(let e of k)if(e.test(r))return{isValid:!1,error:`Security violation: Access to private/internal network IP (${r}) is blocked to prevent SSRF.`};for(let e of A)if(r.endsWith(e)||r===e)return{isValid:!1,error:`Security violation: Access to internal or cloud metadata domain (${r}) is blocked.`};return n.port&&n.port!==`80`&&n.port!==`443`?{isValid:!1,error:`Non-standard port "${n.port}" is restricted. Only standard web ports (80, 443) are allowed.`}:(n.username=``,n.password=``,n.hash=``,{isValid:!0,sanitizedUrl:n.toString(),domain:r})}var M=2097152,N=8e3;async function P(e){let t=j(e);if(!t.isValid||!t.sanitizedUrl||!t.domain)throw Error(t.error||`Invalid or forbidden URL.`);let n=t.sanitizedUrl,r=t.domain;try{let e=new AbortController,t=setTimeout(()=>e.abort(),N),i=await fetch(n,{signal:e.signal,headers:{Accept:`text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`}});if(clearTimeout(t),i.ok){let e=await i.text();if(e.length>M)throw Error(`Payload size exceeded limit (2MB).`);return{html:e,finalUrl:i.url||n,domain:r,sourceType:`direct_fetch`}}}catch(e){console.warn(`Direct fetch failed for "${n}", attempting safe public CORS fallback:`,e?.message)}try{let e=`https://api.allorigins.win/raw?url=${encodeURIComponent(n)}`,t=new AbortController,i=setTimeout(()=>t.abort(),N),a=await fetch(e,{signal:t.signal});if(clearTimeout(i),a.ok){let e=await a.text();if(e.length<=M&&e.includes(`<html`)||e.includes(`<body`)||e.includes(`<div`))return{html:e,finalUrl:n,domain:r,sourceType:`cors_proxy`}}}catch{console.warn(`CORS proxy fetch failed, generating semantic template for domain:`,r)}return{html:F(r,n),finalUrl:n,domain:r,sourceType:`synthetic_reconstruction`}}function F(e,t){let n=e.replace(/^www\./,``).split(`.`)[0].toUpperCase(),r=n.charAt(0)+n.slice(1).toLowerCase();return`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,J as n,Ln as r,Nr as i,Pr as a,Rt as o,Vt as s,di as c,i as l,oi as u,rt as d,tr as f,un as p,v as m}from"./vendor-icons-M_KBtuE-.js";import{t as h}from"./vendor-react-BTEcvIpc.js";import{c as g}from"./vendor-utils-3OgY5Lif.js";import{_,a as v,i as y,p as b,t as x,u as S}from"./themes-Cn_1tMt7.js";var C=e(c(),1);function w(e,t=1){if(!e)return`transparent`;let n=Math.round(e.r*255),r=Math.round(e.g*255),i=Math.round(e.b*255),a=Math.round((e.a??1)*t*100)/100;if(a>=1){let e=e=>e.toString(16).padStart(2,`0`);return`#${e(n)}${e(r)}${e(i)}`}return`rgba(${n}, ${r}, ${i}, ${a})`}function T(e,t){let n={};if(e.fills&&e.fills.length>0){let r=e.fills.find(e=>e.visible!==!1);r&&(r.type===`SOLID`&&r.color?e.type===`TEXT`?n.textColor=w(r.color,r.opacity):n.backgroundColor=w(r.color,r.opacity):r.type.startsWith(`GRADIENT_`)&&(t.push({nodeName:e.name,property:`fills`,details:`Gradient fill (${r.type}) approximated to fallback solid color.`}),r.gradientStops&&r.gradientStops.length>0&&(n.backgroundColor=w(r.gradientStops[0].color))))}if(e.strokes&&e.strokes.length>0&&e.strokeWeight){let t=e.strokes.find(e=>e.visible!==!1);t&&t.color&&(n.borderWidth=e.strokeWeight,n.borderColor=w(t.color,t.opacity))}if(e.cornerRadius?n.borderRadius=e.cornerRadius:e.rectangleCornerRadii&&e.rectangleCornerRadii.length>0&&(n.borderRadius=e.rectangleCornerRadii[0]),e.effects&&e.effects.length>0){let t=e.effects.find(e=>e.visible!==!1&&(e.type===`DROP_SHADOW`||e.type===`INNER_SHADOW`));t&&(n.shadow=t.radius>16?`lg`:t.radius>8?`md`:t.radius>2?`sm`:`none`)}if(e.style){if(e.style.fontSize&&(n.fontSize=e.style.fontSize),e.style.fontWeight){let t=String(e.style.fontWeight);n.fontWeight=[`300`,`400`,`500`,`600`,`700`,`800`].includes(t)?t:e.style.fontWeight>=700?`700`:e.style.fontWeight>=600?`600`:e.style.fontWeight>=500?`500`:`400`}e.style.fontFamily&&(n.fontFamily=e.style.fontFamily),e.style.textAlignHorizontal&&(n.textAlign=e.style.textAlignHorizontal.toLowerCase())}return e.paddingLeft&&(n.paddingLeft=e.paddingLeft),e.paddingRight&&(n.paddingRight=e.paddingRight),e.paddingTop&&(n.paddingTop=e.paddingTop),e.paddingBottom&&(n.paddingBottom=e.paddingBottom),n}function E(e,t,n,r,i){if(e.type===`BOOLEAN_OPERATION`||e.type===`SLICE`)return r.push({nodeName:e.name,nodeType:e.type,reason:`Figma node type "${e.type}" is a destructive vector operation not supported in web HTML.`}),null;let a=e.absoluteBoundingBox||{x:0,y:0,width:200,height:100},o=Math.round(a.x-t.x),s=Math.round(a.y-t.y),c=Math.max(Math.round(a.width),20),l=Math.max(Math.round(a.height),20),u=T(e,n),d={},f=`container`,p=e.name.toLowerCase();e.type===`TEXT`?(d.text=e.characters||e.name,u.fontSize&&u.fontSize>=24?(f=`heading`,d.level=u.fontSize>=36?1:u.fontSize>=28?2:3):f=`paragraph`):e.type===`INSTANCE`?(e.componentId&&i.get(e.componentId),f=p.includes(`button`)?`button`:`card`,d.label=e.name):e.type===`COMPONENT`?(f=p.includes(`button`)?`button`:`card`,d.label=e.name):e.fills?.some(e=>e.type===`IMAGE`)?(f=`image`,d.src=`https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800&q=80`,d.alt=e.name):e.type===`VECTOR`||e.type===`STAR`||e.type===`REGULAR_POLYGON`?(f=`svg`,d.name=e.name,n.push({nodeName:e.name,property:`type`,details:`Vector shape converted to responsive SVG container.`})):e.type===`ELLIPSE`?(f=`avatar`,u.borderRadius=9999):e.type===`FRAME`||e.type===`GROUP`||e.type===`SECTION`?p.includes(`nav`)||p.includes(`header`)?(f=`navbar`,d.brandName=`Brand`,d.links=[`Home`,`Features`,`Pricing`,`About`],d.ctaLabel=`Get Started`):p.includes(`button`)||p.includes(`btn`)||p.includes(`cta`)?(f=`button`,d.label=e.name,d.icon=`ArrowRight`):p.includes(`card`)||p.includes(`item`)||p.includes(`tile`)?(f=`card`,d.title=e.name,d.description=`Imported Figma container element`):f=`container`:e.type===`RECTANGLE`&&(p.includes(`button`)||p.includes(`btn`)?(f=`button`,d.label=`Button`):f=`card`);let m=e.type===`INSTANCE`,h=e.componentId?i.get(e.componentId):void 0;return{id:_(`el`),type:f,name:e.name||`Figma Element`,x:Math.max(o,0),y:Math.max(s,0),width:c,height:l,rotation:0,zIndex:1,styles:u,content:d,isComponentInstance:m,masterComponentId:h}}function D(e){let t=performance.now(),n=[],r=[],i=new Map,a=[],o=0,s=0;e.components&&Object.entries(e.components).forEach(([e,t])=>{let n=_(`comp`);i.set(e,n);let r={id:_(`el`),type:`button`,name:t.name,x:0,y:0,width:160,height:44,rotation:0,zIndex:1,styles:{backgroundColor:`#0071e3`,textColor:`#ffffff`,borderRadius:10},content:{label:t.name}};a.push({id:n,name:t.name,category:`buttons`,templateElement:r,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()})});let c=[];(e.document?.children||[]).forEach(e=>{if(o++,e.type!==`CANVAS`)return;let t=_(`page`),a=[];(e.children||[]).forEach(e=>{o++,e.absoluteBoundingBox;let t=E(e,{x:0,y:0},n,r,i);t&&(a.push(t),s++),(e.children||[]).forEach(e=>{o++;let t=E(e,{x:0,y:0},n,r,i);t&&(a.push(t),s++)})}),c.push({id:t,name:e.name||`Page 1`,slug:(e.name||`page-1`).toLowerCase().replace(/\s+/g,`-`),elements:a,settings:{backgroundColor:`#f5f5f7`,padding:40,maxWidth:1440}})}),c.length===0&&c.push({id:_(`page`),name:`Imported Canvas`,slug:`imported-canvas`,elements:[],settings:{backgroundColor:`#f5f5f7`}});let l=Math.round((performance.now()-t)*10)/10,u={totalNodesScanned:o,convertedElementsCount:s,createdPagesCount:c.length,createdComponentsCount:a.length,unsupportedElements:r,approximationWarnings:n,executionDurationMs:l};return{project:{id:_(`proj`),name:e.name?`Figma: ${e.name}`:`Imported Figma Design`,description:`Imported from official Figma document format.`,type:`website`,pages:c,components:a,designSystem:x,settings:{canvasBackground:`#f5f5f7`,primaryColor:`#0071e3`,theme:`light`},createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},report:u}}var O={name:`Cyrus SaaS Design System & App`,version:`128.4`,lastModified:new Date().toISOString(),schemaVersion:0,components:{"comp:btn-primary":{key:`btn-primary-key`,name:`Primary Button`,description:`Main action CTA button with Cupertino radius`},"comp:feature-card":{key:`feature-card-key`,name:`Feature Metric Card`,description:`Auto-layout feature card with icon container`}},document:{id:`0:0`,name:`Document`,type:`DOCUMENT`,children:[{id:`0:1`,name:`Landing & Dashboard`,type:`CANVAS`,children:[{id:`1:10`,name:`Navigation Bar Header`,type:`FRAME`,absoluteBoundingBox:{x:40,y:30,width:1120,height:60},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,cornerRadius:12,children:[{id:`1:11`,name:`Brand Logo Title`,type:`TEXT`,absoluteBoundingBox:{x:60,y:48,width:140,height:24},characters:`Cyrus Studio Pro`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:16},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:12`,name:`Get Started CTA Button`,type:`INSTANCE`,componentId:`comp:btn-primary`,absoluteBoundingBox:{x:1e3,y:40,width:140,height:40},cornerRadius:10,fills:[{type:`SOLID`,color:{r:0,g:.44,b:.89,a:1}}]}]},{id:`1:20`,name:`Hero Section Frame`,type:`FRAME`,absoluteBoundingBox:{x:40,y:110,width:1120,height:300},fills:[{type:`SOLID`,color:{r:.98,g:.98,b:.99,a:1}}],cornerRadius:18,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,children:[{id:`1:21`,name:`Main Hero Headline`,type:`TEXT`,absoluteBoundingBox:{x:70,y:150,width:900,height:60},characters:`Next-Generation Design & Code IDE`,style:{fontFamily:`SF Pro Display`,fontWeight:800,fontSize:42},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:22`,name:`Hero Subheadline`,type:`TEXT`,absoluteBoundingBox:{x:70,y:220,width:800,height:40},characters:`Direct document mutation, live multiplayer collaboration, and production React generation.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:18},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]},{id:`1:23`,name:`Explore Demo Button`,type:`INSTANCE`,componentId:`comp:btn-primary`,absoluteBoundingBox:{x:70,y:280,width:160,height:44},cornerRadius:12,fills:[{type:`SOLID`,color:{r:0,g:.44,b:.89,a:1}}]}]},{id:`1:30`,name:`Feature Card 1`,type:`FRAME`,absoluteBoundingBox:{x:40,y:440,width:354,height:180},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],cornerRadius:16,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,effects:[{type:`DROP_SHADOW`,radius:8,visible:!0}],children:[{id:`1:31`,name:`Feature Card Title`,type:`TEXT`,absoluteBoundingBox:{x:60,y:470,width:300,height:28},characters:`Real-time Multiplayer`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:18},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:32`,name:`Feature Card Body`,type:`TEXT`,absoluteBoundingBox:{x:60,y:510,width:310,height:50},characters:`Collaborate live with cursors, selection highlights, and CRDT synchronization.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:13},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]}]},{id:`1:40`,name:`Feature Card 2`,type:`FRAME`,absoluteBoundingBox:{x:418,y:440,width:354,height:180},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],cornerRadius:16,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,effects:[{type:`DROP_SHADOW`,radius:8,visible:!0}],children:[{id:`1:41`,name:`Feature Card 2 Title`,type:`TEXT`,absoluteBoundingBox:{x:438,y:470,width:300,height:28},characters:`3-Tier Theming Engine`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:18},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:42`,name:`Feature Card 2 Body`,type:`TEXT`,absoluteBoundingBox:{x:438,y:510,width:310,height:50},characters:`Primitives, semantic decisions, and component tokens with instant light/dark modes.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:13},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]}]},{id:`1:50`,name:`Feature Card 3`,type:`FRAME`,absoluteBoundingBox:{x:796,y:440,width:364,height:180},fills:[{type:`SOLID`,color:{r:1,g:1,b:1,a:1}}],cornerRadius:16,strokes:[{type:`SOLID`,color:{r:.9,g:.9,b:.92,a:1}}],strokeWeight:1,effects:[{type:`DROP_SHADOW`,radius:8,visible:!0}],children:[{id:`1:51`,name:`Feature Card 3 Title`,type:`TEXT`,absoluteBoundingBox:{x:816,y:470,width:300,height:28},characters:`React TypeScript Export`,style:{fontFamily:`SF Pro Display`,fontWeight:700,fontSize:18},fills:[{type:`SOLID`,color:{r:.11,g:.11,b:.12,a:1}}]},{id:`1:52`,name:`Feature Card 3 Body`,type:`TEXT`,absoluteBoundingBox:{x:816,y:510,width:310,height:50},characters:`Zero-lockin code generation with clean CSS variables and modular component tree.`,style:{fontFamily:`SF Pro Text`,fontWeight:400,fontSize:13},fills:[{type:`SOLID`,color:{r:.43,g:.43,b:.45,a:1}}]}]}]}]}},k=[/^127\.\d+\.\d+\.\d+$/,/^10\.\d+\.\d+\.\d+$/,/^172\.(1[6-9]|2\d|3[01])\.\d+\.\d+$/,/^192\.168\.\d+\.\d+$/,/^169\.254\.\d+\.\d+$/,/^0\.0\.0\.0$/,/^localhost$/i,/^::1$/,/^fe80:/i,/^fc00:/i],A=[`.local`,`.internal`,`.lan`,`.corp`,`.intranet`,`.home`,`.test`,`.example`,`.invalid`,`.cluster.local`,`instance-data`,`metadata.google.internal`,`169.254.169.254`];function j(e){if(!e||typeof e!=`string`)return{isValid:!1,error:`URL cannot be empty.`};let t=e.trim();/^https?:\/\//i.test(t)||(t=`https://${t}`);let n;try{n=new URL(t)}catch{return{isValid:!1,error:`Malformed or invalid URL format.`}}if(n.protocol!==`http:`&&n.protocol!==`https:`)return{isValid:!1,error:`Forbidden scheme "${n.protocol}". Only HTTP and HTTPS are permitted.`};let r=n.hostname.toLowerCase();for(let e of k)if(e.test(r))return{isValid:!1,error:`Security violation: Access to private/internal network IP (${r}) is blocked to prevent SSRF.`};for(let e of A)if(r.endsWith(e)||r===e)return{isValid:!1,error:`Security violation: Access to internal or cloud metadata domain (${r}) is blocked.`};return n.port&&n.port!==`80`&&n.port!==`443`?{isValid:!1,error:`Non-standard port "${n.port}" is restricted. Only standard web ports (80, 443) are allowed.`}:(n.username=``,n.password=``,n.hash=``,{isValid:!0,sanitizedUrl:n.toString(),domain:r})}var M=2097152,N=8e3;async function P(e){let t=j(e);if(!t.isValid||!t.sanitizedUrl||!t.domain)throw Error(t.error||`Invalid or forbidden URL.`);let n=t.sanitizedUrl,r=t.domain;try{let e=new AbortController,t=setTimeout(()=>e.abort(),N),i=await fetch(n,{signal:e.signal,headers:{Accept:`text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`}});if(clearTimeout(t),i.ok){let e=await i.text();if(e.length>M)throw Error(`Payload size exceeded limit (2MB).`);return{html:e,finalUrl:i.url||n,domain:r,sourceType:`direct_fetch`}}}catch(e){console.warn(`Direct fetch failed for "${n}", attempting safe public CORS fallback:`,e?.message)}try{let e=`https://api.allorigins.win/raw?url=${encodeURIComponent(n)}`,t=new AbortController,i=setTimeout(()=>t.abort(),N),a=await fetch(e,{signal:t.signal});if(clearTimeout(i),a.ok){let e=await a.text();if(e.length<=M&&e.includes(`<html`)||e.includes(`<body`)||e.includes(`<div`))return{html:e,finalUrl:n,domain:r,sourceType:`cors_proxy`}}}catch{console.warn(`CORS proxy fetch failed, generating semantic template for domain:`,r)}return{html:F(r,n),finalUrl:n,domain:r,sourceType:`synthetic_reconstruction`}}function F(e,t){let n=e.replace(/^www\./,``).split(`.`)[0].toUpperCase(),r=n.charAt(0)+n.slice(1).toLowerCase();return`
|
|
2
2
|
<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
package/dist/assets/{KeyboardShortcutsDialog-HNBNVkqd.js → KeyboardShortcutsDialog-CG2dNBJ-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,Xn as n,Xr as r,bn as i,ct as a,di as o,ht as s,rn as c,vn as l}from"./vendor-icons-M_KBtuE-.js";import{t as u}from"./vendor-react-BTEcvIpc.js";import{c as d}from"./vendor-utils-3OgY5Lif.js";import{a as f,f as p,m,o as h,s as g}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-W7wSyTde.js";import{C as t,Xn as n,Xr as r,bn as i,ct as a,di as o,ht as s,rn as c,vn as l}from"./vendor-icons-M_KBtuE-.js";import{t as u}from"./vendor-react-BTEcvIpc.js";import{c as d}from"./vendor-utils-3OgY5Lif.js";import{a as f,f as p,m,o as h,s as g}from"./index-DvPq7fF5.js";var _=e(o(),1),v=u(),y=`C:/Users/Shadow/Desktop/cyrus/src/components/dialogs/KeyboardShortcutsDialog.tsx`;function b({isOpen:e,onClose:o}){let[u,b]=(0,_.useState)(``),[x,S]=(0,_.useState)(`all`),[C,w]=(0,_.useState)(()=>g.getShortcuts());(0,_.useEffect)(()=>g.subscribe(()=>{w([...g.getShortcuts()])}),[]);let T=(0,_.useMemo)(()=>g.getConflicts(),[C]),E=[{id:`all`,label:`All`,icon:i},{id:`general`,label:`General`,icon:n},{id:`editing`,label:`Selection`,icon:l},{id:`canvas`,label:`Canvas`,icon:c},{id:`widgets`,label:`Quick Widgets`,icon:r}],D=(0,_.useMemo)(()=>{let e=u.trim().toLowerCase();return C.filter(t=>{if(x!==`all`&&t.category!==x)return!1;if(!e)return!0;let n=t.name.toLowerCase().includes(e),r=t.description.toLowerCase().includes(e),i=t.categoryLabel.toLowerCase().includes(e);return n||r||i})},[C,u,x]),O=h();return(0,v.jsxDEV)(p,{isOpen:e,onClose:o,title:`Keyboard Shortcuts`,subtitle:`Power up your workflow with ${O?`macOS (⌘)`:`Windows (Ctrl)`} hotkeys.`,maxWidth:`lg`,footer:(0,v.jsxDEV)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,v.jsxDEV)(m,{variant:`ghost`,size:`xs`,onClick:()=>g.resetAllToDefaults(),className:`text-[#86868b] hover:text-[#1d1d1f] flex items-center gap-1.5`,children:[(0,v.jsxDEV)(s,{className:`w-3.5 h-3.5`},void 0,!1,{fileName:y,lineNumber:89,columnNumber:13},this),(0,v.jsxDEV)(`span`,{children:`Reset to Defaults`},void 0,!1,{fileName:y,lineNumber:90,columnNumber:13},this)]},void 0,!0,{fileName:y,lineNumber:83,columnNumber:11},this),(0,v.jsxDEV)(m,{variant:`primary`,size:`sm`,onClick:o,children:`Done`},void 0,!1,{fileName:y,lineNumber:93,columnNumber:11},this)]},void 0,!0,{fileName:y,lineNumber:82,columnNumber:9},this),children:(0,v.jsxDEV)(`div`,{className:`space-y-4`,children:[T.length>0&&(0,v.jsxDEV)(`div`,{className:`p-3 bg-[#fff9f0] dark:bg-[#3a2810] border border-[#ffe4b3] dark:border-[#5c4015] rounded-xl flex items-start gap-2.5 text-[12px] text-[#b35900] dark:text-[#f7a044]`,children:[(0,v.jsxDEV)(t,{className:`w-4 h-4 shrink-0 mt-0.5`},void 0,!1,{fileName:y,lineNumber:103,columnNumber:13},this),(0,v.jsxDEV)(`div`,{children:[(0,v.jsxDEV)(`span`,{className:`font-semibold`,children:[T.length,` shortcut conflict(s) detected:`]},void 0,!0,{fileName:y,lineNumber:105,columnNumber:15},this),(0,v.jsxDEV)(`ul`,{className:`list-disc pl-4 mt-1 space-y-0.5`,children:T.map((e,t)=>(0,v.jsxDEV)(`li`,{children:e.message},t,!1,{fileName:y,lineNumber:108,columnNumber:19},this))},void 0,!1,{fileName:y,lineNumber:106,columnNumber:15},this)]},void 0,!0,{fileName:y,lineNumber:104,columnNumber:13},this)]},void 0,!0,{fileName:y,lineNumber:102,columnNumber:11},this),(0,v.jsxDEV)(`div`,{className:`flex flex-col sm:flex-row items-center gap-2`,children:[(0,v.jsxDEV)(`div`,{className:`relative flex-1 w-full`,children:[(0,v.jsxDEV)(a,{className:`w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-[#86868b]`},void 0,!1,{fileName:y,lineNumber:118,columnNumber:13},this),(0,v.jsxDEV)(`input`,{type:`text`,value:u,onChange:e=>b(e.target.value),placeholder:`Search shortcuts (e.g. undo, duplicate, zoom, chart)...`,className:`w-full pl-9 pr-3 py-1.5 text-[13px] bg-[#f5f5f7] dark:bg-[#2c2c2e] text-[#1d1d1f] dark:text-[#f5f5f7] rounded-xl border border-transparent focus:border-[#0071e3] outline-none placeholder-[#86868b]`},void 0,!1,{fileName:y,lineNumber:119,columnNumber:13},this)]},void 0,!0,{fileName:y,lineNumber:117,columnNumber:11},this),(0,v.jsxDEV)(`div`,{className:`flex items-center gap-1 w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0`,children:E.map(e=>{let t=e.icon;return(0,v.jsxDEV)(`button`,{onClick:()=>S(e.id),className:d(`px-2.5 py-1 rounded-lg text-[12px] font-medium flex items-center gap-1.5 transition-colors shrink-0 cursor-pointer`,x===e.id?`bg-[#0071e3] text-white shadow-2xs`:`text-[#6e6e73] hover:text-[#1d1d1f] hover:bg-[#f4f4f6] dark:hover:bg-[#2c2c2e]`),children:[(0,v.jsxDEV)(t,{className:`w-3.5 h-3.5`},void 0,!1,{fileName:y,lineNumber:142,columnNumber:19},this),(0,v.jsxDEV)(`span`,{children:e.label},void 0,!1,{fileName:y,lineNumber:143,columnNumber:19},this)]},e.id,!0,{fileName:y,lineNumber:132,columnNumber:17},this)})},void 0,!1,{fileName:y,lineNumber:128,columnNumber:11},this)]},void 0,!0,{fileName:y,lineNumber:116,columnNumber:9},this),(0,v.jsxDEV)(`div`,{className:`max-h-[380px] overflow-y-auto pr-1 space-y-1`,children:D.length===0?(0,v.jsxDEV)(`div`,{className:`py-12 text-center text-[#86868b] text-[13px]`,children:[`No shortcuts found matching "`,u,`".`]},void 0,!0,{fileName:y,lineNumber:153,columnNumber:13},this):D.map(e=>{let t=e.customBinding||e.defaultBinding,n=f(t),r=!!e.customBinding;return(0,v.jsxDEV)(`div`,{className:`flex items-center justify-between px-3 py-2 rounded-xl hover:bg-[#f9f9fb] dark:hover:bg-[#252528] border border-transparent hover:border-[#f0f0f2] transition-colors`,children:[(0,v.jsxDEV)(`div`,{className:`min-w-0 pr-3`,children:[(0,v.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsxDEV)(`span`,{className:`text-[13px] font-medium text-[#1d1d1f] dark:text-[#f5f5f7]`,children:e.name},void 0,!1,{fileName:y,lineNumber:169,columnNumber:23},this),r&&(0,v.jsxDEV)(`span`,{className:`text-[10px] bg-[#0071e3]/10 text-[#0071e3] px-1.5 py-0.5 rounded font-medium`,children:`Custom`},void 0,!1,{fileName:y,lineNumber:173,columnNumber:25},this)]},void 0,!0,{fileName:y,lineNumber:168,columnNumber:21},this),(0,v.jsxDEV)(`p`,{className:`text-[11.5px] text-[#86868b] truncate mt-0.5`,children:e.description},void 0,!1,{fileName:y,lineNumber:178,columnNumber:21},this)]},void 0,!0,{fileName:y,lineNumber:167,columnNumber:19},this),(0,v.jsxDEV)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:n.map((e,t)=>(0,v.jsxDEV)(`kbd`,{className:`px-2 py-1 text-[11.5px] font-mono font-semibold text-[#1d1d1f] dark:text-[#f5f5f7] bg-[#f5f5f7] dark:bg-[#2c2c2e] border border-[#e5e5ea] dark:border-[#3a3a3c] rounded-md shadow-2xs min-w-[24px] text-center`,children:e},t,!1,{fileName:y,lineNumber:185,columnNumber:23},this))},void 0,!1,{fileName:y,lineNumber:183,columnNumber:19},this)]},e.id,!0,{fileName:y,lineNumber:163,columnNumber:17},this)})},void 0,!1,{fileName:y,lineNumber:151,columnNumber:9},this)]},void 0,!0,{fileName:y,lineNumber:99,columnNumber:7},this)},void 0,!1,{fileName:y,lineNumber:75,columnNumber:5},this)}export{b as KeyboardShortcutsDialog};
|