react-moveable
Advanced tools
Comparing version 0.49.2 to 0.50.0-beta.0
@@ -6,2 +6,17 @@ # Change Log | ||
## [0.49.2](https://github.com/daybrush/moveable/blob/master/packages/react-moveable/compare/react-moveable@0.49.0...react-moveable@0.49.2) (2023-04-16) | ||
### :bug: Bug Fix | ||
* fix 0.2 guideline offset delta #888 ([d85c041](https://github.com/daybrush/moveable/blob/master/packages/react-moveable/commit/d85c0414d55e08b3669e3f88bb10c301cc99c59c)) | ||
* fix pinchable's operation #892 ([f4d8df3](https://github.com/daybrush/moveable/blob/master/packages/react-moveable/commit/f4d8df3f81f69f0c00e2b865e6f3368ee9795b01)) | ||
### :mega: Other | ||
* publish packages ([a623eda](https://github.com/daybrush/moveable/blob/master/packages/react-moveable/commit/a623eda2702067397159742dd0c6ed16b99bbe22)) | ||
## [0.49.0](https://github.com/daybrush/moveable/blob/master/packages/react-moveable/compare/react-moveable@0.48.0...react-moveable@0.49.0) (2023-04-13) | ||
@@ -8,0 +23,0 @@ |
@@ -245,5 +245,6 @@ export declare const MOVEABLE_ABLES: readonly [{ | ||
readonly events: readonly []; | ||
readonly props: "origin"[]; | ||
readonly props: (keyof readonly ["origin", "svgOrigin"])[]; | ||
readonly name: "origin"; | ||
} & { | ||
props: readonly ["origin", "svgOrigin"]; | ||
render(moveable: import("../types").MoveableManagerInterface<import("../types").OriginOptions, {}>, React: import("../types").Renderer): any[]; | ||
@@ -371,3 +372,3 @@ }, { | ||
export declare const MOVEABLE_EVENTS: ("dragStart" | "render" | "drag" | "dragEnd" | "dragGroupStart" | "dragGroup" | "dragGroupEnd" | "scale" | "snap" | "resizeStart" | "beforeResize" | "resize" | "resizeEnd" | "resizeGroupStart" | "beforeResizeGroup" | "resizeGroup" | "resizeGroupEnd" | "rotateStart" | "beforeRotate" | "rotate" | "rotateEnd" | "rotateGroupStart" | "beforeRotateGroup" | "rotateGroup" | "rotateGroupEnd" | "scaleStart" | "beforeScale" | "scaleEnd" | "scaleGroupStart" | "beforeScaleGroup" | "scaleGroup" | "scaleGroupEnd" | "warpStart" | "warp" | "warpEnd" | "click" | "clickGroup" | "scroll" | "scrollGroup" | "changeTargets" | "clip" | "round" | "clipStart" | "clipEnd" | "dragOriginStart" | "dragOrigin" | "dragOriginEnd" | "roundStart" | "roundEnd" | "roundGroupStart" | "roundGroup" | "roundGroupEnd" | "beforeRenderStart" | "beforeRender" | "beforeRenderEnd" | "beforeRenderGroupStart" | "beforeRenderGroup" | "beforeRenderGroupEnd" | "renderStart" | "renderEnd" | "renderGroupStart" | "renderGroup" | "renderGroupEnd")[]; | ||
export declare const MOVEABLE_PROPS: ("props" | "className" | "rotatable" | "resizable" | "scalable" | "ables" | "target" | "dragTarget" | "container" | "warpSelf" | "rootContainer" | "viewContainer" | "useResizeObserver" | "useMutationObserver" | "zoom" | "transformOrigin" | "pinchThreshold" | "pinchOutside" | "triggerAblesSimultaneously" | "checkInput" | "cspNonce" | "translateZ" | "hideDefaultLines" | "stopPropagation" | "preventDefault" | "preventClickEventOnDrag" | "preventClickDefault" | "persistData" | "useAccuratePosition" | "linePadding" | "controlPadding" | "firstRenderState" | "requestStyles" | "flushSync" | "dragArea" | "passDragArea" | "origin" | "padding" | "defaultGroupRotate" | "defaultGroupOrigin" | "targetGroups" | "groupable" | "hideChildMoveableDefaultLines" | "groupableProps" | "draggable" | "throttleDrag" | "throttleDragRotate" | "startDragRotate" | "edgeDraggable" | "originDraggable" | "originRelative" | "rotationPosition" | "rotateAroundControls" | "resolveAblesWithRotatable" | "throttleRotate" | "rotationTarget" | "renderDirections" | "edge" | "displayAroundControls" | "throttleResize" | "keepRatio" | "keepRatioFinally" | "resizeFormat" | "checkResizableError" | "throttleScale" | "warpable" | "individualGroupable" | "individualGroupableProps" | "snappable" | "snapContainer" | "snapDirections" | "elementSnapDirections" | "snapGap" | "snapThreshold" | "snapRenderThreshold" | "snapDigit" | "snapGridWidth" | "snapGridHeight" | "isDisplaySnapDigit" | "isDisplayInnerSnapDigit" | "horizontalGuidelines" | "verticalGuidelines" | "elementGuidelines" | "maxSnapElementGuidelineDistance" | "maxSnapElementGapDistance" | "bounds" | "innerBounds" | "snapDistFormat" | "scrollable" | "scrollContainer" | "scrollThreshold" | "scrollThrottleTime" | "getScrollPosition" | "scrollOptions" | "clippable" | "customClipPath" | "defaultClipPath" | "clipRelative" | "dragWithClip" | "clipArea" | "clipTargetBounds" | "clipVerticalGuidelines" | "clipHorizontalGuidelines" | "clipSnapThreshold" | "roundable" | "roundRelative" | "minRoundControls" | "maxRoundControls" | "roundClickable" | "isDisplayShadowRoundControls" | "roundPadding")[]; | ||
export declare const MOVEABLE_PROPS: ("props" | "className" | "rotatable" | "resizable" | "scalable" | "ables" | "target" | "dragTarget" | "container" | "warpSelf" | "rootContainer" | "viewContainer" | "useResizeObserver" | "useMutationObserver" | "zoom" | "transformOrigin" | "pinchThreshold" | "pinchOutside" | "triggerAblesSimultaneously" | "checkInput" | "cspNonce" | "translateZ" | "hideDefaultLines" | "stopPropagation" | "preventDefault" | "preventClickEventOnDrag" | "preventClickDefault" | "persistData" | "useAccuratePosition" | "linePadding" | "controlPadding" | "firstRenderState" | "requestStyles" | "flushSync" | "dragArea" | "passDragArea" | "padding" | "defaultGroupRotate" | "defaultGroupOrigin" | "targetGroups" | "groupable" | "hideChildMoveableDefaultLines" | "groupableProps" | "draggable" | "throttleDrag" | "throttleDragRotate" | "startDragRotate" | "edgeDraggable" | "originDraggable" | "originRelative" | "rotationPosition" | "rotateAroundControls" | "resolveAblesWithRotatable" | "throttleRotate" | "rotationTarget" | "renderDirections" | "edge" | "displayAroundControls" | "throttleResize" | "keepRatio" | "keepRatioFinally" | "resizeFormat" | "checkResizableError" | "throttleScale" | "warpable" | "individualGroupable" | "individualGroupableProps" | "snappable" | "snapContainer" | "snapDirections" | "elementSnapDirections" | "snapGap" | "snapThreshold" | "snapRenderThreshold" | "snapDigit" | "snapGridWidth" | "snapGridHeight" | "isDisplaySnapDigit" | "isDisplayInnerSnapDigit" | "horizontalGuidelines" | "verticalGuidelines" | "elementGuidelines" | "maxSnapElementGuidelineDistance" | "maxSnapElementGapDistance" | "bounds" | "innerBounds" | "snapDistFormat" | "scrollable" | "scrollContainer" | "scrollThreshold" | "scrollThrottleTime" | "getScrollPosition" | "scrollOptions" | "clippable" | "customClipPath" | "defaultClipPath" | "clipRelative" | "dragWithClip" | "clipArea" | "clipTargetBounds" | "clipVerticalGuidelines" | "clipHorizontalGuidelines" | "clipSnapThreshold" | "roundable" | "roundRelative" | "minRoundControls" | "maxRoundControls" | "roundClickable" | "isDisplayShadowRoundControls" | "roundPadding")[]; | ||
export declare const MOVEABLE_REACT_EVENTS: ("onResizeStart" | "onBeforeResize" | "onResize" | "onResizeEnd" | "onResizeGroupStart" | "onBeforeResizeGroup" | "onResizeGroup" | "onResizeGroupEnd" | "onScaleStart" | "onBeforeScale" | "onScale" | "onScaleEnd" | "onScaleGroupStart" | "onBeforeScaleGroup" | "onScaleGroup" | "onScaleGroupEnd" | "onRotateStart" | "onBeforeRotate" | "onRotate" | "onRotateEnd" | "onRotateGroupStart" | "onBeforeRotateGroup" | "onRotateGroup" | "onRotateGroupEnd" | "onDragStart" | "onDrag" | "onDragEnd" | "onDragGroupStart" | "onDragGroup" | "onDragGroupEnd" | "onDragOriginStart" | "onDragOrigin" | "onDragOriginEnd" | "onWarpStart" | "onWarp" | "onWarpEnd" | "onSnap" | "onScroll" | "onScrollGroup" | "onClipStart" | "onClip" | "onClipEnd" | "onRoundStart" | "onRound" | "onRoundEnd" | "onRoundGroupStart" | "onRoundGroup" | "onRoundGroupEnd" | "onBeforeRenderStart" | "onBeforeRender" | "onBeforeRenderEnd" | "onBeforeRenderGroupStart" | "onBeforeRenderGroup" | "onBeforeRenderGroupEnd" | "onClick" | "onClickGroup" | "onRenderStart" | "onRender" | "onRenderEnd" | "onRenderGroupStart" | "onRenderGroup" | "onRenderGroupEnd" | "onChangeTargets")[]; |
import { Renderer, OriginOptions, MoveableManagerInterface } from "../types"; | ||
declare const _default: { | ||
readonly events: readonly []; | ||
readonly props: "origin"[]; | ||
readonly props: (keyof readonly ["origin", "svgOrigin"])[]; | ||
readonly name: "origin"; | ||
} & { | ||
props: readonly ["origin", "svgOrigin"]; | ||
render(moveable: MoveableManagerInterface<OriginOptions>, React: Renderer): any[]; | ||
@@ -8,0 +9,0 @@ }; |
import { MoveableManagerInterface, SnappableProps, SnappableState, SnapGuideline, SnapDirectionPoses, PosGuideline, ElementGuidelineValue, SnapElementRect } from "../../types"; | ||
export declare function getTotalGuidelines(moveable: MoveableManagerInterface<SnappableProps, SnappableState>): SnapGuideline[]; | ||
export declare function getGapGuidelines(moveable: MoveableManagerInterface<SnappableProps, SnappableState>, targetRect: SnapDirectionPoses, snapThreshold: number): SnapGuideline[]; | ||
export declare function getGridGuidelines(snapGridWidth: number, snapGridHeight: number, containerWidth: number, containerHeight: number, clientLeft?: number, clientTop?: number): SnapGuideline[]; | ||
export declare function getGridGuidelines(snapGridWidth: number, snapGridHeight: number, containerWidth: number, containerHeight: number, clientLeft: number | undefined, clientTop: number | undefined, snapOffset: { | ||
left: number; | ||
top: number; | ||
right: number; | ||
bottom: number; | ||
}): SnapGuideline[]; | ||
export declare function checkBetweenRects(rect1: SnapDirectionPoses, rect2: SnapDirectionPoses, type: "horizontal" | "vertical", distance: number): boolean; | ||
@@ -6,0 +11,0 @@ export declare function getElementGuidelines(moveable: MoveableManagerInterface<SnappableProps, SnappableState>): SnapGuideline[]; |
@@ -28,10 +28,10 @@ import { MoveableManagerState, ResizableProps, MoveableManagerInterface, OnTransformEvent, OnTransformStartEvent, DraggableProps } from "../types"; | ||
export declare function fillTransformEvent(moveable: MoveableManagerInterface<DraggableProps>, nextTransform: string, delta: number[], isPinch: boolean, e: any): OnTransformEvent; | ||
export declare function getTranslateFixedPosition(moveable: MoveableManagerInterface<any>, transform: string | number[], fixedDirection: number[], datas: any): number[]; | ||
export declare function getTranslateDist(moveable: MoveableManagerInterface<any>, transform: string, fixedDirection: number[], fixedPosition: number[], datas: any): number[]; | ||
export declare function getScaleDist(moveable: MoveableManagerInterface<any>, scaleDist: number[], fixedDirection: number[], fixedPosition: number[], datas: any): number[]; | ||
export declare function getTranslateFixedPosition(moveable: MoveableManagerInterface<any>, transform: string | number[], fixedDirection: number[], fixedOffset: number[], datas: any): number[]; | ||
export declare function getTranslateDist(moveable: MoveableManagerInterface<any>, transform: string, fixedDirection: number[], fixedPosition: number[], fixedOffset: number[], datas: any): number[]; | ||
export declare function getScaleDist(moveable: MoveableManagerInterface<any>, scaleDist: number[], fixedDirection: number[], fixedPosition: number[], fixedOffset: number[], datas: any): number[]; | ||
export declare function getOriginDirection(moveable: MoveableManagerInterface<any>): number[]; | ||
export declare function getDirectionByPos(pos: number[], width: number, height: number): number[]; | ||
export declare function getDirectionOffset(moveable: MoveableManagerInterface, direction: number[], nextMatrix?: number[]): number[]; | ||
export declare function getDirectionOffset(moveable: MoveableManagerInterface, fixedDirection: number[], fixedOffset: number[], nextMatrix?: number[]): number[]; | ||
export declare function getRotateDist(moveable: MoveableManagerInterface<any>, rotateDist: number, datas: any): number[]; | ||
export declare function getResizeDist(moveable: MoveableManagerInterface<any>, width: number, height: number, fixedPosition: number[], transformOrigin: string[], datas: any): number[]; | ||
export declare function getAbsolutePosition(moveable: MoveableManagerInterface<ResizableProps>, direction: number[]): number[]; |
@@ -55,2 +55,3 @@ import MoveableManager from "./MoveableManager"; | ||
origin: boolean; | ||
svgOrigin: string; | ||
padding: import("./types").PaddingBox; | ||
@@ -57,0 +58,0 @@ }; |
@@ -93,2 +93,3 @@ import { IObject } from "@daybrush/utils"; | ||
export declare function getClientRect(el: HTMLElement | SVGElement, isExtends?: boolean): MoveableClientRect; | ||
export declare function getTotalOrigin(moveable: MoveableManagerInterface<any>): number[]; | ||
export declare function getTotalDirection(parentDirection: number[], isPinch: boolean, inputEvent: any, datas: any): number[] | undefined; | ||
@@ -95,0 +96,0 @@ export declare function getDirection(target: SVGElement | HTMLElement, datas: any): number[] | undefined; |
{ | ||
"name": "react-moveable", | ||
"version": "0.49.2", | ||
"version": "0.50.0-beta.0", | ||
"description": "A React Component that create Moveable, Draggable, Resizable, Scalable, Rotatable, Warpable, Pinchable, Groupable.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/moveable.cjs.js", |
@@ -1,1 +0,1 @@ | ||
{"generatedAt":1681673272560,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"monorepo":"Lerna","packageManager":{"type":"yarn","version":"1.22.19"},"typescriptOptions":{"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"features":{"interactionsDebugger":true,"previewMdx2":true},"storybookVersion":"6.5.16","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"6.5.16"},"@storybook/addon-coverage":{"version":"0.0.8"},"@storybook/addon-storyshots":{"version":"6.5.16"},"@storybook/addons":{"version":"6.5.16"},"@storybook/jest":{"version":null},"@storybook/mdx2-csf":{"version":"0.0.4"},"@storybook/react":{"version":"6.5.16"},"@storybook/test-runner":{"version":"0.9.4"},"@storybook/testing-library":{"version":"0.0.13"}},"framework":{"name":"react"},"addons":{"@storybook/addon-google-analytics":{"version":"6.2.9"},"@storybook/addon-docs":{"options":{"configureJSX":true},"version":"6.5.16"},"storybook-addon-preview":{"version":"2.3.0"},"@storybook/addon-controls":{"version":"6.5.16"},"@storybook/addon-viewport":{"version":"6.5.16"},"storybook-dark-mode":{"version":"1.1.2"},"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-essentials":{"version":null},"@storybook/addon-interactions":{"version":"6.5.16"}}} | ||
{"generatedAt":1682245301562,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"monorepo":"Lerna","packageManager":{"type":"yarn","version":"1.22.19"},"typescriptOptions":{"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"features":{"interactionsDebugger":true,"previewMdx2":true},"storybookVersion":"6.5.16","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"6.5.16"},"@storybook/addon-coverage":{"version":"0.0.8"},"@storybook/addon-storyshots":{"version":"6.5.16"},"@storybook/addons":{"version":"6.5.16"},"@storybook/jest":{"version":null},"@storybook/mdx2-csf":{"version":"0.0.4"},"@storybook/react":{"version":"6.5.16"},"@storybook/test-runner":{"version":"0.9.4"},"@storybook/testing-library":{"version":"0.0.13"}},"framework":{"name":"react"},"addons":{"@storybook/addon-google-analytics":{"version":"6.2.9"},"@storybook/addon-docs":{"options":{"configureJSX":true},"version":"6.5.16"},"storybook-addon-preview":{"version":"2.3.0"},"@storybook/addon-controls":{"version":"6.5.16"},"@storybook/addon-viewport":{"version":"6.5.16"},"storybook-dark-mode":{"version":"1.1.2"},"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-essentials":{"version":null},"@storybook/addon-interactions":{"version":"6.5.16"}}} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 5 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13514049
120
56185
6
60