@lexibase/rdx-types 2.4.0 → 2.5.0

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/config.d.ts CHANGED
@@ -115,6 +115,14 @@ export type RDXConfig = {
115
115
  }
116
116
  }
117
117
 
118
+ /** Values available to a project-owned homepage. */
119
+ export type RdxHomepageProps = {
120
+ /** Active language tag, such as 'en' or 'pt-BR'. */
121
+ lang: string
122
+ /** Documentation entry point for the active language. */
123
+ docsHref: string
124
+ }
125
+
118
126
  /** Options for the built-in landing page or a project-owned home.tsx component. */
119
127
  export type RdxHomepage = {
120
128
  /**
@@ -124,17 +132,17 @@ export type RdxHomepage = {
124
132
  enabled?: boolean
125
133
  /**
126
134
  * Imported React component that owns the homepage body.
127
- * The shared navbar remains; built-in title, description and buttons are not
128
- * injected into this component. Used only when enabled is true.
135
+ * The shared navbar remains. Use the lang and docsHref props to localize the
136
+ * homepage content and navigation. Used only when enabled is true.
129
137
  * @example
130
138
  * component: Home // import Home from './home'
131
139
  */
132
- component?: ComponentType
140
+ component?: ComponentType<RdxHomepageProps>
133
141
  /** Built-in homepage heading. Defaults to metadata.applicationName. */
134
142
  title?: string
135
- /** Optional text below the built-in heading; omitted means no description. */
143
+ /** Text below the built-in heading. Defaults to the site description. */
136
144
  description?: string
137
- /** Buttons below the built-in description. The first button is primary. */
145
+ /** Hero buttons. The first is primary. Defaults to a Docs link; use [] to hide it. */
138
146
  buttons?: {
139
147
  /** Visible button text and accessible name; must not be empty. */
140
148
  label: string
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { RdxSearchEntry, RdxSearchIndex } from './search'
3
3
  export {
4
4
  RDXConfig,
5
5
  RdxHomepage,
6
+ RdxHomepageProps,
6
7
  RdxMetadata,
7
8
  RdxRuntimeConfig,
8
9
  ResolvedRdxConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexibase/rdx-types",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "license": "MIT",
5
5
  "description": "Shared TypeScript types for RDX documentation projects.",
6
6
  "types": "./dist/index.d.ts",