Skip to content

Commit

Permalink
docs: sync generated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jsamr committed Jan 28, 2022
1 parent ef0cabe commit a64016b
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 21 deletions.
6 changes: 3 additions & 3 deletions packages/counter-style/docs/counter-style.rtloptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface RtlOptions

| Property | Type | Description |
| --- | --- | --- |
| [reverseCounter?](./counter-style.rtloptions.reversecounter.md) | boolean | <i>(Optional)</i> |
| [reversePrefix?](./counter-style.rtloptions.reverseprefix.md) | boolean | <i>(Optional)</i> |
| [reverseSuffix?](./counter-style.rtloptions.reversesuffix.md) | boolean | <i>(Optional)</i> |
| [reverseCounter?](./counter-style.rtloptions.reversecounter.md) | boolean | <i>(Optional)</i> Reverse the order of characters in the counter. |
| [reversePrefix?](./counter-style.rtloptions.reverseprefix.md) | boolean | <i>(Optional)</i> Reverse the order of characters in the prefix. |
| [reverseSuffix?](./counter-style.rtloptions.reversesuffix.md) | boolean | <i>(Optional)</i> Reverse the order of characters in the suffix. |

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@

## RtlOptions.reverseCounter property

Reverse the order of characters in the counter.

<b>Signature:</b>

```typescript
reverseCounter?: boolean;
```

## Example

`abc` becomes `cba`

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@

## RtlOptions.reversePrefix property

Reverse the order of characters in the prefix.

<b>Signature:</b>

```typescript
reversePrefix?: boolean;
```

## Example

`-|` becomes `|-`

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@

## RtlOptions.reverseSuffix property

Reverse the order of characters in the suffix.

<b>Signature:</b>

```typescript
reverseSuffix?: boolean;
```

## Example

`. ` becomes ` .`

3 changes: 0 additions & 3 deletions packages/counter-style/etc/counter-style.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ export type MaxCodepointLengthInRangeComputer = (min: number, max: number) => nu

// @public
export interface RtlOptions {
// (undocumented)
reverseCounter?: boolean;
// (undocumented)
reversePrefix?: boolean;
// (undocumented)
reverseSuffix?: boolean;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ See [CSS Lists and Counters Module Level 3, Markers](https://www.w3.org/TR/css-l
<b>Signature:</b>

```typescript
export default function MarkedListItem({ counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, children }: PropsWithChildren<MarkedListItemProps>): JSX.Element;
export default function MarkedListItem({ counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, enableMarkerClipping, children }: PropsWithChildren<MarkedListItemProps>): JSX.Element;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, children } | PropsWithChildren&lt;[MarkedListItemProps](./react-native-li.markedlistitemprops.md)<!-- -->&gt; | |
| { counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, enableMarkerClipping, children } | PropsWithChildren&lt;[MarkedListItemProps](./react-native-li.markedlistitemprops.md)<!-- -->&gt; | |

<b>Returns:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export declare type MarkedListItemProps = Required<Pick<MarkedListProps, 'counte
index: number;
markerTextWidth: number | false;
maxNumOfCodepoints: number;
enableMarkerClipping: boolean;
style: StyleProp<ViewStyle>;
};
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@jsamr/react-native-li](./react-native-li.md) &gt; [MarkedListProps](./react-native-li.markedlistprops.md) &gt; [enableMarkerClipping](./react-native-li.markedlistprops.enablemarkerclipping.md)

## MarkedListProps.enableMarkerClipping property

Clip the marker text when it overflows the marker box.

<b>Signature:</b>

```typescript
enableMarkerClipping?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface MarkedListProps
| [Container?](./react-native-li.markedlistprops.container.md) | ComponentType&lt;any&gt; | <i>(Optional)</i> The component used to wrap list elements. |
| [counterRenderer](./react-native-li.markedlistprops.counterrenderer.md) | CounterStyleRenderer | The counter renderer for this list. |
| [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? |
| [enableMarkerClipping?](./react-native-li.markedlistprops.enablemarkerclipping.md) | boolean | <i>(Optional)</i> Clip the marker text when it overflows the marker box. |
| [lineStyle?](./react-native-li.markedlistprops.linestyle.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Style for the line wrapper. |
| [markerBoxStyle?](./react-native-li.markedlistprops.markerboxstyle.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Style for the marker box container. |
| [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. |
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-li/docs/react-native-li.markerbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ See [CSS Lists and Counters Module Level 3, Markers](https://www.w3.org/TR/css-l
<b>Signature:</b>

```typescript
export default function MarkerBox({ style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth }: MarkerBoxProps): JSX.Element;
export default function MarkerBox({ style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth, enableMarkerClipping }: MarkerBoxProps): JSX.Element;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| { style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth } | [MarkerBoxProps](./react-native-li.markerboxprops.md) | |
| { style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth, enableMarkerClipping } | [MarkerBoxProps](./react-native-li.markerboxprops.md) | |

<b>Returns:</b>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@jsamr/react-native-li](./react-native-li.md) &gt; [MarkerBoxProps](./react-native-li.markerboxprops.md) &gt; [enableMarkerClipping](./react-native-li.markerboxprops.enablemarkerclipping.md)

## MarkerBoxProps.enableMarkerClipping property

Clip the marker text when it overflows the marker box.

<b>Signature:</b>

```typescript
enableMarkerClipping: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export interface MarkerBoxProps
| --- | --- | --- |
| [counterIndex](./react-native-li.markerboxprops.counterindex.md) | number | The index to render. |
| [counterRenderer](./react-native-li.markerboxprops.counterrenderer.md) | CounterStyleRenderer | The renderer to generate the marker string. |
| [enableMarkerClipping](./react-native-li.markerboxprops.enablemarkerclipping.md) | boolean | Clip the marker text when it overflows the marker box. |
| [markerTextStyle](./react-native-li.markerboxprops.markertextstyle.md) | TextStyle | Style for any text element. Should not contain CSS box model properties. |
| [markerTextWidth](./react-native-li.markerboxprops.markertextwidth.md) | number \| false | The width for the marker text element. |
| [maxNumOfCodepoints](./react-native-li.markerboxprops.maxnumofcodepoints.md) | number | The maximum length of the <code>markerString</code> in range. |
| [rtlMarkerReversed](./react-native-li.markerboxprops.rtlmarkerreversed.md) | true \| false | Whether to reverse or not the order of elements in marker (prefix, counter, suffix). |
| [rtlMarkerReversed](./react-native-li.markerboxprops.rtlmarkerreversed.md) | boolean | Whether to reverse or not the order of elements in marker (prefix, counter, suffix). |
| [style](./react-native-li.markerboxprops.style.md) | StyleProp&lt;TextStyle&gt; | Style for the container <code>Text</code> element. |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Whether to reverse or not the order of elements in marker (prefix, counter, suff
<b>Signature:</b>

```typescript
rtlMarkerReversed: true | false;
rtlMarkerReversed: boolean;
```
6 changes: 3 additions & 3 deletions packages/react-native-li/docs/react-native-li.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
| Function | Description |
| --- | --- |
| [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)<!-- -->. |
| [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)<!-- -->. |
| [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) |
| [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)<!-- -->. |
| [MarkedListItem({ counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, enableMarkerClipping, 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)<!-- -->. |
| [MarkerBox({ style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth, enableMarkerClipping })](./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) |
| [useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, enableMarkerClipping, 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)<!-- -->. |

## Interfaces

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A hook to reuse MarkedList logic to render custom lists components in combinatio
<b>Signature:</b>

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

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

<b>Returns:</b>

Expand Down
11 changes: 7 additions & 4 deletions packages/react-native-li/etc/react-native-li.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ export { MarkedList }
export default MarkedList;

// @public
export function MarkedListItem({ counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, children }: PropsWithChildren<MarkedListItemProps>): JSX.Element;
export function MarkedListItem({ counterRenderer, index, startIndex, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, maxNumOfCodepoints, markerTextWidth, style, renderMarker, enableMarkerClipping, children }: PropsWithChildren<MarkedListItemProps>): JSX.Element;

// @public
export type MarkedListItemProps = Required<Pick<MarkedListProps, 'counterRenderer' | 'renderMarker' | 'markerTextStyle' | 'markerBoxStyle' | 'rtlLineReversed' | 'rtlMarkerReversed' | 'startIndex'>> & {
index: number;
markerTextWidth: number | false;
maxNumOfCodepoints: number;
enableMarkerClipping: boolean;
style: StyleProp<ViewStyle>;
};

Expand All @@ -38,6 +39,7 @@ export interface MarkedListProps {
Container?: ComponentType<any>;
counterRenderer: CounterStyleRenderer;
dynamicMarkerBoxWidth?: boolean;
enableMarkerClipping?: boolean;
lineStyle?: StyleProp<ViewStyle>;
markerBoxStyle?: StyleProp<ViewStyle>;
markerTextStyle?: TextStyle;
Expand All @@ -48,21 +50,22 @@ export interface MarkedListProps {
}

// @public
export function MarkerBox({ style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth }: MarkerBoxProps): JSX.Element;
export function MarkerBox({ style, counterRenderer, counterIndex, markerTextStyle, markerTextWidth, enableMarkerClipping }: MarkerBoxProps): JSX.Element;

// @public
export interface MarkerBoxProps {
counterIndex: number;
counterRenderer: CounterStyleRenderer;
enableMarkerClipping: boolean;
markerTextStyle: TextStyle;
markerTextWidth: number | false;
maxNumOfCodepoints: number;
rtlMarkerReversed: true | false;
rtlMarkerReversed: boolean;
style: StyleProp<TextStyle>;
}

// @public
export function useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, computeMarkerBoxWidth }: MarkedListProps & {
export function useMarkedList({ counterRenderer, startIndex, lineStyle, rtlLineReversed, rtlMarkerReversed, markerTextStyle, markerBoxStyle, dynamicMarkerBoxWidth, length, renderMarker, enableMarkerClipping, computeMarkerBoxWidth }: MarkedListProps & {
length: number;
}): Omit<MarkedListItemProps, 'index'>;

Expand Down

0 comments on commit a64016b

Please sign in to comment.