@@ -245,13 +245,57 @@ export interface RenderHTMLSharedProps {
245245 * @defaultValue A `TouchableNativeFeedback` based component on Android, `TouchableHighlight` based component on other platforms.
246246 */
247247 GenericPressable ?: ComponentType < GenericPressableProps > ;
248+
248249 /**
249250 * The WebView component used by plugins (iframe, table)...
250251 * See {@link https://github.com/native-html/plugins | @native-html/plugins}.
251252 *
252253 * @defaultValue `() => null`
253254 */
254255 WebView ?: ComponentType < any > ;
256+
257+ /**
258+ * When `true` (default), anonymous {@link TPhrasing} nodes parents of a
259+ * lonely {@link TText} node are not translated as React Native `Text`
260+ * elements. Instead, their child is directly rendered, e.g. with no `Text`
261+ * wrapper.
262+ *
263+ * @example **With `true`:**
264+ *
265+ * ```xml
266+ * <TPhrasing>
267+ * <TText>Hello</TText>
268+ * </TPhrasing>
269+ * ```
270+ *
271+ * is translated to
272+ *
273+ * ```xml
274+ * <Text>Hello</Text>
275+ * ```
276+ *
277+ * **With `false`:**
278+ *
279+ * ```xml
280+ * <TPhrasing>
281+ * <TText>Hello</TText>
282+ * </TPhrasing>
283+ * ```
284+ *
285+ * is translated to
286+ *
287+ * ```xml
288+ * <Text><Text>Hello</Text></Text>
289+ * ```
290+ *
291+ * @warning Unless strictly necessary, this should be left to `true` because
292+ * some styles don't apply to nested React Native `Text` elements
293+ * (`borderRadius`, `padding`...).
294+ *
295+ * @defaultValue true
296+ */
297+ bypassAnonymousTPhrasingNodes ?: boolean ;
298+
255299 /**
256300 * A function which takes contentWidth and tagName as arguments and returns a
257301 * new width. Can return Infinity to denote unconstrained widths.
@@ -268,6 +312,7 @@ export interface RenderHTMLSharedProps {
268312 * @defaultValue `(c) => c`
269313 */
270314 computeEmbeddedMaxWidth ?: ( contentWidth : number , tagName : string ) => number ;
315+
271316 /**
272317 * Provide support for list style types which are not supported by this
273318 * library.
@@ -290,29 +335,34 @@ export interface RenderHTMLSharedProps {
290335 * ```
291336 */
292337 customListStyleSpecs ?: Record < string , ListStyleSpec > ;
338+
293339 /**
294340 * Log to the console a snapshot of the rendered {@link TDocument} after each
295341 * transient render tree invalidation.
296342 *
297343 * @defaultValue `false`
298344 */
299345 debug ?: boolean ;
346+
300347 /**
301348 * Default props for Text elements in the render tree.
302349 *
303350 * @remarks "style" will be merged into the tnode own styles.
304351 */
305352 defaultTextProps ?: TextProps ;
353+
306354 /**
307355 * Default props for View elements in the render tree.
308356 *
309357 * @remarks "style" will be merged into the tnode own styles.
310358 */
311359 defaultViewProps ?: ViewProps ;
360+
312361 /**
313362 * Default props for WebView elements in the render tree used by plugins.
314363 */
315364 defaultWebViewProps ?: any ;
365+
316366 /**
317367 * Enable or disable margin collapsing CSS behavior (experimental!).
318368 * See {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing | MDN docs}.
0 commit comments