@ohhwells/bridge 0.1.174 → 0.1.175

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
@@ -1350,4 +1350,34 @@ declare function toneFor(el: Element | null | undefined): Tone;
1350
1350
  */
1351
1351
  declare function mountBackgroundTone(doc?: Document): () => void;
1352
1352
 
1353
- export { AI_DEFAULT_BRAND, AI_FOOTER_KEY, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiFooterBottomBar, type AiFooterColumn, type AiFooterLayoutTree, AiFooterRenderer, type AiFooterRendererProps, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, BRAND_TITLE_KEY, type CarouselSlide, type CollectionItemHit, type CollectionItemIndex, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptySection, type EmptySectionProps, FOOTER_COLUMN_BLOCKS, FOOTER_COLUMN_SPANS, FOOTER_SOCIAL_PLATFORMS, HIDDEN_EDITABLES_KEY, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OHW_LOADER_PREHYDRATE_SCRIPT, OHW_LOADER_STYLE, OhhwellsBridge, OhwLoaderSpinner, OhwLoaderSurface, type PagesSyncMessage, SITE_OG_IMAGE_KEY, SchedulingWidget, type SectionScaffold, type SiteLegalLinks, type SitePageEntry, type SyncLink, type SyncPlan, TEMPLATE_LOGO_ATTR, TONE_ATTR, TONE_CHANGE_EVENT, TONE_FIX_ATTR, TONE_THRESHOLD, Toggle, ToggleGroup, ToggleGroupItem, type Tone, type ToneDeps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, addFooterLinkColumn, appendFooterSocial, applyBrandChrome, applyHiddenEditablesToDom, applyStickySearchParams, blockPathFromEditKey, buildDefaultFooterTree, buildTarget, canRemoveAiBlock, canRemoveAiTextBlock, canSoftHideEditable, compositeColor, compositeGradient, computeBackgroundTones, contrastRatioOf, dropIndicatorVariants, ensureFooterTree, filterAvailablePages, foldAlignIntoTrees, getEditModeInitialState, gradientStopColors, hasMountedContentNodes, indexCollectionItems, insertFooterHours, isDeadPageHref, isEditSessionActive, isEditableKeyHidden, isPlainLeftClick, isRenderableFooterTree, isRenderableTree, isStickySearchParam, isValidUrl, linearGradientColourAt, mapRegionToImage, matchCollectionItemClick, mountBackgroundTone, nextViableSlide, parseAiFooterState, parseAiSectionsState, parseCssColor, parseTarget, planAiBlockRemoval, planAiTextBlockRemoval, planBuildPageSync, readHiddenEditables, recordOverriddenPaths, relativeLuminanceOf, releaseTemplateLogoIfReplaced, removeBlockAtPath, removeFooterBlock, resetOverriddenPathsCache, resolveFooterCopyright, resolveSoftHideTarget, resolveStickyNavigation, serializeAiFooterState, shouldFetchContentForPath, softHideEditableInDom, softUnhideEditableInDom, splitTopLevel, stepViableSlide, stripPlaceholderText, stripPlaceholders, stripTextAlignCss, toggleVariants, toneFor, toneOfColor, toneOfLuminance, useOhwCarousel, validateUrlInput, viableSlides, withHiddenEditable, withoutHiddenEditable };
1353
+ /**
1354
+ * Site-wide brand kit hydration. The backend resolves a brand change into one reserved node,
1355
+ * `__ohw_brand`, holding an AiBrandKit. The bridge intercepts that key and writes it as inline
1356
+ * custom properties on <html> — both the bridge's own `--ohw-brand-*` namespace (for generated
1357
+ * sections, which do reference it — see ai-tree) and the `--brand-*` BrandProvider contract every
1358
+ * template's own components actually render from (see LEGACY_BRAND_VAR_NAMES: no template maps
1359
+ * anything onto `--ohw-brand-*`, so writing only that namespace applied, undo-snapshotted, and
1360
+ * reported success while the live page never changed — OHH-766). An inline style beats the
1361
+ * template's own static `:root` block on specificity, so this restyles a live site with no
1362
+ * template rebuild; passing null removes every override and the template falls back to its own
1363
+ * `content/brand.ts` look.
1364
+ *
1365
+ * The namespace and the key string are a contract shared with the backend (the update_brand write)
1366
+ * and the editor (which persists/undoes the node).
1367
+ */
1368
+
1369
+ /**
1370
+ * The colour override values, by role. `surface`, `border`, and `muted` are derived from the four
1371
+ * brand colours so a restyled site keeps its depth (raised surfaces, hairlines, muted text) rather
1372
+ * than collapsing to four flat colours.
1373
+ */
1374
+ declare function brandColorVars(palette: AiBrandKit['palette']): Record<string, string>;
1375
+ /**
1376
+ * The brand colour text on Primary (or Accent) takes (OHH-640): Light or Dark, whichever has the higher
1377
+ * contrast against Primary, ties to Dark. The same comparison the contrast fix and the AI's
1378
+ * Primary bands use, so a pale Primary gets Dark text and a navy one Light. Unparseable values
1379
+ * keep the old Light default.
1380
+ */
1381
+ declare function onPrimaryInk(primary: string, light: string, dark: string): string;
1382
+
1383
+ export { AI_DEFAULT_BRAND, AI_FOOTER_KEY, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiFooterBottomBar, type AiFooterColumn, type AiFooterLayoutTree, AiFooterRenderer, type AiFooterRendererProps, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, BRAND_TITLE_KEY, type CarouselSlide, type CollectionItemHit, type CollectionItemIndex, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptySection, type EmptySectionProps, FOOTER_COLUMN_BLOCKS, FOOTER_COLUMN_SPANS, FOOTER_SOCIAL_PLATFORMS, HIDDEN_EDITABLES_KEY, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OHW_LOADER_PREHYDRATE_SCRIPT, OHW_LOADER_STYLE, OhhwellsBridge, OhwLoaderSpinner, OhwLoaderSurface, type PagesSyncMessage, SITE_OG_IMAGE_KEY, SchedulingWidget, type SectionScaffold, type SiteLegalLinks, type SitePageEntry, type SyncLink, type SyncPlan, TEMPLATE_LOGO_ATTR, TONE_ATTR, TONE_CHANGE_EVENT, TONE_FIX_ATTR, TONE_THRESHOLD, Toggle, ToggleGroup, ToggleGroupItem, type Tone, type ToneDeps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, addFooterLinkColumn, appendFooterSocial, applyBrandChrome, applyHiddenEditablesToDom, applyStickySearchParams, blockPathFromEditKey, brandColorVars, buildDefaultFooterTree, buildTarget, canRemoveAiBlock, canRemoveAiTextBlock, canSoftHideEditable, compositeColor, compositeGradient, computeBackgroundTones, contrastRatioOf, dropIndicatorVariants, ensureFooterTree, filterAvailablePages, foldAlignIntoTrees, getEditModeInitialState, gradientStopColors, hasMountedContentNodes, indexCollectionItems, insertFooterHours, isDeadPageHref, isEditSessionActive, isEditableKeyHidden, isPlainLeftClick, isRenderableFooterTree, isRenderableTree, isStickySearchParam, isValidUrl, linearGradientColourAt, mapRegionToImage, matchCollectionItemClick, mountBackgroundTone, nextViableSlide, onPrimaryInk, parseAiFooterState, parseAiSectionsState, parseCssColor, parseTarget, planAiBlockRemoval, planAiTextBlockRemoval, planBuildPageSync, readHiddenEditables, recordOverriddenPaths, relativeLuminanceOf, releaseTemplateLogoIfReplaced, removeBlockAtPath, removeFooterBlock, resetOverriddenPathsCache, resolveFooterCopyright, resolveSoftHideTarget, resolveStickyNavigation, serializeAiFooterState, shouldFetchContentForPath, softHideEditableInDom, softUnhideEditableInDom, splitTopLevel, stepViableSlide, stripPlaceholderText, stripPlaceholders, stripTextAlignCss, toggleVariants, toneFor, toneOfColor, toneOfLuminance, useOhwCarousel, validateUrlInput, viableSlides, withHiddenEditable, withoutHiddenEditable };
package/dist/index.d.ts CHANGED
@@ -1350,4 +1350,34 @@ declare function toneFor(el: Element | null | undefined): Tone;
1350
1350
  */
1351
1351
  declare function mountBackgroundTone(doc?: Document): () => void;
1352
1352
 
1353
- export { AI_DEFAULT_BRAND, AI_FOOTER_KEY, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiFooterBottomBar, type AiFooterColumn, type AiFooterLayoutTree, AiFooterRenderer, type AiFooterRendererProps, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, BRAND_TITLE_KEY, type CarouselSlide, type CollectionItemHit, type CollectionItemIndex, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptySection, type EmptySectionProps, FOOTER_COLUMN_BLOCKS, FOOTER_COLUMN_SPANS, FOOTER_SOCIAL_PLATFORMS, HIDDEN_EDITABLES_KEY, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OHW_LOADER_PREHYDRATE_SCRIPT, OHW_LOADER_STYLE, OhhwellsBridge, OhwLoaderSpinner, OhwLoaderSurface, type PagesSyncMessage, SITE_OG_IMAGE_KEY, SchedulingWidget, type SectionScaffold, type SiteLegalLinks, type SitePageEntry, type SyncLink, type SyncPlan, TEMPLATE_LOGO_ATTR, TONE_ATTR, TONE_CHANGE_EVENT, TONE_FIX_ATTR, TONE_THRESHOLD, Toggle, ToggleGroup, ToggleGroupItem, type Tone, type ToneDeps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, addFooterLinkColumn, appendFooterSocial, applyBrandChrome, applyHiddenEditablesToDom, applyStickySearchParams, blockPathFromEditKey, buildDefaultFooterTree, buildTarget, canRemoveAiBlock, canRemoveAiTextBlock, canSoftHideEditable, compositeColor, compositeGradient, computeBackgroundTones, contrastRatioOf, dropIndicatorVariants, ensureFooterTree, filterAvailablePages, foldAlignIntoTrees, getEditModeInitialState, gradientStopColors, hasMountedContentNodes, indexCollectionItems, insertFooterHours, isDeadPageHref, isEditSessionActive, isEditableKeyHidden, isPlainLeftClick, isRenderableFooterTree, isRenderableTree, isStickySearchParam, isValidUrl, linearGradientColourAt, mapRegionToImage, matchCollectionItemClick, mountBackgroundTone, nextViableSlide, parseAiFooterState, parseAiSectionsState, parseCssColor, parseTarget, planAiBlockRemoval, planAiTextBlockRemoval, planBuildPageSync, readHiddenEditables, recordOverriddenPaths, relativeLuminanceOf, releaseTemplateLogoIfReplaced, removeBlockAtPath, removeFooterBlock, resetOverriddenPathsCache, resolveFooterCopyright, resolveSoftHideTarget, resolveStickyNavigation, serializeAiFooterState, shouldFetchContentForPath, softHideEditableInDom, softUnhideEditableInDom, splitTopLevel, stepViableSlide, stripPlaceholderText, stripPlaceholders, stripTextAlignCss, toggleVariants, toneFor, toneOfColor, toneOfLuminance, useOhwCarousel, validateUrlInput, viableSlides, withHiddenEditable, withoutHiddenEditable };
1353
+ /**
1354
+ * Site-wide brand kit hydration. The backend resolves a brand change into one reserved node,
1355
+ * `__ohw_brand`, holding an AiBrandKit. The bridge intercepts that key and writes it as inline
1356
+ * custom properties on <html> — both the bridge's own `--ohw-brand-*` namespace (for generated
1357
+ * sections, which do reference it — see ai-tree) and the `--brand-*` BrandProvider contract every
1358
+ * template's own components actually render from (see LEGACY_BRAND_VAR_NAMES: no template maps
1359
+ * anything onto `--ohw-brand-*`, so writing only that namespace applied, undo-snapshotted, and
1360
+ * reported success while the live page never changed — OHH-766). An inline style beats the
1361
+ * template's own static `:root` block on specificity, so this restyles a live site with no
1362
+ * template rebuild; passing null removes every override and the template falls back to its own
1363
+ * `content/brand.ts` look.
1364
+ *
1365
+ * The namespace and the key string are a contract shared with the backend (the update_brand write)
1366
+ * and the editor (which persists/undoes the node).
1367
+ */
1368
+
1369
+ /**
1370
+ * The colour override values, by role. `surface`, `border`, and `muted` are derived from the four
1371
+ * brand colours so a restyled site keeps its depth (raised surfaces, hairlines, muted text) rather
1372
+ * than collapsing to four flat colours.
1373
+ */
1374
+ declare function brandColorVars(palette: AiBrandKit['palette']): Record<string, string>;
1375
+ /**
1376
+ * The brand colour text on Primary (or Accent) takes (OHH-640): Light or Dark, whichever has the higher
1377
+ * contrast against Primary, ties to Dark. The same comparison the contrast fix and the AI's
1378
+ * Primary bands use, so a pale Primary gets Dark text and a navy one Light. Unparseable values
1379
+ * keep the old Light default.
1380
+ */
1381
+ declare function onPrimaryInk(primary: string, light: string, dark: string): string;
1382
+
1383
+ export { AI_DEFAULT_BRAND, AI_FOOTER_KEY, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiFooterBottomBar, type AiFooterColumn, type AiFooterLayoutTree, AiFooterRenderer, type AiFooterRendererProps, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, BRAND_TITLE_KEY, type CarouselSlide, type CollectionItemHit, type CollectionItemIndex, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptySection, type EmptySectionProps, FOOTER_COLUMN_BLOCKS, FOOTER_COLUMN_SPANS, FOOTER_SOCIAL_PLATFORMS, HIDDEN_EDITABLES_KEY, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OHW_LOADER_PREHYDRATE_SCRIPT, OHW_LOADER_STYLE, OhhwellsBridge, OhwLoaderSpinner, OhwLoaderSurface, type PagesSyncMessage, SITE_OG_IMAGE_KEY, SchedulingWidget, type SectionScaffold, type SiteLegalLinks, type SitePageEntry, type SyncLink, type SyncPlan, TEMPLATE_LOGO_ATTR, TONE_ATTR, TONE_CHANGE_EVENT, TONE_FIX_ATTR, TONE_THRESHOLD, Toggle, ToggleGroup, ToggleGroupItem, type Tone, type ToneDeps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, addFooterLinkColumn, appendFooterSocial, applyBrandChrome, applyHiddenEditablesToDom, applyStickySearchParams, blockPathFromEditKey, brandColorVars, buildDefaultFooterTree, buildTarget, canRemoveAiBlock, canRemoveAiTextBlock, canSoftHideEditable, compositeColor, compositeGradient, computeBackgroundTones, contrastRatioOf, dropIndicatorVariants, ensureFooterTree, filterAvailablePages, foldAlignIntoTrees, getEditModeInitialState, gradientStopColors, hasMountedContentNodes, indexCollectionItems, insertFooterHours, isDeadPageHref, isEditSessionActive, isEditableKeyHidden, isPlainLeftClick, isRenderableFooterTree, isRenderableTree, isStickySearchParam, isValidUrl, linearGradientColourAt, mapRegionToImage, matchCollectionItemClick, mountBackgroundTone, nextViableSlide, onPrimaryInk, parseAiFooterState, parseAiSectionsState, parseCssColor, parseTarget, planAiBlockRemoval, planAiTextBlockRemoval, planBuildPageSync, readHiddenEditables, recordOverriddenPaths, relativeLuminanceOf, releaseTemplateLogoIfReplaced, removeBlockAtPath, removeFooterBlock, resetOverriddenPathsCache, resolveFooterCopyright, resolveSoftHideTarget, resolveStickyNavigation, serializeAiFooterState, shouldFetchContentForPath, softHideEditableInDom, softUnhideEditableInDom, splitTopLevel, stepViableSlide, stripPlaceholderText, stripPlaceholders, stripTextAlignCss, toggleVariants, toneFor, toneOfColor, toneOfLuminance, useOhwCarousel, validateUrlInput, viableSlides, withHiddenEditable, withoutHiddenEditable };