your-ai-workflow-firebase-os 1.2.37 → 1.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vite.cjs.js
CHANGED
|
@@ -157,4 +157,4 @@ if (typeof window !== 'undefined') {
|
|
|
157
157
|
export const pagesRegistry = pages;
|
|
158
158
|
export const formsRegistry = forms;
|
|
159
159
|
export const microcomponentRegistry = microcomponents;
|
|
160
|
-
`}var T=e=>w(x(e)),E=e=>e.split(`/`).pop()||e,D=e=>/\/configs\/[^/]+$/.test(e),O=e=>/\/microcomponents\/[^/]+\.tsx$/.test(e),k=e=>e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/(^|[^:\\'"`])\/\/.*$/gm,`$1`),A=(e,t)=>{let n=RegExp(`(?:^|[\\s,{])${t}\\s*:\\s*([^,\\n}]+)`,`g`),r=[],i;for(;i=n.exec(e);)r.push(i[1].trim());return r},j=e=>{let t=e.match(/^(['"`])([^'"`]*)\1$/);return t?t[2]:null},M=e=>/export\s+(?:const|let|var|function|class)\s+\w*Config\b/.test(e)||/export\s*\{[^}]*\b\w*Config\b[^}]*\}/.test(e),N=e=>/export\s+default\b/.test(e),P=e=>{let t=A(e,`route`);return{first:t[0],count:t.length}};function F(e){let t=[],n=[],r=new Map,i=new Set;for(let{file:t}of e)if(O(t))for(let e of h(E(t)))i.add(e);for(let{file:a,source:o}of e){let e=E(a),s=k(o);if(D(a)){let n=_(e);if(n===`shipped`)continue;if(n===`other`){t.push(`${a}: rename it to somethingTab.config.ts (a dashboard page), somethingPage.config.ts (a page for anyone) or somethingForm.config.ts (a form).`);continue}if(!M(s)&&!N(s)&&t.push(`${a}: export one const named ${g(e)}Config.`),n===`tab`||n===`page`){let{first:o,count:c}=P(s),l=o===void 0?null:j(o);if(c===0||l===null||!l.startsWith(`/`))t.push(`${a}: route must be one string starting with /, e.g. route: '/onboarding'. A page has exactly one web address.`);else{let e=r.get(l);e?t.push(`${a}: route '${l}' is already used by ${e}. One page, one file, one address.`):r.set(l,a)}let u=A(s,`template`)[0],d=u===void 0?null:j(u);if(!d||![`board`,`table`,`calendar`,`drive`,`inline_form`,`popup_form`].includes(d)){let r=n===`tab`?f(e):p(e),o=A(s,n===`tab`?`tabName`:`pageName`)[0],c=o===void 0?null:j(o),l=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``);if(![r,...c?[l(c),l(c).replace(/_/g,``)]:[]].some(e=>i.has(e))){let n=g(e).replace(/(Tab|Page)$/,``),r=(c||n).split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``);t.push(`${a}: no content file matches this page, so it renders empty — create src/your-ai-workflow-firebase-os/microcomponents/${r}Content.tsx with export default.`)}}}if(n===`tab`){let e=A(s,`pageType`)[0],n=e===void 0?null:j(e);n!==`user`&&n!==`internal`&&n!==`admin`&&t.push(`${a}: pageType must be 'user', 'internal' or 'admin'. A dashboard page is never public.`)}if(n===`form`){let n=m(e),r=A(s,`systemName`)[0];r!==void 0&&j(r)!==n&&t.push(`${a}: systemName must be '${n}'.`)}continue}O(a)
|
|
160
|
+
`}var T=e=>w(x(e)),E=e=>e.split(`/`).pop()||e,D=e=>/\/configs\/[^/]+$/.test(e),O=e=>/\/microcomponents\/[^/]+\.tsx$/.test(e),k=e=>e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/(^|[^:\\'"`])\/\/.*$/gm,`$1`),A=(e,t)=>{let n=RegExp(`(?:^|[\\s,{])${t}\\s*:\\s*([^,\\n}]+)`,`g`),r=[],i;for(;i=n.exec(e);)r.push(i[1].trim());return r},j=e=>{let t=e.match(/^(['"`])([^'"`]*)\1$/);return t?t[2]:null},M=e=>/export\s+(?:const|let|var|function|class)\s+\w*Config\b/.test(e)||/export\s*\{[^}]*\b\w*Config\b[^}]*\}/.test(e),N=e=>/export\s+default\b/.test(e),P=e=>{let t=A(e,`route`);return{first:t[0],count:t.length}};function F(e){let t=[],n=[],r=new Map,i=new Set;for(let{file:t}of e)if(O(t))for(let e of h(E(t)))i.add(e);for(let{file:a,source:o}of e){let e=E(a),s=k(o);if(D(a)){let n=_(e);if(n===`shipped`)continue;if(n===`other`){t.push(`${a}: rename it to somethingTab.config.ts (a dashboard page), somethingPage.config.ts (a page for anyone) or somethingForm.config.ts (a form).`);continue}if(!M(s)&&!N(s)&&t.push(`${a}: export one const named ${g(e)}Config.`),n===`tab`||n===`page`){let{first:o,count:c}=P(s),l=o===void 0?null:j(o);if(c===0||l===null||!l.startsWith(`/`))t.push(`${a}: route must be one string starting with /, e.g. route: '/onboarding'. A page has exactly one web address.`);else{let e=r.get(l);e?t.push(`${a}: route '${l}' is already used by ${e}. One page, one file, one address.`):r.set(l,a)}let u=A(s,`template`)[0],d=u===void 0?null:j(u);if(!d||![`board`,`table`,`calendar`,`drive`,`inline_form`,`popup_form`].includes(d)){let r=n===`tab`?f(e):p(e),o=A(s,n===`tab`?`tabName`:`pageName`)[0],c=o===void 0?null:j(o),l=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_|_$/g,``);if(![r,...c?[l(c),l(c).replace(/_/g,``)]:[]].some(e=>i.has(e))){let n=g(e).replace(/(Tab|Page)$/,``),r=(c||n).split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``);t.push(`${a}: no content file matches this page, so it renders empty — create src/your-ai-workflow-firebase-os/microcomponents/${r}Content.tsx with export default.`)}}}if(n===`tab`){let e=A(s,`pageType`)[0],n=e===void 0?null:j(e);n!==`user`&&n!==`internal`&&n!==`admin`&&t.push(`${a}: pageType must be 'user', 'internal' or 'admin'. A dashboard page is never public.`)}if(n===`form`){let n=m(e),r=A(s,`systemName`)[0];r!==void 0&&j(r)!==n&&t.push(`${a}: systemName must be '${n}'.`)}continue}if(O(a)){N(s)||t.push(`${a}: add export default.`),(/<form\b/.test(s)||/\bonSubmit\b/.test(s))&&!/ContactPopup/.test(s)&&n.push(`${a}: forms are *Form.config.ts files shown with <ContactPopup formId="…" />; a hand-written form never reaches the Inbox.`),/<style[\s>]/.test(s)&&t.push(`${a}: a <style> tag is global CSS and restyles every page of the app — delete it and style with theme classes (bg-background, text-foreground, glass-panel, btn-primary).`);let e=s.match(/\b(?:bg-(?:white|black)|(?:bg|text|border)-(?:gray|slate|zinc|neutral|stone)-\d+)\b/);e&&n.push(`${a}: ${e[0]} is a hard-coded colour that ignores the owner's theme and stays wrong in light or dark mode — use bg-background, text-foreground, border-[var(--panel-border)], glass-panel or btn-primary.`)}}return{errors:t,warnings:n}}function I(e,t){return F(e.map(e=>({file:e.file,source:t(e.abs)})))}var L=i,R=`\0`+L,z=[{rel:`src/App.tsx`,source:a},{rel:`src/main.tsx`,source:o}],B=e=>`${e} is owned by Your AI Firebase; your edit was discarded.`,V=e=>e.replace(/[?#].*$/,``),H=e=>n.normalize(e).split(n.sep).join(`/`),U={info:e=>console.log(e),warn:e=>console.warn(e),error:e=>console.error(e)};function W(e,r=U){let i=[];for(let{rel:a,source:o}of z){let s=n.join(e,a),c=null;try{c=t.readFileSync(s,`utf8`)}catch{c=null}c!==o&&(t.mkdirSync(n.dirname(s),{recursive:!0}),t.writeFileSync(s,o),i.push(a),c!==null&&r.warn(B(a)))}return i}var G=(e,t)=>{let r=H(V(t));for(let{rel:t,source:i}of z)if(r===H(n.join(e,t)))return i;return null};function K(){let e=process.cwd(),n=!1,r=`build`,i=U,a=()=>I(x(e),e=>t.readFileSync(e,`utf8`));return{name:`your-ai-firebase`,enforce:`pre`,configResolved(t){e=t.root,r=t.command,i=t.logger,n=y(e),n&&W(e,i)},resolveId(e){return e===L?R:null},buildStart(){if(!n)return;let{errors:e,warnings:t}=a();for(let e of t)this.warn(e);if(e.length!==0)if(r===`build`)this.error(e[0]);else for(let t of e)i.error(t)},load(r){if(!n)return null;if(r===R){let n=x(e),{errors:r}=I(n,e=>t.readFileSync(e,`utf8`));return r.length&&this.error(r[0]),w(n)}return G(e,r)},configureServer(t){if(!n)return;let r=()=>{let e=t.moduleGraph.getModuleById(R);e&&t.moduleGraph.invalidateModule(e),t.ws.send({type:`full-reload`,path:`*`})},i=n=>{let i=H(n);if(G(e,i)!==null){W(e,t.config.logger);return}if(!b(e,i))return;r();let{errors:o,warnings:s}=a();for(let e of s)t.config.logger.warn(e);for(let e of o)t.config.logger.error(e)};t.watcher.on(`add`,i),t.watcher.on(`unlink`,i),t.watcher.on(`change`,i)}}}exports.CANONICAL_APP_TSX=a,exports.CANONICAL_MAIN_TSX=o,exports.CONFIGS_DIR=c,exports.CONSUMER_DIR=s,exports.MICROCOMPONENTS_DIR=l,exports.OWNED_BANNER=r,exports.RESOLVED_VIRTUAL_ID=R,exports.SHIPPED_CONFIG_FILES=u,exports.VIRTUAL_ID=L,exports.VIRTUAL_REGISTRIES_ID=i,exports.classifyConfigFile=_,exports.discover=x,exports.fileIdFromConfigFile=g,exports.formIdFromFile=m,exports.isConsumerRoot=y,exports.isDiscoveredPath=b,exports.microcomponentKeysFromFile=h,exports.ownedMessage=B,exports.pageIdFromFile=p,exports.registrable=S,exports.restoreOwnedFiles=W,exports.stripComments=k,exports.tabIdFromFile=f,exports.validate=F,exports.validateDiscovered=I,exports.virtualModuleSource=T,exports.virtualModuleSourceFor=w,exports.yourAiFirebase=K;
|
package/dist/vite.es.js
CHANGED
|
@@ -289,7 +289,11 @@ function P(e) {
|
|
|
289
289
|
}
|
|
290
290
|
continue;
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
if (D(a)) {
|
|
293
|
+
M(s) || t.push(`${a}: add export default.`), (/<form\b/.test(s) || /\bonSubmit\b/.test(s)) && !/ContactPopup/.test(s) && n.push(`${a}: forms are *Form.config.ts files shown with <ContactPopup formId="…" />; a hand-written form never reaches the Inbox.`), /<style[\s>]/.test(s) && t.push(`${a}: a <style> tag is global CSS and restyles every page of the app — delete it and style with theme classes (bg-background, text-foreground, glass-panel, btn-primary).`);
|
|
294
|
+
let e = s.match(/\b(?:bg-(?:white|black)|(?:bg|text|border)-(?:gray|slate|zinc|neutral|stone)-\d+)\b/);
|
|
295
|
+
e && n.push(`${a}: ${e[0]} is a hard-coded colour that ignores the owner's theme and stays wrong in light or dark mode — use bg-background, text-foreground, border-[var(--panel-border)], glass-panel or btn-primary.`);
|
|
296
|
+
}
|
|
293
297
|
}
|
|
294
298
|
return {
|
|
295
299
|
errors: t,
|