made-refine 0.2.1-beta.1 → 0.2.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/LICENSE.md +110 -0
- package/README.md +36 -20
- package/dist/index.d.mts +12 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +2910 -2289
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2879 -2263
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{utils-DUE0nsRc.d.mts → utils-BHGlXxF7.d.mts} +2 -1
- package/dist/{utils-DUE0nsRc.d.ts → utils-BHGlXxF7.d.ts} +2 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +7 -0
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +6 -0
- package/dist/utils.mjs.map +1 -1
- package/package.json +2 -2
- package/LICENSE +0 -21
package/LICENSE.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2025 Reza Ilmi
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under
|
|
92
|
+
the MIT license, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
+
the Software without restriction, including without limitation the rights to
|
|
97
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
+
so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -8,35 +8,51 @@ Visual CSS editor for React. Edit styles in the browser, then copy agent-ready e
|
|
|
8
8
|
<img src=".github/screenshot.png" alt="handmade visual editor" width="720" />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
- Edit spacing, colors, typography, borders, shadows, and layout visually
|
|
12
|
-
- Copies include component name, file path, and the exact changes — ready for Cursor or Claude Code
|
|
13
|
-
- One-command setup for Next.js, Vite, and TanStack Start
|
|
14
|
-
|
|
15
11
|
## Quick start
|
|
16
12
|
|
|
17
13
|
```bash
|
|
18
14
|
npx made-refine@latest init
|
|
19
15
|
```
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
1. Start your dev server.
|
|
26
|
-
2. Press **Cmd+.** (or **Ctrl+.**) to toggle edit mode.
|
|
27
|
-
3. Select an element, adjust styles, then copy edits to your AI agent.
|
|
17
|
+
Run this in your project folder. It detects your framework and applies the necessary config changes after your confirmation.
|
|
28
18
|
|
|
29
19
|
## How it works
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
1. **Start your dev server** as usual.
|
|
22
|
+
2. **Press `Cmd + .`** (or `Ctrl + .`) to open the editor right in the browser, on your running app.
|
|
23
|
+
3. **Click any element** on the page to select it.
|
|
24
|
+
4. **Edit visually** — adjust layout, spacing, radius, borders, shadows, colors, move elements, and edit text directly from the side panel. Undo anytime with `Cmd + Z`.
|
|
25
|
+
5. **Copy the changes** — edits are formatted with the component name, file path, and exact CSS changes so you can paste them straight into Cursor or Claude Code.
|
|
26
|
+
|
|
27
|
+
Your app keeps running normally. The editor floats on top and never touches your actual styles until you apply the changes through your AI coding agent.
|
|
28
|
+
|
|
29
|
+
## Adding handmade to your project
|
|
30
|
+
|
|
31
|
+
### Setup
|
|
32
|
+
|
|
33
|
+
1. **Open the terminal** in your project folder and run:
|
|
34
|
+
```bash
|
|
35
|
+
npx made-refine@latest init
|
|
36
|
+
```
|
|
37
|
+
2. **Review and confirm** the config changes when prompted. That's it — handmade is installed.
|
|
38
|
+
|
|
39
|
+
### Using the editor
|
|
40
|
+
|
|
41
|
+
1. **Start your dev server** and open the app in the browser.
|
|
42
|
+
2. **Press `Cmd + .`** on Mac (or `Ctrl + .` on Windows) to turn on the editor.
|
|
43
|
+
3. **Click any element** — a text block, a button, an image, anything on the page.
|
|
44
|
+
4. **Make your changes** using the side panel:
|
|
45
|
+
- **Layout** — adjust padding, margin, sizing, and flex alignment
|
|
46
|
+
- **Colors** — change background, text, border, and outline colors
|
|
47
|
+
- **Radius** — round corners individually or all at once
|
|
48
|
+
- **Borders** — set style, width, and color per side
|
|
49
|
+
- **Shadows** — add and layer drop shadows
|
|
50
|
+
- **Typography** — change font, size, weight, spacing, and alignment
|
|
51
|
+
- **Move** — drag elements to reposition them
|
|
52
|
+
- **Text** — press `Enter` on a text element to edit its content directly
|
|
53
|
+
5. **Undo** with `Cmd + Z`.
|
|
54
|
+
6. **Click the copy button** to grab your edits. Paste them into Cursor or Claude Code — the edit includes the file name and component so the AI knows exactly where to apply it.
|
|
39
55
|
|
|
40
56
|
## License
|
|
41
57
|
|
|
42
|
-
[MIT](./LICENSE)
|
|
58
|
+
[FSL-1.1-MIT](./LICENSE)
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
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 formatPropertyValue, Z as getComputedBorderStyles, _ as getComputedBoxShadow, $ as getComputedColorStyles, a0 as getComputedStyles, a1 as getDimensionDisplay, a2 as getElementInfo, a3 as getElementLocator, a4 as getFlexDirection, a5 as isFlexContainer, a6 as parseColorValue, a7 as parsePropertyValue, a8 as stylesToTailwind } from './utils-
|
|
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-BHGlXxF7.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 formatPropertyValue, Z as getComputedBorderStyles, _ as getComputedBoxShadow, $ as getComputedColorStyles, a0 as getComputedStyles, a1 as getDimensionDisplay, a2 as getElementInfo, a3 as getElementLocator, a4 as getFlexDirection, a5 as isFlexContainer, a6 as parseColorValue, a7 as parsePropertyValue, a8 as stylesToTailwind } from './utils-BHGlXxF7.mjs';
|
|
5
5
|
|
|
6
6
|
declare function DirectEdit(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
@@ -62,8 +62,13 @@ interface DirectEditActionsContextValue {
|
|
|
62
62
|
addCommentReply: (id: string, text: string) => void;
|
|
63
63
|
deleteComment: (id: string) => void;
|
|
64
64
|
exportComment: (id: string) => Promise<boolean>;
|
|
65
|
-
canSendEditToAgent: (
|
|
65
|
+
canSendEditToAgent: (snapshot?: {
|
|
66
|
+
selectedElement: HTMLElement | null;
|
|
67
|
+
elementInfo: DirectEditState['elementInfo'];
|
|
68
|
+
pendingStyles: Record<string, string>;
|
|
69
|
+
}) => boolean;
|
|
66
70
|
sendEditToAgent: () => Promise<boolean>;
|
|
71
|
+
sendAllSessionItemsToAgent: () => Promise<boolean>;
|
|
67
72
|
sendCommentToAgent: (id: string) => Promise<boolean>;
|
|
68
73
|
setActiveCommentId: (id: string | null) => void;
|
|
69
74
|
getSessionEdits: () => SessionEdit[];
|
|
@@ -159,8 +164,9 @@ interface DirectEditPanelInnerProps {
|
|
|
159
164
|
onHeaderPointerDown?: (e: React.PointerEvent) => void;
|
|
160
165
|
onHeaderPointerMove?: (e: React.PointerEvent) => void;
|
|
161
166
|
onHeaderPointerUp?: (e: React.PointerEvent) => void;
|
|
167
|
+
onHeaderPointerCancel?: (e: React.PointerEvent) => void;
|
|
162
168
|
}
|
|
163
|
-
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, }: DirectEditPanelInnerProps): react_jsx_runtime.JSX.Element;
|
|
169
|
+
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;
|
|
164
170
|
declare function DirectEditPanel(): react_jsx_runtime.JSX.Element | null;
|
|
165
171
|
|
|
166
172
|
interface DirectEditToolbarInnerProps {
|
|
@@ -175,12 +181,13 @@ interface DirectEditToolbarInnerProps {
|
|
|
175
181
|
sessionEditCount?: number;
|
|
176
182
|
onGetSessionItems?: () => SessionItem[];
|
|
177
183
|
onExportAllEdits?: () => Promise<boolean>;
|
|
184
|
+
onSendAllToAgents?: () => Promise<boolean>;
|
|
178
185
|
onClearSessionEdits?: () => void;
|
|
179
186
|
onRemoveSessionEdit?: (element: HTMLElement) => void;
|
|
180
187
|
onDeleteComment?: (id: string) => void;
|
|
181
188
|
className?: string;
|
|
182
189
|
}
|
|
183
|
-
declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool, onSetActiveTool, theme, onSetTheme, sessionEditCount, onGetSessionItems, onExportAllEdits, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
|
|
190
|
+
declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool, onSetActiveTool, theme, onSetTheme, sessionEditCount, onGetSessionItems, onExportAllEdits, onSendAllToAgents, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
|
|
184
191
|
declare function DirectEditToolbar(): react_jsx_runtime.JSX.Element | null;
|
|
185
192
|
|
|
186
193
|
interface UseMeasurementResult {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
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 formatPropertyValue, Z as getComputedBorderStyles, _ as getComputedBoxShadow, $ as getComputedColorStyles, a0 as getComputedStyles, a1 as getDimensionDisplay, a2 as getElementInfo, a3 as getElementLocator, a4 as getFlexDirection, a5 as isFlexContainer, a6 as parseColorValue, a7 as parsePropertyValue, a8 as stylesToTailwind } from './utils-
|
|
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-BHGlXxF7.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 formatPropertyValue, Z as getComputedBorderStyles, _ as getComputedBoxShadow, $ as getComputedColorStyles, a0 as getComputedStyles, a1 as getDimensionDisplay, a2 as getElementInfo, a3 as getElementLocator, a4 as getFlexDirection, a5 as isFlexContainer, a6 as parseColorValue, a7 as parsePropertyValue, a8 as stylesToTailwind } from './utils-BHGlXxF7.js';
|
|
5
5
|
|
|
6
6
|
declare function DirectEdit(): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
@@ -62,8 +62,13 @@ interface DirectEditActionsContextValue {
|
|
|
62
62
|
addCommentReply: (id: string, text: string) => void;
|
|
63
63
|
deleteComment: (id: string) => void;
|
|
64
64
|
exportComment: (id: string) => Promise<boolean>;
|
|
65
|
-
canSendEditToAgent: (
|
|
65
|
+
canSendEditToAgent: (snapshot?: {
|
|
66
|
+
selectedElement: HTMLElement | null;
|
|
67
|
+
elementInfo: DirectEditState['elementInfo'];
|
|
68
|
+
pendingStyles: Record<string, string>;
|
|
69
|
+
}) => boolean;
|
|
66
70
|
sendEditToAgent: () => Promise<boolean>;
|
|
71
|
+
sendAllSessionItemsToAgent: () => Promise<boolean>;
|
|
67
72
|
sendCommentToAgent: (id: string) => Promise<boolean>;
|
|
68
73
|
setActiveCommentId: (id: string | null) => void;
|
|
69
74
|
getSessionEdits: () => SessionEdit[];
|
|
@@ -159,8 +164,9 @@ interface DirectEditPanelInnerProps {
|
|
|
159
164
|
onHeaderPointerDown?: (e: React.PointerEvent) => void;
|
|
160
165
|
onHeaderPointerMove?: (e: React.PointerEvent) => void;
|
|
161
166
|
onHeaderPointerUp?: (e: React.PointerEvent) => void;
|
|
167
|
+
onHeaderPointerCancel?: (e: React.PointerEvent) => void;
|
|
162
168
|
}
|
|
163
|
-
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, }: DirectEditPanelInnerProps): react_jsx_runtime.JSX.Element;
|
|
169
|
+
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;
|
|
164
170
|
declare function DirectEditPanel(): react_jsx_runtime.JSX.Element | null;
|
|
165
171
|
|
|
166
172
|
interface DirectEditToolbarInnerProps {
|
|
@@ -175,12 +181,13 @@ interface DirectEditToolbarInnerProps {
|
|
|
175
181
|
sessionEditCount?: number;
|
|
176
182
|
onGetSessionItems?: () => SessionItem[];
|
|
177
183
|
onExportAllEdits?: () => Promise<boolean>;
|
|
184
|
+
onSendAllToAgents?: () => Promise<boolean>;
|
|
178
185
|
onClearSessionEdits?: () => void;
|
|
179
186
|
onRemoveSessionEdit?: (element: HTMLElement) => void;
|
|
180
187
|
onDeleteComment?: (id: string) => void;
|
|
181
188
|
className?: string;
|
|
182
189
|
}
|
|
183
|
-
declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool, onSetActiveTool, theme, onSetTheme, sessionEditCount, onGetSessionItems, onExportAllEdits, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
|
|
190
|
+
declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool, onSetActiveTool, theme, onSetTheme, sessionEditCount, onGetSessionItems, onExportAllEdits, onSendAllToAgents, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
|
|
184
191
|
declare function DirectEditToolbar(): react_jsx_runtime.JSX.Element | null;
|
|
185
192
|
|
|
186
193
|
interface UseMeasurementResult {
|