@ohhwells/bridge 0.1.121 → 0.1.122-next.336
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 +2823 -468
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -2
- package/dist/index.d.ts +46 -2
- package/dist/index.js +2821 -467
- 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 +125 -8
- package/package.json +8 -3
package/dist/index.d.cts
CHANGED
|
@@ -72,6 +72,21 @@ interface AiLayoutTree {
|
|
|
72
72
|
align?: 'top' | 'center' | 'bottom' | 'stretch';
|
|
73
73
|
}>;
|
|
74
74
|
}
|
|
75
|
+
declare const BUTTON_FILL_TOKENS: readonly ["dark", "primary", "accent", "light"];
|
|
76
|
+
declare const BUTTON_STYLES: readonly ["solid", "outline", "ghost"];
|
|
77
|
+
declare const BUTTON_RADII: readonly ["square", "rounded", "pill"];
|
|
78
|
+
declare const BUTTON_SIZES: readonly ["s", "m", "l"];
|
|
79
|
+
interface ButtonStyle {
|
|
80
|
+
fill: (typeof BUTTON_FILL_TOKENS)[number];
|
|
81
|
+
textColor: (typeof BUTTON_FILL_TOKENS)[number];
|
|
82
|
+
style: (typeof BUTTON_STYLES)[number];
|
|
83
|
+
radius: (typeof BUTTON_RADII)[number];
|
|
84
|
+
size: (typeof BUTTON_SIZES)[number];
|
|
85
|
+
}
|
|
86
|
+
interface ButtonStyles {
|
|
87
|
+
primary: ButtonStyle;
|
|
88
|
+
secondary: ButtonStyle;
|
|
89
|
+
}
|
|
75
90
|
/** One uploaded weight file for a custom font family. */
|
|
76
91
|
interface AiCustomFontWeight {
|
|
77
92
|
weight: number;
|
|
@@ -105,7 +120,20 @@ interface AiBrandKit {
|
|
|
105
120
|
heading: string;
|
|
106
121
|
body: string;
|
|
107
122
|
};
|
|
123
|
+
/** Absent on a kit saved before OHH-791 — renderer falls back to today's hardcoded button look. */
|
|
124
|
+
buttons?: ButtonStyles;
|
|
108
125
|
customFonts?: AiCustomFont[];
|
|
126
|
+
/** Which parts the user actually set. Absent (kits saved before this field) = both, as ever;
|
|
127
|
+
* an unset part is a carried-over template snapshot and must not be written onto the page. */
|
|
128
|
+
touched?: {
|
|
129
|
+
palette?: boolean;
|
|
130
|
+
fonts?: boolean;
|
|
131
|
+
/** Per variant, the button fields the user set (fill, textColor, style, radius, size). */
|
|
132
|
+
buttons?: {
|
|
133
|
+
primary?: (keyof ButtonStyle)[];
|
|
134
|
+
secondary?: (keyof ButtonStyle)[];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
109
137
|
}
|
|
110
138
|
/**
|
|
111
139
|
* Shape, padding and typography measured off a host-template CTA, so generated buttons read as the
|
|
@@ -440,9 +468,15 @@ type ItemInteractionLayerProps = {
|
|
|
440
468
|
chromeGap?: number;
|
|
441
469
|
/** Toolbar alignment over the element; forms hang theirs on the left edge (OHH-642). */
|
|
442
470
|
toolbarAlign?: 'center' | 'left';
|
|
471
|
+
/**
|
|
472
|
+
* Parent-scroll hide. `applyToolbarPos` sets `display:none` on this node when the
|
|
473
|
+
* selection leaves the canvas; React will not clear that on the next selection unless
|
|
474
|
+
* we own `display` here (same node, same `display:block` in the prev VDOM).
|
|
475
|
+
*/
|
|
476
|
+
hidden?: boolean;
|
|
443
477
|
className?: string;
|
|
444
478
|
};
|
|
445
|
-
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, toolbarBelowRect, toolbarBelowEl, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, toolbarAlign, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
479
|
+
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, toolbarBelowRect, toolbarBelowEl, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, toolbarAlign, hidden, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
446
480
|
|
|
447
481
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime.JSX.Element;
|
|
448
482
|
/**
|
|
@@ -478,6 +512,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
|
|
|
478
512
|
hideArrow?: boolean;
|
|
479
513
|
}): react_jsx_runtime.JSX.Element;
|
|
480
514
|
|
|
515
|
+
interface EmptySectionProps {
|
|
516
|
+
title: string;
|
|
517
|
+
homeHref?: string;
|
|
518
|
+
/** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
|
|
519
|
+
eyebrowKey?: string;
|
|
520
|
+
titleKey?: string;
|
|
521
|
+
subtitleKey?: string;
|
|
522
|
+
}
|
|
523
|
+
declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
|
|
524
|
+
|
|
481
525
|
declare function isEditSessionActive(): boolean;
|
|
482
526
|
|
|
483
527
|
type CarouselSlide = {
|
|
@@ -501,4 +545,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
|
501
545
|
bind: Record<string, string>;
|
|
502
546
|
};
|
|
503
547
|
|
|
504
|
-
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 };
|
|
548
|
+
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
|
@@ -72,6 +72,21 @@ interface AiLayoutTree {
|
|
|
72
72
|
align?: 'top' | 'center' | 'bottom' | 'stretch';
|
|
73
73
|
}>;
|
|
74
74
|
}
|
|
75
|
+
declare const BUTTON_FILL_TOKENS: readonly ["dark", "primary", "accent", "light"];
|
|
76
|
+
declare const BUTTON_STYLES: readonly ["solid", "outline", "ghost"];
|
|
77
|
+
declare const BUTTON_RADII: readonly ["square", "rounded", "pill"];
|
|
78
|
+
declare const BUTTON_SIZES: readonly ["s", "m", "l"];
|
|
79
|
+
interface ButtonStyle {
|
|
80
|
+
fill: (typeof BUTTON_FILL_TOKENS)[number];
|
|
81
|
+
textColor: (typeof BUTTON_FILL_TOKENS)[number];
|
|
82
|
+
style: (typeof BUTTON_STYLES)[number];
|
|
83
|
+
radius: (typeof BUTTON_RADII)[number];
|
|
84
|
+
size: (typeof BUTTON_SIZES)[number];
|
|
85
|
+
}
|
|
86
|
+
interface ButtonStyles {
|
|
87
|
+
primary: ButtonStyle;
|
|
88
|
+
secondary: ButtonStyle;
|
|
89
|
+
}
|
|
75
90
|
/** One uploaded weight file for a custom font family. */
|
|
76
91
|
interface AiCustomFontWeight {
|
|
77
92
|
weight: number;
|
|
@@ -105,7 +120,20 @@ interface AiBrandKit {
|
|
|
105
120
|
heading: string;
|
|
106
121
|
body: string;
|
|
107
122
|
};
|
|
123
|
+
/** Absent on a kit saved before OHH-791 — renderer falls back to today's hardcoded button look. */
|
|
124
|
+
buttons?: ButtonStyles;
|
|
108
125
|
customFonts?: AiCustomFont[];
|
|
126
|
+
/** Which parts the user actually set. Absent (kits saved before this field) = both, as ever;
|
|
127
|
+
* an unset part is a carried-over template snapshot and must not be written onto the page. */
|
|
128
|
+
touched?: {
|
|
129
|
+
palette?: boolean;
|
|
130
|
+
fonts?: boolean;
|
|
131
|
+
/** Per variant, the button fields the user set (fill, textColor, style, radius, size). */
|
|
132
|
+
buttons?: {
|
|
133
|
+
primary?: (keyof ButtonStyle)[];
|
|
134
|
+
secondary?: (keyof ButtonStyle)[];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
109
137
|
}
|
|
110
138
|
/**
|
|
111
139
|
* Shape, padding and typography measured off a host-template CTA, so generated buttons read as the
|
|
@@ -440,9 +468,15 @@ type ItemInteractionLayerProps = {
|
|
|
440
468
|
chromeGap?: number;
|
|
441
469
|
/** Toolbar alignment over the element; forms hang theirs on the left edge (OHH-642). */
|
|
442
470
|
toolbarAlign?: 'center' | 'left';
|
|
471
|
+
/**
|
|
472
|
+
* Parent-scroll hide. `applyToolbarPos` sets `display:none` on this node when the
|
|
473
|
+
* selection leaves the canvas; React will not clear that on the next selection unless
|
|
474
|
+
* we own `display` here (same node, same `display:block` in the prev VDOM).
|
|
475
|
+
*/
|
|
476
|
+
hidden?: boolean;
|
|
443
477
|
className?: string;
|
|
444
478
|
};
|
|
445
|
-
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, toolbarBelowRect, toolbarBelowEl, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, toolbarAlign, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
479
|
+
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, toolbarBelowRect, toolbarBelowEl, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, toolbarAlign, hidden, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
446
480
|
|
|
447
481
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime.JSX.Element;
|
|
448
482
|
/**
|
|
@@ -478,6 +512,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
|
|
|
478
512
|
hideArrow?: boolean;
|
|
479
513
|
}): react_jsx_runtime.JSX.Element;
|
|
480
514
|
|
|
515
|
+
interface EmptySectionProps {
|
|
516
|
+
title: string;
|
|
517
|
+
homeHref?: string;
|
|
518
|
+
/** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
|
|
519
|
+
eyebrowKey?: string;
|
|
520
|
+
titleKey?: string;
|
|
521
|
+
subtitleKey?: string;
|
|
522
|
+
}
|
|
523
|
+
declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
|
|
524
|
+
|
|
481
525
|
declare function isEditSessionActive(): boolean;
|
|
482
526
|
|
|
483
527
|
type CarouselSlide = {
|
|
@@ -501,4 +545,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
|
501
545
|
bind: Record<string, string>;
|
|
502
546
|
};
|
|
503
547
|
|
|
504
|
-
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 };
|
|
548
|
+
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 };
|