hive-react-kit 1.4.8 → 1.4.9

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/build.css CHANGED
@@ -493,6 +493,9 @@
493
493
  .z-\[1000\] {
494
494
  z-index: 1000;
495
495
  }
496
+ .z-\[1100\] {
497
+ z-index: 1100;
498
+ }
496
499
  .z-\[2000\] {
497
500
  z-index: 2000;
498
501
  }
@@ -1216,6 +1219,9 @@
1216
1219
  .cursor-grab {
1217
1220
  cursor: grab;
1218
1221
  }
1222
+ .cursor-move {
1223
+ cursor: move;
1224
+ }
1219
1225
  .cursor-not-allowed {
1220
1226
  cursor: not-allowed;
1221
1227
  }
@@ -1665,6 +1671,12 @@
1665
1671
  border-color: color-mix(in oklab, var(--color-amber-700) 40%, transparent);
1666
1672
  }
1667
1673
  }
1674
+ .border-black\/30 {
1675
+ border-color: color-mix(in srgb, #000 30%, transparent);
1676
+ @supports (color: color-mix(in lab, red, red)) {
1677
+ border-color: color-mix(in oklab, var(--color-black) 30%, transparent);
1678
+ }
1679
+ }
1668
1680
  .border-blue-300\/40 {
1669
1681
  border-color: color-mix(in srgb, oklch(80.9% 0.105 251.813) 40%, transparent);
1670
1682
  @supports (color: color-mix(in lab, red, red)) {
@@ -0,0 +1,30 @@
1
+ import type { CropRect } from '../../utils/imageProcessor';
2
+ /**
3
+ * Minimal in-modal crop UI. Renders the source image inside a fixed
4
+ * container, overlays a draggable rectangle on top, and reports the
5
+ * final crop in *normalised* coordinates (0..1 of the source's
6
+ * natural dimensions) so the actual crop happens against the full-
7
+ * resolution image elsewhere.
8
+ *
9
+ * Deliberately library-free — `react-image-crop` / `react-easy-crop`
10
+ * would add 20+ kB and a peer-dep maze we don't need for the
11
+ * pre-upload "trim the edges" use case.
12
+ *
13
+ * Interactions:
14
+ * • Drag the selection's interior to move it.
15
+ * • Drag any of the 4 corner handles to resize.
16
+ * • Tap Reset to reselect the whole image.
17
+ * • Tap Apply to commit; Cancel/X dismiss without cropping.
18
+ */
19
+ export interface ImageCropperModalProps {
20
+ isOpen: boolean;
21
+ onClose: () => void;
22
+ /** Source image — either a File or a remote URL the user already
23
+ * uploaded. The modal renders it via an <img> tag. */
24
+ src: string;
25
+ /** Called when the user applies the crop. Coordinates are 0..1 in
26
+ * both axes, measured against the source image's natural size. */
27
+ onApply: (rect: CropRect) => void;
28
+ }
29
+ export declare function ImageCropperModal({ isOpen, onClose, src, onApply }: ImageCropperModalProps): import("react/jsx-runtime").JSX.Element;
30
+ export default ImageCropperModal;
@@ -14,6 +14,11 @@ export interface ImageUploaderProps {
14
14
  /** Text shown in blinking amber while waiting for wallet approval during the hive image fallback. */
15
15
  walletApprovalLabel?: string;
16
16
  disabled?: boolean;
17
+ /** Cap on the longest edge of the uploaded image. Default 2048px.
18
+ * Photos taken on modern phones are routinely 4032px+ wide, which
19
+ * the upstream image hosts truncate or reject — this guarantees we
20
+ * always ship a sensible size. */
21
+ maxImageDimension?: number;
17
22
  }
18
23
  declare const ImageUploader: React.FC<ImageUploaderProps>;
19
24
  export default ImageUploader;