@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.js CHANGED
@@ -2564,6 +2564,19 @@ function quotedFont(font) {
2564
2564
  const cleaned = font.replace(/["']/g, "").trim();
2565
2565
  return cleaned ? `"${cleaned}"` : "sans-serif";
2566
2566
  }
2567
+ function themeFont(role, fallback) {
2568
+ const quoted = quotedFont(fallback);
2569
+ return role === "heading" ? `var(--brand-font-heading, var(--font-heading, var(--font-display, ${quoted})))` : `var(--brand-font-body, var(--font-body, ${quoted}))`;
2570
+ }
2571
+ function withThemeFonts(brand) {
2572
+ return {
2573
+ ...brand,
2574
+ fonts: {
2575
+ heading: themeFont("heading", brand.fonts.heading),
2576
+ body: themeFont("body", brand.fonts.body)
2577
+ }
2578
+ };
2579
+ }
2567
2580
  function footerLogoStyle(fallbackFont, fallbackColor) {
2568
2581
  return {
2569
2582
  fontFamily: `var(--brand-font-heading, var(--font-heading, var(--font-display, ${quotedFont(fallbackFont)})))`,
@@ -4959,7 +4972,7 @@ function AiTreeRenderer({
4959
4972
  if (!isRenderableTree(tree)) {
4960
4973
  return null;
4961
4974
  }
4962
- const resolvedBrand = brand ?? AI_DEFAULT_BRAND;
4975
+ const resolvedBrand = withThemeFonts(brand ?? AI_DEFAULT_BRAND);
4963
4976
  const band = (tree.settings ?? {}).sectionBackground === "accent" ? accentBandContext(resolvedBrand) : null;
4964
4977
  const blockBrand = band?.brand ?? resolvedBrand;
4965
4978
  const placeholderMap = buildPlaceholderMap(tree);
@@ -5115,7 +5128,7 @@ function AiFooterRenderer({
5115
5128
  if (!isRenderableFooterTree(tree)) {
5116
5129
  return null;
5117
5130
  }
5118
- const resolvedBrand = brand ?? AI_DEFAULT_BRAND;
5131
+ const resolvedBrand = withThemeFonts(brand ?? AI_DEFAULT_BRAND);
5119
5132
  const bandBg = surface?.background ?? resolvedBrand.palette.dark;
5120
5133
  const bandText = surface?.text ?? resolvedBrand.palette.light;
5121
5134
  const onDark = surface ? isDarkColor(surface.background) : true;
@@ -8938,7 +8951,7 @@ var isLabelWeight = (label) => label === "number" || label === "weight";
8938
8951
  var isLabelShadow = (label) => label === "shadow";
8939
8952
  var getDefaultConfig = () => {
8940
8953
  const themeColor = fromTheme("color");
8941
- const themeFont = fromTheme("font");
8954
+ const themeFont2 = fromTheme("font");
8942
8955
  const themeText = fromTheme("text");
8943
8956
  const themeFontWeight = fromTheme("font-weight");
8944
8957
  const themeTracking = fromTheme("tracking");
@@ -9860,7 +9873,7 @@ var getDefaultConfig = () => {
9860
9873
  * @see https://tailwindcss.com/docs/font-family
9861
9874
  */
9862
9875
  "font-family": [{
9863
- font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
9876
+ font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont2]
9864
9877
  }],
9865
9878
  /**
9866
9879
  * Font Feature Settings
@@ -30228,7 +30241,7 @@ function OhhwellsBridge() {
30228
30241
  postToParent2({
30229
30242
  type: "ow:ready",
30230
30243
  version: "1",
30231
- bridgeVersion: "0.1.132",
30244
+ bridgeVersion: "0.1.134",
30232
30245
  path: pathname,
30233
30246
  nodes: collectEditableNodes(editContentRef.current),
30234
30247
  sections