@haklex/rich-renderer-image 0.30.0 → 0.31.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/index.mjs +4 -2
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -597,7 +597,8 @@ function ReplacePanel() {
|
|
|
597
597
|
style: { display: "none" },
|
|
598
598
|
type: "file",
|
|
599
599
|
onChange: (event) => {
|
|
600
|
-
|
|
600
|
+
const file = event.currentTarget.files?.[0] ?? null;
|
|
601
|
+
handleReplaceFile(file);
|
|
601
602
|
event.currentTarget.value = "";
|
|
602
603
|
}
|
|
603
604
|
}), /* @__PURE__ */ jsx("button", {
|
|
@@ -849,7 +850,8 @@ function useImageResize() {
|
|
|
849
850
|
const rawDelta = moveEvent.clientX - startX;
|
|
850
851
|
if (!moved && Math.abs(rawDelta) < MOVE_THRESHOLD_PX) return;
|
|
851
852
|
moved = true;
|
|
852
|
-
|
|
853
|
+
const outward = side === "left" ? -rawDelta : rawDelta;
|
|
854
|
+
percent = sanitizeImageDisplayWidth((startWidth + outward * factor) / containerWidth * 100) ?? percent;
|
|
853
855
|
if (isFloat && blockWrapper) blockWrapper.style.width = `${percent}%`;
|
|
854
856
|
else figure.style.setProperty("--rich-image-display-width", `${percent}%`);
|
|
855
857
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-renderer-image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "Image renderer with blurhash",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,29 +25,29 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@lexical/react": "^0.
|
|
28
|
+
"@lexical/react": "^0.48.0",
|
|
29
29
|
"@types/react": "^19.2.17",
|
|
30
30
|
"@types/react-dom": "^19.2.3",
|
|
31
|
-
"@vanilla-extract/css": "^1.21.
|
|
32
|
-
"@vanilla-extract/vite-plugin": "^5.2.
|
|
33
|
-
"jotai": "^2.20.
|
|
34
|
-
"lexical": "^0.
|
|
31
|
+
"@vanilla-extract/css": "^1.21.1",
|
|
32
|
+
"@vanilla-extract/vite-plugin": "^5.2.5",
|
|
33
|
+
"jotai": "^2.20.2",
|
|
34
|
+
"lexical": "^0.48.0",
|
|
35
35
|
"react": "^19.2.7",
|
|
36
36
|
"react-dom": "^19.2.7",
|
|
37
37
|
"typescript": "^6.0.3",
|
|
38
38
|
"unplugin-dts": "^1.0.3",
|
|
39
|
-
"vite": "^8.1.
|
|
39
|
+
"vite": "^8.1.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@lexical/react": "^0.
|
|
42
|
+
"@lexical/react": "^0.47.0",
|
|
43
43
|
"jotai": ">=2",
|
|
44
|
-
"lexical": "^0.
|
|
44
|
+
"lexical": "^0.47.0",
|
|
45
45
|
"lucide-react": "^1.0.0",
|
|
46
46
|
"react": ">=19",
|
|
47
47
|
"react-dom": ">=19",
|
|
48
|
-
"@haklex/rich-editor": "^0.
|
|
49
|
-
"@haklex/rich-editor-ui": "^0.
|
|
50
|
-
"@haklex/rich-style-token": "^0.
|
|
48
|
+
"@haklex/rich-editor": "^0.31.1",
|
|
49
|
+
"@haklex/rich-editor-ui": "^0.31.1",
|
|
50
|
+
"@haklex/rich-style-token": "^0.31.1"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|