@markput/react 0.9.0 → 0.10.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 (3) hide show
  1. package/index.d.ts +5 -8
  2. package/index.js +2507 -1938
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -6,7 +6,6 @@ import type { CSSProperties } from 'react';
6
6
  import type { DataAttributes } from '@markput/core';
7
7
  import { denote } from '@markput/core';
8
8
  import type { ElementType } from 'react';
9
- import type { HTMLAttributes } from 'react';
10
9
  import { JSX } from 'react/jsx-runtime';
11
10
  import { MarkHandler } from '@markput/core';
12
11
  import type { MarkOptions } from '@markput/core';
@@ -25,7 +24,7 @@ export { annotate }
25
24
 
26
25
  export { denote }
27
26
 
28
- export declare function MarkedInput<TMarkProps = MarkProps, TOverlayProps = OverlayProps>(props: MarkedInputProps<TMarkProps, TOverlayProps>): JSX.Element;
27
+ export declare function MarkedInput<TMarkProps = MarkProps, TOverlayProps extends CoreOption['overlay'] = OverlayProps>(props: MarkedInputProps<TMarkProps, TOverlayProps>): JSX.Element;
29
28
 
30
29
  /**
31
30
  * Props for MarkedInput component.
@@ -44,7 +43,7 @@ export declare function MarkedInput<TMarkProps = MarkProps, TOverlayProps = Over
44
43
  * />
45
44
  * ```
46
45
  */
47
- export declare interface MarkedInputProps<TMarkProps = MarkProps, TOverlayProps = OverlayProps> {
46
+ export declare interface MarkedInputProps<TMarkProps = MarkProps, TOverlayProps extends CoreOption['overlay'] = OverlayProps> {
48
47
  /** Ref to handler */
49
48
  ref?: Ref<MarkputHandler>;
50
49
  /** Global component used for rendering text tokens (default: built-in Span) */
@@ -127,7 +126,7 @@ export { Markup }
127
126
  * mark: { slot: Chip, label: 'Click' }
128
127
  * }
129
128
  */
130
- declare interface Option_2<TMarkProps = MarkProps, TOverlayProps = OverlayProps> extends CoreOption {
129
+ declare interface Option_2<TMarkProps = MarkProps, TOverlayProps extends CoreOption['overlay'] = OverlayProps> extends CoreOption {
131
130
  /** Per-option component for rendering this mark */
132
131
  Mark?: ComponentType<TMarkProps>;
133
132
  /**
@@ -169,7 +168,7 @@ export declare interface OverlayProps {
169
168
  }
170
169
 
171
170
  declare interface SlotProps {
172
- container?: HTMLAttributes<HTMLDivElement> & DataAttributes;
171
+ container?: Record<string, unknown> & DataAttributes;
173
172
  }
174
173
 
175
174
  /**
@@ -177,11 +176,9 @@ declare interface SlotProps {
177
176
  */
178
177
  declare interface Slots extends CoreSlots {
179
178
  /** Root container component */
180
- container?: ElementType<HTMLAttributes<HTMLDivElement>>;
179
+ container?: ElementType<Record<string, unknown>>;
181
180
  }
182
181
 
183
- export declare const Span: (_props: MarkProps) => JSX.Element;
184
-
185
182
  export { TextToken }
186
183
 
187
184
  export { Token }