@ohhwells/bridge 0.1.79 → 0.1.80-next.244
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.cjs +564 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +563 -216
- package/dist/index.js.map +1 -1
- package/dist/pages.cjs +141 -0
- package/dist/pages.cjs.map +1 -0
- package/dist/pages.d.cts +45 -0
- package/dist/pages.d.ts +45 -0
- package/dist/pages.js +107 -0
- package/dist/pages.js.map +1 -0
- package/dist/styles.css +508 -453
- package/package.json +8 -3
package/dist/index.d.cts
CHANGED
|
@@ -24,6 +24,8 @@ type AiBlockType = 'text' | 'button' | 'media' | 'media-list' | 'rating' | 'divi
|
|
|
24
24
|
interface AiBlockNode {
|
|
25
25
|
type: AiBlockType;
|
|
26
26
|
span: number;
|
|
27
|
+
/** Horizontal alignment of the block's content within its column. */
|
|
28
|
+
align?: 'left' | 'center' | 'right';
|
|
27
29
|
slots?: Record<string, unknown>;
|
|
28
30
|
children?: AiBlockNode[];
|
|
29
31
|
items?: Array<{
|
|
@@ -55,8 +57,10 @@ interface AiLayoutTree {
|
|
|
55
57
|
scaffold: SectionScaffold;
|
|
56
58
|
tag?: string;
|
|
57
59
|
settings?: AiSectionSettings;
|
|
60
|
+
/** A row's `align` sets the vertical alignment of its columns; `stretch` equalises heights. */
|
|
58
61
|
rows: Array<{
|
|
59
62
|
blocks: AiBlockNode[];
|
|
63
|
+
align?: 'top' | 'center' | 'bottom' | 'stretch';
|
|
60
64
|
}>;
|
|
61
65
|
}
|
|
62
66
|
/** The site brand kit the renderer styles from (editor Brand settings). */
|
|
@@ -139,6 +143,8 @@ declare function isRenderableTree(value: unknown): value is AiLayoutTree;
|
|
|
139
143
|
interface AiTreeRendererProps {
|
|
140
144
|
tree: AiLayoutTree;
|
|
141
145
|
brand?: AiBrandKit;
|
|
146
|
+
/** The host template's button corner radius (e.g. "0px", "8px"); a form's submit adopts it. */
|
|
147
|
+
buttonRadius?: string | null;
|
|
142
148
|
/** Resolves a media ref to a URL; null renders a placeholder. */
|
|
143
149
|
resolveMedia?: (ref: string) => string | null;
|
|
144
150
|
/**
|
|
@@ -148,7 +154,7 @@ interface AiTreeRendererProps {
|
|
|
148
154
|
*/
|
|
149
155
|
editKeyPrefix?: string;
|
|
150
156
|
}
|
|
151
|
-
declare function AiTreeRenderer({ tree, brand, resolveMedia, editKeyPrefix }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
157
|
+
declare function AiTreeRenderer({ tree, brand, buttonRadius, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
152
158
|
|
|
153
159
|
type LinkPage = {
|
|
154
160
|
path: string;
|
|
@@ -271,7 +277,7 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
|
|
|
271
277
|
notifyOnConnect?: boolean;
|
|
272
278
|
initialScheduleId?: string | null;
|
|
273
279
|
insertAfter?: string;
|
|
274
|
-
}): react_jsx_runtime.JSX.Element
|
|
280
|
+
}): react_jsx_runtime.JSX.Element;
|
|
275
281
|
|
|
276
282
|
declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
277
283
|
|
|
@@ -417,6 +423,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
|
|
|
417
423
|
hideArrow?: boolean;
|
|
418
424
|
}): react_jsx_runtime.JSX.Element;
|
|
419
425
|
|
|
426
|
+
interface EmptySectionProps {
|
|
427
|
+
title: string;
|
|
428
|
+
homeHref?: string;
|
|
429
|
+
/** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
|
|
430
|
+
eyebrowKey?: string;
|
|
431
|
+
titleKey?: string;
|
|
432
|
+
subtitleKey?: string;
|
|
433
|
+
}
|
|
434
|
+
declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
|
|
435
|
+
|
|
420
436
|
declare function isEditSessionActive(): boolean;
|
|
421
437
|
|
|
422
438
|
type CarouselSlide = {
|
|
@@ -440,4 +456,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
|
440
456
|
bind: Record<string, string>;
|
|
441
457
|
};
|
|
442
458
|
|
|
443
|
-
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, type SectionScaffold, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isRenderableTree, isValidUrl, parseTarget, toggleVariants, useOhwCarousel, validateUrlInput };
|
|
459
|
+
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptySection, type EmptySectionProps, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, type SectionScaffold, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isRenderableTree, isValidUrl, parseTarget, toggleVariants, useOhwCarousel, validateUrlInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ type AiBlockType = 'text' | 'button' | 'media' | 'media-list' | 'rating' | 'divi
|
|
|
24
24
|
interface AiBlockNode {
|
|
25
25
|
type: AiBlockType;
|
|
26
26
|
span: number;
|
|
27
|
+
/** Horizontal alignment of the block's content within its column. */
|
|
28
|
+
align?: 'left' | 'center' | 'right';
|
|
27
29
|
slots?: Record<string, unknown>;
|
|
28
30
|
children?: AiBlockNode[];
|
|
29
31
|
items?: Array<{
|
|
@@ -55,8 +57,10 @@ interface AiLayoutTree {
|
|
|
55
57
|
scaffold: SectionScaffold;
|
|
56
58
|
tag?: string;
|
|
57
59
|
settings?: AiSectionSettings;
|
|
60
|
+
/** A row's `align` sets the vertical alignment of its columns; `stretch` equalises heights. */
|
|
58
61
|
rows: Array<{
|
|
59
62
|
blocks: AiBlockNode[];
|
|
63
|
+
align?: 'top' | 'center' | 'bottom' | 'stretch';
|
|
60
64
|
}>;
|
|
61
65
|
}
|
|
62
66
|
/** The site brand kit the renderer styles from (editor Brand settings). */
|
|
@@ -139,6 +143,8 @@ declare function isRenderableTree(value: unknown): value is AiLayoutTree;
|
|
|
139
143
|
interface AiTreeRendererProps {
|
|
140
144
|
tree: AiLayoutTree;
|
|
141
145
|
brand?: AiBrandKit;
|
|
146
|
+
/** The host template's button corner radius (e.g. "0px", "8px"); a form's submit adopts it. */
|
|
147
|
+
buttonRadius?: string | null;
|
|
142
148
|
/** Resolves a media ref to a URL; null renders a placeholder. */
|
|
143
149
|
resolveMedia?: (ref: string) => string | null;
|
|
144
150
|
/**
|
|
@@ -148,7 +154,7 @@ interface AiTreeRendererProps {
|
|
|
148
154
|
*/
|
|
149
155
|
editKeyPrefix?: string;
|
|
150
156
|
}
|
|
151
|
-
declare function AiTreeRenderer({ tree, brand, resolveMedia, editKeyPrefix }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
157
|
+
declare function AiTreeRenderer({ tree, brand, buttonRadius, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
152
158
|
|
|
153
159
|
type LinkPage = {
|
|
154
160
|
path: string;
|
|
@@ -271,7 +277,7 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
|
|
|
271
277
|
notifyOnConnect?: boolean;
|
|
272
278
|
initialScheduleId?: string | null;
|
|
273
279
|
insertAfter?: string;
|
|
274
|
-
}): react_jsx_runtime.JSX.Element
|
|
280
|
+
}): react_jsx_runtime.JSX.Element;
|
|
275
281
|
|
|
276
282
|
declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
277
283
|
|
|
@@ -417,6 +423,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
|
|
|
417
423
|
hideArrow?: boolean;
|
|
418
424
|
}): react_jsx_runtime.JSX.Element;
|
|
419
425
|
|
|
426
|
+
interface EmptySectionProps {
|
|
427
|
+
title: string;
|
|
428
|
+
homeHref?: string;
|
|
429
|
+
/** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
|
|
430
|
+
eyebrowKey?: string;
|
|
431
|
+
titleKey?: string;
|
|
432
|
+
subtitleKey?: string;
|
|
433
|
+
}
|
|
434
|
+
declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
|
|
435
|
+
|
|
420
436
|
declare function isEditSessionActive(): boolean;
|
|
421
437
|
|
|
422
438
|
type CarouselSlide = {
|
|
@@ -440,4 +456,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
|
440
456
|
bind: Record<string, string>;
|
|
441
457
|
};
|
|
442
458
|
|
|
443
|
-
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, type SectionScaffold, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isRenderableTree, isValidUrl, parseTarget, toggleVariants, useOhwCarousel, validateUrlInput };
|
|
459
|
+
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptySection, type EmptySectionProps, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, type SectionScaffold, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isRenderableTree, isValidUrl, parseTarget, toggleVariants, useOhwCarousel, validateUrlInput };
|