your-ai-workflow-firebase-os 1.2.33 → 1.2.34

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.
@@ -7,7 +7,7 @@ RULES — these override anything you infer from the rest of the project:
7
7
  4. Use a DEFAULT export: \`export default function ${e}(...)\`. A named-only export is silently ignored by the registry.
8
8
  5. Do NOT render \`<DashboardNav />\`, a navbar, or any tab menu. The page already has one.
9
9
  6. Do NOT render an \`<h1>\` or a page title. The page already renders it.
10
- 7. Your component renders INSIDE the page's existing panel. No full-page wrapper, no \`min-h-screen\`, no \`fixed\` positioning.`,Y="Design rules:\n- Dark glassmorphism. NO bg-white, NO text-gray-*, NO bg-indigo-*, no hard-coded colors.\n- Cards: `bg-background border border-[var(--panel-border)] rounded-2xl` (or the `glass-panel` class).\n- Text: `text-foreground`, `text-foreground/50`. Accent: `text-accent`, `bg-accent/10`.\n- Inputs: `bg-foreground/[0.03] border border-[var(--panel-border)] rounded-xl text-foreground`. Flat and clean — no glow, no highlight, no inner shadow.\n- Buttons: `btn-primary rounded-xl`. No other button styles.\n- Prebuilt UI is importable: `import { Button, Input, CustomSelect, ConfirmModal } from 'your-ai-workflow-firebase-os';`\n- Icons: `lucide-react`. Motion: `framer-motion`.",X=e=>{let t=q(e?.pageName||e?.pageId,`PublicPage`);return`${J(t)}
10
+ 7. Your component renders INSIDE the page's existing panel. No full-page wrapper, no \`min-h-screen\`, no \`fixed\` positioning.`,Y="Design rules:\n- Dark glassmorphism. NO bg-white, NO text-gray-*, NO bg-indigo-*, no hard-coded colors.\n- Cards: `bg-background border border-[var(--panel-border)] rounded-2xl` (or the `glass-panel` class).\n- Text: `text-foreground`, `text-foreground/50`. Accent: `text-accent`, `bg-accent/10`.\n- Inputs: `bg-foreground/[0.03] border border-[var(--panel-border)] rounded-xl text-foreground`. Flat and clean — no glow, no highlight, no inner shadow.\n- Buttons: `btn-primary rounded-xl`. No other button styles.\n- Prebuilt UI is importable: `import { Button, Input, CustomSelect, ConfirmModal } from 'your-ai-workflow-firebase-os';`\n- Icons: `lucide-react`. Motion: `framer-motion`.\n- NEVER touch the logo or favicon (`logoUrl` / `faviconUrl` in theme.config.ts). Only the site owner changes those, by uploading at Drive > Public and setting them in /theme.",X=e=>{let t=q(e?.pageName||e?.pageId,`PublicPage`);return`${J(t)}
11
11
 
12
12
  Create file: ${G}/${t}.tsx
13
13
 
@@ -5403,7 +5403,7 @@ RULES — these override anything you infer from the rest of the project:
5403
5403
  4. Use a DEFAULT export: \`export default function ${e}(...)\`. A named-only export is silently ignored by the registry.
5404
5404
  5. Do NOT render \`<DashboardNav />\`, a navbar, or any tab menu. The page already has one.
5405
5405
  6. Do NOT render an \`<h1>\` or a page title. The page already renders it.
5406
- 7. Your component renders INSIDE the page's existing panel. No full-page wrapper, no \`min-h-screen\`, no \`fixed\` positioning.`, Sn = "Design rules:\n- Dark glassmorphism. NO bg-white, NO text-gray-*, NO bg-indigo-*, no hard-coded colors.\n- Cards: `bg-background border border-[var(--panel-border)] rounded-2xl` (or the `glass-panel` class).\n- Text: `text-foreground`, `text-foreground/50`. Accent: `text-accent`, `bg-accent/10`.\n- Inputs: `bg-foreground/[0.03] border border-[var(--panel-border)] rounded-xl text-foreground`. Flat and clean — no glow, no highlight, no inner shadow.\n- Buttons: `btn-primary rounded-xl`. No other button styles.\n- Prebuilt UI is importable: `import { Button, Input, CustomSelect, ConfirmModal } from 'your-ai-workflow-firebase-os';`\n- Icons: `lucide-react`. Motion: `framer-motion`.", Cn = (e) => {
5406
+ 7. Your component renders INSIDE the page's existing panel. No full-page wrapper, no \`min-h-screen\`, no \`fixed\` positioning.`, Sn = "Design rules:\n- Dark glassmorphism. NO bg-white, NO text-gray-*, NO bg-indigo-*, no hard-coded colors.\n- Cards: `bg-background border border-[var(--panel-border)] rounded-2xl` (or the `glass-panel` class).\n- Text: `text-foreground`, `text-foreground/50`. Accent: `text-accent`, `bg-accent/10`.\n- Inputs: `bg-foreground/[0.03] border border-[var(--panel-border)] rounded-xl text-foreground`. Flat and clean — no glow, no highlight, no inner shadow.\n- Buttons: `btn-primary rounded-xl`. No other button styles.\n- Prebuilt UI is importable: `import { Button, Input, CustomSelect, ConfirmModal } from 'your-ai-workflow-firebase-os';`\n- Icons: `lucide-react`. Motion: `framer-motion`.\n- NEVER touch the logo or favicon (`logoUrl` / `faviconUrl` in theme.config.ts). Only the site owner changes those, by uploading at Drive > Public and setting them in /theme.", Cn = (e) => {
5407
5407
  let t = bn(e?.pageName || e?.pageId, "PublicPage");
5408
5408
  return `${xn(t)}
5409
5409
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "your-ai-workflow-firebase-os",
3
- "version": "1.2.33",
3
+ "version": "1.2.34",
4
4
  "description": "A complete Firebase-powered admin OS — one React component.",
5
5
  "type": "module",
6
6
  "main": "dist/your-ai-workflow-firebase-os.cjs.js",
@@ -0,0 +1,70 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { readFileSync } from 'node:fs';
3
+ import { resolve } from 'node:path';
4
+
5
+ /**
6
+ * The logo and favicon are the site owner's brand. An assistant asked to
7
+ * "rebrand" would happily rewrite logoUrl — the config file even invited it
8
+ * with a plain "Links to your logo and favicon" comment, and the generated
9
+ * contract listed logoUrl among the things to change.
10
+ *
11
+ * Read from disk: vitest stubs .css out and these are cross-project files.
12
+ */
13
+ const read = (p: string) => readFileSync(resolve(process.cwd(), p), 'utf8');
14
+
15
+ const themeConfig = read('src/configs/theme.config.ts');
16
+ const postinstall = read('scripts/postinstall.js');
17
+ const promptShared = read('src/prompts/shared.ts');
18
+
19
+ describe('the logo is off limits to the AI', () => {
20
+ it('the config file warns right above the two values', () => {
21
+ const at = themeConfig.indexOf('logoUrl:');
22
+ expect(at).toBeGreaterThan(-1);
23
+ const preamble = themeConfig.slice(Math.max(0, at - 900), at);
24
+ expect(preamble).toContain('DO NOT EDIT');
25
+ // The old comment read as an invitation to set them.
26
+ expect(preamble).not.toMatch(/^\s*\/\/ Links to your logo and favicon/m);
27
+ });
28
+
29
+ it('the generated contract forbids it outright', () => {
30
+ expect(postinstall).toContain('off limits');
31
+ expect(postinstall).toMatch(/NEVER touch either one/);
32
+ });
33
+
34
+ it('the generated contract no longer lists the logo as editable', () => {
35
+ // It used to appear in the "and globally:" list of theme keys to change.
36
+ const at = postinstall.indexOf('and globally:');
37
+ expect(at).toBeGreaterThan(-1);
38
+ const keyList = postinstall.slice(at, at + 400);
39
+ expect(keyList).not.toContain('logoUrl');
40
+ expect(keyList).not.toContain('faviconUrl');
41
+ });
42
+
43
+ it('names the owner-only upload route instead', () => {
44
+ expect(postinstall).toContain('Drive > Public');
45
+ expect(postinstall).toContain('/theme');
46
+ });
47
+
48
+ it('survives a rebrand request', () => {
49
+ expect(postinstall).toMatch(/leave the logo image and the favicon exactly as they are/);
50
+ });
51
+
52
+ it('locks the favicon as firmly as the logo', () => {
53
+ for (const src of [themeConfig, postinstall, promptShared]) {
54
+ expect(src).toContain('faviconUrl');
55
+ }
56
+ const at = postinstall.indexOf('off limits');
57
+ expect(postinstall.slice(at, at + 900)).toContain('faviconUrl');
58
+ });
59
+
60
+ it('still allows the app name to be changed', () => {
61
+ // The owner explicitly wants appName editable; only the icon is locked.
62
+ expect(postinstall).toMatch(/app NAME is different and you MAY change it/);
63
+ const at = postinstall.indexOf('and globally:');
64
+ expect(postinstall.slice(at, at + 400)).toContain('appName');
65
+ });
66
+
67
+ it('every generated prompt carries the rule too', () => {
68
+ expect(promptShared).toMatch(/NEVER touch the logo or favicon/);
69
+ });
70
+ });
@@ -397,7 +397,7 @@ textGradient: ['#f0eeff', '#c4b5fd'], // gradient used by page titles
397
397
  selectionBg, selectionText,
398
398
  \`\`\`
399
399
 
400
- and globally: \`appName\`, \`logoUrl\`, \`faviconUrl\`,
400
+ and globally: \`appName\`,
401
401
  \`defaultTheme\` (\`'system' | 'light' | 'dark'\`), \`showThemeToggle\`,
402
402
  \`fontFamily\` (Inter, Outfit, Roboto, Space Grotesk, Plus Jakarta Sans,
403
403
  System UI), \`cornerRounding\` (\`'default' | 'custom'\`) and \`cornerRadii\`
@@ -406,6 +406,24 @@ System UI), \`cornerRounding\` (\`'default' | 'custom'\`) and \`cornerRadii\`
406
406
  ALWAYS set both \`colors.dark\` and \`colors.light\`. Editing only one leaves the
407
407
  other theme unreadable.
408
408
 
409
+ ### The logo image and the favicon are off limits
410
+
411
+ \`logoUrl\` is the icon shown in the top bar; \`faviconUrl\` is the browser tab
412
+ icon. NEVER touch either one. Do not set them, do not clear them, do not swap
413
+ them, do not "improve" them, and never point them at a placeholder or at an
414
+ image you generated. They are the owner's brand.
415
+
416
+ Only the owner changes them, and only by uploading an image under
417
+ Drive > Public and pasting its URL into \`/theme\`.
418
+
419
+ The app NAME is different and you MAY change it: \`appName\` is ordinary text
420
+ and is fair game when asked.
421
+
422
+ So this holds even during a rebrand: change the colours, the fonts and
423
+ \`appName\` freely — leave the logo image and the favicon exactly as they are.
424
+ If someone asks you to change the logo, tell them to upload it at
425
+ Drive > Public and set it in \`/theme\`, and do not edit the file.
426
+
409
427
  ## Creating a page, a tab or a form
410
428
 
411
429
  You can create these yourself. They are auto-discovered config files — no
@@ -17,7 +17,15 @@ export const themeConfig = {
17
17
  // Show or hide the Sun/Moon toggle button in the top menu
18
18
  showThemeToggle: true,
19
19
 
20
- // Links to your logo and favicon (Can be a URL or a local path like /favicon.svg)
20
+ // ── DO NOT EDIT: logoUrl / faviconUrl ───────────────────────────────────
21
+ // logoUrl is the icon in the top bar; faviconUrl is the browser tab icon.
22
+ // Both belong to the site owner and are changed ONLY by the owner, by
23
+ // uploading an image under Drive > Public and pasting its URL into /theme.
24
+ // An AI assistant must never set, clear, swap or "improve" these two
25
+ // values, and must never point them at a placeholder or a generated image.
26
+ // Leave both exactly as they are. (appName above is text, and may be
27
+ // changed freely.)
28
+ // (Can be a URL or a local path like /favicon.svg)
21
29
  logoUrl: 'https://firebasestorage.googleapis.com/v0/b/fir-os-47863.firebasestorage.app/o/pub_files%2F1776321238933_favicon_smaller.png?alt=media&token=efecb55c-2456-4cbe-a20a-b86db54a1e55',
22
30
  faviconUrl: 'https://firebasestorage.googleapis.com/v0/b/fir-os-47863.firebasestorage.app/o/pub_files%2F1776321238933_favicon_smaller.png?alt=media&token=efecb55c-2456-4cbe-a20a-b86db54a1e55',
23
31
 
@@ -53,4 +53,5 @@ export const design = `Design rules:
53
53
  - Inputs: \`bg-foreground/[0.03] border border-[var(--panel-border)] rounded-xl text-foreground\`. Flat and clean — no glow, no highlight, no inner shadow.
54
54
  - Buttons: \`btn-primary rounded-xl\`. No other button styles.
55
55
  - Prebuilt UI is importable: \`import { Button, Input, CustomSelect, ConfirmModal } from 'your-ai-workflow-firebase-os';\`
56
- - Icons: \`lucide-react\`. Motion: \`framer-motion\`.`;
56
+ - Icons: \`lucide-react\`. Motion: \`framer-motion\`.
57
+ - NEVER touch the logo or favicon (\`logoUrl\` / \`faviconUrl\` in theme.config.ts). Only the site owner changes those, by uploading at Drive > Public and setting them in /theme.`;