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

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.
@@ -322,7 +322,7 @@ Recall is built on a plugin-based architecture:
322
322
 
323
323
  This is an internal tool, but we welcome contributions:
324
324
 
325
- 1. Follow the [CLAUDE.md](../../CLAUDE.md) development guidelines
325
+ 1. Follow the repository [AGENTS.md](../../AGENTS.md) development guidelines
326
326
  2. Write tests for new features
327
327
  3. Run `bun run typecheck` and `bun run lint` before committing
328
328
  4. Keep commits focused and write clear messages
package/dist/site.d.ts CHANGED
@@ -11,8 +11,9 @@
11
11
  *
12
12
  * **Sync rules:**
13
13
  * - When the runtime shape of `SitePackage`, `personalSitePlugin`,
14
- * `PersonalLayout`, or `routes` changes, this file MUST be updated
15
- * in the same commit.
14
+ * `professionalSitePlugin`, `PersonalLayout`, `ProfessionalLayout`,
15
+ * or the route exports changes, this file MUST be updated in the
16
+ * same commit.
16
17
  * - `Plugin` and `RouteDefinitionInput` are deliberately opaque
17
18
  * pass-throughs — consumers receive them, hand them back, and
18
19
  * never introspect. Do NOT expand them to mirror internal shapes.
@@ -39,8 +40,9 @@ import type { ComponentType } from "preact";
39
40
 
40
41
  /**
41
42
  * Opaque plugin marker. Consumers receive plugin instances via
42
- * `personalSitePlugin(config)` and pass them along to brain.yaml /
43
- * brain definitions; they do not introspect the shape themselves.
43
+ * `personalSitePlugin(config)` / `professionalSitePlugin(config)` and
44
+ * pass them along to brain.yaml / brain definitions; they do not
45
+ * introspect the shape themselves.
44
46
  */
45
47
  export interface Plugin {
46
48
  readonly id: string;
@@ -50,7 +52,7 @@ export interface Plugin {
50
52
  }
51
53
 
52
54
  /**
53
- * Opaque route definition. Consumers receive `routes` from
55
+ * Opaque route definition. Consumers receive route exports from
54
56
  * `@rizom/brain/site` and place them on the `SitePackage.routes`
55
57
  * field verbatim — they do not construct or modify the shape.
56
58
  */
@@ -86,9 +88,11 @@ export interface EntityDisplayEntry {
86
88
  }
87
89
 
88
90
  /**
89
- * A site package bundles everything the site-builder needs:
90
- * theme CSS, layout components, hand-written routes, the site
91
- * plugin factory, and per-entity display metadata.
91
+ * A site package bundles everything the site-builder needs for site
92
+ * structure: layout components, hand-written routes, the site plugin
93
+ * factory, and per-entity display metadata.
94
+ *
95
+ * Themes are resolved separately by the framework.
92
96
  *
93
97
  * @example
94
98
  * ```ts
@@ -98,10 +102,8 @@ export interface EntityDisplayEntry {
98
102
  * routes,
99
103
  * } from "@rizom/brain/site";
100
104
  * import type { Plugin, SitePackage } from "@rizom/brain/site";
101
- * import themeCSS from "./theme.css" with { type: "text" };
102
105
  *
103
106
  * const site: SitePackage = {
104
- * theme: themeCSS,
105
107
  * layouts: { default: PersonalLayout },
106
108
  * routes,
107
109
  * plugin: (config) => personalSitePlugin(config ?? {}),
@@ -114,8 +116,6 @@ export interface EntityDisplayEntry {
114
116
  * ```
115
117
  */
116
118
  export interface SitePackage {
117
- /** Composed theme CSS string */
118
- theme: string;
119
119
  /** Layout components keyed by name — at minimum "default" is required */
120
120
  layouts: Record<string, unknown>;
121
121
  /** Hand-written route definitions */
@@ -147,3 +147,28 @@ export function personalSitePlugin(config?: Record<string, unknown>): Plugin;
147
147
  * (homepage, about, etc.). Place verbatim on `SitePackage.routes`.
148
148
  */
149
149
  export const routes: RouteDefinitionInput[];
150
+
151
+ /**
152
+ * Alias for the personal site routes. Prefer this in new code when you
153
+ * want to be explicit about which layout family you are pairing.
154
+ */
155
+ export const personalRoutes: RouteDefinitionInput[];
156
+
157
+ /**
158
+ * Professional site layout — a Preact component used as the default
159
+ * layout in a `SitePackage.layouts` map for professional/editorial sites.
160
+ */
161
+ export const ProfessionalLayout: ComponentType<Record<string, unknown>>;
162
+
163
+ /**
164
+ * Professional site plugin factory. Registers templates, datasources,
165
+ * and schema extensions needed by the professional layout.
166
+ */
167
+ export function professionalSitePlugin(
168
+ config?: Record<string, unknown>,
169
+ ): Plugin;
170
+
171
+ /**
172
+ * Hand-written route definitions for the professional layout.
173
+ */
174
+ export const professionalRoutes: RouteDefinitionInput[];