@haklex/rich-renderer-image 0.61.0 → 0.62.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ReplacePanel.d.ts","sourceRoot":"","sources":["../src/ReplacePanel.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,qBAAqB,IAAI,MAAM,OAAO,CAAC,IAAI,CAAC,CA2E3D;AAED,wBAAgB,YAAY,SAa3B"}
1
+ {"version":3,"file":"ReplacePanel.d.ts","sourceRoot":"","sources":["../src/ReplacePanel.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,qBAAqB,IAAI,MAAM,OAAO,CAAC,IAAI,CAAC,CA8E3D;AAED,wBAAgB,YAAY,SAa3B"}
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import { $createNodeSelection, $getNearestNodeFromDOMNode, $getNodeByKey, $getSe
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
  import { AlignCenterVertical, AlignEndVertical, AlignStartVertical, ArrowLeftToLine, ArrowRightToLine, ChevronDown, CopyPlus, Download, Ellipsis, ExternalLink, ImageIcon, Replace, Trash2 } from "lucide-react";
11
11
  import { ActionButton, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, Field, Kbd, Popover, PopoverBody, PopoverFooter, PopoverHeader, PopoverPanel, PopoverTrigger, SegmentedControl, TextInput, TooltipContent, TooltipRoot, TooltipTrigger, toast, updateToast, useLiveEdit } from "@haklex/rich-editor-ui";
12
- import { defaultImageUpload, getImageEditor, presentImageDialog, resolvePreprocessTargets, useImagePreprocess, useImageUpload } from "@haklex/rich-editor/plugins";
12
+ import { defaultImageUpload, getImageEditor, presentImageDialog, resolvePreprocessTargets, uploadImageFile, useImagePreprocess, useImageUpload } from "@haklex/rich-editor/plugins";
13
13
  import { usePortalTheme } from "@haklex/rich-style-token";
14
14
  //#region src/atoms.ts
15
15
  function getCaptionText(altText, caption) {
@@ -777,7 +777,7 @@ function useReplaceImageDialog() {
777
777
  });
778
778
  try {
779
779
  const uploader = uploadImage ?? defaultImageUpload;
780
- const [result, meta] = await Promise.all([uploader(file), computeImageMeta(file)]);
780
+ const [result, meta] = await Promise.all([uploadImageFile(uploader, file), computeImageMeta(file)]);
781
781
  withNode((node) => {
782
782
  node.setSrc(result.src);
783
783
  node.setAltText(result.altText ?? file.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-renderer-image",
3
- "version": "0.61.0",
3
+ "version": "0.62.0",
4
4
  "description": "Image renderer with blurhash",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,9 +39,9 @@
39
39
  "vite": "^8.3.5"
40
40
  },
41
41
  "peerDependencies": {
42
- "@haklex/rich-editor": "^0.61.0",
43
- "@haklex/rich-editor-ui": "^0.61.0",
44
- "@haklex/rich-style-token": "^0.61.0",
42
+ "@haklex/rich-editor": "^0.62.0",
43
+ "@haklex/rich-editor-ui": "^0.62.0",
44
+ "@haklex/rich-style-token": "^0.62.0",
45
45
  "@lexical/react": "^0.53.0",
46
46
  "jotai": ">=2",
47
47
  "lexical": "^0.53.0",