@rizom/site-rizom 0.2.0-alpha.159 → 0.2.0-alpha.160

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/site-rizom",
3
- "version": "0.2.0-alpha.159",
3
+ "version": "0.2.0-alpha.160",
4
4
  "description": "Shared Rizom site core — structural base for rizom.ai, rizom.foundation, and rizom.work",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@rizom/site": "0.2.0-alpha.159",
29
+ "@rizom/site": "0.2.0-alpha.160",
30
30
  "clsx": "^2.1.0",
31
31
  "preact": "^10.27.2",
32
32
  "tailwind-merge": "^3.6.0"
@@ -1,8 +1,10 @@
1
1
  import { extendSite } from "@brains/site-composition";
2
2
  import type {
3
+ EntityDisplayEntry,
3
4
  RouteDefinitionInput,
4
5
  SiteContentDefinition,
5
6
  SiteDefinition,
7
+ SiteSectionGroup,
6
8
  } from "@rizom/site";
7
9
  import rizomBaseSite from ".";
8
10
  import type {
@@ -55,11 +57,32 @@ class RizomVariantPlugin extends RizomRuntimePlugin {
55
57
 
56
58
  export interface CreateRizomSiteOptions {
57
59
  packageName: string;
58
- themeProfile: RizomThemeProfile;
60
+ /**
61
+ * Optional profile-driven chrome: sets `data-theme-profile` on the document
62
+ * and loads the matching background canvas (product→tree, editorial→roots,
63
+ * studio→constellation). Omit for sites that draw their own motifs — the
64
+ * boot.js animation runtime always loads regardless. Only the retiring
65
+ * rizom-work/rizom-foundation variants still use profiles; the machinery
66
+ * goes with them at consolidation Phase 6.
67
+ */
68
+ themeProfile?: RizomThemeProfile;
59
69
  layout: unknown;
60
70
  routes: RouteDefinitionInput[];
61
71
  content?: SiteContentDefinition | SiteContentDefinition[];
72
+ /**
73
+ * Schema-first section groups (authored via `@rizom/site-sections`'
74
+ * `defineSection`/`sectionGroup`). Registered as content templates at brain
75
+ * boot exactly like `content`, so the CMS + directory-sync + resolver treat
76
+ * them identically — but the section shape is derived from one zod schema.
77
+ */
78
+ sections?: SiteSectionGroup | SiteSectionGroup[];
62
79
  themeOverride?: string;
80
+ /**
81
+ * Presentation config for entity-backed list/detail routes (labels, plural
82
+ * names, navigation). Merged onto the base site's empty map. Sites that
83
+ * surface plugin lists — e.g. `post`→"Essay", `deck`→"Talk" — set it here.
84
+ */
85
+ entityDisplay?: Record<string, EntityDisplayEntry>;
63
86
  /** Advanced runtime hooks for in-repo sites that need custom template/data-source wiring. */
64
87
  runtime?: RizomRuntimeHooks;
65
88
  }
@@ -86,7 +109,10 @@ function createRuntimePlugin(
86
109
  return (config?: Record<string, unknown>): RizomRuntimePlugin =>
87
110
  new RizomVariantPlugin(
88
111
  options.packageName,
89
- { themeProfile: options.themeProfile, ...(config ?? {}) },
112
+ {
113
+ ...(options.themeProfile ? { themeProfile: options.themeProfile } : {}),
114
+ ...(config ?? {}),
115
+ },
90
116
  buildTemplateGroups(options),
91
117
  options.runtime?.dataSources,
92
118
  );
@@ -100,7 +126,9 @@ export function createRizomSite(
100
126
  return extendSite(rizomBaseSite, {
101
127
  layouts: { default: options.layout },
102
128
  routes: options.routes,
129
+ ...(options.entityDisplay ? { entityDisplay: options.entityDisplay } : {}),
103
130
  ...(options.content ? { content: options.content } : {}),
131
+ ...(options.sections ? { sections: options.sections } : {}),
104
132
  headScripts: [buildRizomHeadScript(options.themeProfile)],
105
133
  ...(plugin ? { plugin } : {}),
106
134
  ...(options.themeOverride ? { themeOverride: options.themeOverride } : {}),
package/src/ui/frame.tsx CHANGED
@@ -4,6 +4,12 @@ export type { RizomLayoutProps } from "@rizom/site";
4
4
 
5
5
  export interface RizomFrameProps {
6
6
  children?: ComponentChildren;
7
+ /**
8
+ * Render the full-page background canvas mount the profile canvas scripts
9
+ * draw into. Sites without a `themeProfile` pass false — the mount would be
10
+ * dead markup.
11
+ */
12
+ canvas?: boolean;
7
13
  }
8
14
 
9
15
  /**
@@ -12,14 +18,19 @@ export interface RizomFrameProps {
12
18
  * Owns only the full-page canvas background and the centered page
13
19
  * container. Wrapper sites own their actual chrome/layout composition.
14
20
  */
15
- export const RizomFrame = ({ children }: RizomFrameProps): JSX.Element => (
21
+ export const RizomFrame = ({
22
+ children,
23
+ canvas = true,
24
+ }: RizomFrameProps): JSX.Element => (
16
25
  <>
17
- <div
18
- id="bgCanvasWrap"
19
- className="rizom-frame-canvas-wrap fixed top-0 left-0 w-full h-full pointer-events-none"
20
- >
21
- <canvas id="heroCanvas" className="w-full h-full block" />
22
- </div>
26
+ {canvas && (
27
+ <div
28
+ id="bgCanvasWrap"
29
+ className="rizom-frame-canvas-wrap fixed top-0 left-0 w-full h-full pointer-events-none"
30
+ >
31
+ <canvas id="heroCanvas" className="w-full h-full block" />
32
+ </div>
33
+ )}
23
34
 
24
35
  <div className="max-w-[1440px] mx-auto relative overflow-x-clip">
25
36
  {children}