@ohhwells/bridge 0.1.134 → 0.1.135

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 CHANGED
@@ -2656,6 +2656,19 @@ function quotedFont(font) {
2656
2656
  const cleaned = font.replace(/["']/g, "").trim();
2657
2657
  return cleaned ? `"${cleaned}"` : "sans-serif";
2658
2658
  }
2659
+ function themeFont(role, fallback) {
2660
+ const quoted = quotedFont(fallback);
2661
+ return role === "heading" ? `var(--brand-font-heading, var(--font-heading, var(--font-display, ${quoted})))` : `var(--brand-font-body, var(--font-body, ${quoted}))`;
2662
+ }
2663
+ function withThemeFonts(brand) {
2664
+ return {
2665
+ ...brand,
2666
+ fonts: {
2667
+ heading: themeFont("heading", brand.fonts.heading),
2668
+ body: themeFont("body", brand.fonts.body)
2669
+ }
2670
+ };
2671
+ }
2659
2672
  function footerLogoStyle(fallbackFont, fallbackColor) {
2660
2673
  return {
2661
2674
  fontFamily: `var(--brand-font-heading, var(--font-heading, var(--font-display, ${quotedFont(fallbackFont)})))`,
@@ -5051,7 +5064,7 @@ function AiTreeRenderer({
5051
5064
  if (!isRenderableTree(tree)) {
5052
5065
  return null;
5053
5066
  }
5054
- const resolvedBrand = brand ?? AI_DEFAULT_BRAND;
5067
+ const resolvedBrand = withThemeFonts(brand ?? AI_DEFAULT_BRAND);
5055
5068
  const band = (tree.settings ?? {}).sectionBackground === "accent" ? accentBandContext(resolvedBrand) : null;
5056
5069
  const blockBrand = band?.brand ?? resolvedBrand;
5057
5070
  const placeholderMap = buildPlaceholderMap(tree);
@@ -5207,7 +5220,7 @@ function AiFooterRenderer({
5207
5220
  if (!isRenderableFooterTree(tree)) {
5208
5221
  return null;
5209
5222
  }
5210
- const resolvedBrand = brand ?? AI_DEFAULT_BRAND;
5223
+ const resolvedBrand = withThemeFonts(brand ?? AI_DEFAULT_BRAND);
5211
5224
  const bandBg = surface?.background ?? resolvedBrand.palette.dark;
5212
5225
  const bandText = surface?.text ?? resolvedBrand.palette.light;
5213
5226
  const onDark = surface ? isDarkColor(surface.background) : true;
@@ -9030,7 +9043,7 @@ var isLabelWeight = (label) => label === "number" || label === "weight";
9030
9043
  var isLabelShadow = (label) => label === "shadow";
9031
9044
  var getDefaultConfig = () => {
9032
9045
  const themeColor = fromTheme("color");
9033
- const themeFont = fromTheme("font");
9046
+ const themeFont2 = fromTheme("font");
9034
9047
  const themeText = fromTheme("text");
9035
9048
  const themeFontWeight = fromTheme("font-weight");
9036
9049
  const themeTracking = fromTheme("tracking");
@@ -9952,7 +9965,7 @@ var getDefaultConfig = () => {
9952
9965
  * @see https://tailwindcss.com/docs/font-family
9953
9966
  */
9954
9967
  "font-family": [{
9955
- font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
9968
+ font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont2]
9956
9969
  }],
9957
9970
  /**
9958
9971
  * Font Feature Settings
@@ -30314,7 +30327,7 @@ function OhhwellsBridge() {
30314
30327
  postToParent2({
30315
30328
  type: "ow:ready",
30316
30329
  version: "1",
30317
- bridgeVersion: "0.1.132",
30330
+ bridgeVersion: "0.1.134",
30318
30331
  path: pathname,
30319
30332
  nodes: collectEditableNodes(editContentRef.current),
30320
30333
  sections