made-refine 0.2.10 → 0.2.13

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 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 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';
3
+ import { D as DragState, a as DropIndicator, S as SelectElementOptions, b as SelectElementsOptions, c as SpacingPropertyKey, C as CSSPropertyValue, B as BorderRadiusPropertyKey, d as BorderPropertyKey, e as BorderProperties, F as FlexPropertyKey, f as SizingPropertyKey, g as SizingValue, h as SizingChangeOptions, i as ColorPropertyKey, j as ColorValue, T as TypographyPropertyKey, A as ActiveTool, k as Theme, l as BorderStyleControlPreference, m as DirectEditState, n as SessionEdit, o as SessionItem, p as CanvasElementKind, q as TypographyProperties, M as MeasurementLine, G as Guideline, r as Comment } from './utils-DvJ3xKrO.mjs';
4
+ export { s as BorderRadiusProperties, t as BorderStyle, u as ColorProperties, v as CommentReply, w as DomSourceLocation, x as DropTarget, E as ElementInfo, y as ElementLocator, z as FlexProperties, H as MeasurementState, R as ReactComponentFrame, I as SizingChangePhase, J as SizingMode, K as SizingProperties, L as SpacingProperties, U as UndoEditEntry, N as UndoEntry, O as UndoMoveEntry, P as UndoSelectionEntry, Q as buildCommentExport, V as buildSessionExport, W as calculateDropPosition, X as calculateElementMeasurements, Y as calculateGuidelineMeasurements, Z as calculateParentMeasurements, _ as colorToTailwind, $ as elementFromPointWithoutOverlays, a0 as findContainerAtPoint, a1 as findLayoutContainerAtPoint, a2 as formatPropertyValue, a3 as getComputedBorderStyles, a4 as getComputedBoxShadow, a5 as getComputedColorStyles, a6 as getComputedStyles, a7 as getDimensionDisplay, a8 as getElementInfo, a9 as getElementLocator, aa as getFlexDirection, ab as isFlexContainer, ac as isLayoutContainer, ad as parseColorValue, ae as parsePropertyValue, af as stylesToTailwind } from './utils-DvJ3xKrO.mjs';
5
5
 
6
6
  declare function DirectEdit(): react_jsx_runtime.JSX.Element;
7
7
 
@@ -45,7 +45,10 @@ interface UseMoveResult {
45
45
  declare function useMove({ onMoveComplete }: UseMoveOptions): UseMoveResult;
46
46
 
47
47
  interface DirectEditActionsContextValue {
48
- selectElement: (element: HTMLElement) => void;
48
+ selectElement: (element: HTMLElement, options?: SelectElementOptions) => void;
49
+ selectElements: (elements: HTMLElement[], options?: SelectElementsOptions) => void;
50
+ toggleElementSelection: (element: HTMLElement) => void;
51
+ clearSelection: () => void;
49
52
  selectParent: () => void;
50
53
  selectChild: () => void;
51
54
  closePanel: () => void;
@@ -94,6 +97,8 @@ interface DirectEditActionsContextValue {
94
97
  removeSessionEdit: (element: HTMLElement) => void;
95
98
  startTextEditing: (element: HTMLElement) => void;
96
99
  commitTextEditing: () => void;
100
+ groupSelection: () => void;
101
+ insertElement: (kind: CanvasElementKind) => void;
97
102
  toggleCanvas: () => void;
98
103
  setCanvasZoom: (zoom: number) => void;
99
104
  fitCanvasToViewport: () => void;
@@ -102,6 +107,7 @@ interface DirectEditActionsContextValue {
102
107
  interface DirectEditStateContextValue extends DirectEditState {
103
108
  agentAvailable: boolean;
104
109
  sessionEditCount: number;
110
+ multiSelectContextCount: number;
105
111
  }
106
112
  interface DirectEditContextValue extends DirectEditStateContextValue, DirectEditActionsContextValue {
107
113
  }
@@ -204,6 +210,8 @@ interface DirectEditToolbarInnerProps {
204
210
  theme?: Theme;
205
211
  onSetTheme?: (theme: Theme) => void;
206
212
  sessionEditCount?: number;
213
+ multiSelectCount?: number;
214
+ multiSelectedElements?: HTMLElement[];
207
215
  onGetSessionItems?: () => SessionItem[];
208
216
  onExportAllEdits?: () => Promise<boolean>;
209
217
  onSendAllToAgents?: () => Promise<boolean>;
@@ -219,7 +227,7 @@ interface DirectEditToolbarInnerProps {
219
227
  onZoomTo100?: () => void;
220
228
  onFitToViewport?: () => void;
221
229
  }
222
- declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool: _activeTool, onSetActiveTool: _onSetActiveTool, theme, onSetTheme, sessionEditCount, onGetSessionItems, onExportAllEdits, onSendAllToAgents, agentAvailable, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, canvasActive, canvasZoom, onToggleCanvas, onSetCanvasZoom, onZoomTo100, onFitToViewport, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
230
+ declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool: _activeTool, onSetActiveTool: _onSetActiveTool, theme, onSetTheme, sessionEditCount, multiSelectCount, multiSelectedElements, onGetSessionItems, onExportAllEdits, onSendAllToAgents, agentAvailable, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, canvasActive, canvasZoom, onToggleCanvas, onSetCanvasZoom, onZoomTo100, onFitToViewport, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
223
231
  declare function DirectEditToolbar(): react_jsx_runtime.JSX.Element | null;
224
232
 
225
233
  interface UseMeasurementResult {
@@ -317,4 +325,4 @@ declare function CommentOverlay({ comments, activeCommentId, onSetActiveComment,
317
325
 
318
326
  declare function formatColorValue(color: ColorValue): string;
319
327
 
320
- 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 };
328
+ export { ActiveTool, BorderProperties, BorderPropertyKey, BorderRadiusPropertyKey, CSSPropertyValue, CanvasElementKind, 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, SelectElementOptions, SelectElementsOptions, 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,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 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';
3
+ import { D as DragState, a as DropIndicator, S as SelectElementOptions, b as SelectElementsOptions, c as SpacingPropertyKey, C as CSSPropertyValue, B as BorderRadiusPropertyKey, d as BorderPropertyKey, e as BorderProperties, F as FlexPropertyKey, f as SizingPropertyKey, g as SizingValue, h as SizingChangeOptions, i as ColorPropertyKey, j as ColorValue, T as TypographyPropertyKey, A as ActiveTool, k as Theme, l as BorderStyleControlPreference, m as DirectEditState, n as SessionEdit, o as SessionItem, p as CanvasElementKind, q as TypographyProperties, M as MeasurementLine, G as Guideline, r as Comment } from './utils-DvJ3xKrO.js';
4
+ export { s as BorderRadiusProperties, t as BorderStyle, u as ColorProperties, v as CommentReply, w as DomSourceLocation, x as DropTarget, E as ElementInfo, y as ElementLocator, z as FlexProperties, H as MeasurementState, R as ReactComponentFrame, I as SizingChangePhase, J as SizingMode, K as SizingProperties, L as SpacingProperties, U as UndoEditEntry, N as UndoEntry, O as UndoMoveEntry, P as UndoSelectionEntry, Q as buildCommentExport, V as buildSessionExport, W as calculateDropPosition, X as calculateElementMeasurements, Y as calculateGuidelineMeasurements, Z as calculateParentMeasurements, _ as colorToTailwind, $ as elementFromPointWithoutOverlays, a0 as findContainerAtPoint, a1 as findLayoutContainerAtPoint, a2 as formatPropertyValue, a3 as getComputedBorderStyles, a4 as getComputedBoxShadow, a5 as getComputedColorStyles, a6 as getComputedStyles, a7 as getDimensionDisplay, a8 as getElementInfo, a9 as getElementLocator, aa as getFlexDirection, ab as isFlexContainer, ac as isLayoutContainer, ad as parseColorValue, ae as parsePropertyValue, af as stylesToTailwind } from './utils-DvJ3xKrO.js';
5
5
 
6
6
  declare function DirectEdit(): react_jsx_runtime.JSX.Element;
7
7
 
@@ -45,7 +45,10 @@ interface UseMoveResult {
45
45
  declare function useMove({ onMoveComplete }: UseMoveOptions): UseMoveResult;
46
46
 
47
47
  interface DirectEditActionsContextValue {
48
- selectElement: (element: HTMLElement) => void;
48
+ selectElement: (element: HTMLElement, options?: SelectElementOptions) => void;
49
+ selectElements: (elements: HTMLElement[], options?: SelectElementsOptions) => void;
50
+ toggleElementSelection: (element: HTMLElement) => void;
51
+ clearSelection: () => void;
49
52
  selectParent: () => void;
50
53
  selectChild: () => void;
51
54
  closePanel: () => void;
@@ -94,6 +97,8 @@ interface DirectEditActionsContextValue {
94
97
  removeSessionEdit: (element: HTMLElement) => void;
95
98
  startTextEditing: (element: HTMLElement) => void;
96
99
  commitTextEditing: () => void;
100
+ groupSelection: () => void;
101
+ insertElement: (kind: CanvasElementKind) => void;
97
102
  toggleCanvas: () => void;
98
103
  setCanvasZoom: (zoom: number) => void;
99
104
  fitCanvasToViewport: () => void;
@@ -102,6 +107,7 @@ interface DirectEditActionsContextValue {
102
107
  interface DirectEditStateContextValue extends DirectEditState {
103
108
  agentAvailable: boolean;
104
109
  sessionEditCount: number;
110
+ multiSelectContextCount: number;
105
111
  }
106
112
  interface DirectEditContextValue extends DirectEditStateContextValue, DirectEditActionsContextValue {
107
113
  }
@@ -204,6 +210,8 @@ interface DirectEditToolbarInnerProps {
204
210
  theme?: Theme;
205
211
  onSetTheme?: (theme: Theme) => void;
206
212
  sessionEditCount?: number;
213
+ multiSelectCount?: number;
214
+ multiSelectedElements?: HTMLElement[];
207
215
  onGetSessionItems?: () => SessionItem[];
208
216
  onExportAllEdits?: () => Promise<boolean>;
209
217
  onSendAllToAgents?: () => Promise<boolean>;
@@ -219,7 +227,7 @@ interface DirectEditToolbarInnerProps {
219
227
  onZoomTo100?: () => void;
220
228
  onFitToViewport?: () => void;
221
229
  }
222
- declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool: _activeTool, onSetActiveTool: _onSetActiveTool, theme, onSetTheme, sessionEditCount, onGetSessionItems, onExportAllEdits, onSendAllToAgents, agentAvailable, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, canvasActive, canvasZoom, onToggleCanvas, onSetCanvasZoom, onZoomTo100, onFitToViewport, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
230
+ declare function DirectEditToolbarInner({ editModeActive, onToggleEditMode, rulersVisible, onToggleRulers, activeTool: _activeTool, onSetActiveTool: _onSetActiveTool, theme, onSetTheme, sessionEditCount, multiSelectCount, multiSelectedElements, onGetSessionItems, onExportAllEdits, onSendAllToAgents, agentAvailable, onClearSessionEdits, onRemoveSessionEdit, onDeleteComment, className, canvasActive, canvasZoom, onToggleCanvas, onSetCanvasZoom, onZoomTo100, onFitToViewport, }: DirectEditToolbarInnerProps): react_jsx_runtime.JSX.Element;
223
231
  declare function DirectEditToolbar(): react_jsx_runtime.JSX.Element | null;
224
232
 
225
233
  interface UseMeasurementResult {
@@ -317,4 +325,4 @@ declare function CommentOverlay({ comments, activeCommentId, onSetActiveComment,
317
325
 
318
326
  declare function formatColorValue(color: ColorValue): string;
319
327
 
320
- 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 };
328
+ export { ActiveTool, BorderProperties, BorderPropertyKey, BorderRadiusPropertyKey, CSSPropertyValue, CanvasElementKind, 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, SelectElementOptions, SelectElementsOptions, 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 };