made-refine 0.2.6 → 0.2.7
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.d.mts +17 -7
- package/dist/index.d.ts +17 -7
- package/dist/index.js +1332 -224
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1330 -224
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{utils-C7RBdUAE.d.mts → utils-dcZIwXa7.d.mts} +114 -2
- package/dist/{utils-C7RBdUAE.d.ts → utils-dcZIwXa7.d.ts} +114 -2
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +661 -62
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +650 -62
- package/dist/utils.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { D as DragState, a as DropIndicator, S as SpacingPropertyKey, C as CSSPropertyValue, B as BorderRadiusPropertyKey, b as BorderPropertyKey, c as BorderProperties, F as FlexPropertyKey, d as SizingPropertyKey, e as SizingValue, f as ColorPropertyKey, g as ColorValue, T as TypographyPropertyKey, A as ActiveTool, h as Theme, i as BorderStyleControlPreference, j as DirectEditState, k as SessionEdit, l as SessionItem, m as TypographyProperties, M as MeasurementLine, G as Guideline, n as Comment } from './utils-
|
|
4
|
-
export { o as BorderRadiusProperties, p as BorderStyle, q as ColorProperties, r as CommentReply, s as DomSourceLocation, t as DropTarget, E as ElementInfo, u as ElementLocator, v as FlexProperties, w as MeasurementState, R as ReactComponentFrame, x as SizingMode, y as SizingProperties, z as SpacingProperties, U as UndoEditEntry, H as UndoEntry, I as UndoMoveEntry, J as UndoSelectionEntry, K as buildCommentExport, L as buildSessionExport, N as calculateDropPosition, O as calculateElementMeasurements, P as calculateGuidelineMeasurements, Q as calculateParentMeasurements, V as colorToTailwind, W as elementFromPointWithoutOverlays, X as findContainerAtPoint, Y as
|
|
3
|
+
import { D as DragState, a as DropIndicator, S as SpacingPropertyKey, C as CSSPropertyValue, B as BorderRadiusPropertyKey, b as BorderPropertyKey, c as BorderProperties, F as FlexPropertyKey, d as SizingPropertyKey, e as SizingValue, f as ColorPropertyKey, g as ColorValue, T as TypographyPropertyKey, A as ActiveTool, h as Theme, i as BorderStyleControlPreference, j as DirectEditState, k as SessionEdit, l as SessionItem, m as TypographyProperties, M as MeasurementLine, G as Guideline, n as Comment } from './utils-dcZIwXa7.mjs';
|
|
4
|
+
export { o as BorderRadiusProperties, p as BorderStyle, q as ColorProperties, r as CommentReply, s as DomSourceLocation, t as DropTarget, E as ElementInfo, u as ElementLocator, v as FlexProperties, w as MeasurementState, R as ReactComponentFrame, x as SizingMode, y as SizingProperties, z as SpacingProperties, U as UndoEditEntry, H as UndoEntry, I as UndoMoveEntry, J as UndoSelectionEntry, K as buildCommentExport, L as buildSessionExport, N as calculateDropPosition, O as calculateElementMeasurements, P as calculateGuidelineMeasurements, Q as calculateParentMeasurements, V as colorToTailwind, W as elementFromPointWithoutOverlays, X as findContainerAtPoint, Y as findLayoutContainerAtPoint, Z as formatPropertyValue, _ as getComputedBorderStyles, $ as getComputedBoxShadow, a0 as getComputedColorStyles, a1 as getComputedStyles, a2 as getDimensionDisplay, a3 as getElementInfo, a4 as getElementLocator, a5 as getFlexDirection, a6 as isFlexContainer, a7 as isLayoutContainer, a8 as parseColorValue, a9 as parsePropertyValue, aa as stylesToTailwind } from './utils-dcZIwXa7.mjs';
|
|
5
5
|
|
|
6
6
|
declare function DirectEdit(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
8
8
|
declare function DirectEditDemo(): react_jsx_runtime.JSX.Element;
|
|
9
9
|
|
|
10
|
+
type MoveMode = 'free' | 'reorder' | 'position';
|
|
10
11
|
interface MoveInfo {
|
|
11
12
|
originalParent: HTMLElement;
|
|
12
13
|
originalPreviousSibling: HTMLElement | null;
|
|
13
14
|
originalNextSibling: HTMLElement | null;
|
|
15
|
+
mode?: MoveMode;
|
|
16
|
+
positionDelta?: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
visualDelta?: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
/** When true, the element was reparented — clear any position/left/top inline styles from prior position-mode moves. */
|
|
25
|
+
resetPositionOffsets?: boolean;
|
|
14
26
|
}
|
|
15
27
|
interface UseMoveOptions {
|
|
16
28
|
onMoveComplete?: (element: HTMLElement, moveInfo: MoveInfo | null) => void;
|
|
@@ -22,6 +34,7 @@ interface UseMoveDropTarget {
|
|
|
22
34
|
}
|
|
23
35
|
interface StartDragOptions {
|
|
24
36
|
constrainToOriginalParent?: boolean;
|
|
37
|
+
mode?: MoveMode;
|
|
25
38
|
}
|
|
26
39
|
interface UseMoveResult {
|
|
27
40
|
dragState: DragState;
|
|
@@ -218,9 +231,6 @@ interface MeasurementOverlayProps {
|
|
|
218
231
|
}
|
|
219
232
|
declare function MeasurementOverlay({ selectedElement, hoveredElement, measurements, }: MeasurementOverlayProps): react_jsx_runtime.JSX.Element;
|
|
220
233
|
|
|
221
|
-
interface MoveStartOptions {
|
|
222
|
-
constrainToOriginalParent?: boolean;
|
|
223
|
-
}
|
|
224
234
|
interface SelectionOverlayProps {
|
|
225
235
|
selectedElement: HTMLElement;
|
|
226
236
|
draggedElement?: HTMLElement | null;
|
|
@@ -229,7 +239,7 @@ interface SelectionOverlayProps {
|
|
|
229
239
|
x: number;
|
|
230
240
|
y: number;
|
|
231
241
|
};
|
|
232
|
-
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?:
|
|
242
|
+
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?: StartDragOptions) => void;
|
|
233
243
|
showMoveHandle?: boolean;
|
|
234
244
|
activeTool?: ActiveTool;
|
|
235
245
|
isTextEditing?: boolean;
|
|
@@ -292,4 +302,4 @@ declare function CommentOverlay({ comments, activeCommentId, onSetActiveComment,
|
|
|
292
302
|
|
|
293
303
|
declare function formatColorValue(color: ColorValue): string;
|
|
294
304
|
|
|
295
|
-
export { ActiveTool, BorderProperties, BorderPropertyKey, BorderRadiusPropertyKey, CSSPropertyValue, ColorPropertyKey, ColorValue, Comment, CommentOverlay, type CommentOverlayProps, DirectEdit, type DirectEditActionsContextValue, type DirectEditContextValue, DirectEditDemo, DirectEditPanel, DirectEditPanelInner, type DirectEditPanelInnerProps, DirectEditProvider, DirectEditState, type DirectEditStateContextValue, DirectEditToolbar, DirectEditToolbarInner, type DirectEditToolbarInnerProps, DragState, DropIndicator, FlexPropertyKey, Guideline, MeasurementLine, MeasurementOverlay, type MeasurementOverlayProps, type MoveInfo, MoveOverlay, type MoveOverlayProps, Rulers, RulersOverlay, SelectionOverlay, type SelectionOverlayProps, SessionEdit, SizingPropertyKey, SizingValue, SpacingPropertyKey, Theme, TypographyProperties, TypographyPropertyKey, type UseGuidelinesResult, type UseMeasurementResult, type UseMoveDropTarget, type UseMoveOptions, type UseMoveResult, formatColorValue, getStoredGuidelines, useDirectEdit, useDirectEditActions, useDirectEditState, useGuidelines, useMeasurement, useMove, useRulersVisible };
|
|
305
|
+
export { ActiveTool, BorderProperties, BorderPropertyKey, BorderRadiusPropertyKey, CSSPropertyValue, ColorPropertyKey, ColorValue, Comment, CommentOverlay, type CommentOverlayProps, DirectEdit, type DirectEditActionsContextValue, type DirectEditContextValue, DirectEditDemo, DirectEditPanel, DirectEditPanelInner, type DirectEditPanelInnerProps, DirectEditProvider, DirectEditState, type DirectEditStateContextValue, DirectEditToolbar, DirectEditToolbarInner, type DirectEditToolbarInnerProps, DragState, DropIndicator, FlexPropertyKey, Guideline, MeasurementLine, MeasurementOverlay, type MeasurementOverlayProps, type MoveInfo, type MoveMode, MoveOverlay, type MoveOverlayProps, Rulers, RulersOverlay, SelectionOverlay, type SelectionOverlayProps, SessionEdit, SizingPropertyKey, SizingValue, SpacingPropertyKey, type StartDragOptions, Theme, TypographyProperties, TypographyPropertyKey, type UseGuidelinesResult, type UseMeasurementResult, type UseMoveDropTarget, type UseMoveOptions, type UseMoveResult, formatColorValue, getStoredGuidelines, useDirectEdit, useDirectEditActions, useDirectEditState, useGuidelines, useMeasurement, useMove, useRulersVisible };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { D as DragState, a as DropIndicator, S as SpacingPropertyKey, C as CSSPropertyValue, B as BorderRadiusPropertyKey, b as BorderPropertyKey, c as BorderProperties, F as FlexPropertyKey, d as SizingPropertyKey, e as SizingValue, f as ColorPropertyKey, g as ColorValue, T as TypographyPropertyKey, A as ActiveTool, h as Theme, i as BorderStyleControlPreference, j as DirectEditState, k as SessionEdit, l as SessionItem, m as TypographyProperties, M as MeasurementLine, G as Guideline, n as Comment } from './utils-
|
|
4
|
-
export { o as BorderRadiusProperties, p as BorderStyle, q as ColorProperties, r as CommentReply, s as DomSourceLocation, t as DropTarget, E as ElementInfo, u as ElementLocator, v as FlexProperties, w as MeasurementState, R as ReactComponentFrame, x as SizingMode, y as SizingProperties, z as SpacingProperties, U as UndoEditEntry, H as UndoEntry, I as UndoMoveEntry, J as UndoSelectionEntry, K as buildCommentExport, L as buildSessionExport, N as calculateDropPosition, O as calculateElementMeasurements, P as calculateGuidelineMeasurements, Q as calculateParentMeasurements, V as colorToTailwind, W as elementFromPointWithoutOverlays, X as findContainerAtPoint, Y as
|
|
3
|
+
import { D as DragState, a as DropIndicator, S as SpacingPropertyKey, C as CSSPropertyValue, B as BorderRadiusPropertyKey, b as BorderPropertyKey, c as BorderProperties, F as FlexPropertyKey, d as SizingPropertyKey, e as SizingValue, f as ColorPropertyKey, g as ColorValue, T as TypographyPropertyKey, A as ActiveTool, h as Theme, i as BorderStyleControlPreference, j as DirectEditState, k as SessionEdit, l as SessionItem, m as TypographyProperties, M as MeasurementLine, G as Guideline, n as Comment } from './utils-dcZIwXa7.js';
|
|
4
|
+
export { o as BorderRadiusProperties, p as BorderStyle, q as ColorProperties, r as CommentReply, s as DomSourceLocation, t as DropTarget, E as ElementInfo, u as ElementLocator, v as FlexProperties, w as MeasurementState, R as ReactComponentFrame, x as SizingMode, y as SizingProperties, z as SpacingProperties, U as UndoEditEntry, H as UndoEntry, I as UndoMoveEntry, J as UndoSelectionEntry, K as buildCommentExport, L as buildSessionExport, N as calculateDropPosition, O as calculateElementMeasurements, P as calculateGuidelineMeasurements, Q as calculateParentMeasurements, V as colorToTailwind, W as elementFromPointWithoutOverlays, X as findContainerAtPoint, Y as findLayoutContainerAtPoint, Z as formatPropertyValue, _ as getComputedBorderStyles, $ as getComputedBoxShadow, a0 as getComputedColorStyles, a1 as getComputedStyles, a2 as getDimensionDisplay, a3 as getElementInfo, a4 as getElementLocator, a5 as getFlexDirection, a6 as isFlexContainer, a7 as isLayoutContainer, a8 as parseColorValue, a9 as parsePropertyValue, aa as stylesToTailwind } from './utils-dcZIwXa7.js';
|
|
5
5
|
|
|
6
6
|
declare function DirectEdit(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
8
8
|
declare function DirectEditDemo(): react_jsx_runtime.JSX.Element;
|
|
9
9
|
|
|
10
|
+
type MoveMode = 'free' | 'reorder' | 'position';
|
|
10
11
|
interface MoveInfo {
|
|
11
12
|
originalParent: HTMLElement;
|
|
12
13
|
originalPreviousSibling: HTMLElement | null;
|
|
13
14
|
originalNextSibling: HTMLElement | null;
|
|
15
|
+
mode?: MoveMode;
|
|
16
|
+
positionDelta?: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
visualDelta?: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
/** When true, the element was reparented — clear any position/left/top inline styles from prior position-mode moves. */
|
|
25
|
+
resetPositionOffsets?: boolean;
|
|
14
26
|
}
|
|
15
27
|
interface UseMoveOptions {
|
|
16
28
|
onMoveComplete?: (element: HTMLElement, moveInfo: MoveInfo | null) => void;
|
|
@@ -22,6 +34,7 @@ interface UseMoveDropTarget {
|
|
|
22
34
|
}
|
|
23
35
|
interface StartDragOptions {
|
|
24
36
|
constrainToOriginalParent?: boolean;
|
|
37
|
+
mode?: MoveMode;
|
|
25
38
|
}
|
|
26
39
|
interface UseMoveResult {
|
|
27
40
|
dragState: DragState;
|
|
@@ -218,9 +231,6 @@ interface MeasurementOverlayProps {
|
|
|
218
231
|
}
|
|
219
232
|
declare function MeasurementOverlay({ selectedElement, hoveredElement, measurements, }: MeasurementOverlayProps): react_jsx_runtime.JSX.Element;
|
|
220
233
|
|
|
221
|
-
interface MoveStartOptions {
|
|
222
|
-
constrainToOriginalParent?: boolean;
|
|
223
|
-
}
|
|
224
234
|
interface SelectionOverlayProps {
|
|
225
235
|
selectedElement: HTMLElement;
|
|
226
236
|
draggedElement?: HTMLElement | null;
|
|
@@ -229,7 +239,7 @@ interface SelectionOverlayProps {
|
|
|
229
239
|
x: number;
|
|
230
240
|
y: number;
|
|
231
241
|
};
|
|
232
|
-
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?:
|
|
242
|
+
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?: StartDragOptions) => void;
|
|
233
243
|
showMoveHandle?: boolean;
|
|
234
244
|
activeTool?: ActiveTool;
|
|
235
245
|
isTextEditing?: boolean;
|
|
@@ -292,4 +302,4 @@ declare function CommentOverlay({ comments, activeCommentId, onSetActiveComment,
|
|
|
292
302
|
|
|
293
303
|
declare function formatColorValue(color: ColorValue): string;
|
|
294
304
|
|
|
295
|
-
export { ActiveTool, BorderProperties, BorderPropertyKey, BorderRadiusPropertyKey, CSSPropertyValue, ColorPropertyKey, ColorValue, Comment, CommentOverlay, type CommentOverlayProps, DirectEdit, type DirectEditActionsContextValue, type DirectEditContextValue, DirectEditDemo, DirectEditPanel, DirectEditPanelInner, type DirectEditPanelInnerProps, DirectEditProvider, DirectEditState, type DirectEditStateContextValue, DirectEditToolbar, DirectEditToolbarInner, type DirectEditToolbarInnerProps, DragState, DropIndicator, FlexPropertyKey, Guideline, MeasurementLine, MeasurementOverlay, type MeasurementOverlayProps, type MoveInfo, MoveOverlay, type MoveOverlayProps, Rulers, RulersOverlay, SelectionOverlay, type SelectionOverlayProps, SessionEdit, SizingPropertyKey, SizingValue, SpacingPropertyKey, Theme, TypographyProperties, TypographyPropertyKey, type UseGuidelinesResult, type UseMeasurementResult, type UseMoveDropTarget, type UseMoveOptions, type UseMoveResult, formatColorValue, getStoredGuidelines, useDirectEdit, useDirectEditActions, useDirectEditState, useGuidelines, useMeasurement, useMove, useRulersVisible };
|
|
305
|
+
export { ActiveTool, BorderProperties, BorderPropertyKey, BorderRadiusPropertyKey, CSSPropertyValue, ColorPropertyKey, ColorValue, Comment, CommentOverlay, type CommentOverlayProps, DirectEdit, type DirectEditActionsContextValue, type DirectEditContextValue, DirectEditDemo, DirectEditPanel, DirectEditPanelInner, type DirectEditPanelInnerProps, DirectEditProvider, DirectEditState, type DirectEditStateContextValue, DirectEditToolbar, DirectEditToolbarInner, type DirectEditToolbarInnerProps, DragState, DropIndicator, FlexPropertyKey, Guideline, MeasurementLine, MeasurementOverlay, type MeasurementOverlayProps, type MoveInfo, type MoveMode, MoveOverlay, type MoveOverlayProps, Rulers, RulersOverlay, SelectionOverlay, type SelectionOverlayProps, SessionEdit, SizingPropertyKey, SizingValue, SpacingPropertyKey, type StartDragOptions, Theme, TypographyProperties, TypographyPropertyKey, type UseGuidelinesResult, type UseMeasurementResult, type UseMoveDropTarget, type UseMoveOptions, type UseMoveResult, formatColorValue, getStoredGuidelines, useDirectEdit, useDirectEditActions, useDirectEditState, useGuidelines, useMeasurement, useMove, useRulersVisible };
|