zs_library 0.7.1 → 0.7.3

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.
@@ -31,5 +31,5 @@ export type { DesktopIconContainerProps as DockDesktopItemProps } from './dock/d
31
31
  export type { MobileIconContainerProps as DockMobileItemProps } from './dock/dock-mobile';
32
32
  export { default as GeoMap } from './map-view';
33
33
  export type { GeoMapProps } from './map-view';
34
- export { default as SimpleEditor, SimpleEditorRender, jsonToHtml, htmlToJson, EditorFormatConverter, } from './tiptap-editor/simple';
35
- export type { SimpleEditorProps, SimpleEditorRenderProps, SimpleEditorFeatures, EditorOutputFormat, } from './tiptap-editor/simple';
34
+ export { default as SimpleEditor, SimpleEditorRender, useSimpleEditor, jsonToHtml, htmlToJson, EditorFormatConverter, } from './tiptap-editor/simple';
35
+ export type { SimpleEditorProps, SimpleEditorRenderProps, SimpleEditorFeatures, EditorOutputFormat, UseSimpleEditorProps, } from './tiptap-editor/simple';
@@ -1,7 +1,7 @@
1
1
  export interface ImageNodeOptions {
2
2
  inline: boolean;
3
3
  allowBase64: boolean;
4
- HTMLAttributes: Record<string, any>;
4
+ HTMLAttributes: Record<string, unknown>;
5
5
  }
6
6
  declare module "@tiptap/core" {
7
7
  interface Commands<ReturnType> {
@@ -27,6 +27,7 @@ import { SimpleEditor } from './simple-editor';
27
27
  * ```
28
28
  */
29
29
  export * from './simple-editor';
30
+ export * from './use-simple-editor';
30
31
  export * from './simple-editor-render';
31
32
  export * from './lib/feature-utils';
32
33
  export * from './lib/format-utils';
@@ -1,4 +1,4 @@
1
- import { JSONContent } from '@tiptap/react';
1
+ import { JSONContent, Editor } from '@tiptap/react';
2
2
  import { SimpleEditorFeatures } from './lib/feature-utils';
3
3
  import { EditorOutputFormat } from './lib/format-utils';
4
4
  export interface SimpleEditorProps {
@@ -8,5 +8,9 @@ export interface SimpleEditorProps {
8
8
  style?: React.CSSProperties;
9
9
  features?: SimpleEditorFeatures;
10
10
  output?: EditorOutputFormat;
11
+ editor?: Editor | null;
11
12
  }
12
- export declare function SimpleEditor({ value, onChange, className, style, features, output }: SimpleEditorProps): import("react/jsx-runtime").JSX.Element;
13
+ export interface SimpleEditorRef {
14
+ editor: Editor | null;
15
+ }
16
+ export declare const SimpleEditor: import('react').ForwardRefExoticComponent<SimpleEditorProps & import('react').RefAttributes<SimpleEditorRef>>;
@@ -0,0 +1,10 @@
1
+ import { JSONContent } from '@tiptap/react';
2
+ import { SimpleEditorFeatures } from './lib/feature-utils';
3
+ import { EditorOutputFormat } from './lib/format-utils';
4
+ export interface UseSimpleEditorProps {
5
+ value?: string | JSONContent;
6
+ onChange?: (value: string | JSONContent) => void;
7
+ features?: SimpleEditorFeatures;
8
+ output?: EditorOutputFormat;
9
+ }
10
+ export declare function useSimpleEditor({ value, onChange, features, output }: UseSimpleEditorProps): import('@tiptap/core').Editor | null;