@lexibase/rdx-types 2.4.0 → 2.6.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 +21 -5
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -115,6 +115,20 @@ 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
|
+
|
|
126
|
+
/** Props for the server homepage enabled by homepage.translations. */
|
|
127
|
+
export type RdxTranslatedHomepageProps = RdxHomepageProps & {
|
|
128
|
+
/** Translate a source phrase, falling back to the phrase itself. */
|
|
129
|
+
t: (text: string) => string
|
|
130
|
+
}
|
|
131
|
+
|
|
118
132
|
/** Options for the built-in landing page or a project-owned home.tsx component. */
|
|
119
133
|
export type RdxHomepage = {
|
|
120
134
|
/**
|
|
@@ -124,17 +138,19 @@ export type RdxHomepage = {
|
|
|
124
138
|
enabled?: boolean
|
|
125
139
|
/**
|
|
126
140
|
* Imported React component that owns the homepage body.
|
|
127
|
-
* The shared navbar remains
|
|
128
|
-
*
|
|
141
|
+
* The shared navbar remains. Use the lang and docsHref props to localize the
|
|
142
|
+
* homepage content and navigation. Used only when enabled is true.
|
|
129
143
|
* @example
|
|
130
144
|
* component: Home // import Home from './home'
|
|
131
145
|
*/
|
|
132
|
-
component?: ComponentType
|
|
146
|
+
component?: ComponentType<RdxHomepageProps>
|
|
147
|
+
/** Load components/home.tsx on the server and translate its text from locale folders. */
|
|
148
|
+
translations?: boolean
|
|
133
149
|
/** Built-in homepage heading. Defaults to metadata.applicationName. */
|
|
134
150
|
title?: string
|
|
135
|
-
/**
|
|
151
|
+
/** Text below the built-in heading. Defaults to the site description. */
|
|
136
152
|
description?: string
|
|
137
|
-
/**
|
|
153
|
+
/** Hero buttons. The first is primary. Defaults to a Docs link; use [] to hide it. */
|
|
138
154
|
buttons?: {
|
|
139
155
|
/** Visible button text and accessible name; must not be empty. */
|
|
140
156
|
label: string
|
package/dist/index.d.ts
CHANGED