grep-components 1.11.1 → 1.12.1
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.
- package/dist/components/GrepEditor/misc/handlers/key.d.ts +2 -1
- package/dist/components/GrepEditor/misc/utils.d.ts +2 -2
- package/dist/components/ToC/utils/identity-element.d.ts +1 -1
- package/dist/hooks/use-content-elements.d.ts +2 -2
- package/dist/hooks/use-date.d.ts +1 -4
- package/dist/hooks/use-debounce.d.ts +1 -1
- package/dist/index.js +5429 -5412
- package/dist/index.js.map +1 -1
- package/dist/styling/makeStyles.d.ts +2 -0
- package/dist/utils/dateHelper.d.ts +5 -5
- package/package.json +11 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorState, DraftEditorCommand, DraftHandleValue } from 'draft-js';
|
|
2
|
+
import { Style } from '../../components/buttons';
|
|
2
3
|
export declare type CustomDraftCommand = DraftEditorCommand | 'shift-split-block';
|
|
3
4
|
export declare const customKeyHandler: (setEditorState: (state: EditorState) => void) => (command: CustomDraftCommand, editorState: EditorState) => DraftHandleValue;
|
|
4
|
-
export declare const keyHandler: (setEditorState: (state: EditorState) => void, allowedStyles?:
|
|
5
|
+
export declare const keyHandler: (setEditorState: (state: EditorState) => void, allowedStyles?: Array<Style>) => (command: CustomDraftCommand, editorState: EditorState) => DraftHandleValue;
|
|
5
6
|
export default keyHandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DraftDecorator, ContentState, EditorState } from 'draft-js';
|
|
2
2
|
import { Options as Convert2htmlOptions } from 'draft-js-export-html';
|
|
3
3
|
import { InlineStyle } from '../components/buttons';
|
|
4
|
-
export declare const createState: (content?: string
|
|
4
|
+
export declare const createState: (content?: string, decorators?: DraftDecorator[]) => EditorState;
|
|
5
5
|
export declare type ParsedContent = {
|
|
6
6
|
txt: string;
|
|
7
7
|
html: string;
|
|
@@ -12,5 +12,5 @@ export declare const parseContentState: (state: ContentState) => {
|
|
|
12
12
|
txt: string;
|
|
13
13
|
html: string;
|
|
14
14
|
};
|
|
15
|
-
export declare const parseContent: (content?: string
|
|
15
|
+
export declare const parseContent: (content?: string, decorators?: DraftDecorator[]) => ParsedContent;
|
|
16
16
|
export declare const UpdateStyle: (state: EditorState, style: InlineStyle) => EditorState;
|
|
@@ -2,7 +2,7 @@ export interface IdentifyElement {
|
|
|
2
2
|
(element: HTMLElement): string;
|
|
3
3
|
}
|
|
4
4
|
export declare const generateElementId: IdentifyElement;
|
|
5
|
-
export declare const identifyElement: (identify?: IdentifyElement
|
|
5
|
+
export declare const identifyElement: (identify?: IdentifyElement) => (element: HTMLElement) => string;
|
|
6
6
|
export declare const identifyElements: (elements: Array<HTMLElement>, identify?: IdentifyElement) => void;
|
|
7
7
|
export declare const useIdentifiedElements: (elements: Array<HTMLElement>, identify?: IdentifyElement) => Record<string, HTMLElement>;
|
|
8
8
|
export default useIdentifiedElements;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare const filterElements: (match?: RegExp
|
|
1
|
+
declare const filterElements: (match?: RegExp) => (elements: Array<HTMLElement>) => HTMLElement[];
|
|
2
2
|
interface Options {
|
|
3
3
|
filter?: (element: HTMLElement) => boolean;
|
|
4
4
|
config?: MutationObserverInit;
|
|
5
5
|
identify?: (element: HTMLElement) => string;
|
|
6
6
|
}
|
|
7
|
-
export declare const useContentElements: (container: Element | null, selector: string, options?: Options
|
|
7
|
+
export declare const useContentElements: (container: Element | null, selector: string, options?: Options) => Record<string, HTMLElement>;
|
|
8
8
|
export { filterElements as filterContentElements };
|
|
9
9
|
export default useContentElements;
|
package/dist/hooks/use-date.d.ts
CHANGED
|
@@ -6,8 +6,5 @@ export declare const defaultOptions: {
|
|
|
6
6
|
utc: boolean;
|
|
7
7
|
preserveTime: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const useDate: (value?: DateInput, options?:
|
|
10
|
-
utc: boolean;
|
|
11
|
-
preserveTime: boolean;
|
|
12
|
-
} | undefined) => [DateState, (next: DateInput) => void];
|
|
9
|
+
export declare const useDate: (value?: DateInput, options?: typeof defaultOptions) => [DateState, (next: DateInput) => void];
|
|
13
10
|
export default useDate;
|
|
@@ -17,5 +17,5 @@ declare type Debounce<T extends (...args: any) => any> = _.DebouncedFunc<T>;
|
|
|
17
17
|
* return (<><input {...{ref,onChange}}/><p>{txt}</p></>)
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
20
|
-
export declare const useDebounce: <T extends (...args: any) => any>(func: T, opt: Options, deps?: any[]
|
|
20
|
+
export declare const useDebounce: <T extends (...args: any) => any>(func: T, opt: Options, deps?: any[]) => Debounce<T>;
|
|
21
21
|
export default useDebounce;
|