@ohhwells/bridge 0.1.92 → 0.1.93-next.281

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
@@ -63,6 +63,27 @@ interface AiLayoutTree {
63
63
  align?: 'top' | 'center' | 'bottom' | 'stretch';
64
64
  }>;
65
65
  }
66
+ /** One uploaded weight file for a custom font family. */
67
+ interface AiCustomFontWeight {
68
+ weight: number;
69
+ /** Present when the file is a variable font with a `wght` axis — `weight` is the axis min,
70
+ * `weightEnd` the axis max, together spanning every weight the one file actually covers. */
71
+ weightEnd?: number;
72
+ url: string;
73
+ format: 'woff2' | 'woff' | 'truetype' | 'opentype';
74
+ }
75
+ /**
76
+ * A custom (non-Google) font family, grouped by its uploaded weight files so a bold heading
77
+ * actually resolves to a real bold file instead of the browser synthesizing fake bold from
78
+ * whichever single weight happens to be present.
79
+ */
80
+ interface AiCustomFont {
81
+ /** Collision-proof internal family name — what `fonts.heading`/`fonts.body` actually reference. */
82
+ family: string;
83
+ /** Human-readable name shown in the picker; hidden everywhere the internal `family` is used. */
84
+ label: string;
85
+ weights: AiCustomFontWeight[];
86
+ }
66
87
  /** The site brand kit the renderer styles from (editor Brand settings). */
67
88
  interface AiBrandKit {
68
89
  palette: {
@@ -75,6 +96,26 @@ interface AiBrandKit {
75
96
  heading: string;
76
97
  body: string;
77
98
  };
99
+ customFonts?: AiCustomFont[];
100
+ }
101
+ /**
102
+ * Shape, padding and typography measured off a host-template CTA, so generated buttons read as the
103
+ * site's own button rather than a default. Colour stays brand-driven (band-aware); everything here
104
+ * follows the template button. Null when the page has no template button to measure.
105
+ */
106
+ interface TemplateButtonStyle {
107
+ radius: string;
108
+ padding: string;
109
+ fontFamily: string;
110
+ fontSize: string;
111
+ fontWeight: string;
112
+ letterSpacing: string;
113
+ textTransform: string;
114
+ /** Measured fill/label pair of the template's primary CTA — a template may fill its buttons
115
+ * with any token (hvac uses accent, not primary), so the pair travels together. Absent when
116
+ * the page's only buttons are unfilled (ghost/outline). */
117
+ background?: string;
118
+ color?: string;
78
119
  }
79
120
  /** Section System defaults — used when a site has no brand kit override. */
80
121
  declare const AI_DEFAULT_BRAND: AiBrandKit;
@@ -143,8 +184,8 @@ declare function isRenderableTree(value: unknown): value is AiLayoutTree;
143
184
  interface AiTreeRendererProps {
144
185
  tree: AiLayoutTree;
145
186
  brand?: AiBrandKit;
146
- /** The host template's button corner radius (e.g. "0px", "8px"); a form's submit adopts it. */
147
- buttonRadius?: string | null;
187
+ /** The host template's button shape/padding/typography; generated CTAs adopt it. */
188
+ buttonStyle?: TemplateButtonStyle | null;
148
189
  /** Resolves a media ref to a URL; null renders a placeholder. */
149
190
  resolveMedia?: (ref: string) => string | null;
150
191
  /**
@@ -154,7 +195,7 @@ interface AiTreeRendererProps {
154
195
  */
155
196
  editKeyPrefix?: string;
156
197
  }
157
- declare function AiTreeRenderer({ tree, brand, buttonRadius, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
198
+ declare function AiTreeRenderer({ tree, brand, buttonStyle, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
158
199
 
159
200
  type LinkPage = {
160
201
  path: string;
@@ -423,6 +464,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
423
464
  hideArrow?: boolean;
424
465
  }): react_jsx_runtime.JSX.Element;
425
466
 
467
+ interface EmptySectionProps {
468
+ title: string;
469
+ homeHref?: string;
470
+ /** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
471
+ eyebrowKey?: string;
472
+ titleKey?: string;
473
+ subtitleKey?: string;
474
+ }
475
+ declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
476
+
426
477
  declare function isEditSessionActive(): boolean;
427
478
 
428
479
  type CarouselSlide = {
@@ -446,4 +497,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
446
497
  bind: Record<string, string>;
447
498
  };
448
499
 
449
- 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 };
500
+ 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
@@ -63,6 +63,27 @@ interface AiLayoutTree {
63
63
  align?: 'top' | 'center' | 'bottom' | 'stretch';
64
64
  }>;
65
65
  }
66
+ /** One uploaded weight file for a custom font family. */
67
+ interface AiCustomFontWeight {
68
+ weight: number;
69
+ /** Present when the file is a variable font with a `wght` axis — `weight` is the axis min,
70
+ * `weightEnd` the axis max, together spanning every weight the one file actually covers. */
71
+ weightEnd?: number;
72
+ url: string;
73
+ format: 'woff2' | 'woff' | 'truetype' | 'opentype';
74
+ }
75
+ /**
76
+ * A custom (non-Google) font family, grouped by its uploaded weight files so a bold heading
77
+ * actually resolves to a real bold file instead of the browser synthesizing fake bold from
78
+ * whichever single weight happens to be present.
79
+ */
80
+ interface AiCustomFont {
81
+ /** Collision-proof internal family name — what `fonts.heading`/`fonts.body` actually reference. */
82
+ family: string;
83
+ /** Human-readable name shown in the picker; hidden everywhere the internal `family` is used. */
84
+ label: string;
85
+ weights: AiCustomFontWeight[];
86
+ }
66
87
  /** The site brand kit the renderer styles from (editor Brand settings). */
67
88
  interface AiBrandKit {
68
89
  palette: {
@@ -75,6 +96,26 @@ interface AiBrandKit {
75
96
  heading: string;
76
97
  body: string;
77
98
  };
99
+ customFonts?: AiCustomFont[];
100
+ }
101
+ /**
102
+ * Shape, padding and typography measured off a host-template CTA, so generated buttons read as the
103
+ * site's own button rather than a default. Colour stays brand-driven (band-aware); everything here
104
+ * follows the template button. Null when the page has no template button to measure.
105
+ */
106
+ interface TemplateButtonStyle {
107
+ radius: string;
108
+ padding: string;
109
+ fontFamily: string;
110
+ fontSize: string;
111
+ fontWeight: string;
112
+ letterSpacing: string;
113
+ textTransform: string;
114
+ /** Measured fill/label pair of the template's primary CTA — a template may fill its buttons
115
+ * with any token (hvac uses accent, not primary), so the pair travels together. Absent when
116
+ * the page's only buttons are unfilled (ghost/outline). */
117
+ background?: string;
118
+ color?: string;
78
119
  }
79
120
  /** Section System defaults — used when a site has no brand kit override. */
80
121
  declare const AI_DEFAULT_BRAND: AiBrandKit;
@@ -143,8 +184,8 @@ declare function isRenderableTree(value: unknown): value is AiLayoutTree;
143
184
  interface AiTreeRendererProps {
144
185
  tree: AiLayoutTree;
145
186
  brand?: AiBrandKit;
146
- /** The host template's button corner radius (e.g. "0px", "8px"); a form's submit adopts it. */
147
- buttonRadius?: string | null;
187
+ /** The host template's button shape/padding/typography; generated CTAs adopt it. */
188
+ buttonStyle?: TemplateButtonStyle | null;
148
189
  /** Resolves a media ref to a URL; null renders a placeholder. */
149
190
  resolveMedia?: (ref: string) => string | null;
150
191
  /**
@@ -154,7 +195,7 @@ interface AiTreeRendererProps {
154
195
  */
155
196
  editKeyPrefix?: string;
156
197
  }
157
- declare function AiTreeRenderer({ tree, brand, buttonRadius, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
198
+ declare function AiTreeRenderer({ tree, brand, buttonStyle, resolveMedia, editKeyPrefix, }: AiTreeRendererProps): react_jsx_runtime.JSX.Element | null;
158
199
 
159
200
  type LinkPage = {
160
201
  path: string;
@@ -423,6 +464,16 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
423
464
  hideArrow?: boolean;
424
465
  }): react_jsx_runtime.JSX.Element;
425
466
 
467
+ interface EmptySectionProps {
468
+ title: string;
469
+ homeHref?: string;
470
+ /** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
471
+ eyebrowKey?: string;
472
+ titleKey?: string;
473
+ subtitleKey?: string;
474
+ }
475
+ declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
476
+
426
477
  declare function isEditSessionActive(): boolean;
427
478
 
428
479
  type CarouselSlide = {
@@ -446,4 +497,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
446
497
  bind: Record<string, string>;
447
498
  };
448
499
 
449
- 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 };
500
+ 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 };