Skip to content

Commit 87046e0

Browse files
committed
0.26.5
1 parent 7eb748f commit 87046e0

14 files changed

+71
-75
lines changed

docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**API****Docs**
1+
**API**
22

33
***
44

docs/functions/RichTextarea.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Function: RichTextarea()
66

77
> **RichTextarea**(`props`): `ReactNode`
88
9+
Defined in: [src/textarea.tsx:129](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/textarea.tsx#L129)
10+
911
Textarea component with some extra props. See [RichTextareaProps](../interfaces/RichTextareaProps.md) and [RichTextareaHandle](../interfaces/RichTextareaHandle.md).
1012

1113
## Parameters
1214

13-
**props**: `Omit`\<[`RichTextareaProps`](../interfaces/RichTextareaProps.md), `"ref"`\> & `RefAttributes`\<[`RichTextareaHandle`](../interfaces/RichTextareaHandle.md)\>
15+
### props
16+
17+
`Omit`\<[`RichTextareaProps`](../interfaces/RichTextareaProps.md), `"ref"`\> & `RefAttributes`\<[`RichTextareaHandle`](../interfaces/RichTextareaHandle.md)\>
1418

1519
## Returns
1620

1721
`ReactNode`
18-
19-
## Defined in
20-
21-
[src/textarea.tsx:128](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/textarea.tsx#L128)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Function: createCSSCustomHighlightRenderer()
66

77
> **createCSSCustomHighlightRenderer**(`matchers`): [`Renderer`](../type-aliases/Renderer.md)
88
9+
Defined in: [src/renderers/regex/index.tsx:166](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/renderers/regex/index.tsx#L166)
10+
911
**`Experimental`**
1012

1113
[createRegexRenderer](createRegexRenderer.md) but rendered with [CSS Custom Highlight API](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API).
1214

1315
## Parameters
1416

15-
**matchers**: [`RegExp`, `string`][]
17+
### matchers
18+
19+
\[`RegExp`, `string`\][]
1620

1721
## Returns
1822

1923
[`Renderer`](../type-aliases/Renderer.md)
20-
21-
## Defined in
22-
23-
[src/renderers/regex/index.tsx:166](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/renderers/regex/index.tsx#L166)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Function: createRegexRenderer()
66

77
> **createRegexRenderer**(`matchers`): [`Renderer`](../type-aliases/Renderer.md)
88
9+
Defined in: [src/renderers/regex/index.tsx:19](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/renderers/regex/index.tsx#L19)
10+
911
An utility to create renderer function with regex.
1012

1113
The priority is descending order.
1214

1315
## Parameters
1416

15-
**matchers**: ([`RegExp`, [`StyleOrRender`](../type-aliases/StyleOrRender.md)] \| [`RegExp`, [`StyleOrRender`](../type-aliases/StyleOrRender.md), (`matchedText`, `matchResult`) => `boolean`])[]
17+
### matchers
18+
19+
(\[`RegExp`, [`StyleOrRender`](../type-aliases/StyleOrRender.md)\] \| \[`RegExp`, [`StyleOrRender`](../type-aliases/StyleOrRender.md), (`matchedText`, `matchResult`) => `boolean`\])[]
1620

1721
## Returns
1822

1923
[`Renderer`](../type-aliases/Renderer.md)
20-
21-
## Defined in
22-
23-
[src/renderers/regex/index.tsx:19](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/renderers/regex/index.tsx#L19)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Function: experimental\_RichInput()
66

77
> **experimental\_RichInput**(`props`): `ReactNode`
88
9+
Defined in: [src/input.tsx:139](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/input.tsx#L139)
10+
911
Input component with some extra props. See [RichInputProps](../interfaces/RichInputProps.md) and [RichInputHandle](../interfaces/RichInputHandle.md).
1012

1113
**NOTE: This component is experimental one so it may have some bugs.**
1214

1315
## Parameters
1416

15-
**props**: `Omit`\<[`RichInputProps`](../interfaces/RichInputProps.md), `"ref"`\> & `RefAttributes`\<[`RichInputHandle`](../interfaces/RichInputHandle.md)\>
17+
### props
18+
19+
`Omit`\<[`RichInputProps`](../interfaces/RichInputProps.md), `"ref"`\> & `RefAttributes`\<[`RichInputHandle`](../interfaces/RichInputHandle.md)\>
1620

1721
## Returns
1822

1923
`ReactNode`
20-
21-
## Defined in
22-
23-
[src/input.tsx:138](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/input.tsx#L138)

docs/interfaces/RichInputHandle.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Interface: RichInputHandle
66

7+
Defined in: [src/input.tsx:97](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/input.tsx#L97)
8+
79
Methods of [RichInput](../functions/experimental_RichInput.md).
810

911
All the others not mentioned are proxied to ref of [input](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).

docs/interfaces/RichInputProps.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Interface: RichInputProps
66

7+
Defined in: [src/input.tsx:105](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/input.tsx#L105)
8+
79
Props of [RichInput](../functions/experimental_RichInput.md).
810

911
For other props not mentioned below will be passed to [input](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).
1012
`defaultValue` is omitted for simplicity of logic.
1113

1214
## Extends
1315

14-
- `Omit`\<`JSX.IntrinsicElements`\[`"input"`\], `"children"`\>
16+
- `Omit`\<`React.ComponentProps`\<`"input"`\>, `"children"`\>
1517

1618
## Properties
1719

1820
### children?
1921

2022
> `optional` **children**: [`Renderer`](../type-aliases/Renderer.md)
2123
24+
Defined in: [src/input.tsx:121](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/input.tsx#L121)
25+
2226
Render function to create customized view from value.
2327

2428
This function should return ReactNodes which texts are positioned the same as textarea (see examples for detailed usage).
@@ -37,16 +41,14 @@ On the rendered nodes, currently limited event handlers will work.
3741
undefined
3842
```
3943

40-
#### Defined in
41-
42-
[src/input.tsx:120](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/input.tsx#L120)
43-
4444
***
4545

4646
### autoHeight?
4747

4848
> `optional` **autoHeight**: `boolean`
4949
50+
Defined in: [src/input.tsx:126](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/input.tsx#L126)
51+
5052
If true, textarea height is automatically resized and height of style prop does not work. Set `maxHeight` to style prop if you need limit.
5153

5254
#### Default Value
@@ -55,21 +57,21 @@ If true, textarea height is automatically resized and height of style prop does
5557
undefined
5658
```
5759

58-
#### Defined in
59-
60-
[src/input.tsx:125](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/input.tsx#L125)
61-
6260
***
6361

6462
### onSelectionChange()?
6563

6664
> `optional` **onSelectionChange**: (`pos`) => `void`
6765
66+
Defined in: [src/input.tsx:131](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/input.tsx#L131)
67+
6868
Called when selection in textarea changes. It gives position of caret at the time, which is useful to position menu.
6969

7070
#### Parameters
7171

72-
**pos**: [`CaretPosition`](../type-aliases/CaretPosition.md)
72+
##### pos
73+
74+
[`CaretPosition`](../type-aliases/CaretPosition.md)
7375

7476
#### Returns
7577

@@ -80,7 +82,3 @@ Called when selection in textarea changes. It gives position of caret at the tim
8082
```ts
8183
undefined
8284
```
83-
84-
#### Defined in
85-
86-
[src/input.tsx:130](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/input.tsx#L130)

docs/interfaces/RichTextareaHandle.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Interface: RichTextareaHandle
66

7+
Defined in: [src/textarea.tsx:87](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/textarea.tsx#L87)
8+
79
Methods of [RichTextarea](../functions/RichTextarea.md).
810

911
All the others not mentioned are proxied to ref of [textarea](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement).

docs/interfaces/RichTextareaProps.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Interface: RichTextareaProps
66

7+
Defined in: [src/textarea.tsx:94](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/textarea.tsx#L94)
8+
79
Props of [RichTextarea](../functions/RichTextarea.md).
810

911
For other props not mentioned below will be passed to [textarea](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement).
1012

1113
## Extends
1214

13-
- `Omit`\<`JSX.IntrinsicElements`\[`"textarea"`\], `"children"`\>
15+
- `Omit`\<`React.ComponentProps`\<`"textarea"`\>, `"children"`\>
1416

1517
## Properties
1618

1719
### children?
1820

1921
> `optional` **children**: [`Renderer`](../type-aliases/Renderer.md)
2022
23+
Defined in: [src/textarea.tsx:111](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/textarea.tsx#L111)
24+
2125
Render function to create customized view from value.
2226

2327
This function should return ReactNodes which texts are positioned the same as textarea (see examples for detailed usage).
@@ -36,16 +40,14 @@ On the rendered nodes, currently limited event handlers will work.
3640
undefined
3741
```
3842

39-
#### Defined in
40-
41-
[src/textarea.tsx:110](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/textarea.tsx#L110)
42-
4343
***
4444

4545
### autoHeight?
4646

4747
> `optional` **autoHeight**: `boolean`
4848
49+
Defined in: [src/textarea.tsx:118](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/textarea.tsx#L118)
50+
4951
If true, textarea height is automatically resized and height of style prop does not work.
5052
Set `maxHeight` to style prop if you need limit.
5153
Set `rows` prop to 1 if you need single-line textarea.
@@ -56,21 +58,21 @@ Set `rows` prop to 1 if you need single-line textarea.
5658
undefined
5759
```
5860

59-
#### Defined in
60-
61-
[src/textarea.tsx:117](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/textarea.tsx#L117)
62-
6361
***
6462

6563
### onSelectionChange()?
6664

6765
> `optional` **onSelectionChange**: (`pos`) => `void`
6866
67+
Defined in: [src/textarea.tsx:123](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/textarea.tsx#L123)
68+
6969
Called when selection in textarea changes. It gives position of caret at the time, which is useful to position menu.
7070

7171
#### Parameters
7272

73-
**pos**: [`CaretPosition`](../type-aliases/CaretPosition.md)
73+
##### pos
74+
75+
[`CaretPosition`](../type-aliases/CaretPosition.md)
7476

7577
#### Returns
7678

@@ -81,7 +83,3 @@ Called when selection in textarea changes. It gives position of caret at the tim
8183
```ts
8284
undefined
8385
```
84-
85-
#### Defined in
86-
87-
[src/textarea.tsx:122](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/textarea.tsx#L122)

docs/type-aliases/CaretPosition.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
[**API**](../API.md)**Docs**
1+
[**API**](../API.md)
22

33
***
44

55
# Type Alias: CaretPosition
66

7-
> **CaretPosition**: `object` \| `object`
7+
> **CaretPosition**: \{ `focused`: `false`; `selectionStart`: `number`; `selectionEnd`: `number`; \} \| \{ `focused`: `true`; `selectionStart`: `number`; `selectionEnd`: `number`; `top`: `number`; `left`: `number`; `height`: `number`; \}
88
9-
## Defined in
10-
11-
[src/types.ts:3](https://github.com/inokawa/rich-textarea/blob/d85a9d37692a634c883a1362722567fa1003e79e/src/types.ts#L3)
9+
Defined in: [src/types.ts:3](https://github.com/inokawa/rich-textarea/blob/7eb748f42b59f753b6ba4e33c0a5f82e934d33c9/src/types.ts#L3)

0 commit comments

Comments
 (0)