Skip to content

Commit dd5975f

Browse files
committed
docs: bump fresh docs
1 parent 6b6453c commit dd5975f

10 files changed

+32
-12
lines changed

packages/react-native-li/docs/react-native-li.markedlistitemprops.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Props for the [MarkedListItem()](./react-native-li.markedlistitem.md) component.
1111
```typescript
1212
export declare type MarkedListItemProps = Required<Pick<MarkedListProps, 'counterRenderer' | 'renderMarker' | 'markerTextStyle' | 'markerBoxStyle' | 'rtlLineReversed' | 'rtlMarkerReversed' | 'startIndex'>> & {
1313
index: number;
14-
markerTextWidth: number;
14+
markerTextWidth: number | false;
1515
maxNumOfCodepoints: number;
1616
style: StyleProp<ViewStyle>;
1717
};

packages/react-native-li/docs/react-native-li.markedlistprops.computemarkerboxwidth.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ computeMarkerBoxWidth?: (maxCodepointsLengthInRange: number, fontSize: number) =
1414

1515
## Remarks
1616

17-
Font size is derived from `markerStyle` prop.
17+
- Font size is derived from `markerStyle` prop. - Will be ignored when [MarkedListProps.dynamicMarkerBoxWidth](./react-native-li.markedlistprops.dynamicmarkerboxwidth.md) is set to `false`<!-- -->.
1818

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@jsamr/react-native-li](./react-native-li.md) &gt; [MarkedListProps](./react-native-li.markedlistprops.md) &gt; [dynamicMarkerBoxWidth](./react-native-li.markedlistprops.dynamicmarkerboxwidth.md)
4+
5+
## MarkedListProps.dynamicMarkerBoxWidth property
6+
7+
Should the width of the marker box be computed dynamically, e.g. depend on the longest marker in the list?
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
dynamicMarkerBoxWidth?: boolean;
13+
```

packages/react-native-li/docs/react-native-li.markedlistprops.markerboxstyle.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44

55
## MarkedListProps.markerBoxStyle property
66

7-
Style for the marker box container. It is discouraged to set `(min,max)width` that way. Use [MarkedListProps.computeMarkerBoxWidth](./react-native-li.markedlistprops.computemarkerboxwidth.md) instead.
7+
Style for the marker box container.
88

99
<b>Signature:</b>
1010

1111
```typescript
1212
markerBoxStyle?: StyleProp<ViewStyle>;
1313
```
14+
15+
## Remarks
16+
17+
It is discouraged to set `(min,max)width` when [MarkedListProps.dynamicMarkerBoxWidth](./react-native-li.markedlistprops.dynamicmarkerboxwidth.md) is set to `true`<!-- -->. In that case, use [MarkedListProps.computeMarkerBoxWidth](./react-native-li.markedlistprops.computemarkerboxwidth.md) instead.
18+

packages/react-native-li/docs/react-native-li.markedlistprops.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ export interface MarkedListProps
1919
| [computeMarkerBoxWidth?](./react-native-li.markedlistprops.computemarkerboxwidth.md) | (maxCodepointsLengthInRange: number, fontSize: number) =&gt; number | <i>(Optional)</i> A function to compute marker box width depending on the maximum length of the marker string in range. |
2020
| [Container?](./react-native-li.markedlistprops.container.md) | ComponentType&lt;any&gt; | <i>(Optional)</i> The component used to wrap list elements. |
2121
| [counterRenderer](./react-native-li.markedlistprops.counterrenderer.md) | CounterStyleRenderer | The counter renderer for this list. |
22+
| [dynamicMarkerBoxWidth?](./react-native-li.markedlistprops.dynamicmarkerboxwidth.md) | boolean | <i>(Optional)</i> Should the width of the marker box be computed dynamically, e.g. depend on the longest marker in the list? |
2223
| [lineStyle?](./react-native-li.markedlistprops.linestyle.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Style for the line wrapper. |
23-
| [markerBoxStyle?](./react-native-li.markedlistprops.markerboxstyle.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Style for the marker box container. It is discouraged to set <code>(min,max)width</code> that way. Use [MarkedListProps.computeMarkerBoxWidth](./react-native-li.markedlistprops.computemarkerboxwidth.md) instead. |
24+
| [markerBoxStyle?](./react-native-li.markedlistprops.markerboxstyle.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Style for the marker box container. |
2425
| [markerTextStyle?](./react-native-li.markedlistprops.markertextstyle.md) | TextStyle | <i>(Optional)</i> A plain JavaScript object text style for the marker string. It is advised to pass the same <code>fontSize</code> and <code>lineHeight</code> as the list content for perfect horizontal alignment. |
2526
| [renderMarker?](./react-native-li.markedlistprops.rendermarker.md) | (props: [MarkerBoxProps](./react-native-li.markerboxprops.md)<!-- -->) =&gt; ReactNode | <i>(Optional)</i> A custom Marker render function. |
2627
| [rtlLineReversed?](./react-native-li.markedlistprops.rtllinereversed.md) | boolean | <i>(Optional)</i> Set the line layout in <code>flexDirection: 'row-reverse'</code> and left-align the marker box. |

packages/react-native-li/docs/react-native-li.markerboxprops.markertextwidth.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ The width for the marker text element.
99
<b>Signature:</b>
1010

1111
```typescript
12-
markerTextWidth: number;
12+
markerTextWidth: number | false;
1313
```

packages/react-native-li/docs/react-native-li.markerboxprops.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface MarkerBoxProps
1919
| [counterIndex](./react-native-li.markerboxprops.counterindex.md) | number | The index to render. |
2020
| [counterRenderer](./react-native-li.markerboxprops.counterrenderer.md) | CounterStyleRenderer | The renderer to generate the marker string. |
2121
| [markerTextStyle](./react-native-li.markerboxprops.markertextstyle.md) | TextStyle | Style for any text element. Should not contain CSS box model properties. |
22-
| [markerTextWidth](./react-native-li.markerboxprops.markertextwidth.md) | number | The width for the marker text element. |
22+
| [markerTextWidth](./react-native-li.markerboxprops.markertextwidth.md) | number \| false | The width for the marker text element. |
2323
| [maxNumOfCodepoints](./react-native-li.markerboxprops.maxnumofcodepoints.md) | number | The maximum length of the <code>markerString</code> in range. |
2424
| [rtlMarkerReversed](./react-native-li.markerboxprops.rtlmarkerreversed.md) | true \| false | Whether to reverse or not the order of elements in marker (prefix, counter, suffix). |
2525
| [style](./react-native-li.markerboxprops.style.md) | StyleProp&lt;TextStyle&gt; | Style for the container <code>Text</code> element. |

packages/react-native-li/docs/react-native-li.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| [MarkedList({ children, Container, ...props })](./react-native-li.markedlist.md) | A component which given a counter style, wraps each of its children with a [MarkedListItem()](./react-native-li.markedlistitem.md)<!-- -->. The latter prepends the child with a marker box containing a marker string representation for this child index.<!-- -->See [CSS Lists and Counters Module Level 3, Markers](https://www.w3.org/TR/css-lists-3/#markers)<!-- -->. |
1212
| [MarkedListItem({ counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, children })](./react-native-li.markedlistitem.md) | A component which reproduces CSS3 <code>display: list-item;</code> behavior. It prepends its child with a marker box containing a marker string representation for this child index.<!-- -->See [CSS Lists and Counters Module Level 3, Markers](https://www.w3.org/TR/css-lists-3/#markers)<!-- -->. |
1313
| [MarkerBox({ style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth })](./react-native-li.markerbox.md) | Default component to render the list marker.<!-- -->See [CSS Lists and Counters Module Level 3, Markers](https://www.w3.org/TR/css-lists-3/#marker-pseudo) |
14-
| [useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, length, renderMarker, computeMarkerBoxWidth })](./react-native-li.usemarkedlist.md) | A hook to reuse MarkedList logic to render custom lists components in combination with [MarkedListItem()](./react-native-li.markedlistitem.md)<!-- -->. |
14+
| [useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, computeMarkerBoxWidth })](./react-native-li.usemarkedlist.md) | A hook to reuse MarkedList logic to render custom lists components in combination with [MarkedListItem()](./react-native-li.markedlistitem.md)<!-- -->. |
1515

1616
## Interfaces
1717

packages/react-native-li/docs/react-native-li.usemarkedlist.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A hook to reuse MarkedList logic to render custom lists components in combinatio
99
<b>Signature:</b>
1010

1111
```typescript
12-
export default function useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, length, renderMarker, computeMarkerBoxWidth }: MarkedListProps & {
12+
export default function useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, computeMarkerBoxWidth }: MarkedListProps & {
1313
length: number;
1414
}): Omit<MarkedListItemProps, 'index'>;
1515
```
@@ -18,7 +18,7 @@ export default function useMarkedList({ counterRenderer, startIndex, lineStyle,
1818

1919
| Parameter | Type | Description |
2020
| --- | --- | --- |
21-
| { counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, length, renderMarker, computeMarkerBoxWidth } | [MarkedListProps](./react-native-li.markedlistprops.md) &amp; { length: number; } | |
21+
| { counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, computeMarkerBoxWidth } | [MarkedListProps](./react-native-li.markedlistprops.md) &amp; { length: number; } | |
2222

2323
<b>Returns:</b>
2424

packages/react-native-li/etc/react-native-li.api.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function MarkedListItem({ counterRenderer, index, startIndex, rtlLineReve
2727
// @public
2828
export type MarkedListItemProps = Required<Pick<MarkedListProps, 'counterRenderer' | 'renderMarker' | 'markerTextStyle' | 'markerBoxStyle' | 'rtlLineReversed' | 'rtlMarkerReversed' | 'startIndex'>> & {
2929
index: number;
30-
markerTextWidth: number;
30+
markerTextWidth: number | false;
3131
maxNumOfCodepoints: number;
3232
style: StyleProp<ViewStyle>;
3333
};
@@ -37,6 +37,7 @@ export interface MarkedListProps {
3737
computeMarkerBoxWidth?: (maxCodepointsLengthInRange: number, fontSize: number) => number;
3838
Container?: ComponentType<any>;
3939
counterRenderer: CounterStyleRenderer;
40+
dynamicMarkerBoxWidth?: boolean;
4041
lineStyle?: StyleProp<ViewStyle>;
4142
markerBoxStyle?: StyleProp<ViewStyle>;
4243
markerTextStyle?: TextStyle;
@@ -54,14 +55,14 @@ export interface MarkerBoxProps {
5455
counterIndex: number;
5556
counterRenderer: CounterStyleRenderer;
5657
markerTextStyle: TextStyle;
57-
markerTextWidth: number;
58+
markerTextWidth: number | false;
5859
maxNumOfCodepoints: number;
5960
rtlMarkerReversed: true | false;
6061
style: StyleProp<TextStyle>;
6162
}
6263

6364
// @public
64-
export function useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, length, renderMarker, computeMarkerBoxWidth }: MarkedListProps & {
65+
export function useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, computeMarkerBoxWidth }: MarkedListProps & {
6566
length: number;
6667
}): Omit<MarkedListItemProps, 'index'>;
6768

0 commit comments

Comments
 (0)