@markput/react 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +5 -2
  2. package/index.d.ts +2 -14
  3. package/index.js +528 -471
  4. package/package.json +15 -15
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # [Marked Input](https://marked-input.vercel.app)
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@markput/react.svg?style=flat&label=react)](https://www.npmjs.com/package/@markput/react) [![npm version](https://img.shields.io/npm/v/@markput/vue.svg?style=flat&label=vue)](https://www.npmjs.com/package/@markput/vue) [![min zipped size](https://img.shields.io/bundlephobia/minzip/@markput/react?label=react+gzip)](https://bundlephobia.com/package/@markput/react) [![min zipped size](https://img.shields.io/bundlephobia/minzip/@markput/vue?label=vue+gzip)](https://bundlephobia.com/package/@markput/vue) [![Storybook](https://gw.alipayobjects.com/mdn/ob_info/afts/img/A*CQXNTZfK1vwAAAAAAAAAAABjAQAAAQ/original)](https://marked-input.vercel.app)
3
+ [![npm version](https://img.shields.io/npm/v/@markput/react.svg?style=flat&label=react)](https://www.npmjs.com/package/@markput/react) [![min zipped size](https://img.shields.io/bundlephobia/minzip/@markput/react?label=react+gzip)](https://bundlephobia.com/package/@markput/react) [![React Storybook](https://gw.alipayobjects.com/mdn/ob_info/afts/img/A*CQXNTZfK1vwAAAAAAAAAAABjAQAAAQ/original)](https://markput-react.vercel.app)
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@markput/vue.svg?style=flat&label=vue)](https://www.npmjs.com/package/@markput/vue) [![min zipped size](https://img.shields.io/bundlephobia/minzip/@markput/vue?label=vue+gzip)](https://bundlephobia.com/package/@markput/vue) [![Vue Storybook](https://gw.alipayobjects.com/mdn/ob_info/afts/img/A*CQXNTZfK1vwAAAAAAAAAAABjAQAAAQ/original)](https://markput-vue.vercel.app)
4
6
 
5
7
  <img width="521" alt="image" src="https://user-images.githubusercontent.com/37639183/182974441-49e4b247-449a-47ba-a090-2cb3aab7ce44.png">
6
8
 
@@ -11,7 +13,8 @@ Currently supported packages:
11
13
  - `@markput/react`
12
14
  - `@markput/vue`
13
15
 
14
- **[Documentation](https://markput.vercel.app)** **[Storybook](https://marked-input.vercel.app)**
16
+ **[Documentation](https://markput.vercel.app)**
17
+ **[React Storybook](https://markput-react.vercel.app)** | **[Vue Storybook](https://markput-vue.vercel.app)**
15
18
 
16
19
  ## Feature
17
20
 
package/index.d.ts CHANGED
@@ -3,11 +3,13 @@ import { Block } from '@markput/core';
3
3
  import type { ComponentType } from 'react';
4
4
  import type { CoreOption } from '@markput/core';
5
5
  import type { CSSProperties } from 'react';
6
+ import type { DataAttributes } from '@markput/core';
6
7
  import { denote } from '@markput/core';
7
8
  import type { ElementType } from 'react';
8
9
  import type { HTMLAttributes } from 'react';
9
10
  import { JSX } from 'react/jsx-runtime';
10
11
  import { MarkHandler } from '@markput/core';
12
+ import type { MarkOptions } from '@markput/core';
11
13
  import { MarkputHandler } from '@markput/core';
12
14
  import { MarkToken } from '@markput/core';
13
15
  import { Markup } from '@markput/core';
@@ -25,11 +27,6 @@ export { annotate }
25
27
 
26
28
  export { Block }
27
29
 
28
- /**
29
- * Data attributes with automatic camelCase to kebab-case conversion
30
- */
31
- declare type DataAttributes = Record<`data${Capitalize<string>}`, string | number | boolean | undefined>;
32
-
33
30
  export { denote }
34
31
 
35
32
  export declare function MarkedInput<TMarkProps = MarkProps, TOverlayProps = OverlayProps>(props: MarkedInputProps<TMarkProps, TOverlayProps>): JSX.Element;
@@ -97,10 +94,6 @@ export declare interface MarkedInputProps<TMarkProps = MarkProps, TOverlayProps
97
94
 
98
95
  export { MarkHandler }
99
96
 
100
- declare interface MarkOptions {
101
- controlled?: boolean;
102
- }
103
-
104
97
  /**
105
98
  * Props passed to Mark components.
106
99
  */
@@ -176,13 +169,8 @@ export declare interface OverlayProps {
176
169
 
177
170
  export { reorderBlocks }
178
171
 
179
- /**
180
- * Props for each slot component
181
- */
182
172
  declare interface SlotProps {
183
- /** Props to pass to the container slot */
184
173
  container?: HTMLAttributes<HTMLDivElement> & DataAttributes;
185
- /** Props to pass to the span slot */
186
174
  span?: HTMLAttributes<HTMLSpanElement> & DataAttributes;
187
175
  }
188
176