@rizom/site-rizom 0.2.0-alpha.150 → 0.2.0-alpha.151

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +282 -83
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,9 +1,193 @@
1
- import { ComponentChildren, JSX } from 'preact';
2
- import { RizomBrandSuffix as RizomBrandSuffix$1, RizomLink, RizomFooterTagline, RizomSideNavItem, SiteLayoutInfo, RizomLayoutProps, SiteDefinition, RouteDefinitionInput, SiteContentDefinition } from '@rizom/site';
3
- export { EntityDisplayEntry, RizomBrandSuffix, RizomFooterTagline, RizomLayoutProps, RizomLink, RizomSideNavItem, RouteDefinitionInput, SectionDefinitionInput, SiteContentArrayFieldDefinition, SiteContentDefinition, SiteContentEnumFieldDefinition, SiteContentFieldDefinition, SiteContentNumberFieldDefinition, SiteContentObjectFieldDefinition, SiteContentSectionDefinition, SiteContentStringFieldDefinition, SiteDefinition, SiteDefinitionOverrides, SiteLayoutInfo } from '@rizom/site';
4
-
1
+ import { ComponentChildren, JSX } from "preact";
2
+ //#region ../../packages/site/src/index.d.ts
3
+ /** Permission levels for editable site content templates. */
4
+ type UserPermissionLevel = "anchor" | "trusted" | "public";
5
+ /** Runtime script declaration attached to a content section/template. */
6
+ interface RuntimeScript {
7
+ src: string;
8
+ defer?: boolean;
9
+ module?: boolean;
10
+ }
11
+ /** Bivariant component type for author-supplied layout components. */
12
+ type ComponentType<P = unknown> = {
13
+ bivarianceHack(props: P): JSX.Element;
14
+ }["bivarianceHack"];
15
+ /** Navigation slot types exposed to authored routes and generated entity routes. */
16
+ type NavigationSlot = "primary" | "secondary";
17
+ /** Display and behavior metadata for an entity type. */
18
+ interface EntityDisplayEntry {
19
+ label: string;
20
+ pluralName?: string | undefined;
21
+ /** Layout name for this entity type's generated routes (defaults to "default"). */
22
+ layout?: string | undefined;
23
+ /** Enable pagination for list pages. */
24
+ paginate?: boolean | undefined;
25
+ /** Items per page (default: 10). */
26
+ pageSize?: number | undefined;
27
+ navigation?: {
28
+ show?: boolean | undefined;
29
+ slot?: NavigationSlot | undefined;
30
+ priority?: number | undefined;
31
+ } | undefined;
32
+ }
33
+ interface SectionDefinitionInput {
34
+ id: string;
35
+ template: string;
36
+ content?: unknown;
37
+ dataQuery?: {
38
+ entityType?: string | undefined;
39
+ template?: string | undefined;
40
+ query?: Record<string, unknown> | undefined;
41
+ [key: string]: unknown;
42
+ } | undefined;
43
+ order?: number | undefined;
44
+ }
45
+ interface NavigationMetadataInput {
46
+ show?: boolean | undefined;
47
+ label?: string | undefined;
48
+ slot?: NavigationSlot | undefined;
49
+ priority?: number | undefined;
50
+ }
51
+ interface RouteDefinitionInput {
52
+ id: string;
53
+ path: string;
54
+ title?: string | undefined;
55
+ /** Bare display label without any page suffix. */
56
+ pageLabel?: string | undefined;
57
+ description?: string | undefined;
58
+ sections?: SectionDefinitionInput[] | undefined;
59
+ layout?: string | undefined;
60
+ fullscreen?: boolean | undefined;
61
+ pluginId?: string | undefined;
62
+ sourceEntityType?: string | undefined;
63
+ external?: boolean | undefined;
64
+ navigation?: NavigationMetadataInput | undefined;
65
+ }
66
+ interface SiteContentStringFieldDefinition {
67
+ type: "string";
68
+ label: string;
69
+ optional?: boolean;
70
+ }
71
+ interface SiteContentNumberFieldDefinition {
72
+ type: "number";
73
+ label: string;
74
+ optional?: boolean;
75
+ }
76
+ interface SiteContentEnumFieldDefinition {
77
+ type: "enum";
78
+ label: string;
79
+ options: [string, ...string[]] | readonly [string, ...string[]];
80
+ optional?: boolean;
81
+ }
82
+ interface SiteContentObjectFieldDefinition {
83
+ type: "object";
84
+ label: string;
85
+ fields: Record<string, SiteContentFieldDefinition>;
86
+ optional?: boolean;
87
+ }
88
+ interface SiteContentArrayFieldDefinition {
89
+ type: "array";
90
+ label: string;
91
+ items: SiteContentStringFieldDefinition | SiteContentNumberFieldDefinition | SiteContentEnumFieldDefinition | SiteContentObjectFieldDefinition;
92
+ minItems?: number;
93
+ length?: number;
94
+ optional?: boolean;
95
+ }
96
+ type SiteContentFieldDefinition = SiteContentStringFieldDefinition | SiteContentNumberFieldDefinition | SiteContentEnumFieldDefinition | SiteContentObjectFieldDefinition | SiteContentArrayFieldDefinition;
97
+ interface SiteContentSectionDefinition {
98
+ description: string;
99
+ title: string;
100
+ layout: ComponentType<unknown>;
101
+ fields: Record<string, SiteContentFieldDefinition>;
102
+ requiredPermission?: UserPermissionLevel;
103
+ fullscreen?: boolean;
104
+ runtimeScripts?: RuntimeScript[];
105
+ }
106
+ interface SiteContentDefinition {
107
+ namespace: string;
108
+ sections: Record<string, SiteContentSectionDefinition>;
109
+ }
110
+ interface SiteMetadataCTA {
111
+ heading: string;
112
+ buttonText: string;
113
+ buttonLink: string;
114
+ }
115
+ interface SiteMetadataSection {
116
+ blurb?: string | undefined;
117
+ }
118
+ interface SiteMetadata {
119
+ title: string;
120
+ description: string;
121
+ url?: string | undefined;
122
+ copyright?: string | undefined;
123
+ logo?: boolean | undefined;
124
+ themeMode?: "light" | "dark" | undefined;
125
+ analyticsScript?: string | undefined;
126
+ cta?: SiteMetadataCTA | undefined;
127
+ sections?: Record<string, SiteMetadataSection> | undefined;
128
+ }
129
+ interface NavigationItem {
130
+ label: string;
131
+ href: string;
132
+ priority: number;
133
+ }
134
+ interface SiteLayoutInfo extends SiteMetadata {
135
+ copyright: string;
136
+ navigation: {
137
+ primary: NavigationItem[];
138
+ secondary: NavigationItem[];
139
+ };
140
+ socialLinks?: Array<{
141
+ platform: "github" | "instagram" | "linkedin" | "email" | "website";
142
+ url: string;
143
+ label?: string | undefined;
144
+ }> | undefined;
145
+ }
146
+ /** Declarative site-package shape authored by public site packages. */
147
+ interface SiteDefinition {
148
+ /** Layout components keyed by name — at minimum "default" is required. */
149
+ layouts: Record<string, unknown>;
150
+ /** Hand-written route definitions (home, about, etc.). */
151
+ routes: RouteDefinitionInput[];
152
+ /** Optional content definitions owned by this package. */
153
+ content?: SiteContentDefinition | SiteContentDefinition[];
154
+ /** Optional additive CSS owned by the site package. */
155
+ themeOverride?: string;
156
+ /** Global head scripts to inject into every rendered page. */
157
+ headScripts?: string[];
158
+ /** Display metadata per entity type. */
159
+ entityDisplay: Record<string, EntityDisplayEntry>;
160
+ /** Static assets to write into the site output directory at build time. */
161
+ staticAssets?: Record<string, string>;
162
+ }
163
+ type SiteDefinitionOverrides = Partial<SiteDefinition>;
164
+ interface RizomLink {
165
+ href: string;
166
+ label: string;
167
+ /** Open in a new tab with rel="noopener noreferrer". */
168
+ external?: boolean;
169
+ }
170
+ type RizomBrandSuffix = "ai" | "foundation" | "work";
171
+ interface RizomSideNavItem {
172
+ href: string;
173
+ label: string;
174
+ }
175
+ interface RizomFooterTagline {
176
+ prefix?: string;
177
+ link: RizomLink;
178
+ suffix?: string;
179
+ }
180
+ interface RizomLayoutProps {
181
+ sections: ComponentChildren[];
182
+ title: string;
183
+ description: string;
184
+ path: string;
185
+ siteInfo: SiteLayoutInfo;
186
+ }
187
+ //#endregion
188
+ //#region src/ui/frame.d.ts
5
189
  interface RizomFrameProps {
6
- children?: ComponentChildren;
190
+ children?: ComponentChildren;
7
191
  }
8
192
  /**
9
193
  * Shared Rizom page frame.
@@ -12,59 +196,67 @@ interface RizomFrameProps {
12
196
  * container. Wrapper sites own their actual chrome/layout composition.
13
197
  */
14
198
  declare const RizomFrame: ({ children }: RizomFrameProps) => JSX.Element;
15
-
199
+ //#endregion
200
+ //#region src/ui/Header.d.ts
16
201
  interface HeaderProps {
17
- brandSuffix: RizomBrandSuffix$1;
18
- navLinks: RizomLink[];
19
- primaryCta: RizomLink;
202
+ brandSuffix: RizomBrandSuffix;
203
+ navLinks: RizomLink[];
204
+ primaryCta: RizomLink;
20
205
  }
21
- declare const Header: ({ brandSuffix, navLinks, primaryCta, }: HeaderProps) => JSX.Element;
22
-
206
+ declare const Header: ({ brandSuffix, navLinks, primaryCta }: HeaderProps) => JSX.Element;
207
+ //#endregion
208
+ //#region src/ui/Footer.d.ts
23
209
  interface FooterProps {
24
- brandSuffix: RizomBrandSuffix$1;
25
- metaLabel: string;
26
- tagline?: RizomFooterTagline;
27
- links: RizomLink[];
28
- className?: string;
29
- }
30
- declare const Footer: ({ brandSuffix, metaLabel, tagline, links, className, }: FooterProps) => JSX.Element;
31
-
210
+ brandSuffix: RizomBrandSuffix;
211
+ metaLabel: string;
212
+ tagline?: RizomFooterTagline;
213
+ links: RizomLink[];
214
+ className?: string;
215
+ }
216
+ declare const Footer: ({ brandSuffix, metaLabel, tagline, links, className }: FooterProps) => JSX.Element;
217
+ //#endregion
218
+ //#region src/ui/SideNav.d.ts
32
219
  interface SideNavProps {
33
- items: RizomSideNavItem[];
220
+ items: RizomSideNavItem[];
34
221
  }
35
222
  declare const SideNav: ({ items }: SideNavProps) => JSX.Element;
36
-
223
+ //#endregion
224
+ //#region src/ui/Section.d.ts
37
225
  interface SectionProps {
38
- id?: string;
39
- className?: string;
40
- children?: ComponentChildren;
226
+ id?: string;
227
+ className?: string;
228
+ children?: ComponentChildren;
41
229
  }
42
230
  declare const GUTTER = "px-6 md:px-10 xl:px-20";
43
- declare const Section: ({ id, className, children, }: SectionProps) => JSX.Element;
44
-
231
+ declare const Section: ({ id, className, children }: SectionProps) => JSX.Element;
232
+ //#endregion
233
+ //#region src/ui/Button.d.ts
45
234
  type ButtonVariant = "primary" | "primary-strong" | "secondary";
46
235
  type ButtonSize = "md" | "lg";
47
236
  interface ButtonProps {
48
- href: string;
49
- variant?: ButtonVariant;
50
- size?: ButtonSize;
51
- block?: boolean;
52
- className?: string;
53
- children?: ComponentChildren;
54
- }
55
- declare const Button: ({ href, variant, size, block, className, children, }: ButtonProps) => JSX.Element;
56
-
237
+ href: string;
238
+ variant?: ButtonVariant;
239
+ size?: ButtonSize;
240
+ block?: boolean;
241
+ className?: string;
242
+ children?: ComponentChildren;
243
+ }
244
+ declare const Button: ({ href, variant, size, block, className, children }: ButtonProps) => JSX.Element;
245
+ //#endregion
246
+ //#region src/ui/Badge.d.ts
57
247
  interface BadgeProps {
58
- children?: ComponentChildren;
59
- className?: string;
248
+ children?: ComponentChildren;
249
+ className?: string;
60
250
  }
61
251
  declare const Badge: ({ children, className }: BadgeProps) => JSX.Element;
62
-
252
+ //#endregion
253
+ //#region src/ui/Divider.d.ts
63
254
  interface DividerProps {
64
- className?: string;
255
+ className?: string;
65
256
  }
66
257
  declare const Divider: ({ className }: DividerProps) => JSX.Element;
67
-
258
+ //#endregion
259
+ //#region src/ui/highlighted-text.d.ts
68
260
  /**
69
261
  * Render a content string with two lightweight markup conventions:
70
262
  *
@@ -78,58 +270,65 @@ declare const Divider: ({ className }: DividerProps) => JSX.Element;
78
270
  * the parsing/structure is shared.
79
271
  */
80
272
  declare function renderHighlightedText(text: string, highlightClass: string): JSX.Element;
81
-
273
+ //#endregion
274
+ //#region src/ui/site-info-links.d.ts
82
275
  declare function socialLinksToRizomLinks(siteInfo: Pick<SiteLayoutInfo, "socialLinks">, allowedPlatforms?: string[]): RizomLink[];
83
-
84
- declare const DefaultRizomLayout: ({ sections, }: RizomLayoutProps) => JSX.Element;
85
-
276
+ //#endregion
277
+ //#region src/runtime/default-layout.d.ts
278
+ declare const DefaultRizomLayout: ({ sections }: RizomLayoutProps) => JSX.Element;
279
+ //#endregion
280
+ //#region src/runtime/base-site.d.ts
86
281
  declare const rizomBaseSite: SiteDefinition;
87
-
282
+ //#endregion
283
+ //#region src/contracts.d.ts
88
284
  type RizomThemeProfile = "product" | "editorial" | "studio";
89
-
285
+ //#endregion
286
+ //#region src/create-site.d.ts
90
287
  interface RizomRuntimeHooks {
91
- contentNamespace: string;
92
- templates?: Record<string, unknown>;
93
- dataSources?: unknown[];
288
+ contentNamespace: string;
289
+ templates?: Record<string, unknown>;
290
+ dataSources?: unknown[];
94
291
  }
95
292
  interface CreateRizomSiteOptions {
96
- packageName: string;
97
- themeProfile: RizomThemeProfile;
98
- layout: unknown;
99
- routes: RouteDefinitionInput[];
100
- content?: SiteContentDefinition | SiteContentDefinition[];
101
- themeOverride?: string;
102
- /** Advanced runtime hooks for in-repo sites that need custom template/data-source wiring. */
103
- runtime?: RizomRuntimeHooks;
293
+ packageName: string;
294
+ themeProfile: RizomThemeProfile;
295
+ layout: unknown;
296
+ routes: RouteDefinitionInput[];
297
+ content?: SiteContentDefinition | SiteContentDefinition[];
298
+ themeOverride?: string;
299
+ /** Advanced runtime hooks for in-repo sites that need custom template/data-source wiring. */
300
+ runtime?: RizomRuntimeHooks;
104
301
  }
105
302
  declare function createRizomSite(options: CreateRizomSiteOptions): SiteDefinition;
106
-
107
- type RizomBrandSuffix = "ai" | "foundation" | "work";
108
-
303
+ //#endregion
304
+ //#region ../../shared/rizom-ui/src/types.d.ts
305
+ type RizomBrandSuffix$1 = "ai" | "foundation" | "work";
306
+ //#endregion
307
+ //#region ../../shared/rizom-ui/src/Wordmark.d.ts
109
308
  interface WordmarkProps {
110
- /** Brand name before the dot. Defaults to `"rizom"`. */
111
- name?: string;
112
- /** Suffix after the dot. Any string (e.g. `"ai"`, `"io"`, `"foundation"`). */
113
- brandSuffix: RizomBrandSuffix | string;
114
- className?: string;
115
- dotClassName?: string;
116
- suffixClassName?: string;
117
- }
118
- declare const Wordmark: ({ name, brandSuffix, className, dotClassName, suffixClassName, }: WordmarkProps) => JSX.Element;
119
-
309
+ /** Brand name before the dot. Defaults to `"rizom"`. */
310
+ name?: string;
311
+ /** Suffix after the dot. Any string (e.g. `"ai"`, `"io"`, `"foundation"`). */
312
+ brandSuffix: RizomBrandSuffix$1 | string;
313
+ className?: string;
314
+ dotClassName?: string;
315
+ suffixClassName?: string;
316
+ }
317
+ declare const Wordmark: ({ name, brandSuffix, className, dotClassName, suffixClassName }: WordmarkProps) => JSX.Element;
318
+ //#endregion
319
+ //#region ../../shared/rizom-ui/src/Ecosystem.d.ts
120
320
  interface EcosystemCard {
121
- suffix: RizomBrandSuffix;
122
- title: string;
123
- body: string;
124
- linkLabel: string;
125
- linkHref: string;
321
+ suffix: RizomBrandSuffix$1;
322
+ title: string;
323
+ body: string;
324
+ linkLabel: string;
325
+ linkHref: string;
126
326
  }
127
327
  interface EcosystemContent {
128
- eyebrow: string;
129
- headline: string;
130
- cards: EcosystemCard[];
131
- }
132
- declare const Ecosystem: ({ eyebrow, headline, cards, }: EcosystemContent) => JSX.Element;
133
-
134
- export { Badge, Button, DefaultRizomLayout, Divider, Ecosystem, Footer, GUTTER, Header, RizomFrame, Section, SideNav, Wordmark, createRizomSite, rizomBaseSite as default, renderHighlightedText, rizomBaseSite, socialLinksToRizomLinks };
135
- export type { BadgeProps, ButtonProps, ButtonSize, ButtonVariant, CreateRizomSiteOptions, DividerProps, EcosystemCard, EcosystemContent, RizomFrameProps, RizomThemeProfile, SectionProps, WordmarkProps };
328
+ eyebrow: string;
329
+ headline: string;
330
+ cards: EcosystemCard[];
331
+ }
332
+ declare const Ecosystem: ({ eyebrow, headline, cards }: EcosystemContent) => JSX.Element;
333
+ //#endregion
334
+ export { Badge, type BadgeProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, type CreateRizomSiteOptions, DefaultRizomLayout, Divider, type DividerProps, Ecosystem, type EcosystemCard, type EcosystemContent, type EntityDisplayEntry, Footer, GUTTER, Header, type RizomBrandSuffix, type RizomFooterTagline, RizomFrame, type RizomFrameProps, type RizomLayoutProps, type RizomLink, type RizomSideNavItem, type RizomThemeProfile, type RouteDefinitionInput, Section, type SectionDefinitionInput, type SectionProps, SideNav, type SiteContentArrayFieldDefinition, type SiteContentDefinition, type SiteContentEnumFieldDefinition, type SiteContentFieldDefinition, type SiteContentNumberFieldDefinition, type SiteContentObjectFieldDefinition, type SiteContentSectionDefinition, type SiteContentStringFieldDefinition, type SiteDefinition, type SiteDefinitionOverrides, type SiteLayoutInfo, Wordmark, type WordmarkProps, createRizomSite, rizomBaseSite as default, rizomBaseSite, renderHighlightedText, socialLinksToRizomLinks };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/site-rizom",
3
- "version": "0.2.0-alpha.150",
3
+ "version": "0.2.0-alpha.151",
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.150",
29
+ "@rizom/site": "0.2.0-alpha.151",
30
30
  "clsx": "^2.1.0",
31
31
  "preact": "^10.27.2",
32
32
  "tailwind-merge": "^3.6.0"