pixedi 1.10.0 → 1.10.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.
- package/CHANGELOG.md +9 -0
- package/dist/lib/Pixedi.d.ts +10 -0
- package/dist/lib/assets/icons.d.ts +27 -0
- package/dist/lib/constants.d.ts +6 -0
- package/dist/lib/crop/CropButtonGroup.d.ts +6 -0
- package/dist/lib/crop/CropInfo.d.ts +1 -0
- package/dist/lib/crop/CropInteractBox.d.ts +1 -0
- package/dist/lib/crop/CropLines.d.ts +1 -0
- package/dist/lib/crop/CropPointer.d.ts +7 -0
- package/dist/lib/crop/CropPointers.d.ts +6 -0
- package/dist/lib/crop/CropTools.d.ts +1 -0
- package/dist/lib/crop/index.d.ts +7 -0
- package/dist/lib/crop/useCrop.d.ts +7 -0
- package/dist/lib/crop/useCropInteraction.d.ts +9 -0
- package/dist/lib/eventBus.d.ts +6 -0
- package/dist/lib/filters/DefaultFilterValues.d.ts +2 -0
- package/dist/lib/filters/FilterInteractBox.d.ts +1 -0
- package/dist/lib/filters/FilterTools.d.ts +1 -0
- package/dist/lib/filters/UrlFilters.d.ts +1 -0
- package/dist/lib/filters/index.d.ts +3 -0
- package/dist/lib/filters/useFilterInteraction.d.ts +7 -0
- package/dist/lib/filters/useFilters.d.ts +20 -0
- package/dist/lib/flip/FlipTools.d.ts +1 -0
- package/dist/lib/flip/index.d.ts +1 -0
- package/dist/lib/flip/useFlip.d.ts +9 -0
- package/dist/lib/frame/Frame.d.ts +1 -0
- package/dist/lib/frame/index.d.ts +1 -0
- package/dist/lib/header/Header.d.ts +5 -0
- package/dist/lib/header/index.d.ts +1 -0
- package/dist/lib/hooks/index.d.ts +6 -0
- package/dist/lib/hooks/useAbove.d.ts +2 -0
- package/dist/lib/hooks/useBellow.d.ts +2 -0
- package/dist/lib/hooks/useImageLoader.d.ts +16 -0
- package/dist/lib/hooks/useImageSaving.d.ts +6 -0
- package/dist/lib/hooks/useMobile.d.ts +3 -0
- package/dist/lib/hooks/useToolCommit.d.ts +7 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +715 -892
- package/dist/lib/index.umd.cjs +33 -0
- package/dist/lib/infobar/Infobar.d.ts +1 -0
- package/dist/lib/infobar/index.d.ts +1 -0
- package/dist/lib/preset/PresetTools.d.ts +1 -0
- package/dist/lib/preset/index.d.ts +1 -0
- package/dist/lib/preset/usePreset.d.ts +8 -0
- package/dist/lib/preview/Preview.d.ts +8 -0
- package/dist/lib/preview/index.d.ts +1 -0
- package/dist/lib/preview/usePreview.d.ts +28 -0
- package/dist/lib/provider/PixediProvider.d.ts +15 -0
- package/dist/lib/provider/StoreContext.d.ts +20 -0
- package/dist/lib/provider/initialState.d.ts +16 -0
- package/dist/lib/provider/usePixediContext.d.ts +16 -0
- package/dist/lib/resize/ResizeTools.d.ts +1 -0
- package/dist/lib/resize/index.d.ts +1 -0
- package/dist/lib/resize/useResize.d.ts +15 -0
- package/dist/lib/rotate/RotateTools.d.ts +1 -0
- package/dist/lib/rotate/index.d.ts +1 -0
- package/dist/lib/rotate/useRotate.d.ts +6 -0
- package/dist/lib/sidebar/Sidebar.d.ts +5 -0
- package/dist/lib/sidebar/index.d.ts +1 -0
- package/dist/lib/sidebar/useSidebar.d.ts +11 -0
- package/dist/lib/types.d.ts +129 -0
- package/dist/lib/ui/button/Button.d.ts +7 -0
- package/dist/lib/ui/index.d.ts +10 -0
- package/dist/lib/ui/input/Input.d.ts +4 -0
- package/dist/lib/ui/input-pixel/InputPixel.d.ts +6 -0
- package/dist/lib/ui/save-close-group/SaveCloseGroup.d.ts +8 -0
- package/dist/lib/ui/select/Select.d.ts +11 -0
- package/dist/lib/ui/select/useSelect.d.ts +22 -0
- package/dist/lib/ui/separator/Separator.d.ts +4 -0
- package/dist/lib/ui/slider/Slider.d.ts +19 -0
- package/dist/lib/ui/surface-tool/SurfaceTool.d.ts +8 -0
- package/dist/lib/ui/surface-tool/SurfaceToolContext.d.ts +6 -0
- package/dist/lib/ui/surface-tool/SurfaceToolOffsetProvider.d.ts +5 -0
- package/dist/lib/ui/surface-tool/useSurfaceTool.d.ts +7 -0
- package/dist/lib/ui/tooltip/Tooltip.d.ts +11 -0
- package/dist/lib/ui/tooltip/useTooltip.d.ts +14 -0
- package/dist/lib/utils/canvas.d.ts +7 -0
- package/dist/lib/utils/crop.d.ts +10 -0
- package/dist/lib/utils/imageProcessor.d.ts +10 -0
- package/dist/lib/utils/preview.d.ts +42 -0
- package/dist/lib/workers/imageLoad.d.ts +1 -0
- package/package.json +12 -9
- package/dist/lib/index.umd.js +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.10.2
|
|
6
|
+
|
|
7
|
+
- Fix `Calling require for "react"` crash in browser bundlers: `react/jsx-runtime` is no longer bundled into the library.
|
|
8
|
+
- Ship TypeScript declarations (`dist/lib/index.d.ts`) with the package.
|
|
9
|
+
|
|
5
10
|
## 1.10.1
|
|
6
11
|
|
|
12
|
+
- Fix UMD build output to use .cjs extension and add exports field to package.json.
|
|
13
|
+
|
|
14
|
+
## 1.10.0
|
|
15
|
+
|
|
7
16
|
- Add `background` option to settings.
|
|
8
17
|
|
|
9
18
|
## 1.9.0
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FuncSaveArgs, type Theme, type Settings } from "./types";
|
|
2
|
+
type PixediProps = {
|
|
3
|
+
image: string | Blob;
|
|
4
|
+
onSave: FuncSaveArgs;
|
|
5
|
+
onBack: () => void;
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
settings?: Settings;
|
|
8
|
+
};
|
|
9
|
+
export declare const Pixedi: ({ image, onSave, onBack, theme, settings, }: PixediProps) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const Check: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
3
|
+
export declare const X: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
4
|
+
export declare const Lock: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
5
|
+
export declare const ArrowLeft: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
6
|
+
export declare const ChevronDown: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
7
|
+
export declare const Undo: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
8
|
+
export declare const Redo: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
9
|
+
export declare const Settings: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
10
|
+
export declare const Crop: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
11
|
+
export declare const Image: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
12
|
+
export declare const Square: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
13
|
+
export declare const Rectangle16x9: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
14
|
+
export declare const Rectangle4x3: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
15
|
+
export declare const Fullscreen: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
16
|
+
export declare const FlipH: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
17
|
+
export declare const FlipV: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
18
|
+
export declare const Rotate: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
19
|
+
export declare const RotateCCW: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
20
|
+
export declare const Presets: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
21
|
+
export declare const Filters: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
22
|
+
export declare const SidebarOpen: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
23
|
+
export declare const SidebarClose: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
24
|
+
export declare const PredefinedFilters: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
25
|
+
export declare const Compare: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
26
|
+
export declare const Drag: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
27
|
+
export declare const Loader: (props: React.ComponentPropsWithoutRef<"svg">) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Option, FilterData, Preset } from "./types";
|
|
2
|
+
export declare const PREVIEW_MAX_DIMENSION = 1920;
|
|
3
|
+
export declare const PREVIEW_QUALITY = 0.85;
|
|
4
|
+
export declare const presetsData: Preset[];
|
|
5
|
+
export declare const filtersData: FilterData[];
|
|
6
|
+
export declare const filterUrlsData: Option[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CropInfo: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CropInteractBox: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CropLines: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Direction } from "../types";
|
|
3
|
+
type CropPointerProps = {
|
|
4
|
+
onMouseDown: (e: React.MouseEvent | React.TouchEvent, type: Direction, cursor?: string) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const CropPointer: ({ onMouseDown }: CropPointerProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Direction } from "../types";
|
|
2
|
+
type CropPointersProps = {
|
|
3
|
+
onMouseDown: (e: React.MouseEvent, type: Direction, cursor: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const CropPointers: ({ onMouseDown }: CropPointersProps) => import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CropTools: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CropInteractBox } from "./CropInteractBox";
|
|
2
|
+
export { CropTools } from "./CropTools";
|
|
3
|
+
export { CropLines } from "./CropLines";
|
|
4
|
+
export { CropPointers } from "./CropPointers";
|
|
5
|
+
export { useCropInteraction } from "./useCropInteraction";
|
|
6
|
+
export { CropPointer } from "./CropPointer";
|
|
7
|
+
export { CropInfo } from "./CropInfo";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Direction } from "../types";
|
|
2
|
+
type UseCropInteractionArgs = {
|
|
3
|
+
boxRef: React.RefObject<HTMLDivElement | null>;
|
|
4
|
+
};
|
|
5
|
+
export declare const useCropInteraction: ({ boxRef }: UseCropInteractionArgs) => {
|
|
6
|
+
handleCropStart: (e: React.MouseEvent | React.TouchEvent, type: Direction, cursor?: string) => void;
|
|
7
|
+
initialCrop: import("../types").CropRectExtended;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ActionFilter, CropRect } from "./types";
|
|
2
|
+
export declare const emitCropUpdate: (eventBus: EventTarget, detail: CropRect) => void;
|
|
3
|
+
export declare const emitClipPathUpdate: (eventBus: EventTarget, detail: CropRect) => void;
|
|
4
|
+
export declare const emitResizeUpdate: (eventBus: EventTarget, detail: number) => void;
|
|
5
|
+
export declare const emitFilterUpdate: (eventBus: EventTarget, detail: ActionFilter) => void;
|
|
6
|
+
export declare const emitCompareUpdate: (eventBus: EventTarget, detail: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FilterInteractBox: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FilterTools: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UrlFilters: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type UseFilterInteractionArgs = {
|
|
2
|
+
compareRef: React.RefObject<HTMLDivElement | null>;
|
|
3
|
+
};
|
|
4
|
+
export declare const useFilterInteraction: ({ compareRef, }: UseFilterInteractionArgs) => {
|
|
5
|
+
handleDragStart: (e: React.MouseEvent | React.TouchEvent) => void;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type FilterData } from "../types";
|
|
2
|
+
export declare const useFilters: () => {
|
|
3
|
+
showCompare: boolean;
|
|
4
|
+
previewUrl: string;
|
|
5
|
+
isUrl: boolean;
|
|
6
|
+
toggleIsUrl: () => void;
|
|
7
|
+
filters: FilterData[];
|
|
8
|
+
selectedFilter: string;
|
|
9
|
+
selectedFilterItem: FilterData | undefined;
|
|
10
|
+
selectedUrl: string;
|
|
11
|
+
sliderValue: number;
|
|
12
|
+
handleToggleCompare: () => void;
|
|
13
|
+
handleSliderInput: (value: number) => void;
|
|
14
|
+
handleSliderChange: (value: number) => void;
|
|
15
|
+
handleChange: (value: string) => void;
|
|
16
|
+
handleChangeWhenUrl: (value: string) => void;
|
|
17
|
+
handleSave: () => void;
|
|
18
|
+
handleClose: () => void;
|
|
19
|
+
isSaving: boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FlipTools: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FlipTools } from "./FlipTools";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Frame: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Frame } from "./Frame";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Header } from "./Header";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useImageLoader } from "./useImageLoader";
|
|
2
|
+
export { useMobile } from "./useMobile";
|
|
3
|
+
export { useBellow } from "./useBellow";
|
|
4
|
+
export { useAbove } from "./useAbove";
|
|
5
|
+
export { useImageSaving } from "./useImageSaving";
|
|
6
|
+
export { useToolCommit } from "./useToolCommit";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type UseImageLoaderProps = {
|
|
2
|
+
src: string | Blob;
|
|
3
|
+
skip?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type UseImageLoader = {
|
|
6
|
+
loading: boolean;
|
|
7
|
+
error: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
originalBlob: Blob | null;
|
|
12
|
+
previewUrl: string;
|
|
13
|
+
isAlpha: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const useImageLoader: ({ src, skip, }: UseImageLoaderProps) => UseImageLoader;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Pixedi } from "./Pixedi";
|