@rizom/site-rizom 0.2.0-alpha.142

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 (37) hide show
  1. package/dist/index.d.ts +135 -0
  2. package/dist/index.js +31089 -0
  3. package/dist/index.js.map +259 -0
  4. package/package.json +54 -0
  5. package/src/content.ts +9 -0
  6. package/src/contracts.ts +157 -0
  7. package/src/create-site.ts +108 -0
  8. package/src/index.ts +63 -0
  9. package/src/runtime/base-site.ts +13 -0
  10. package/src/runtime/boot/boot.boot.d.ts +2 -0
  11. package/src/runtime/boot/boot.boot.js +83 -0
  12. package/src/runtime/canvases/constellation.canvas.d.ts +2 -0
  13. package/src/runtime/canvases/constellation.canvas.js +307 -0
  14. package/src/runtime/canvases/prelude.canvas.d.ts +2 -0
  15. package/src/runtime/canvases/prelude.canvas.js +193 -0
  16. package/src/runtime/canvases/products.canvas.d.ts +2 -0
  17. package/src/runtime/canvases/roots.canvas.d.ts +2 -0
  18. package/src/runtime/canvases/roots.canvas.js +358 -0
  19. package/src/runtime/canvases/tree.canvas.d.ts +2 -0
  20. package/src/runtime/canvases/tree.canvas.js +544 -0
  21. package/src/runtime/default-layout.tsx +10 -0
  22. package/src/runtime/index.ts +8 -0
  23. package/src/runtime/plugin.ts +147 -0
  24. package/src/ui/Badge.tsx +14 -0
  25. package/src/ui/Button.tsx +56 -0
  26. package/src/ui/Divider.tsx +12 -0
  27. package/src/ui/Footer.tsx +76 -0
  28. package/src/ui/Header.tsx +45 -0
  29. package/src/ui/Section.tsx +22 -0
  30. package/src/ui/SideNav.tsx +22 -0
  31. package/src/ui/cn.ts +1 -0
  32. package/src/ui/external-link.ts +8 -0
  33. package/src/ui/frame.tsx +28 -0
  34. package/src/ui/highlighted-text.tsx +45 -0
  35. package/src/ui/index.ts +21 -0
  36. package/src/ui/site-info-links.ts +24 -0
  37. package/src/ui/types.ts +6 -0
@@ -0,0 +1,135 @@
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
+
5
+ interface RizomFrameProps {
6
+ children?: ComponentChildren;
7
+ }
8
+ /**
9
+ * Shared Rizom page frame.
10
+ *
11
+ * Owns only the full-page canvas background and the centered page
12
+ * container. Wrapper sites own their actual chrome/layout composition.
13
+ */
14
+ declare const RizomFrame: ({ children }: RizomFrameProps) => JSX.Element;
15
+
16
+ interface HeaderProps {
17
+ brandSuffix: RizomBrandSuffix$1;
18
+ navLinks: RizomLink[];
19
+ primaryCta: RizomLink;
20
+ }
21
+ declare const Header: ({ brandSuffix, navLinks, primaryCta, }: HeaderProps) => JSX.Element;
22
+
23
+ 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
+
32
+ interface SideNavProps {
33
+ items: RizomSideNavItem[];
34
+ }
35
+ declare const SideNav: ({ items }: SideNavProps) => JSX.Element;
36
+
37
+ interface SectionProps {
38
+ id?: string;
39
+ className?: string;
40
+ children?: ComponentChildren;
41
+ }
42
+ declare const GUTTER = "px-6 md:px-10 xl:px-20";
43
+ declare const Section: ({ id, className, children, }: SectionProps) => JSX.Element;
44
+
45
+ type ButtonVariant = "primary" | "primary-strong" | "secondary";
46
+ type ButtonSize = "md" | "lg";
47
+ 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
+
57
+ interface BadgeProps {
58
+ children?: ComponentChildren;
59
+ className?: string;
60
+ }
61
+ declare const Badge: ({ children, className }: BadgeProps) => JSX.Element;
62
+
63
+ interface DividerProps {
64
+ className?: string;
65
+ }
66
+ declare const Divider: ({ className }: DividerProps) => JSX.Element;
67
+
68
+ /**
69
+ * Render a content string with two lightweight markup conventions:
70
+ *
71
+ * - `\n` in the string produces a `<br />` (for multi-line headlines)
72
+ * - Any `*...*` run is wrapped in a `<span>` carrying `highlightClass`
73
+ *
74
+ * Authors write the phrase as one natural string in markdown content;
75
+ * the renderer does the structural split. Highlight styling is passed
76
+ * per-brand (rizom.ai uses accent+midline, rizom.work uses
77
+ * italic+accent) so each brand owns its own emphasis treatment while
78
+ * the parsing/structure is shared.
79
+ */
80
+ declare function renderHighlightedText(text: string, highlightClass: string): JSX.Element;
81
+
82
+ declare function socialLinksToRizomLinks(siteInfo: Pick<SiteLayoutInfo, "socialLinks">, allowedPlatforms?: string[]): RizomLink[];
83
+
84
+ declare const DefaultRizomLayout: ({ sections, }: RizomLayoutProps) => JSX.Element;
85
+
86
+ declare const rizomBaseSite: SiteDefinition;
87
+
88
+ type RizomThemeProfile = "product" | "editorial" | "studio";
89
+
90
+ interface RizomRuntimeHooks {
91
+ contentNamespace: string;
92
+ templates?: Record<string, unknown>;
93
+ dataSources?: unknown[];
94
+ }
95
+ 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;
104
+ }
105
+ declare function createRizomSite(options: CreateRizomSiteOptions): SiteDefinition;
106
+
107
+ type RizomBrandSuffix = "ai" | "foundation" | "work";
108
+
109
+ 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
+
120
+ interface EcosystemCard {
121
+ suffix: RizomBrandSuffix;
122
+ title: string;
123
+ body: string;
124
+ linkLabel: string;
125
+ linkHref: string;
126
+ }
127
+ 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 };