@ohhwells/bridge 0.1.86 → 0.1.87-next.261

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.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). */
@@ -72,6 +76,20 @@ interface AiBrandKit {
72
76
  body: string;
73
77
  };
74
78
  }
79
+ /**
80
+ * Shape, padding and typography measured off a host-template CTA, so generated buttons read as the
81
+ * site's own button rather than a default. Colour stays brand-driven (band-aware); everything here
82
+ * follows the template button. Null when the page has no template button to measure.
83
+ */
84
+ interface TemplateButtonStyle {
85
+ radius: string;
86
+ padding: string;
87
+ fontFamily: string;
88
+ fontSize: string;
89
+ fontWeight: string;
90
+ letterSpacing: string;
91
+ textTransform: string;
92
+ }
75
93
  /** Section System defaults — used when a site has no brand kit override. */
76
94
  declare const AI_DEFAULT_BRAND: AiBrandKit;
77
95
  /** Design tokens from the Section System Blocks page (px unless noted). */
@@ -139,8 +157,8 @@ declare function isRenderableTree(value: unknown): value is AiLayoutTree;
139
157
  interface AiTreeRendererProps {
140
158
  tree: AiLayoutTree;
141
159
  brand?: AiBrandKit;
142
- /** The host template's button corner radius (e.g. "0px", "8px"); a form's submit adopts it. */
143
- buttonRadius?: string | null;
160
+ /** The host template's button shape/padding/typography; generated CTAs adopt it. */
161
+ buttonStyle?: TemplateButtonStyle | null;
144
162
  /** Resolves a media ref to a URL; null renders a placeholder. */
145
163
  resolveMedia?: (ref: string) => string | null;
146
164
  /**
@@ -150,7 +168,7 @@ interface AiTreeRendererProps {
150
168
  */
151
169
  editKeyPrefix?: string;
152
170
  }
153
- declare function AiTreeRenderer({ tree, brand, buttonRadius, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
171
+ declare function AiTreeRenderer({ tree, brand, buttonStyle, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
154
172
 
155
173
  type LinkPage = {
156
174
  path: string;
@@ -419,6 +437,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
419
437
  hideArrow?: boolean;
420
438
  }): react_jsx_runtime.JSX.Element;
421
439
 
440
+ interface EmptySectionProps {
441
+ title: string;
442
+ homeHref?: string;
443
+ /** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
444
+ eyebrowKey?: string;
445
+ titleKey?: string;
446
+ subtitleKey?: string;
447
+ }
448
+ declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
449
+
422
450
  declare function isEditSessionActive(): boolean;
423
451
 
424
452
  type CarouselSlide = {
@@ -442,4 +470,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
442
470
  bind: Record<string, string>;
443
471
  };
444
472
 
445
- 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 };
473
+ 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). */
@@ -72,6 +76,20 @@ interface AiBrandKit {
72
76
  body: string;
73
77
  };
74
78
  }
79
+ /**
80
+ * Shape, padding and typography measured off a host-template CTA, so generated buttons read as the
81
+ * site's own button rather than a default. Colour stays brand-driven (band-aware); everything here
82
+ * follows the template button. Null when the page has no template button to measure.
83
+ */
84
+ interface TemplateButtonStyle {
85
+ radius: string;
86
+ padding: string;
87
+ fontFamily: string;
88
+ fontSize: string;
89
+ fontWeight: string;
90
+ letterSpacing: string;
91
+ textTransform: string;
92
+ }
75
93
  /** Section System defaults — used when a site has no brand kit override. */
76
94
  declare const AI_DEFAULT_BRAND: AiBrandKit;
77
95
  /** Design tokens from the Section System Blocks page (px unless noted). */
@@ -139,8 +157,8 @@ declare function isRenderableTree(value: unknown): value is AiLayoutTree;
139
157
  interface AiTreeRendererProps {
140
158
  tree: AiLayoutTree;
141
159
  brand?: AiBrandKit;
142
- /** The host template's button corner radius (e.g. "0px", "8px"); a form's submit adopts it. */
143
- buttonRadius?: string | null;
160
+ /** The host template's button shape/padding/typography; generated CTAs adopt it. */
161
+ buttonStyle?: TemplateButtonStyle | null;
144
162
  /** Resolves a media ref to a URL; null renders a placeholder. */
145
163
  resolveMedia?: (ref: string) => string | null;
146
164
  /**
@@ -150,7 +168,7 @@ interface AiTreeRendererProps {
150
168
  */
151
169
  editKeyPrefix?: string;
152
170
  }
153
- declare function AiTreeRenderer({ tree, brand, buttonRadius, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
171
+ declare function AiTreeRenderer({ tree, brand, buttonStyle, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
154
172
 
155
173
  type LinkPage = {
156
174
  path: string;
@@ -419,6 +437,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
419
437
  hideArrow?: boolean;
420
438
  }): react_jsx_runtime.JSX.Element;
421
439
 
440
+ interface EmptySectionProps {
441
+ title: string;
442
+ homeHref?: string;
443
+ /** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
444
+ eyebrowKey?: string;
445
+ titleKey?: string;
446
+ subtitleKey?: string;
447
+ }
448
+ declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
449
+
422
450
  declare function isEditSessionActive(): boolean;
423
451
 
424
452
  type CarouselSlide = {
@@ -442,4 +470,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
442
470
  bind: Record<string, string>;
443
471
  };
444
472
 
445
- 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 };
473
+ 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 };