cyrus-studio 1.0.0

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.
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),l=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});export{l as n,c as r,o as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,o as n,r,s as i}from"./vendor-utils-3OgY5Lif.js";import{C as a,S as o,T as s,_ as c,a as l,b as u,g as d,h as f,m as p,n as m,r as h,v as g,w as _,x as v,y}from"./vendor-firebase-DHYCsgNh.js";function b(e=`elem`){let t=``;for(let e=0;e<8;e++)t+=`0123456789abcdefghijklmnopqrstuvwxyz`.charAt(Math.floor(Math.random()*36));return`${e}_${t}`}var x=_().length?a():s({apiKey:`AIzaSyADETpVkjSKxwXbcvDOKwVOpNq5QmmEkAg`,authDomain:`faah-canfig.firebaseapp.com`,projectId:`faah-canfig`,storageBucket:`faah-canfig.firebasestorage.app`,messagingSenderId:`947514329279`,appId:`1:947514329279:web:6bca4f5a228c7d0c9e9e0a`,measurementId:`G-02RKCV7NZT`}),S=l(x),C=o(x),w=new h,T=new m,E=`cyrus_projects`;function D(e){if(e==null)return null;if(Array.isArray(e))return e.map(D);if(typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=D(r));return t}return e}async function O(e){try{let t=S.currentUser,n=v(C,E,e.id),r=D({...e,ownerId:t?t.uid:e.ownerId||`guest`,ownerEmail:t?t.email:null,updatedAt:new Date().toISOString(),cloudSyncedAt:new Date().toISOString()});await g(n,r,{merge:!0})}catch(t){console.warn(`[CloudSync] Could not sync project ${e.id} to Firestore:`,t.message)}}async function k(e){try{let t=v(C,E,e),n=await f(t);return n.exists()?n.data():null}catch(t){return console.warn(`[CloudSync] Error reading project ${e} from Firestore:`,t.message),null}}async function A(){try{let e=S.currentUser;if(!e)return[];let t=c(u(C,E),y(`ownerId`,`==`,e.uid)),n=await d(t),r=[];return n.forEach(e=>{r.push(e.data())}),r.sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime())}catch(e){return console.warn(`[CloudSync] Error fetching user projects from Firestore:`,e.message),[]}}async function j(e){try{let t=v(C,E,e);await p(t)}catch(t){console.warn(`[CloudSync] Error deleting project ${e} from Firestore:`,t.message)}}var M=`cyrus_proj_`,N=`cyrus_db_initialized_v5`;async function P(){try{await i(N,!0)}catch(e){console.warn(`Storage init note:`,e)}}async function F(){try{let t=await e(),n=new Map;for(let[e,r]of t)if(typeof e==`string`&&e.startsWith(M)&&r){let e=r;n.set(e.id,e)}try{let e=await A();for(let t of e)(!n.has(t.id)||new Date(t.updatedAt).getTime()>new Date(n.get(t.id).updatedAt).getTime())&&(n.set(t.id,t),await i(`${M}${t.id}`,t))}catch{}return Array.from(n.values()).sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime())}catch(e){return console.error(`Error fetching projects:`,e),[]}}async function I(e){try{let t=await n(`${M}${e}`);if(t)return t;let r=await k(e);return r?(await i(`${M}${e}`,r),r):null}catch(t){return console.error(`Error fetching project ${e}:`,t),null}}async function L(e){try{let t={...e,updatedAt:new Date().toISOString()};await i(`${M}${e.id}`,t),O(t).catch(()=>{})}catch(t){console.error(`Error saving project ${e.id}:`,t)}}async function R(e){try{await t(`${M}${e}`),j(e).catch(()=>{})}catch(t){console.error(`Error deleting project ${e}:`,t)}}async function z(e){return JSON.stringify(e,null,2)}async function B(e){let t=JSON.parse(e);if(!t.id||!t.name||!Array.isArray(t.pages))throw Error(`Invalid Cyrus project JSON format.`);let n={...t,id:b(`proj`),name:`${t.name} (Imported)`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};return await L(n),n}async function V(){try{let n=await e();for(let[e]of n)typeof e==`string`&&e.startsWith(M)&&await t(e)}catch(e){console.error(`Error resetting data:`,e)}}var H=r((e,t)=>({toasts:[],addToast:(n,r=`info`)=>{let i=`toast_${Date.now()}_${Math.random()}`,a={id:i,type:r,text:n};e({toasts:[...t().toasts,a]}),setTimeout(()=>{t().removeToast(i)},3200)},removeToast:n=>{e({toasts:t().toasts.filter(e=>e.id!==n)})}})),U={colors:{blue50:`#f0f7ff`,blue100:`#e0effe`,blue200:`#bae0fd`,blue300:`#7cc5fb`,blue400:`#38a5f8`,blue500:`#0071e3`,blue600:`#0062c4`,blue700:`#004fa1`,blue800:`#004385`,blue900:`#05386f`,indigo500:`#5856d6`,purple500:`#af52de`,emerald500:`#34c759`,rose500:`#ff2d55`,amber500:`#ff9500`,gray50:`#fbfbfd`,gray100:`#f5f5f7`,gray200:`#e5e5ea`,gray300:`#d1d1d6`,gray400:`#c7c7cc`,gray500:`#8e8e93`,gray600:`#636366`,gray700:`#3a3a3c`,gray800:`#2c2c2e`,gray900:`#1c1c1e`,gray950:`#1d1d1f`,white:`#ffffff`,black:`#000000`,transparent:`transparent`},spacing:{spacing0:0,spacing2:2,spacing4:4,spacing8:8,spacing12:12,spacing16:16,spacing20:20,spacing24:24,spacing32:32,spacing40:40,spacing48:48,spacing64:64,spacing80:80},radius:{radius0:0,radius2:2,radius4:4,radius6:6,radius8:8,radius10:10,radius12:12,radius16:16,radius20:20,radius24:24,radiusPill:9999},typography:{fontSans:`Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,fontMono:`'SF Mono', Monaco, Consolas, monospace`,fontSerif:`'New York', Georgia, serif`,size10:10,size11:11,size12:12,size13:13,size14:14,size15:15,size16:16,size18:18,size20:20,size24:24,size28:28,size32:32,size40:40,size48:48,size64:64,weightLight:`300`,weightRegular:`400`,weightMedium:`500`,weightSemibold:`600`,weightBold:`700`,weightExtrabold:`800`},shadows:{shadowNone:`none`,shadowXs:`0 1px 2px 0 rgba(0, 0, 0, 0.05)`,shadowSm:`0 2px 8px -1px rgba(0, 0, 0, 0.06)`,shadowMd:`0 4px 16px -2px rgba(0, 0, 0, 0.08)`,shadowLg:`0 12px 28px -4px rgba(0, 0, 0, 0.12)`,shadowXl:`0 20px 48px -6px rgba(0, 0, 0, 0.16)`}},W={colors:{colorPrimary:`#0071e3`,colorPrimaryHover:`#0077ed`,colorSecondary:`#5856d6`,colorBackground:`#f5f5f7`,colorBackgroundAlt:`#fbfbfd`,colorSurface:`#ffffff`,colorSurfaceSecondary:`#f4f4f6`,colorSurfaceTertiary:`#e5e5ea`,colorText:`#1d1d1f`,colorTextSecondary:`#86868b`,colorTextTertiary:`#a1a1a6`,colorTextInverse:`#ffffff`,colorBorder:`#e5e5ea`,colorBorderSecondary:`#d1d1d6`,colorFocusRing:`#0071e3`,colorSuccess:`#34c759`,colorWarning:`#ff9500`,colorError:`#ff3b30`,colorInfo:`#0071e3`},spacing:{spacingInline:8,spacingStack:16,spacingCard:24,spacingSection:48,spacingContainer:80},radius:{radiusControl:10,radiusCard:16,radiusModal:20,radiusBadge:9999}},G={button:{primaryBackground:`#0071e3`,primaryHover:`#0077ed`,primaryText:`#ffffff`,secondaryBackground:`#f4f4f6`,secondaryHover:`#e5e5ea`,secondaryText:`#1d1d1f`,borderRadius:10,paddingX:18,paddingY:10,fontSize:14,fontWeight:`600`},card:{background:`#ffffff`,border:`#e5e5ea`,borderRadius:16,padding:24,shadow:`0 4px 16px -2px rgba(0, 0, 0, 0.08)`},input:{background:`#fbfbfd`,backgroundFocus:`#ffffff`,border:`#e5e5ea`,borderFocus:`#0071e3`,text:`#1d1d1f`,placeholder:`#86868b`,borderRadius:10,height:40,fontSize:13},navbar:{background:`rgba(255, 255, 255, 0.85)`,border:`#e5e5ea`,text:`#1d1d1f`,height:60,backdropBlur:16}},K={colors:{colorPrimary:`#0a84ff`,colorPrimaryHover:`#409cff`,colorSecondary:`#5e5ce6`,colorBackground:`#000000`,colorBackgroundAlt:`#121214`,colorSurface:`#1c1c1e`,colorSurfaceSecondary:`#2c2c2e`,colorSurfaceTertiary:`#3a3a3c`,colorText:`#ffffff`,colorTextSecondary:`#8e8e93`,colorTextTertiary:`#636366`,colorTextInverse:`#000000`,colorBorder:`#38383a`,colorBorderSecondary:`#48484a`,colorFocusRing:`#0a84ff`,colorSuccess:`#30d158`,colorWarning:`#ffd60a`,colorError:`#ff453a`,colorInfo:`#64d2ff`},spacing:{spacingInline:8,spacingStack:16,spacingCard:24,spacingSection:48,spacingContainer:80},radius:{radiusControl:10,radiusCard:16,radiusModal:20,radiusBadge:9999}},q={button:{primaryBackground:`#0a84ff`,primaryHover:`#409cff`,primaryText:`#ffffff`,secondaryBackground:`#2c2c2e`,secondaryHover:`#3a3a3c`,secondaryText:`#ffffff`,borderRadius:10,paddingX:18,paddingY:10,fontSize:14,fontWeight:`600`},card:{background:`#1c1c1e`,border:`#38383a`,borderRadius:16,padding:24,shadow:`0 8px 24px -2px rgba(0, 0, 0, 0.45)`},input:{background:`#1c1c1e`,backgroundFocus:`#2c2c2e`,border:`#38383a`,borderFocus:`#0a84ff`,text:`#ffffff`,placeholder:`#8e8e93`,borderRadius:10,height:40,fontSize:13},navbar:{background:`rgba(28, 28, 30, 0.85)`,border:`#38383a`,text:`#ffffff`,height:60,backdropBlur:16}},J={colors:{...W.colors,primary:`#0071e3`,secondary:`#5856d6`,background:`#f5f5f7`,surface:`#ffffff`,surfaceSecondary:`#f4f4f6`,text:`#1d1d1f`,textSecondary:`#86868b`,border:`#e5e5ea`,success:`#34c759`,warning:`#ff9500`,error:`#ff3b30`,info:`#0071e3`},typography:{display:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:48,fontWeight:`700`,lineHeight:1.15,letterSpacing:`-0.03em`},heading1:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:32,fontWeight:`700`,lineHeight:1.2,letterSpacing:`-0.025em`},heading2:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:24,fontWeight:`600`,lineHeight:1.3,letterSpacing:`-0.02em`},heading3:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:18,fontWeight:`600`,lineHeight:1.4,letterSpacing:`-0.015em`},body:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:14,fontWeight:`400`,lineHeight:1.5,letterSpacing:`-0.01em`},bodySmall:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:12,fontWeight:`400`,lineHeight:1.5,letterSpacing:`0`},caption:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:11,fontWeight:`500`,lineHeight:1.4,letterSpacing:`0.01em`},label:{fontFamily:`Inter, -apple-system, sans-serif`,fontSize:12,fontWeight:`600`,lineHeight:1.4,letterSpacing:`0.02em`}},radius:{none:0,small:6,medium:12,large:18,pill:999},shadows:{none:`none`,small:`0 1px 2px 0 rgba(0, 0, 0, 0.05)`,medium:`0 4px 12px -2px rgba(0, 0, 0, 0.08)`,large:`0 12px 24px -4px rgba(0, 0, 0, 0.12)`},spacing:{xs:4,sm:8,md:16,lg:24,xl:32,"2xl":48},primitives:U,semantic:W,components:G,mode:`light`,activeThemeId:`apple_system`};function Y(e,t){let n=t===`dark`,r=n?K:W,i=n?q:G;return{...e,mode:t,colors:{...e.colors,...r.colors,primary:n?`#0a84ff`:`#0071e3`,background:r.colors.colorBackground,surface:r.colors.colorSurface,surfaceSecondary:r.colors.colorSurfaceSecondary,text:r.colors.colorText,textSecondary:r.colors.colorTextSecondary,border:r.colors.colorBorder},semantic:r,components:i}}function X(e,t,n){let r=e.semantic||W,i={...r.colors,[t]:n},a={...e.components||G};return t===`colorPrimary`&&(a.button={...a.button,primaryBackground:n},a.input={...a.input,borderFocus:n}),{...e,colors:{...e.colors,[t===`colorPrimary`?`primary`:t===`colorBackground`?`background`:t===`colorSurface`?`surface`:t===`colorText`?`text`:t]:n},semantic:{...r,colors:i},components:a}}var Z=[{id:`minimal`,name:`Apple Minimal`,description:`Clean light neutrals with iconic Cupertino blue accents and crisp typography.`,tokens:J},{id:`modern`,name:`Modern Indigo`,description:`Vibrant indigo accents, Plus Jakarta Sans, and rounded-2xl cards.`,tokens:{...J,colors:{...J.colors,primary:`#4f46e5`,secondary:`#06b6d4`,background:`#f8fafc`,surface:`#ffffff`,border:`#e2e8f0`,text:`#0f172a`},semantic:{...W,colors:{...W.colors,colorPrimary:`#4f46e5`,colorSecondary:`#06b6d4`,colorBackground:`#f8fafc`,colorSurface:`#ffffff`,colorBorder:`#e2e8f0`,colorText:`#0f172a`}},components:{...G,button:{...G.button,primaryBackground:`#4f46e5`,borderRadius:14}}}},{id:`dark`,name:`OLED Dark Studio`,description:`Deep OLED space gray, frosted translucent surfaces, and electric cyan.`,tokens:Y(J,`dark`)},{id:`emerald`,name:`Emerald Green`,description:`Fresh organic greens, sustainable earthy neutrals, and warm cards.`,tokens:{...J,colors:{...J.colors,primary:`#059669`,secondary:`#10b981`,background:`#f0fdf4`,surface:`#ffffff`,border:`#dcfce7`,text:`#064e3b`},semantic:{...W,colors:{...W.colors,colorPrimary:`#059669`,colorSecondary:`#10b981`,colorBackground:`#f0fdf4`,colorSurface:`#ffffff`,colorBorder:`#dcfce7`,colorText:`#064e3b`}},components:{...G,button:{...G.button,primaryBackground:`#059669`,borderRadius:10}}}},{id:`cyberpunk`,name:`Cyberpunk Neon`,description:`Electric violet, hot pink accents, deep obsidian background.`,tokens:{...Y(J,`dark`),colors:{...Y(J,`dark`).colors,primary:`#ec4899`,secondary:`#a855f7`,background:`#09090b`,surface:`#18181b`,border:`#27272a`,text:`#fafafa`},semantic:{...K,colors:{...K.colors,colorPrimary:`#ec4899`,colorSecondary:`#a855f7`,colorBackground:`#09090b`,colorSurface:`#18181b`,colorBorder:`#27272a`,colorText:`#fafafa`}},components:{...q,button:{...q.button,primaryBackground:`#ec4899`,borderRadius:8}}}}];export{b as _,H as a,F as c,P as d,V as f,w as g,T as h,X as i,I as l,S as m,Z as n,R as o,L as p,Y as r,z as s,J as t,B as u};
@@ -0,0 +1,2 @@
1
+ function e(e){let t=[],n=[];for(let[r,i]of Object.entries(e)){if(r.endsWith(`.json`)){try{JSON.parse(i)}catch(e){t.push(`[SyntaxError] in ${r}: Invalid JSON format (${e.message}).`)}continue}if(r.endsWith(`.css`)){let e=(i.match(/\{/g)||[]).length,n=(i.match(/\}/g)||[]).length;e!==n&&t.push(`[CSSError] in ${r}: Unmatched braces ({ = ${e}, } = ${n}).`);continue}if(r.endsWith(`.tsx`)||r.endsWith(`.ts`)){let e=(i.match(/\(/g)||[]).length,a=(i.match(/\)/g)||[]).length;e!==a&&t.push(`[SyntaxError] in ${r}: Unmatched parentheses ( ( = ${e}, ) = ${a} ).`);let o=(i.match(/\{/g)||[]).length,s=(i.match(/\}/g)||[]).length;o!==s&&t.push(`[SyntaxError] in ${r}: Unmatched curly braces ( { = ${o}, } = ${s} ).`);let c=i.split(`
2
+ `).filter(e=>e.trim().startsWith(`import `));for(let e of c)!e.includes(`from`)&&!e.includes(`./`)&&!e.includes(`.css`)&&t.push(`[TypeError] in ${r}: Malformed import statement: "${e.trim()}".`);if(r.endsWith(`.tsx`))for(let e of[`div`,`button`,`header`,`nav`,`section`,`article`,`main`,`footer`,`form`,`h1`,`h2`,`h3`,`p`,`span`]){let t=(i.match(RegExp(`<${e}[\\s>]`,`g`))||[]).length,a=(i.match(RegExp(`</${e}>`,`g`))||[]).length,o=(i.match(RegExp(`<${e}[^>]*/>`,`g`))||[]).length;t>0&&t!==a+o&&n.push(`[JSXWarning] in ${r}: Potential unclosed <${e}> tag.`)}}}let r=t.length===0;return{typecheck:r,build:r,errors:t,warnings:n}}export{e as t};