@ohhwells/bridge 0.1.39-next.77 → 0.1.40
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 +1 -13
- package/dist/index.cjs +543 -1800
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -48
- package/dist/index.d.ts +3 -48
- package/dist/index.js +493 -1747
- package/dist/index.js.map +1 -1
- package/dist/styles.css +18 -42
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -132,26 +132,6 @@ 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
135
|
declare const CustomToolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
156
136
|
declare function CustomToolbarDivider({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
157
137
|
declare const CustomToolbarButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
@@ -176,21 +156,17 @@ type ItemInteractionLayerProps = {
|
|
|
176
156
|
rect: DOMRect;
|
|
177
157
|
state: ItemInteractionState;
|
|
178
158
|
elRef?: React.Ref<HTMLDivElement>;
|
|
179
|
-
/** Slotted Custom/Toolbar instance (item-action or other fill).
|
|
159
|
+
/** Slotted Custom/Toolbar instance (item-action or other fill). */
|
|
180
160
|
toolbar?: React.ReactNode;
|
|
181
161
|
showHandle?: boolean;
|
|
182
162
|
dragDisabled?: boolean;
|
|
183
163
|
dragHandleLabel?: string;
|
|
184
164
|
onDragHandleDragStart?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
185
165
|
onDragHandleDragEnd?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
186
|
-
/** Press on the item chrome (not handle/toolbar) — starts press-to-drag. */
|
|
187
|
-
onItemPointerDown?: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
188
|
-
/** Click on chrome without a drag — typically enter text edit. */
|
|
189
|
-
onItemClick?: (clientX: number, clientY: number) => void;
|
|
190
166
|
chromeGap?: number;
|
|
191
167
|
className?: string;
|
|
192
168
|
};
|
|
193
|
-
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd,
|
|
169
|
+
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, chromeGap, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
194
170
|
|
|
195
171
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
196
172
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -199,25 +175,4 @@ declare function TooltipContent({ className, sideOffset, side, children, ...prop
|
|
|
199
175
|
|
|
200
176
|
declare function isEditSessionActive(): boolean;
|
|
201
177
|
|
|
202
|
-
type
|
|
203
|
-
src: string;
|
|
204
|
-
alt: string;
|
|
205
|
-
};
|
|
206
|
-
/**
|
|
207
|
-
* Template hook. Owns the slide array in React state, stamps the DOM contract via `bind`, and
|
|
208
|
-
* listens for the bridge's change event so replace/add/delete re-render the component.
|
|
209
|
-
*
|
|
210
|
-
* `bind` is plain data attributes (no ref), so it spreads onto any element type without type
|
|
211
|
-
* friction; the hook finds its own container by key. Slides inside still need
|
|
212
|
-
* `data-ohw-carousel-slide={i}`.
|
|
213
|
-
*
|
|
214
|
-
* const { images, bind } = useOhwCarousel('hero-carousel', content.images)
|
|
215
|
-
* <div {...bind}>{images.map((img, i) => <Slide data-ohw-carousel-slide={i} … />)}</div>
|
|
216
|
-
*/
|
|
217
|
-
declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
218
|
-
images: CarouselSlide[];
|
|
219
|
-
setImages: React.Dispatch<React.SetStateAction<CarouselSlide[]>>;
|
|
220
|
-
bind: Record<string, string>;
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
export { type CarouselSlide, 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, useOhwCarousel, validateUrlInput };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -132,26 +132,6 @@ 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
135
|
declare const CustomToolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
156
136
|
declare function CustomToolbarDivider({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
157
137
|
declare const CustomToolbarButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
@@ -176,21 +156,17 @@ type ItemInteractionLayerProps = {
|
|
|
176
156
|
rect: DOMRect;
|
|
177
157
|
state: ItemInteractionState;
|
|
178
158
|
elRef?: React.Ref<HTMLDivElement>;
|
|
179
|
-
/** Slotted Custom/Toolbar instance (item-action or other fill).
|
|
159
|
+
/** Slotted Custom/Toolbar instance (item-action or other fill). */
|
|
180
160
|
toolbar?: React.ReactNode;
|
|
181
161
|
showHandle?: boolean;
|
|
182
162
|
dragDisabled?: boolean;
|
|
183
163
|
dragHandleLabel?: string;
|
|
184
164
|
onDragHandleDragStart?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
185
165
|
onDragHandleDragEnd?: (e: React.DragEvent<HTMLButtonElement>) => void;
|
|
186
|
-
/** Press on the item chrome (not handle/toolbar) — starts press-to-drag. */
|
|
187
|
-
onItemPointerDown?: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
188
|
-
/** Click on chrome without a drag — typically enter text edit. */
|
|
189
|
-
onItemClick?: (clientX: number, clientY: number) => void;
|
|
190
166
|
chromeGap?: number;
|
|
191
167
|
className?: string;
|
|
192
168
|
};
|
|
193
|
-
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd,
|
|
169
|
+
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, chromeGap, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
194
170
|
|
|
195
171
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
196
172
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -199,25 +175,4 @@ declare function TooltipContent({ className, sideOffset, side, children, ...prop
|
|
|
199
175
|
|
|
200
176
|
declare function isEditSessionActive(): boolean;
|
|
201
177
|
|
|
202
|
-
type
|
|
203
|
-
src: string;
|
|
204
|
-
alt: string;
|
|
205
|
-
};
|
|
206
|
-
/**
|
|
207
|
-
* Template hook. Owns the slide array in React state, stamps the DOM contract via `bind`, and
|
|
208
|
-
* listens for the bridge's change event so replace/add/delete re-render the component.
|
|
209
|
-
*
|
|
210
|
-
* `bind` is plain data attributes (no ref), so it spreads onto any element type without type
|
|
211
|
-
* friction; the hook finds its own container by key. Slides inside still need
|
|
212
|
-
* `data-ohw-carousel-slide={i}`.
|
|
213
|
-
*
|
|
214
|
-
* const { images, bind } = useOhwCarousel('hero-carousel', content.images)
|
|
215
|
-
* <div {...bind}>{images.map((img, i) => <Slide data-ohw-carousel-slide={i} … />)}</div>
|
|
216
|
-
*/
|
|
217
|
-
declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
218
|
-
images: CarouselSlide[];
|
|
219
|
-
setImages: React.Dispatch<React.SetStateAction<CarouselSlide[]>>;
|
|
220
|
-
bind: Record<string, string>;
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
export { type CarouselSlide, 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, useOhwCarousel, validateUrlInput };
|
|
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 };
|