@rizom/brain 0.1.1-alpha.5 → 0.1.1-alpha.6

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/brain.js CHANGED
@@ -26490,7 +26490,7 @@ ${$}`;try{await A.entityService.createEntity({id:I,entityType:"topic",content:D,
26490
26490
  .btn-primary:hover { background-color: var(--color-brand-dark); }
26491
26491
  .btn-primary:disabled { opacity: 0.5; }
26492
26492
  }
26493
- `;var zi2=sd0(td0),ed0=zi2;var vi2={theme:ed0,layouts:{default:DuA},routes:IuA,plugin:(A)=>$uA(A??{}),entityDisplay:{post:{label:"Post"},deck:{label:"Deck"},project:{label:"Project"},series:{label:"Series",navigation:{slot:"secondary"}},topic:{label:"Topic",navigation:{slot:"secondary"}},link:{label:"Link",navigation:{slot:"secondary"}},base:{label:"Note",navigation:{show:!1}},"social-post":{label:"Social Post",pluralName:"social-posts",navigation:{slot:"secondary"}},newsletter:{label:"Newsletter",navigation:{slot:"secondary"}}}},Ar0=vi2;import{join as Ei2}from"path";var fr0=["prompt","note","link","wishlist","topics","directory-sync","agents","mcp","discord","a2a"],Qr0=[...fr0,"image","dashboard","blog","series","decks","analytics","obsidian-vault","site-info","site-builder","webserver"],Ni2=[...Qr0,"portfolio","topics","content-pipeline","social-media","newsletter","stock-photo"],wr0=MS({name:"rover",version:"0.1.0",site:Ar0,presets:{core:fr0,default:Qr0,full:Ni2},evalDisable:["discord","webserver","mcp","analytics","dashboard"],capabilities:[["prompt",dWA,void 0],["image",Q5A,void 0],["dashboard",_WA,void 0],["blog",UcA,{}],["series",ccA,void 0],["decks",VcA,void 0],["note",hcA,{}],["link",ycA,{}],["portfolio",scA,{}],["topics",Dp0,{includeEntityTypes:["post","deck","project","link","anchor-profile"]}],["content-pipeline",vWA,{generationSchedules:{newsletter:"0 9 * * 1","social-post":"0 10 * * *"},generationConditions:{newsletter:{skipIfDraftExists:!0,minSourceEntities:1,sourceEntityType:"post"},"social-post":{skipIfDraftExists:!0,maxUnpublishedDrafts:5}}}],["social-media",HWA,{autoGenerateOnBlogPublish:!0}],["newsletter",Kd0,{doubleOptIn:!0}],["obsidian-vault",gWA,{autoSync:!0}],["wishlist",Ed0,{}],["stock-photo",aWA,{}],["agents",ld0,void 0],["directory-sync",qHA,{seedContent:!0,seedContentPath:Ei2(import.meta.dir,"..","seed-content"),initialSync:!0}],["analytics",rp0,{}],["site-info",uXA,void 0],["site-builder",wcA,{cms:{}}]],interfaces:[["mcp",pi,()=>({})],["discord",el,()=>({})],["webserver",Hn,()=>({})],["a2a",Fn,()=>({})]],permissions:{rules:[{pattern:"cli:*",level:"anchor"},{pattern:"mcp:stdio",level:"anchor"},{pattern:"mcp:http",level:"public"},{pattern:"discord:*",level:"public"}]},deployment:{cdn:{enabled:!0,provider:"bunny"},dns:{enabled:!0,provider:"bunny"}}});import{readFileSync as $m2}from"fs";import{join as Im2}from"path";import{execSync as Dm2}from"child_process";import{parseArgs as Li2}from"util";var Ci2={model:{type:"string"},domain:{type:"string"},"content-repo":{type:"string"},"ai-api-key":{type:"string"},"no-interactive":{type:"boolean"},preview:{type:"boolean"},deploy:{type:"boolean"},remote:{type:"string"},token:{type:"string"},help:{type:"boolean",short:"h"},version:{type:"boolean",short:"v"}};function tv(A,f){let Q=A[f];return typeof Q==="string"?Q:void 0}function UuA(A,f){let Q=A[f];return typeof Q==="boolean"?Q:void 0}function Br0(A){let{values:f,positionals:Q}=Li2({args:A,options:Ci2,allowPositionals:!0,strict:!1});if(f.help)return{command:"help",args:[],flags:{help:!0}};if(f.version)return{command:"version",args:[],flags:{version:!0}};return{command:Q[0]??"help",args:Q.slice(1),flags:{model:tv(f,"model"),domain:tv(f,"domain"),"content-repo":tv(f,"content-repo"),"ai-api-key":tv(f,"ai-api-key"),"no-interactive":UuA(f,"no-interactive"),preview:UuA(f,"preview"),deploy:UuA(f,"deploy"),remote:tv(f,"remote"),token:tv(f,"token")}}}import{mkdirSync as ay2}from"fs";import{join as oy2}from"path";import{spawn as sy2,execSync as ty2}from"child_process";var va={name:"@rizom/brain",version:"0.1.1-alpha.5",description:"Brain runtime + CLI \u2014 scaffold, run, and manage AI brain instances",type:"module",bin:{brain:"./dist/brain.js"},exports:{"./cli":"./dist/brain.js","./site":{types:"./dist/site.d.ts",import:"./dist/site.js"}},files:["dist"],scripts:{build:"bun scripts/build.ts",prepublishOnly:"bun scripts/build.ts",typecheck:"tsc --noEmit",test:"bun test",lint:"eslint . --ext .ts"},dependencies:{"@clack/prompts":"^0.11.0","@modelcontextprotocol/sdk":"^1.24.0","@tailwindcss/postcss":"^4.1.13","@tailwindcss/typography":"^0.5.19",postcss:"^8.5.6",preact:"^10.27.2","preact-render-to-string":"^6.3.1",tailwindcss:"^4.1.11"},optionalDependencies:{"@libsql/client":"^0.15.7","@tailwindcss/oxide":"^4.1.4","better-sqlite3":"^11.8.1",lightningcss:"^1.29.2","react-devtools-core":"^6.1.1",sharp:"^0.34.5"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/layout-personal":"workspace:*","@brains/mcp-service":"workspace:*","@brains/plugins":"workspace:*","@brains/rover":"workspace:*","@brains/typescript-config":"workspace:*","@brains/utils":"workspace:*","@types/bun":"latest",typescript:"^5.3.3"},publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/rizom-ai/brains.git",directory:"packages/brain-cli"},license:"Apache-2.0",author:"Yeehaa <yeehaa@rizom.ai> (https://rizom.ai)",homepage:"https://github.com/rizom-ai/brains/tree/main/packages/brain-cli#readme",bugs:"https://github.com/rizom-ai/brains/issues",engines:{bun:">=1.3.3"},keywords:["brain","ai","cli","mcp","agent","personal-ai","knowledge-management"]};import{mkdirSync as xr0,writeFileSync as UY,chmodSync as bi2}from"fs";import{basename as $r0,join as V4}from"path";var hi2=`^${va.version}`,Mi2="^10.27.2";function Ir0(A,f){let{model:Q}=f,w=f.domain??`${Q}.rizom.ai`;if(Oi2(A,Q,w,f.contentRepo),ii2(A),yi2(A,Q),Ri2(A),Si2(A),mi2(A),f.apiKey)Pi2(A,f.apiKey,f.contentRepo);if(f.deploy)ji2(A),Ti2(A),gi2(A)}function Oi2(A,f,Q,w){let B=w?` directory-sync:
26493
+ `;var zi2=sd0(td0),ed0=zi2;var vi2={theme:ed0,layouts:{default:DuA},routes:IuA,plugin:(A)=>$uA(A??{}),entityDisplay:{post:{label:"Post"},deck:{label:"Deck"},project:{label:"Project"},series:{label:"Series",navigation:{slot:"secondary"}},topic:{label:"Topic",navigation:{slot:"secondary"}},link:{label:"Link",navigation:{slot:"secondary"}},base:{label:"Note",navigation:{show:!1}},"social-post":{label:"Social Post",pluralName:"social-posts",navigation:{slot:"secondary"}},newsletter:{label:"Newsletter",navigation:{slot:"secondary"}}}},Ar0=vi2;import{join as Ei2}from"path";var fr0=["prompt","note","link","wishlist","topics","directory-sync","agents","mcp","discord","a2a"],Qr0=[...fr0,"image","dashboard","blog","series","decks","analytics","obsidian-vault","site-info","site-builder","webserver"],Ni2=[...Qr0,"portfolio","topics","content-pipeline","social-media","newsletter","stock-photo"],wr0=MS({name:"rover",version:"0.1.0",site:Ar0,presets:{core:fr0,default:Qr0,full:Ni2},evalDisable:["discord","webserver","mcp","analytics","dashboard"],capabilities:[["prompt",dWA,void 0],["image",Q5A,void 0],["dashboard",_WA,void 0],["blog",UcA,{}],["series",ccA,void 0],["decks",VcA,void 0],["note",hcA,{}],["link",ycA,{}],["portfolio",scA,{}],["topics",Dp0,{includeEntityTypes:["post","deck","project","link","anchor-profile"]}],["content-pipeline",vWA,{generationSchedules:{newsletter:"0 9 * * 1","social-post":"0 10 * * *"},generationConditions:{newsletter:{skipIfDraftExists:!0,minSourceEntities:1,sourceEntityType:"post"},"social-post":{skipIfDraftExists:!0,maxUnpublishedDrafts:5}}}],["social-media",HWA,{autoGenerateOnBlogPublish:!0}],["newsletter",Kd0,{doubleOptIn:!0}],["obsidian-vault",gWA,{autoSync:!0}],["wishlist",Ed0,{}],["stock-photo",aWA,{}],["agents",ld0,void 0],["directory-sync",qHA,{seedContent:!0,seedContentPath:Ei2(import.meta.dir,"..","seed-content"),initialSync:!0}],["analytics",rp0,{}],["site-info",uXA,void 0],["site-builder",wcA,{cms:{}}]],interfaces:[["mcp",pi,()=>({})],["discord",el,()=>({})],["webserver",Hn,()=>({})],["a2a",Fn,()=>({})]],permissions:{rules:[{pattern:"cli:*",level:"anchor"},{pattern:"mcp:stdio",level:"anchor"},{pattern:"mcp:http",level:"public"},{pattern:"discord:*",level:"public"}]},deployment:{cdn:{enabled:!0,provider:"bunny"},dns:{enabled:!0,provider:"bunny"}}});import{readFileSync as $m2}from"fs";import{join as Im2}from"path";import{execSync as Dm2}from"child_process";import{parseArgs as Li2}from"util";var Ci2={model:{type:"string"},domain:{type:"string"},"content-repo":{type:"string"},"ai-api-key":{type:"string"},"no-interactive":{type:"boolean"},preview:{type:"boolean"},deploy:{type:"boolean"},remote:{type:"string"},token:{type:"string"},help:{type:"boolean",short:"h"},version:{type:"boolean",short:"v"}};function tv(A,f){let Q=A[f];return typeof Q==="string"?Q:void 0}function UuA(A,f){let Q=A[f];return typeof Q==="boolean"?Q:void 0}function Br0(A){let{values:f,positionals:Q}=Li2({args:A,options:Ci2,allowPositionals:!0,strict:!1});if(f.help)return{command:"help",args:[],flags:{help:!0}};if(f.version)return{command:"version",args:[],flags:{version:!0}};return{command:Q[0]??"help",args:Q.slice(1),flags:{model:tv(f,"model"),domain:tv(f,"domain"),"content-repo":tv(f,"content-repo"),"ai-api-key":tv(f,"ai-api-key"),"no-interactive":UuA(f,"no-interactive"),preview:UuA(f,"preview"),deploy:UuA(f,"deploy"),remote:tv(f,"remote"),token:tv(f,"token")}}}import{mkdirSync as ay2}from"fs";import{join as oy2}from"path";import{spawn as sy2,execSync as ty2}from"child_process";var va={name:"@rizom/brain",version:"0.1.1-alpha.6",description:"Brain runtime + CLI \u2014 scaffold, run, and manage AI brain instances",type:"module",bin:{brain:"./dist/brain.js"},exports:{"./cli":"./dist/brain.js","./site":{types:"./dist/site.d.ts",import:"./dist/site.js"},"./themes":{types:"./dist/themes.d.ts",import:"./dist/themes.js"}},files:["dist"],scripts:{build:"bun scripts/build.ts",prepublishOnly:"bun scripts/build.ts",typecheck:"tsc --noEmit",test:"bun test",lint:"eslint . --ext .ts"},dependencies:{"@clack/prompts":"^0.11.0","@modelcontextprotocol/sdk":"^1.24.0","@tailwindcss/postcss":"^4.1.13","@tailwindcss/typography":"^0.5.19",postcss:"^8.5.6",preact:"^10.27.2","preact-render-to-string":"^6.3.1",tailwindcss:"^4.1.11"},optionalDependencies:{"@libsql/client":"^0.15.7","@tailwindcss/oxide":"^4.1.4","better-sqlite3":"^11.8.1",lightningcss:"^1.29.2","react-devtools-core":"^6.1.1",sharp:"^0.34.5"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/layout-personal":"workspace:*","@brains/mcp-service":"workspace:*","@brains/plugins":"workspace:*","@brains/rover":"workspace:*","@brains/typescript-config":"workspace:*","@brains/utils":"workspace:*","@types/bun":"latest",typescript:"^5.3.3"},publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/rizom-ai/brains.git",directory:"packages/brain-cli"},license:"Apache-2.0",author:"Yeehaa <yeehaa@rizom.ai> (https://rizom.ai)",homepage:"https://github.com/rizom-ai/brains/tree/main/packages/brain-cli#readme",bugs:"https://github.com/rizom-ai/brains/issues",engines:{bun:">=1.3.3"},keywords:["brain","ai","cli","mcp","agent","personal-ai","knowledge-management"]};import{mkdirSync as xr0,writeFileSync as UY,chmodSync as bi2}from"fs";import{basename as $r0,join as V4}from"path";var hi2=`^${va.version}`,Mi2="^10.27.2";function Ir0(A,f){let{model:Q}=f,w=f.domain??`${Q}.rizom.ai`;if(Oi2(A,Q,w,f.contentRepo),ii2(A),yi2(A,Q),Ri2(A),Si2(A),mi2(A),f.apiKey)Pi2(A,f.apiKey,f.contentRepo);if(f.deploy)ji2(A),Ti2(A),gi2(A)}function Oi2(A,f,Q,w){let B=w?` directory-sync:
26494
26494
  git:
26495
26495
  repo: ${w.replace("github:","")}
26496
26496
  authToken: \${GIT_SYNC_TOKEN}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * ⚠️ TEMPORARY HAND-WRITTEN PUBLIC API SURFACE ⚠️
3
+ *
4
+ * Public API contract for `@rizom/brain/themes`. Hand-maintained
5
+ * as a stopgap because the auto-bundlers choke on the size and
6
+ * edge cases of the `@brains/*` type graph. See
7
+ * `docs/plans/library-exports.md` for the replacement plan.
8
+ *
9
+ * **Sync rules:**
10
+ * - When `composeTheme`'s signature changes in `@brains/theme-base`,
11
+ * update this file in the same commit.
12
+ * - The runtime side (`../entries/themes.ts`) re-exports the real
13
+ * implementation from `@brains/theme-base`. The .js bundle
14
+ * produced by `scripts/build.ts` is what consumers execute.
15
+ * This .d.ts file is what their tsc sees.
16
+ */
17
+
18
+ /**
19
+ * Prepend the shared base theme utilities to a site-specific theme
20
+ * CSS string and return the combined result.
21
+ *
22
+ * The base utilities layer contains:
23
+ *
24
+ * - Palette tokens (`--palette-*`) for neutral colors, status colors,
25
+ * and universal UI signals
26
+ * - `@theme inline` declarations that expose the semantic color
27
+ * tokens (`--color-brand`, `--color-bg`, `--color-text`, etc.) to
28
+ * Tailwind v4's JIT so utilities like `bg-brand`, `text-brand`,
29
+ * `border-brand`, `focus-visible:ring-brand` auto-generate
30
+ * - Layer ordering (`@layer theme-base, theme-override`) so theme
31
+ * overrides cascade correctly regardless of concat order
32
+ * - Universal gradient, status, selection, and warning utilities
33
+ * - Prose color slots for `@tailwindcss/typography`
34
+ *
35
+ * Consumers MUST call `composeTheme(myThemeCSS)` when constructing a
36
+ * `SitePackage.theme` from their own CSS. Without it, Tailwind can't
37
+ * resolve utilities like `bg-brand` and the site build crashes with:
38
+ *
39
+ * Cannot apply unknown utility class `focus-visible:ring-brand`
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { composeTheme } from "@rizom/brain/themes";
44
+ * import type { SitePackage } from "@rizom/brain/site";
45
+ * import themeCSS from "./theme.css" with { type: "text" };
46
+ *
47
+ * const site: SitePackage = {
48
+ * theme: composeTheme(themeCSS),
49
+ * // ...
50
+ * };
51
+ * ```
52
+ */
53
+ export function composeTheme(themeCSS: string): string;
package/dist/themes.js ADDED
@@ -0,0 +1,288 @@
1
+ // @bun
2
+ var t=`/* ============================================
3
+ THEME BASE - Shared utilities for all themes
4
+ ============================================
5
+ This file contains CSS that is IDENTICAL across all themes.
6
+ Individual themes only need to define:
7
+ - Font imports
8
+ - :root palette variables (unique colors)
9
+ - :root semantic variable mappings
10
+ - [data-theme="dark"] overrides
11
+ - Typography styles (heading weights, letter-spacing)
12
+ - Nav/header/logo/toggle light-dark behavior
13
+ - Hero/CTA background patterns
14
+ - Prose dark mode overrides
15
+ - Theme-specific decorative elements
16
+
17
+ Layer ordering: theme-base < theme-override
18
+ Base utilities come first; theme-specific styles override.
19
+ ============================================ */
20
+
21
+ /* Declare layer order \u2014 guarantees cascade regardless of concat order */
22
+ @layer theme-base, theme-override;
23
+
24
+ /* Custom variant: \`light:*\` utilities apply when [data-theme="light"]
25
+ is set on any ancestor (typically <html>). Dark mode is the
26
+ default so there's no matching \`dark:\` variant. */
27
+ @custom-variant light ([data-theme="light"] &);
28
+
29
+ /* ============================================
30
+ @theme inline - Expose CSS variables to Tailwind
31
+ Uses @theme inline for RUNTIME CSS variable resolution.
32
+ The "inline" keyword is essential for dark mode / multi-site theming.
33
+ ============================================ */
34
+ @theme inline {
35
+ /* Layout */
36
+ --max-width-layout: var(--layout-max-width);
37
+
38
+ /* Brand colors - same color for bg/text/border */
39
+ --color-brand: var(--color-brand);
40
+ --color-brand-dark: var(--color-brand-dark);
41
+ --color-brand-light: var(--color-brand-light);
42
+ --color-accent: var(--color-accent);
43
+ --color-accent-dark: var(--color-accent-dark);
44
+
45
+ /* Selection colors */
46
+ --color-selection: var(--color-selection);
47
+
48
+ /* Monospace font \u2014 used by ui-library widgets, code blocks, etc.
49
+ Defined by every theme (or left empty for ranger). Brand-specific
50
+ fonts (\`font-display\`, \`font-body\`, \`font-label\`, \`font-nav\`)
51
+ and the typography scale live in the brand theme that uses them
52
+ so non-brand themes don't ship broken utilities. */
53
+ --font-mono: var(--font-mono);
54
+
55
+ /* Typography scale \u2014 each entry bundles font-size + line-height +
56
+ letter-spacing via Tailwind v4's --text-name--line-height /
57
+ --text-name--letter-spacing modifiers, so a single utility (e.g.
58
+ \`text-display-lg\`) replaces three (\`text-[clamp(...)]
59
+ leading-[1.1] tracking-[-1px]\`). Themes set the actual values
60
+ in their :root block. */
61
+
62
+ /* Display \u2014 fluid headlines */
63
+ --text-display-2xl: var(--text-display-2xl);
64
+ --text-display-2xl--line-height: 0.9;
65
+ --text-display-2xl--letter-spacing: -2px;
66
+
67
+ --text-display-xl: var(--text-display-xl);
68
+ --text-display-xl--line-height: 0.95;
69
+ --text-display-xl--letter-spacing: -3px;
70
+
71
+ --text-display-lg: var(--text-display-lg);
72
+ --text-display-lg--line-height: 1.1;
73
+ --text-display-lg--letter-spacing: -1px;
74
+
75
+ --text-display-md: var(--text-display-md);
76
+ --text-display-md--line-height: 1.1;
77
+ --text-display-md--letter-spacing: -1px;
78
+
79
+ --text-display-sm: var(--text-display-sm);
80
+ --text-display-sm--line-height: 1.2;
81
+ --text-display-sm--letter-spacing: -0.5px;
82
+
83
+ /* Heading \u2014 subsection labels. Deliberately NO bundled line-height:
84
+ in the rizom mock these elements (eco-title, feature-title,
85
+ problem-title) inherit the body's 1.6 line-height. They're
86
+ emphasized labels, not display headings. Sites that want a tight
87
+ leading override per use site with \`leading-tight\` etc. */
88
+ --text-heading-lg: var(--text-heading-lg);
89
+ --text-heading-md: var(--text-heading-md);
90
+ --text-heading-sm: var(--text-heading-sm);
91
+
92
+ /* Body \u2014 paragraphs */
93
+ --text-body-xl: var(--text-body-xl);
94
+ --text-body-xl--line-height: 1.7;
95
+ --text-body-lg: var(--text-body-lg);
96
+ --text-body-lg--line-height: 1.7;
97
+ --text-body-md: var(--text-body-md);
98
+ --text-body-md--line-height: 1.8;
99
+ --text-body-sm: var(--text-body-sm);
100
+ --text-body-sm--line-height: 1.7;
101
+ --text-body-xs: var(--text-body-xs);
102
+ --text-body-xs--line-height: 1.7;
103
+
104
+ /* Label \u2014 small uppercase text. Letter-spacing is applied per-use
105
+ (different label kinds have very different tracking). */
106
+ --text-label-md: var(--text-label-md);
107
+ --text-label-sm: var(--text-label-sm);
108
+ --text-label-xs: var(--text-label-xs);
109
+
110
+ /* Section spacing \u2014 single fluid token, drives \`py-section\`,
111
+ \`pt-section\`, \`pb-section\`, \`gap-section\`, etc. */
112
+ --spacing-section: var(--spacing-section);
113
+
114
+ /* Footer */
115
+ --color-footer: var(--color-footer);
116
+ --color-footer-text: var(--color-footer-text);
117
+
118
+ /* Gradient colors */
119
+ --color-gradient-start: var(--color-gradient-start);
120
+ --color-gradient-end: var(--color-gradient-end);
121
+
122
+ /* Pattern colors */
123
+ --color-pattern-dot: var(--color-pattern-dot);
124
+
125
+ /* Prose/Typography colors - for @tailwindcss/typography plugin */
126
+ --tw-prose-body: var(--color-text);
127
+ --tw-prose-headings: var(--color-heading);
128
+ --tw-prose-links: var(--color-brand);
129
+ --tw-prose-bold: var(--color-text);
130
+ --tw-prose-code: var(--color-text);
131
+ --tw-prose-quotes: var(--color-text-muted);
132
+ --tw-prose-counters: var(--color-text-muted);
133
+ --tw-prose-bullets: var(--color-text-muted);
134
+ }
135
+
136
+ /* ============================================
137
+ Core theme utilities
138
+ These CAN'T be auto-generated by @theme inline because
139
+ different utilities need different variables.
140
+ e.g. bg-theme uses --color-bg, text-theme uses --color-text
141
+ ============================================ */
142
+ @layer theme-base {
143
+ /* Theme utilities - bg uses --color-bg, text uses --color-text */
144
+ .bg-theme { background-color: var(--color-bg); }
145
+ .bg-theme-subtle { background-color: var(--color-bg-subtle); }
146
+ .bg-theme-muted { background-color: var(--color-bg-muted); }
147
+ .bg-theme-dark { background-color: var(--color-bg-dark); }
148
+ .bg-surface { background-color: var(--color-bg-subtle); }
149
+ .text-theme { color: var(--color-text); }
150
+ .text-theme-muted { color: var(--color-text-muted); }
151
+ .text-theme-light { color: var(--color-text-light); }
152
+ .text-theme-inverse { color: var(--color-text-inverse); }
153
+ .text-heading { color: var(--color-heading); }
154
+ .text-selection { color: var(--color-selection); }
155
+ .border-theme { border-color: var(--color-border); }
156
+ .border-theme-light { border-color: var(--color-border-light); }
157
+ .placeholder-theme-muted::placeholder { color: var(--color-text-muted); }
158
+
159
+ /* Status badge utilities */
160
+ .bg-status-neutral { background-color: var(--color-status-neutral-bg); }
161
+ .text-status-neutral { color: var(--color-status-neutral-text); }
162
+ .bg-status-info { background-color: var(--color-status-info-bg); }
163
+ .text-status-info { color: var(--color-status-info-text); }
164
+ .bg-status-success { background-color: var(--color-status-success-bg); }
165
+ .text-status-success { color: var(--color-status-success-text); }
166
+ .bg-status-danger { background-color: var(--color-status-danger-bg); }
167
+ .text-status-danger { color: var(--color-status-danger-text); }
168
+ .bg-status-warning { background-color: var(--color-status-warning-bg); }
169
+ .text-status-warning { color: var(--color-status-warning-text); }
170
+
171
+ /* Hover states for theme utilities */
172
+ .hover\\:bg-theme-subtle:hover { background-color: var(--color-bg-subtle); }
173
+ .hover\\:bg-brand:hover { background-color: var(--color-brand); }
174
+ .hover\\:bg-brand-dark:hover { background-color: var(--color-brand-dark); }
175
+
176
+ /* Complete gradient background - uses full gradient value, not single color */
177
+ .bg-theme-gradient { background: var(--color-bg-gradient); }
178
+
179
+ /* Footer text color override */
180
+ .bg-footer .text-theme-inverse {
181
+ color: var(--color-footer-text);
182
+ }
183
+
184
+ /* Text selection highlighting */
185
+ ::selection {
186
+ background-color: var(--color-selection-bg);
187
+ color: var(--color-selection-text);
188
+ }
189
+ }
190
+
191
+ /* ============================================
192
+ Gradient utilities - Tailwind v4 format
193
+ ============================================ */
194
+ @layer theme-base {
195
+ .from-gradient-start {
196
+ --tw-gradient-from: var(--color-gradient-start);
197
+ --tw-gradient-to: rgb(from var(--color-gradient-start) r g b / 0);
198
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
199
+ }
200
+ .to-gradient-end {
201
+ --tw-gradient-to: var(--color-gradient-end);
202
+ }
203
+ .from-accent {
204
+ --tw-gradient-from: var(--color-accent);
205
+ --tw-gradient-to: rgb(from var(--color-accent) r g b / 0);
206
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
207
+ }
208
+ .to-accent-dark {
209
+ --tw-gradient-to: var(--color-accent-dark);
210
+ }
211
+ .from-brand-dark {
212
+ --tw-gradient-from: var(--color-brand-dark);
213
+ --tw-gradient-to: rgb(from var(--color-brand-dark) r g b / 0);
214
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
215
+ }
216
+ .from-brand-light {
217
+ --tw-gradient-from: var(--color-brand-light);
218
+ --tw-gradient-to: rgb(from var(--color-brand-light) r g b / 0);
219
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
220
+ }
221
+ .to-brand {
222
+ --tw-gradient-to: var(--color-brand);
223
+ }
224
+ .to-theme {
225
+ --tw-gradient-to: var(--color-bg);
226
+ }
227
+ }
228
+
229
+ /* ============================================
230
+ Status colors (warning / success / danger / info) \u2014 SHARED across
231
+ themes. These are universal UI signals (not brand colors) so they
232
+ live here and every theme inherits them. A theme can still override
233
+ individual --color-warning-* values if it wants brand-flavored
234
+ variants, but the sensible defaults are right here.
235
+ ============================================ */
236
+ :root {
237
+ --palette-warning: #CA8A04; /* base yellow (dark mode bg/border) */
238
+ --palette-warning-text: #FDE047; /* dark-mode text */
239
+ --palette-warning-text-emphasis: #FEF08A; /* dark-mode heavy text */
240
+ --palette-warning-bg-light: #FEFCE8; /* light-mode bg */
241
+ --palette-warning-border-light: #FDE047; /* light-mode border */
242
+ --palette-warning-text-light: #854D0E; /* light-mode text */
243
+ --palette-warning-text-emphasis-light: #92400E;
244
+
245
+ /* Dark-mode defaults */
246
+ --color-warning-bg: rgb(from var(--palette-warning) r g b / 0.2);
247
+ --color-warning-border: rgb(from var(--palette-warning) r g b / 0.5);
248
+ --color-warning-text: var(--palette-warning-text);
249
+ --color-warning-text-emphasis: var(--palette-warning-text-emphasis);
250
+ }
251
+
252
+ [data-theme="light"] {
253
+ --color-warning-bg: var(--palette-warning-bg-light);
254
+ --color-warning-border: var(--palette-warning-border-light);
255
+ --color-warning-text: var(--palette-warning-text-light);
256
+ --color-warning-text-emphasis: var(--palette-warning-text-emphasis-light);
257
+ }
258
+
259
+ @layer theme-base {
260
+ .bg-warning { background-color: var(--color-warning-bg); }
261
+ .border-warning { border-color: var(--color-warning-border); }
262
+ .text-warning { color: var(--color-warning-text); }
263
+ .text-warning-emphasis { color: var(--color-warning-text-emphasis); }
264
+ }
265
+
266
+ /* ============================================
267
+ Theme toggle icon visibility
268
+ ============================================ */
269
+ @layer theme-base {
270
+ [data-theme="dark"] .sun-icon {
271
+ display: block;
272
+ }
273
+ [data-theme="dark"] .moon-icon {
274
+ display: none;
275
+ }
276
+ [data-theme="light"] .sun-icon {
277
+ display: none;
278
+ }
279
+ [data-theme="light"] .moon-icon {
280
+ display: block;
281
+ }
282
+ }
283
+ `;function o(e){return t+`
284
+
285
+ `+e}export{o as composeTheme};
286
+
287
+ //# debugId=AA4E52472A90D8F564756E2164756E21
288
+ //# sourceMappingURL=themes.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../shared/theme-base/src/index.ts"],
4
+ "sourcesContent": [
5
+ "// Types for CSS imports are defined in types.d.ts\n/// <reference types=\"./types.d.ts\" />\n\nimport themeBaseCSS from \"./theme-base.css\" with { type: \"text\" };\n\n/**\n * Compose a complete theme by prepending shared base utilities.\n *\n * Base utilities live in @layer theme-base; theme-specific styles\n * should use @layer theme-override to guarantee correct cascade order.\n */\nexport function composeTheme(themeCSS: string): string {\n return themeBaseCSS + \"\\n\\n\" + themeCSS;\n}\n\nexport default themeBaseCSS;\nexport { themeBaseCSS };\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWO,SAAS,CAAY,CAAC,EAA0B,CACrD,OAAO,EAAe;AAAA;AAAA,EAAS",
8
+ "debugId": "AA4E52472A90D8F564756E2164756E21",
9
+ "names": []
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/brain",
3
- "version": "0.1.1-alpha.5",
3
+ "version": "0.1.1-alpha.6",
4
4
  "description": "Brain runtime + CLI — scaffold, run, and manage AI brain instances",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,6 +11,10 @@
11
11
  "./site": {
12
12
  "types": "./dist/site.d.ts",
13
13
  "import": "./dist/site.js"
14
+ },
15
+ "./themes": {
16
+ "types": "./dist/themes.d.ts",
17
+ "import": "./dist/themes.js"
14
18
  }
15
19
  },
16
20
  "files": [