@kystverket/styrbord 1.9.1 → 1.9.2

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.
@@ -10,6 +10,7 @@ type UseRichTextImageUploadParams = {
10
10
  latestOnUploadRef: React.RefObject<OnImageUploadFn | undefined> | undefined;
11
11
  deriveFileInfosFromStorageIds?: DeriveFileInfosFromStorageIds;
12
12
  sasToRefMap: React.RefObject<Map<string, string>>;
13
+ refToPreviewMap: React.RefObject<Map<string, string>>;
13
14
  pendingImageSelectionRef: React.RefObject<{
14
15
  from: number;
15
16
  to: number;
@@ -23,5 +24,5 @@ type UseRichTextImageUploadReturn = {
23
24
  success: boolean;
24
25
  }>;
25
26
  };
26
- export declare const useRichTextImageUpload: ({ disabled, get, updateToolbarState, latestOnUploadRef, deriveFileInfosFromStorageIds, sasToRefMap, pendingImageSelectionRef, }: UseRichTextImageUploadParams) => UseRichTextImageUploadReturn;
27
+ export declare const useRichTextImageUpload: ({ disabled, get, updateToolbarState, latestOnUploadRef, deriveFileInfosFromStorageIds, sasToRefMap, refToPreviewMap, pendingImageSelectionRef, }: UseRichTextImageUploadParams) => UseRichTextImageUploadReturn;
27
28
  export {};
@@ -10,12 +10,12 @@ export declare const handleRichTextAreaEditorClick: (_view: EditorView, event: M
10
10
  export declare const handleRichTextAreaEditorKeydown: (view: EditorView, event: KeyboardEvent) => boolean;
11
11
  export declare const createRichTextAreaEditorPaste: (canUploadImage: boolean, insertImageFromFile: ImageInsertHandler) => (_view: EditorView, event: ClipboardEvent) => boolean;
12
12
  export declare const createRichTextAreaEditorDrop: (canUploadImage: boolean, insertImageFromFile: ImageInsertHandler) => (_view: EditorView, event: DragEvent) => boolean;
13
- export declare const createRichTextAreaInlineImageUpload: (uploadImage: UploadImageFn, sasToRefMap: Map<string, string>) => (file: File) => Promise<string>;
14
- export declare const createRichTextAreaInlineImageConfig: (uploadImage: UploadImageFn, sasToRefMap: Map<string, string>) => (config: InlineImageConfig) => {
13
+ export declare const createRichTextAreaInlineImageUpload: (uploadImage: UploadImageFn, sasToRefMap: Map<string, string>, refToPreviewMap: Map<string, string>) => (file: File) => Promise<string>;
14
+ export declare const createRichTextAreaInlineImageConfig: (uploadImage: UploadImageFn, sasToRefMap: Map<string, string>, refToPreviewMap: Map<string, string>) => (config: InlineImageConfig) => {
15
15
  onUpload: (file: File) => Promise<string>;
16
+ proxyDomURL: (url: string) => Promise<string>;
16
17
  imageIcon: string | undefined;
17
18
  uploadButton: string | undefined;
18
19
  confirmButton: string | undefined;
19
20
  uploadPlaceholderText: string;
20
- proxyDomURL?: (url: string) => Promise<string> | string;
21
21
  };
@@ -1,4 +1,5 @@
1
1
  import { type DeriveFileInfosFromStorageIds } from '~/utils/fileInfoResolver';
2
+ export declare const imageRefPrefix = "image://";
2
3
  export declare const getImageRefsFromMarkdown: (markdown: string) => string[];
3
4
  export declare const convertFromRefToImage: (markdown: string, deriveFileInfosFromStorageIds: DeriveFileInfosFromStorageIds, urlToRefMap?: Map<string, string>, previousRefToUrlMap?: Map<string, string>) => Promise<string>;
4
5
  export declare const replaceImageUrlsWithRefs: (markdown: string, sasToRefMap: Map<string, string>) => string;