Skip to content

Commit

Permalink
0.24.2
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 5, 2023
1 parent 6fd4c20 commit 75c9691
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 56 deletions.
69 changes: 32 additions & 37 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

## Table of contents

### Component Functions
### Functions

- [RichTextarea](API.md#richtextarea)
- [experimental\_RichInput](API.md#experimental_richinput)

### Other Functions

- [createRegexRenderer](API.md#createregexrenderer)

### Interfaces
Expand All @@ -24,7 +21,7 @@
- [Renderer](API.md#renderer)
- [CaretPosition](API.md#caretposition)

## Component Functions
## Component

### RichTextarea

Expand All @@ -44,7 +41,7 @@ Textarea component with some extra props. See [RichTextareaProps](interfaces/Ric

#### Defined in

node_modules/@types/react/index.d.ts:386
node_modules/@types/react/index.d.ts:428

___

Expand All @@ -68,43 +65,17 @@ Input component with some extra props. See [RichInputProps](interfaces/RichInput

#### Defined in

node_modules/@types/react/index.d.ts:386

___

## Other Functions

### createRegexRenderer

**createRegexRenderer**(`matchers`): [`Renderer`](API.md#renderer)

An utility to create renderer function with regex.

The priority is descending order.

#### Parameters

| Name | Type |
| :------ | :------ |
| `matchers` | [`RegExp`, [`StyleOrRender`](API.md#styleorrender)][] |

#### Returns

[`Renderer`](API.md#renderer)

#### Defined in
node_modules/@types/react/index.d.ts:428

[src/renderers.tsx:17](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/renderers.tsx#L17)

## Type Aliases
## Other

### StyleOrRender

Ƭ **StyleOrRender**: `React.CSSProperties` \| (`props`: { `children`: `React.ReactNode` ; `value`: `string` ; `key?`: `string` }) => `React.ReactNode`

#### Defined in

[src/renderers.tsx:4](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/renderers.tsx#L4)
[src/renderers.tsx:4](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/renderers.tsx#L4)

___

Expand All @@ -128,7 +99,7 @@ ___

#### Defined in

[src/types.ts:1](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/types.ts#L1)
[src/types.ts:1](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/types.ts#L1)

___

Expand All @@ -138,4 +109,28 @@ ___

#### Defined in

[src/types.ts:3](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/types.ts#L3)
[src/types.ts:3](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/types.ts#L3)

___

### createRegexRenderer

**createRegexRenderer**(`matchers`): [`Renderer`](API.md#renderer)

An utility to create renderer function with regex.

The priority is descending order.

#### Parameters

| Name | Type |
| :------ | :------ |
| `matchers` | [`RegExp`, [`StyleOrRender`](API.md#styleorrender)][] |

#### Returns

[`Renderer`](API.md#renderer)

#### Defined in

[src/renderers.tsx:17](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/renderers.tsx#L17)
2 changes: 1 addition & 1 deletion docs/interfaces/RichInputHandle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Interface: RichInputHandle

Methods of [experimental_RichInput](../API.md#experimental_richinput).
Methods of [RichInput](../API.md#experimental_richinput).

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

Expand Down
22 changes: 14 additions & 8 deletions docs/interfaces/RichInputProps.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Interface: RichInputProps

Props of [experimental_RichInput](../API.md#experimental_richinput).
Props of [RichInput](../API.md#experimental_richinput).

For other props not mentioned below will be passed to [input](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).
`defaultValue` is omitted for simplicity of logic.
Expand Down Expand Up @@ -39,11 +39,13 @@ On the rendered nodes, currently limited event handlers will work.

**`Default Value`**

```ts
undefined
```

#### Defined in

[src/input.tsx:119](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/input.tsx#L119)
[src/input.tsx:120](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/input.tsx#L120)

___

Expand All @@ -55,11 +57,13 @@ If true, textarea height is automatically resized and height of style prop does

**`Default Value`**

```ts
undefined
```

#### Defined in

[src/input.tsx:124](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/input.tsx#L124)
[src/input.tsx:125](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/input.tsx#L125)

___

Expand All @@ -73,10 +77,6 @@ ___

Called when selection in textarea changes. It gives position of caret at the time, which is useful to position menu.

**`Default Value`**

undefined

##### Parameters

| Name | Type |
Expand All @@ -87,6 +87,12 @@ undefined

`void`

**`Default Value`**

```ts
undefined
```

#### Defined in

[src/input.tsx:129](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/input.tsx#L129)
[src/input.tsx:130](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/input.tsx#L130)
20 changes: 13 additions & 7 deletions docs/interfaces/RichTextareaProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ On the rendered nodes, currently limited event handlers will work.

**`Default Value`**

```ts
undefined
```

#### Defined in

[src/textarea.tsx:109](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/textarea.tsx#L109)
[src/textarea.tsx:110](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/textarea.tsx#L110)

___

Expand All @@ -56,11 +58,13 @@ Set `rows` prop to 1 if you need single-line textarea.

**`Default Value`**

```ts
undefined
```

#### Defined in

[src/textarea.tsx:116](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/textarea.tsx#L116)
[src/textarea.tsx:117](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/textarea.tsx#L117)

___

Expand All @@ -74,10 +78,6 @@ ___

Called when selection in textarea changes. It gives position of caret at the time, which is useful to position menu.

**`Default Value`**

undefined

##### Parameters

| Name | Type |
Expand All @@ -88,6 +88,12 @@ undefined

`void`

**`Default Value`**

```ts
undefined
```

#### Defined in

[src/textarea.tsx:121](https://github.com/inokawa/rich-textarea/blob/4cd0f24/src/textarea.tsx#L121)
[src/textarea.tsx:122](https://github.com/inokawa/rich-textarea/blob/6fd4c20/src/textarea.tsx#L122)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rich-textarea",
"version": "0.24.1",
"version": "0.24.2",
"description": "A small customizable textarea for React to colorize, highlight, decorate texts, offer autocomplete and much more.",
"main": "lib/index.js",
"module": "lib/index.mjs",
Expand Down

0 comments on commit 75c9691

Please sign in to comment.