made-refine 0.2.6 → 0.2.8
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/cli.cjs +17 -3
- package/dist/index.d.mts +26 -9
- package/dist/index.d.ts +26 -9
- package/dist/index.js +3715 -1304
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3774 -1367
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{utils-C7RBdUAE.d.mts → utils-BGCQaaSf.d.mts} +121 -4
- package/dist/{utils-C7RBdUAE.d.ts → utils-BGCQaaSf.d.ts} +121 -4
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +822 -105
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +810 -105
- package/dist/utils.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -8337,7 +8337,13 @@ function getInstallCommand(pm) {
|
|
|
8337
8337
|
function detectFramework(cwd) {
|
|
8338
8338
|
const pkgPath = import_path2.default.join(cwd, "package.json");
|
|
8339
8339
|
if (!import_fs2.default.existsSync(pkgPath)) return null;
|
|
8340
|
-
|
|
8340
|
+
let pkg;
|
|
8341
|
+
try {
|
|
8342
|
+
pkg = JSON.parse(import_fs2.default.readFileSync(pkgPath, "utf-8"));
|
|
8343
|
+
} catch (err) {
|
|
8344
|
+
console.error(import_picocolors.default.red(`Failed to parse package.json: ${err instanceof Error ? err.message : err}`));
|
|
8345
|
+
return null;
|
|
8346
|
+
}
|
|
8341
8347
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
8342
8348
|
if (deps["@tanstack/start"] || deps["@tanstack/react-start"]) return "tanstack";
|
|
8343
8349
|
if (deps["next"]) return "next";
|
|
@@ -8793,7 +8799,7 @@ async function init() {
|
|
|
8793
8799
|
}
|
|
8794
8800
|
framework = selected;
|
|
8795
8801
|
}
|
|
8796
|
-
|
|
8802
|
+
installPackage(cwd);
|
|
8797
8803
|
switch (framework) {
|
|
8798
8804
|
case "next":
|
|
8799
8805
|
await setupNextJs(cwd);
|
|
@@ -8808,6 +8814,14 @@ async function init() {
|
|
|
8808
8814
|
console.log(import_picocolors.default.bold(import_picocolors.default.green("\n\u2713 Setup complete!")));
|
|
8809
8815
|
console.log(import_picocolors.default.dim(" Start your dev server and press Cmd+. (Ctrl+.) to toggle the editor.\n"));
|
|
8810
8816
|
}
|
|
8811
|
-
|
|
8817
|
+
function getPackageVersion() {
|
|
8818
|
+
try {
|
|
8819
|
+
const pkgJson = JSON.parse(import_fs2.default.readFileSync(import_path2.default.join(__dirname, "..", "package.json"), "utf-8"));
|
|
8820
|
+
return pkgJson.version ?? "0.0.0";
|
|
8821
|
+
} catch {
|
|
8822
|
+
return "0.0.0";
|
|
8823
|
+
}
|
|
8824
|
+
}
|
|
8825
|
+
program.name("made-refine").description("Visual CSS editor for React").version(getPackageVersion());
|
|
8812
8826
|
program.command("init").description("Set up made-refine in your project").action(init);
|
|
8813
8827
|
program.parse();
|
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
|
|
4
|
-
export {
|
|
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 SizingChangeOptions, g as ColorPropertyKey, h as ColorValue, T as TypographyPropertyKey, A as ActiveTool, i as Theme, j as BorderStyleControlPreference, k as DirectEditState, l as SessionEdit, m as SessionItem, n as TypographyProperties, M as MeasurementLine, G as Guideline, o as Comment } from './utils-BGCQaaSf.mjs';
|
|
4
|
+
export { p as BorderRadiusProperties, q as BorderStyle, r as ColorProperties, s as CommentReply, t as DomSourceLocation, u as DropTarget, E as ElementInfo, v as ElementLocator, w as FlexProperties, x as MeasurementState, R as ReactComponentFrame, y as SizingChangePhase, z as SizingMode, H as SizingProperties, I as SpacingProperties, U as UndoEditEntry, J as UndoEntry, K as UndoMoveEntry, L as UndoSelectionEntry, N as buildCommentExport, O as buildSessionExport, P as calculateDropPosition, Q as calculateElementMeasurements, V as calculateGuidelineMeasurements, W as calculateParentMeasurements, X as colorToTailwind, Y as elementFromPointWithoutOverlays, Z as findContainerAtPoint, _ as findLayoutContainerAtPoint, $ as formatPropertyValue, a0 as getComputedBorderStyles, a1 as getComputedBoxShadow, a2 as getComputedColorStyles, a3 as getComputedStyles, a4 as getDimensionDisplay, a5 as getElementInfo, a6 as getElementLocator, a7 as getFlexDirection, a8 as isFlexContainer, a9 as isLayoutContainer, aa as parseColorValue, ab as parsePropertyValue, ac as stylesToTailwind } from './utils-BGCQaaSf.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;
|
|
@@ -43,8 +56,10 @@ interface DirectEditActionsContextValue {
|
|
|
43
56
|
updateRawCSS: (properties: Record<string, string>) => void;
|
|
44
57
|
updateFlexProperty: (key: FlexPropertyKey, value: string) => void;
|
|
45
58
|
toggleFlexLayout: () => void;
|
|
59
|
+
updateSizingProperties: (changes: Partial<Record<SizingPropertyKey, SizingValue>>, options?: SizingChangeOptions) => void;
|
|
46
60
|
updateSizingProperty: (key: SizingPropertyKey, value: SizingValue) => void;
|
|
47
61
|
updateColorProperty: (key: ColorPropertyKey, value: ColorValue) => void;
|
|
62
|
+
replaceSelectionColor: (from: ColorValue, to: ColorValue) => void;
|
|
48
63
|
updateTypographyProperty: (key: TypographyPropertyKey, value: CSSPropertyValue | string) => void;
|
|
49
64
|
resetToOriginal: () => void;
|
|
50
65
|
exportEdits: () => Promise<boolean>;
|
|
@@ -140,6 +155,7 @@ interface DirectEditPanelInnerProps {
|
|
|
140
155
|
borderColor: ColorValue;
|
|
141
156
|
outlineColor: ColorValue;
|
|
142
157
|
} | null;
|
|
158
|
+
selectionColors?: ColorValue[];
|
|
143
159
|
computedBoxShadow?: string;
|
|
144
160
|
borderStyleControlPreference?: BorderStyleControlPreference;
|
|
145
161
|
computedTypography: TypographyProperties | null;
|
|
@@ -156,6 +172,8 @@ interface DirectEditPanelInnerProps {
|
|
|
156
172
|
onToggleFlex: () => void;
|
|
157
173
|
onUpdateSizing: (key: SizingPropertyKey, value: SizingValue) => void;
|
|
158
174
|
onUpdateColor: (key: ColorPropertyKey, value: ColorValue) => void;
|
|
175
|
+
onReplaceSelectionColor: (from: ColorValue, to: ColorValue) => void;
|
|
176
|
+
onSelectSelectionColorTarget?: (color: ColorValue) => void;
|
|
159
177
|
onUpdateTypography: (key: TypographyPropertyKey, value: CSSPropertyValue | string) => void;
|
|
160
178
|
onReset: () => void;
|
|
161
179
|
onExportEdits: () => Promise<boolean>;
|
|
@@ -170,7 +188,7 @@ interface DirectEditPanelInnerProps {
|
|
|
170
188
|
onHeaderPointerUp?: (e: React.PointerEvent) => void;
|
|
171
189
|
onHeaderPointerCancel?: (e: React.PointerEvent) => void;
|
|
172
190
|
}
|
|
173
|
-
declare function DirectEditPanelInner({ elementInfo, computedSpacing, computedBorderRadius, computedBorder, computedFlex, computedSizing, computedColor, computedBoxShadow, borderStyleControlPreference, computedTypography, pendingStyles, onClose, onSelectParent, onSelectChild, onUpdateSpacing, onUpdateBorderRadius, onUpdateBorder, onBatchUpdateBorder, onSetCSS, onUpdateFlex, onToggleFlex, onUpdateSizing, onUpdateColor, onUpdateTypography, onReset, onExportEdits, onSendToAgent, canSendToAgent, className, style, panelRef, isDragging, onHeaderPointerDown, onHeaderPointerMove, onHeaderPointerUp, onHeaderPointerCancel, }: DirectEditPanelInnerProps): react_jsx_runtime.JSX.Element;
|
|
191
|
+
declare function DirectEditPanelInner({ elementInfo, computedSpacing, computedBorderRadius, computedBorder, computedFlex, computedSizing, computedColor, selectionColors, computedBoxShadow, borderStyleControlPreference, computedTypography, pendingStyles, onClose, onSelectParent, onSelectChild, onUpdateSpacing, onUpdateBorderRadius, onUpdateBorder, onBatchUpdateBorder, onSetCSS, onUpdateFlex, onToggleFlex, onUpdateSizing, onUpdateColor, onReplaceSelectionColor, onSelectSelectionColorTarget, onUpdateTypography, onReset, onExportEdits, onSendToAgent, canSendToAgent, className, style, panelRef, isDragging, onHeaderPointerDown, onHeaderPointerMove, onHeaderPointerUp, onHeaderPointerCancel, }: DirectEditPanelInnerProps): react_jsx_runtime.JSX.Element;
|
|
174
192
|
declare function DirectEditPanel(): react_jsx_runtime.JSX.Element | null;
|
|
175
193
|
|
|
176
194
|
interface DirectEditToolbarInnerProps {
|
|
@@ -218,9 +236,6 @@ interface MeasurementOverlayProps {
|
|
|
218
236
|
}
|
|
219
237
|
declare function MeasurementOverlay({ selectedElement, hoveredElement, measurements, }: MeasurementOverlayProps): react_jsx_runtime.JSX.Element;
|
|
220
238
|
|
|
221
|
-
interface MoveStartOptions {
|
|
222
|
-
constrainToOriginalParent?: boolean;
|
|
223
|
-
}
|
|
224
239
|
interface SelectionOverlayProps {
|
|
225
240
|
selectedElement: HTMLElement;
|
|
226
241
|
draggedElement?: HTMLElement | null;
|
|
@@ -229,15 +244,17 @@ interface SelectionOverlayProps {
|
|
|
229
244
|
x: number;
|
|
230
245
|
y: number;
|
|
231
246
|
};
|
|
232
|
-
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?:
|
|
247
|
+
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?: StartDragOptions) => void;
|
|
233
248
|
showMoveHandle?: boolean;
|
|
234
249
|
activeTool?: ActiveTool;
|
|
235
250
|
isTextEditing?: boolean;
|
|
236
251
|
onDoubleClick?: (clientX: number, clientY: number) => void;
|
|
237
252
|
onHoverElement?: (element: HTMLElement | null) => void;
|
|
238
253
|
onClickThrough?: (clientX: number, clientY: number) => void;
|
|
254
|
+
enableResizeHandles?: boolean;
|
|
255
|
+
onResizeSizingChange?: (changes: Partial<Record<SizingPropertyKey, SizingValue>>, options?: SizingChangeOptions) => void;
|
|
239
256
|
}
|
|
240
|
-
declare function SelectionOverlay({ selectedElement, draggedElement, isDragging, ghostPosition, onMoveStart, showMoveHandle, activeTool, isTextEditing, onDoubleClick, onHoverElement, onClickThrough, }: SelectionOverlayProps): react_jsx_runtime.JSX.Element;
|
|
257
|
+
declare function SelectionOverlay({ selectedElement, draggedElement, isDragging, ghostPosition, onMoveStart, showMoveHandle, activeTool, isTextEditing, onDoubleClick, onHoverElement, onClickThrough, enableResizeHandles, onResizeSizingChange, }: SelectionOverlayProps): react_jsx_runtime.JSX.Element;
|
|
241
258
|
|
|
242
259
|
interface MoveOverlayProps {
|
|
243
260
|
dropIndicator: DropIndicator | null;
|
|
@@ -292,4 +309,4 @@ declare function CommentOverlay({ comments, activeCommentId, onSetActiveComment,
|
|
|
292
309
|
|
|
293
310
|
declare function formatColorValue(color: ColorValue): string;
|
|
294
311
|
|
|
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 };
|
|
312
|
+
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, SizingChangeOptions, 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
|
|
4
|
-
export {
|
|
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 SizingChangeOptions, g as ColorPropertyKey, h as ColorValue, T as TypographyPropertyKey, A as ActiveTool, i as Theme, j as BorderStyleControlPreference, k as DirectEditState, l as SessionEdit, m as SessionItem, n as TypographyProperties, M as MeasurementLine, G as Guideline, o as Comment } from './utils-BGCQaaSf.js';
|
|
4
|
+
export { p as BorderRadiusProperties, q as BorderStyle, r as ColorProperties, s as CommentReply, t as DomSourceLocation, u as DropTarget, E as ElementInfo, v as ElementLocator, w as FlexProperties, x as MeasurementState, R as ReactComponentFrame, y as SizingChangePhase, z as SizingMode, H as SizingProperties, I as SpacingProperties, U as UndoEditEntry, J as UndoEntry, K as UndoMoveEntry, L as UndoSelectionEntry, N as buildCommentExport, O as buildSessionExport, P as calculateDropPosition, Q as calculateElementMeasurements, V as calculateGuidelineMeasurements, W as calculateParentMeasurements, X as colorToTailwind, Y as elementFromPointWithoutOverlays, Z as findContainerAtPoint, _ as findLayoutContainerAtPoint, $ as formatPropertyValue, a0 as getComputedBorderStyles, a1 as getComputedBoxShadow, a2 as getComputedColorStyles, a3 as getComputedStyles, a4 as getDimensionDisplay, a5 as getElementInfo, a6 as getElementLocator, a7 as getFlexDirection, a8 as isFlexContainer, a9 as isLayoutContainer, aa as parseColorValue, ab as parsePropertyValue, ac as stylesToTailwind } from './utils-BGCQaaSf.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;
|
|
@@ -43,8 +56,10 @@ interface DirectEditActionsContextValue {
|
|
|
43
56
|
updateRawCSS: (properties: Record<string, string>) => void;
|
|
44
57
|
updateFlexProperty: (key: FlexPropertyKey, value: string) => void;
|
|
45
58
|
toggleFlexLayout: () => void;
|
|
59
|
+
updateSizingProperties: (changes: Partial<Record<SizingPropertyKey, SizingValue>>, options?: SizingChangeOptions) => void;
|
|
46
60
|
updateSizingProperty: (key: SizingPropertyKey, value: SizingValue) => void;
|
|
47
61
|
updateColorProperty: (key: ColorPropertyKey, value: ColorValue) => void;
|
|
62
|
+
replaceSelectionColor: (from: ColorValue, to: ColorValue) => void;
|
|
48
63
|
updateTypographyProperty: (key: TypographyPropertyKey, value: CSSPropertyValue | string) => void;
|
|
49
64
|
resetToOriginal: () => void;
|
|
50
65
|
exportEdits: () => Promise<boolean>;
|
|
@@ -140,6 +155,7 @@ interface DirectEditPanelInnerProps {
|
|
|
140
155
|
borderColor: ColorValue;
|
|
141
156
|
outlineColor: ColorValue;
|
|
142
157
|
} | null;
|
|
158
|
+
selectionColors?: ColorValue[];
|
|
143
159
|
computedBoxShadow?: string;
|
|
144
160
|
borderStyleControlPreference?: BorderStyleControlPreference;
|
|
145
161
|
computedTypography: TypographyProperties | null;
|
|
@@ -156,6 +172,8 @@ interface DirectEditPanelInnerProps {
|
|
|
156
172
|
onToggleFlex: () => void;
|
|
157
173
|
onUpdateSizing: (key: SizingPropertyKey, value: SizingValue) => void;
|
|
158
174
|
onUpdateColor: (key: ColorPropertyKey, value: ColorValue) => void;
|
|
175
|
+
onReplaceSelectionColor: (from: ColorValue, to: ColorValue) => void;
|
|
176
|
+
onSelectSelectionColorTarget?: (color: ColorValue) => void;
|
|
159
177
|
onUpdateTypography: (key: TypographyPropertyKey, value: CSSPropertyValue | string) => void;
|
|
160
178
|
onReset: () => void;
|
|
161
179
|
onExportEdits: () => Promise<boolean>;
|
|
@@ -170,7 +188,7 @@ interface DirectEditPanelInnerProps {
|
|
|
170
188
|
onHeaderPointerUp?: (e: React.PointerEvent) => void;
|
|
171
189
|
onHeaderPointerCancel?: (e: React.PointerEvent) => void;
|
|
172
190
|
}
|
|
173
|
-
declare function DirectEditPanelInner({ elementInfo, computedSpacing, computedBorderRadius, computedBorder, computedFlex, computedSizing, computedColor, computedBoxShadow, borderStyleControlPreference, computedTypography, pendingStyles, onClose, onSelectParent, onSelectChild, onUpdateSpacing, onUpdateBorderRadius, onUpdateBorder, onBatchUpdateBorder, onSetCSS, onUpdateFlex, onToggleFlex, onUpdateSizing, onUpdateColor, onUpdateTypography, onReset, onExportEdits, onSendToAgent, canSendToAgent, className, style, panelRef, isDragging, onHeaderPointerDown, onHeaderPointerMove, onHeaderPointerUp, onHeaderPointerCancel, }: DirectEditPanelInnerProps): react_jsx_runtime.JSX.Element;
|
|
191
|
+
declare function DirectEditPanelInner({ elementInfo, computedSpacing, computedBorderRadius, computedBorder, computedFlex, computedSizing, computedColor, selectionColors, computedBoxShadow, borderStyleControlPreference, computedTypography, pendingStyles, onClose, onSelectParent, onSelectChild, onUpdateSpacing, onUpdateBorderRadius, onUpdateBorder, onBatchUpdateBorder, onSetCSS, onUpdateFlex, onToggleFlex, onUpdateSizing, onUpdateColor, onReplaceSelectionColor, onSelectSelectionColorTarget, onUpdateTypography, onReset, onExportEdits, onSendToAgent, canSendToAgent, className, style, panelRef, isDragging, onHeaderPointerDown, onHeaderPointerMove, onHeaderPointerUp, onHeaderPointerCancel, }: DirectEditPanelInnerProps): react_jsx_runtime.JSX.Element;
|
|
174
192
|
declare function DirectEditPanel(): react_jsx_runtime.JSX.Element | null;
|
|
175
193
|
|
|
176
194
|
interface DirectEditToolbarInnerProps {
|
|
@@ -218,9 +236,6 @@ interface MeasurementOverlayProps {
|
|
|
218
236
|
}
|
|
219
237
|
declare function MeasurementOverlay({ selectedElement, hoveredElement, measurements, }: MeasurementOverlayProps): react_jsx_runtime.JSX.Element;
|
|
220
238
|
|
|
221
|
-
interface MoveStartOptions {
|
|
222
|
-
constrainToOriginalParent?: boolean;
|
|
223
|
-
}
|
|
224
239
|
interface SelectionOverlayProps {
|
|
225
240
|
selectedElement: HTMLElement;
|
|
226
241
|
draggedElement?: HTMLElement | null;
|
|
@@ -229,15 +244,17 @@ interface SelectionOverlayProps {
|
|
|
229
244
|
x: number;
|
|
230
245
|
y: number;
|
|
231
246
|
};
|
|
232
|
-
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?:
|
|
247
|
+
onMoveStart: (e: React.PointerEvent, targetElement?: HTMLElement, options?: StartDragOptions) => void;
|
|
233
248
|
showMoveHandle?: boolean;
|
|
234
249
|
activeTool?: ActiveTool;
|
|
235
250
|
isTextEditing?: boolean;
|
|
236
251
|
onDoubleClick?: (clientX: number, clientY: number) => void;
|
|
237
252
|
onHoverElement?: (element: HTMLElement | null) => void;
|
|
238
253
|
onClickThrough?: (clientX: number, clientY: number) => void;
|
|
254
|
+
enableResizeHandles?: boolean;
|
|
255
|
+
onResizeSizingChange?: (changes: Partial<Record<SizingPropertyKey, SizingValue>>, options?: SizingChangeOptions) => void;
|
|
239
256
|
}
|
|
240
|
-
declare function SelectionOverlay({ selectedElement, draggedElement, isDragging, ghostPosition, onMoveStart, showMoveHandle, activeTool, isTextEditing, onDoubleClick, onHoverElement, onClickThrough, }: SelectionOverlayProps): react_jsx_runtime.JSX.Element;
|
|
257
|
+
declare function SelectionOverlay({ selectedElement, draggedElement, isDragging, ghostPosition, onMoveStart, showMoveHandle, activeTool, isTextEditing, onDoubleClick, onHoverElement, onClickThrough, enableResizeHandles, onResizeSizingChange, }: SelectionOverlayProps): react_jsx_runtime.JSX.Element;
|
|
241
258
|
|
|
242
259
|
interface MoveOverlayProps {
|
|
243
260
|
dropIndicator: DropIndicator | null;
|
|
@@ -292,4 +309,4 @@ declare function CommentOverlay({ comments, activeCommentId, onSetActiveComment,
|
|
|
292
309
|
|
|
293
310
|
declare function formatColorValue(color: ColorValue): string;
|
|
294
311
|
|
|
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 };
|
|
312
|
+
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, SizingChangeOptions, 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 };
|