@ohhwells/bridge 0.1.40 → 0.1.42-next.100
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/README.md +12 -0
- package/dist/index.cjs +3003 -460
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -5
- package/dist/index.d.ts +51 -5
- package/dist/index.js +3010 -469
- package/dist/index.js.map +1 -1
- package/dist/styles.css +88 -73
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -132,8 +132,34 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
|
|
|
132
132
|
|
|
133
133
|
declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
134
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Visual drop-gap line for navbar / footer / repeater reorder.
|
|
137
|
+
* Figma: Custom/Drop Indicator (8140:1731) — CSS class `.ov-gap-line`
|
|
138
|
+
*
|
|
139
|
+
* Opacity (Figma docs):
|
|
140
|
+
* - default: 0 (hidden)
|
|
141
|
+
* - hover: 1
|
|
142
|
+
* - dragIdle: 0.4
|
|
143
|
+
* - dragActive: 1
|
|
144
|
+
*/
|
|
145
|
+
declare const dropIndicatorVariants: (props?: ({
|
|
146
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
147
|
+
state?: "default" | "hover" | "dragIdle" | "dragActive" | null | undefined;
|
|
148
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
149
|
+
type DropIndicatorProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof dropIndicatorVariants>;
|
|
150
|
+
declare const DropIndicator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
151
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
152
|
+
state?: "default" | "hover" | "dragIdle" | "dragActive" | null | undefined;
|
|
153
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Custom/Toolbar shell (Figma 7320:11058).
|
|
157
|
+
* One pill, two fills — text formatting or item actions. No hardcoded colors.
|
|
158
|
+
*/
|
|
135
159
|
declare const CustomToolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
160
|
+
/** Separators belong on the text-format fill only — not item-actions. */
|
|
136
161
|
declare function CustomToolbarDivider({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
162
|
+
/** Figma Toggle: 28×28, radius calc(var(--radius)-2px)=6px, icon 16. */
|
|
137
163
|
declare const CustomToolbarButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
138
164
|
active?: boolean;
|
|
139
165
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -145,11 +171,15 @@ type ItemActionToolbarProps = {
|
|
|
145
171
|
editLinkDisabled?: boolean;
|
|
146
172
|
addItemDisabled?: boolean;
|
|
147
173
|
moreDisabled?: boolean;
|
|
174
|
+
/** Hide Add item — CTA buttons only show Edit link (prototype). */
|
|
175
|
+
showAddItem?: boolean;
|
|
176
|
+
/** Hide More — CTA buttons only show Edit link (prototype). */
|
|
177
|
+
showMore?: boolean;
|
|
148
178
|
/** Tooltip placement relative to each icon — Figma uses bottom. */
|
|
149
179
|
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
150
180
|
};
|
|
151
|
-
/** Item-action fill for Custom/Toolbar — Edit link / Add item / More. */
|
|
152
|
-
declare function ItemActionToolbar({ onEditLink, onAddItem, onMore, editLinkDisabled, addItemDisabled, moreDisabled, tooltipSide, }: ItemActionToolbarProps): react_jsx_runtime.JSX.Element;
|
|
181
|
+
/** Item-action fill for Custom/Toolbar — Edit link / Add item / More (no separators). */
|
|
182
|
+
declare function ItemActionToolbar({ onEditLink, onAddItem, onMore, editLinkDisabled, addItemDisabled, moreDisabled, showAddItem, showMore, tooltipSide, }: ItemActionToolbarProps): react_jsx_runtime.JSX.Element;
|
|
153
183
|
|
|
154
184
|
type ItemInteractionState = 'default' | 'hover' | 'sibling-hint' | 'active-top' | 'active-bottom' | 'dragging';
|
|
155
185
|
type ItemInteractionLayerProps = {
|
|
@@ -163,16 +193,32 @@ type ItemInteractionLayerProps = {
|
|
|
163
193
|
dragHandleLabel?: string;
|
|
164
194
|
onDragHandleDragStart?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
165
195
|
onDragHandleDragEnd?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
196
|
+
/** Press on the item chrome (not handle/toolbar) — starts press-to-drag. */
|
|
197
|
+
onItemPointerDown?: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
198
|
+
/** Click on chrome without a drag — typically enter text edit. */
|
|
199
|
+
onItemClick?: (clientX: number, clientY: number) => void;
|
|
200
|
+
/**
|
|
201
|
+
* Full-bleed press-drag surface over the selection.
|
|
202
|
+
* Disable for footer column frames so child links keep grab cursor / hover.
|
|
203
|
+
*/
|
|
204
|
+
itemDragSurface?: boolean;
|
|
205
|
+
/** Gap between element and chrome border — Figma inset is 4px. */
|
|
166
206
|
chromeGap?: number;
|
|
167
207
|
className?: string;
|
|
168
208
|
};
|
|
169
|
-
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, chromeGap, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
209
|
+
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
170
210
|
|
|
171
211
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
172
212
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
173
213
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
174
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Tooltip content — CSS caret (not Radix Arrow) so `sideOffset` is the true
|
|
216
|
+
* trigger↔tooltip gap. Default 6px matches item-action toolbar AC.
|
|
217
|
+
*/
|
|
218
|
+
declare function TooltipContent({ className, sideOffset, side, children, hideArrow, ...props }: React.ComponentProps<typeof Tooltip$1.Content> & {
|
|
219
|
+
hideArrow?: boolean;
|
|
220
|
+
}): react_jsx_runtime.JSX.Element;
|
|
175
221
|
|
|
176
222
|
declare function isEditSessionActive(): boolean;
|
|
177
223
|
|
|
178
|
-
export { CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isValidUrl, parseTarget, toggleVariants, validateUrlInput };
|
|
224
|
+
export { CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isValidUrl, parseTarget, toggleVariants, validateUrlInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -132,8 +132,34 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
|
|
|
132
132
|
|
|
133
133
|
declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
134
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Visual drop-gap line for navbar / footer / repeater reorder.
|
|
137
|
+
* Figma: Custom/Drop Indicator (8140:1731) — CSS class `.ov-gap-line`
|
|
138
|
+
*
|
|
139
|
+
* Opacity (Figma docs):
|
|
140
|
+
* - default: 0 (hidden)
|
|
141
|
+
* - hover: 1
|
|
142
|
+
* - dragIdle: 0.4
|
|
143
|
+
* - dragActive: 1
|
|
144
|
+
*/
|
|
145
|
+
declare const dropIndicatorVariants: (props?: ({
|
|
146
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
147
|
+
state?: "default" | "hover" | "dragIdle" | "dragActive" | null | undefined;
|
|
148
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
149
|
+
type DropIndicatorProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof dropIndicatorVariants>;
|
|
150
|
+
declare const DropIndicator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
151
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
152
|
+
state?: "default" | "hover" | "dragIdle" | "dragActive" | null | undefined;
|
|
153
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Custom/Toolbar shell (Figma 7320:11058).
|
|
157
|
+
* One pill, two fills — text formatting or item actions. No hardcoded colors.
|
|
158
|
+
*/
|
|
135
159
|
declare const CustomToolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
160
|
+
/** Separators belong on the text-format fill only — not item-actions. */
|
|
136
161
|
declare function CustomToolbarDivider({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
162
|
+
/** Figma Toggle: 28×28, radius calc(var(--radius)-2px)=6px, icon 16. */
|
|
137
163
|
declare const CustomToolbarButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
138
164
|
active?: boolean;
|
|
139
165
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -145,11 +171,15 @@ type ItemActionToolbarProps = {
|
|
|
145
171
|
editLinkDisabled?: boolean;
|
|
146
172
|
addItemDisabled?: boolean;
|
|
147
173
|
moreDisabled?: boolean;
|
|
174
|
+
/** Hide Add item — CTA buttons only show Edit link (prototype). */
|
|
175
|
+
showAddItem?: boolean;
|
|
176
|
+
/** Hide More — CTA buttons only show Edit link (prototype). */
|
|
177
|
+
showMore?: boolean;
|
|
148
178
|
/** Tooltip placement relative to each icon — Figma uses bottom. */
|
|
149
179
|
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
150
180
|
};
|
|
151
|
-
/** Item-action fill for Custom/Toolbar — Edit link / Add item / More. */
|
|
152
|
-
declare function ItemActionToolbar({ onEditLink, onAddItem, onMore, editLinkDisabled, addItemDisabled, moreDisabled, tooltipSide, }: ItemActionToolbarProps): react_jsx_runtime.JSX.Element;
|
|
181
|
+
/** Item-action fill for Custom/Toolbar — Edit link / Add item / More (no separators). */
|
|
182
|
+
declare function ItemActionToolbar({ onEditLink, onAddItem, onMore, editLinkDisabled, addItemDisabled, moreDisabled, showAddItem, showMore, tooltipSide, }: ItemActionToolbarProps): react_jsx_runtime.JSX.Element;
|
|
153
183
|
|
|
154
184
|
type ItemInteractionState = 'default' | 'hover' | 'sibling-hint' | 'active-top' | 'active-bottom' | 'dragging';
|
|
155
185
|
type ItemInteractionLayerProps = {
|
|
@@ -163,16 +193,32 @@ type ItemInteractionLayerProps = {
|
|
|
163
193
|
dragHandleLabel?: string;
|
|
164
194
|
onDragHandleDragStart?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
165
195
|
onDragHandleDragEnd?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
196
|
+
/** Press on the item chrome (not handle/toolbar) — starts press-to-drag. */
|
|
197
|
+
onItemPointerDown?: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
198
|
+
/** Click on chrome without a drag — typically enter text edit. */
|
|
199
|
+
onItemClick?: (clientX: number, clientY: number) => void;
|
|
200
|
+
/**
|
|
201
|
+
* Full-bleed press-drag surface over the selection.
|
|
202
|
+
* Disable for footer column frames so child links keep grab cursor / hover.
|
|
203
|
+
*/
|
|
204
|
+
itemDragSurface?: boolean;
|
|
205
|
+
/** Gap between element and chrome border — Figma inset is 4px. */
|
|
166
206
|
chromeGap?: number;
|
|
167
207
|
className?: string;
|
|
168
208
|
};
|
|
169
|
-
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, chromeGap, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
209
|
+
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
170
210
|
|
|
171
211
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
172
212
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
173
213
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
174
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Tooltip content — CSS caret (not Radix Arrow) so `sideOffset` is the true
|
|
216
|
+
* trigger↔tooltip gap. Default 6px matches item-action toolbar AC.
|
|
217
|
+
*/
|
|
218
|
+
declare function TooltipContent({ className, sideOffset, side, children, hideArrow, ...props }: React.ComponentProps<typeof Tooltip$1.Content> & {
|
|
219
|
+
hideArrow?: boolean;
|
|
220
|
+
}): react_jsx_runtime.JSX.Element;
|
|
175
221
|
|
|
176
222
|
declare function isEditSessionActive(): boolean;
|
|
177
223
|
|
|
178
|
-
export { CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isValidUrl, parseTarget, toggleVariants, validateUrlInput };
|
|
224
|
+
export { CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isValidUrl, parseTarget, toggleVariants, validateUrlInput };
|