@ohhwells/bridge 0.1.136 → 0.1.137

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
@@ -7921,6 +7921,21 @@ function PricingCard({ node, ctx, path }) {
7921
7921
  const fg = emphasis.fg;
7922
7922
  const features = pricingFeatureItems(slots.features);
7923
7923
  const buttons = (node.children ?? []).map((child, i) => ({ child, i })).filter((entry) => entry.child.type === "button");
7924
+ const badge = featured.enabled && str(featured.badge) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
7925
+ "div",
7926
+ {
7927
+ ...ctx.keyFor ? { "data-ohw-key": ctx.keyFor(`${path}.featured.badge`), "data-ohw-editable": "plain" } : {},
7928
+ style: {
7929
+ alignSelf: "flex-start",
7930
+ padding: `${AI_TREE_TOKENS.spacing2 / 2}px ${AI_TREE_TOKENS.spacing3}px`,
7931
+ borderRadius: 999,
7932
+ background: ctx.brand.palette.primary,
7933
+ color: primaryButtonLabel(ctx.brand),
7934
+ ...typeStyle(AI_TREE_TOKENS.type.eyebrow, ctx.brand.fonts.body)
7935
+ },
7936
+ children: str(featured.badge)
7937
+ }
7938
+ ) : null;
7924
7939
  const headingBlock = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: AI_TREE_TOKENS.spacing2 }, children: [
7925
7940
  str(slots.heading) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
7926
7941
  "div",
@@ -7970,32 +7985,31 @@ function PricingCard({ node, ctx, path }) {
7970
7985
  position: "relative"
7971
7986
  },
7972
7987
  children: [
7973
- featured.enabled && str(featured.badge) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
7974
- "div",
7975
- {
7976
- style: {
7977
- alignSelf: "flex-start",
7978
- padding: `${AI_TREE_TOKENS.spacing2 / 2}px ${AI_TREE_TOKENS.spacing3}px`,
7979
- borderRadius: 999,
7980
- background: ctx.brand.palette.primary,
7981
- color: primaryButtonLabel(ctx.brand),
7982
- ...typeStyle(AI_TREE_TOKENS.type.eyebrow, ctx.brand.fonts.body)
7983
- },
7984
- children: str(featured.badge)
7985
- }
7986
- ),
7987
- emphasis.headerBg ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
7988
- "div",
7989
- {
7990
- style: {
7991
- background: emphasis.headerBg,
7992
- margin: `-${AI_TREE_TOKENS.paddingBlock}px -${AI_TREE_TOKENS.paddingBlock}px 0`,
7993
- padding: AI_TREE_TOKENS.paddingBlock,
7994
- borderRadius: `${cardRadius(slots)}px ${cardRadius(slots)}px 0 0`
7995
- },
7996
- children: headingBlock
7997
- }
7998
- ) : headingBlock,
7988
+ emphasis.headerBg ? (
7989
+ // The badge rides inside the band so the tint runs from the card's top edge down
7990
+ // through the price block, instead of starting underneath the badge.
7991
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
7992
+ "div",
7993
+ {
7994
+ style: {
7995
+ background: emphasis.headerBg,
7996
+ margin: `-${AI_TREE_TOKENS.paddingBlock}px -${AI_TREE_TOKENS.paddingBlock}px 0`,
7997
+ padding: AI_TREE_TOKENS.paddingBlock,
7998
+ borderRadius: `${cardRadius(slots)}px ${cardRadius(slots)}px 0 0`,
7999
+ display: "flex",
8000
+ flexDirection: "column",
8001
+ gap: AI_TREE_TOKENS.spacing8
8002
+ },
8003
+ children: [
8004
+ badge,
8005
+ headingBlock
8006
+ ]
8007
+ }
8008
+ )
8009
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
8010
+ badge,
8011
+ headingBlock
8012
+ ] }),
7999
8013
  features.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
8000
8014
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", { style: { border: "none", borderTop: `1px solid ${fg}`, opacity: 0.2, margin: 0, width: "100%" } }),
8001
8015
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: AI_TREE_TOKENS.spacing4 }, children: [
@@ -18300,16 +18314,65 @@ function removePricingTier(tree, index) {
18300
18314
  return true;
18301
18315
  });
18302
18316
  }
18303
- function setPricingCardFeatured(tree, index, patch) {
18317
+ var PRICING_CARD_STYLES = [
18318
+ { value: "outline", label: "Outline", treatment: null },
18319
+ { value: "lift", label: "Lift", treatment: "lifted" },
18320
+ { value: "invert", label: "Invert", treatment: "inverted" },
18321
+ { value: "header", label: "Header", treatment: "accent-header" }
18322
+ ];
18323
+ var DEFAULT_FEATURED_BADGE = "Most popular";
18324
+ function featuredOf(target) {
18325
+ const raw = target?.slots?.featured;
18326
+ if (raw === true) return { enabled: true, treatment: "outlined" };
18327
+ return typeof raw === "object" && raw !== null ? raw : {};
18328
+ }
18329
+ function badgeOf(featured) {
18330
+ return typeof featured.badge === "string" ? featured.badge.trim() : "";
18331
+ }
18332
+ function pricingCardStyle(tree, index) {
18333
+ const featured = featuredOf(findPricingCollection(tree)?.children?.[index]);
18334
+ if (featured.enabled !== true) return "outline";
18335
+ return PRICING_CARD_STYLES.find((s) => s.treatment === featured.treatment)?.value ?? "outline";
18336
+ }
18337
+ function pricingCardFeaturedTag(tree, index) {
18338
+ const featured = featuredOf(findPricingCollection(tree)?.children?.[index]);
18339
+ return featured.enabled === true && badgeOf(featured).length > 0;
18340
+ }
18341
+ function composeFeatured(style, tagOn, badgeText) {
18342
+ const treatment = PRICING_CARD_STYLES.find((s) => s.value === style)?.treatment ?? null;
18343
+ if (tagOn) return { enabled: true, badge: badgeText || DEFAULT_FEATURED_BADGE, treatment: treatment ?? "outlined" };
18344
+ if (treatment) return { enabled: true, treatment };
18345
+ return badgeText.length > 0 ? { enabled: false, badge: badgeText } : { enabled: false };
18346
+ }
18347
+ function withPricingCard(tree, index, mutate) {
18304
18348
  return withPricingCollection(tree, (collection) => {
18305
18349
  const children = collection.children;
18306
18350
  if (index < 0 || index >= children.length) return false;
18307
18351
  const target = children[index];
18308
18352
  target.slots = target.slots ?? {};
18309
- target.slots.featured = { ...patch };
18353
+ mutate(target);
18310
18354
  return true;
18311
18355
  });
18312
18356
  }
18357
+ function setPricingCardStyle(tree, index, style) {
18358
+ if (!PRICING_CARD_STYLES.some((s) => s.value === style)) return null;
18359
+ return withPricingCard(tree, index, (target) => {
18360
+ const prev = featuredOf(target);
18361
+ const tagOn = prev.enabled === true && badgeOf(prev).length > 0;
18362
+ target.slots.featured = composeFeatured(style, tagOn, badgeOf(prev));
18363
+ });
18364
+ }
18365
+ function setPricingCardFeaturedTag(tree, index, on) {
18366
+ return withPricingCard(tree, index, (target) => {
18367
+ const prev = featuredOf(target);
18368
+ const style = pricingCardStyleOf(prev);
18369
+ target.slots.featured = composeFeatured(style, on, badgeOf(prev));
18370
+ });
18371
+ }
18372
+ function pricingCardStyleOf(featured) {
18373
+ if (featured.enabled !== true) return "outline";
18374
+ return PRICING_CARD_STYLES.find((s) => s.treatment === featured.treatment)?.value ?? "outline";
18375
+ }
18313
18376
  function addPricingCardButton(tree, index, label) {
18314
18377
  return withPricingCollection(tree, (collection) => {
18315
18378
  const children = collection.children;
@@ -18384,15 +18447,8 @@ function removePricingCardFeature(tree, index) {
18384
18447
 
18385
18448
  // src/ui/ai-section/AiPricingCardOverlay.tsx
18386
18449
  var import_jsx_runtime20 = require("react/jsx-runtime");
18387
- var EMPHASIS_TREATMENTS = [
18388
- { value: "outlined", label: "Outline" },
18389
- { value: "lifted", label: "Lift" },
18390
- { value: "inverted", label: "Invert" },
18391
- { value: "accent-header", label: "Header" }
18392
- ];
18393
- var PRIMARY4 = "#0885FE";
18394
- var OHW_BLUE2 = `var(--ohw-primary, ${PRIMARY4})`;
18395
- var OHW_BLUE_DARK2 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY4}) 60%, #000000)`;
18450
+ var PRIMARY4 = "var(--ohw-primary, #0885FE)";
18451
+ var CHROME_SELECTOR = "[data-ohw-toolbar], [data-ohw-edit-chrome], [data-ohw-item-interaction], [data-ohw-link-modal-root], [data-ohw-section-picker], [data-ohw-ai-review], [data-ohw-more-menu]";
18396
18452
  function findPricingCardElement(sectionId, index) {
18397
18453
  const sectionEl = findByInstanceId(sectionId);
18398
18454
  if (!sectionEl) return null;
@@ -18402,14 +18458,35 @@ function findPricingCardElement(sectionId, index) {
18402
18458
  }
18403
18459
  return null;
18404
18460
  }
18405
- function readRect3(ref) {
18406
- const el = ref && findPricingCardElement(ref.sectionId, ref.index);
18461
+ function cardRefFromTarget(target) {
18462
+ if (!(target instanceof Element)) return null;
18463
+ if (target.closest(CHROME_SELECTOR)) return null;
18464
+ const cardEl = target.closest("[data-ohw-pricing-card]");
18465
+ if (!cardEl) return null;
18466
+ const sectionEl = cardEl.closest("[data-ohw-section]");
18467
+ const unit = sectionEl ? movableUnit(sectionEl) : null;
18468
+ const sectionId = unit ? instanceIdOf(unit) || null : null;
18469
+ const index = Number(cardEl.dataset.ohwPricingIndex);
18470
+ if (!sectionId || Number.isNaN(index)) return null;
18471
+ return { sectionId, index };
18472
+ }
18473
+ function sameRef(a, b) {
18474
+ return a?.sectionId === b?.sectionId && a?.index === b?.index;
18475
+ }
18476
+ function rectOf(el) {
18407
18477
  if (!el) return null;
18408
18478
  const r2 = el.getBoundingClientRect();
18409
18479
  if (r2.width <= 0 || r2.height <= 0) return null;
18410
18480
  return { top: r2.top, left: r2.left, width: r2.width, height: r2.height };
18411
18481
  }
18412
- function useLiveCardRect(ref) {
18482
+ function readRect3(ref) {
18483
+ return rectOf(ref && findPricingCardElement(ref.sectionId, ref.index));
18484
+ }
18485
+ function readGridRect(ref) {
18486
+ const card = ref && findPricingCardElement(ref.sectionId, ref.index);
18487
+ return rectOf(card?.closest("[data-ohw-pricing-collection]") ?? card);
18488
+ }
18489
+ function useLiveCardRect(ref, grid = false) {
18413
18490
  const [rect, setRect] = (0, import_react11.useState)(null);
18414
18491
  (0, import_react11.useEffect)(() => {
18415
18492
  if (!ref) {
@@ -18417,7 +18494,7 @@ function useLiveCardRect(ref) {
18417
18494
  return;
18418
18495
  }
18419
18496
  const update = () => {
18420
- const next = readRect3(ref);
18497
+ const next = grid ? readGridRect(ref) : readRect3(ref);
18421
18498
  setRect(
18422
18499
  (prev) => prev && next && prev.top === next.top && prev.left === next.left && prev.width === next.width && prev.height === next.height ? prev : next
18423
18500
  );
@@ -18432,9 +18509,49 @@ function useLiveCardRect(ref) {
18432
18509
  window.removeEventListener("resize", update);
18433
18510
  clearInterval(interval);
18434
18511
  };
18435
- }, [ref?.sectionId, ref?.index]);
18512
+ }, [ref?.sectionId, ref?.index, grid]);
18436
18513
  return rect;
18437
18514
  }
18515
+ var TOOLBAR_GRID_GAP = 52;
18516
+ var TOOLBAR_GRID_GAP_MOBILE = 42;
18517
+ var TOOLBAR_EDGE_MARGIN2 = 4;
18518
+ function GridToolbarSlot({ gridRect, children }) {
18519
+ const slotRef = (0, import_react11.useRef)(null);
18520
+ const [shift, setShift] = (0, import_react11.useState)(0);
18521
+ const centerX = gridRect.left + gridRect.width / 2;
18522
+ (0, import_react11.useLayoutEffect)(() => {
18523
+ const slot = slotRef.current;
18524
+ if (!slot) return;
18525
+ const clamp = () => {
18526
+ const w = slot.offsetWidth;
18527
+ if (w <= 0) return;
18528
+ const half = w / 2;
18529
+ const clamped = Math.max(TOOLBAR_EDGE_MARGIN2 + half, Math.min(centerX, window.innerWidth - TOOLBAR_EDGE_MARGIN2 - half));
18530
+ setShift((prev) => Math.abs(prev - (clamped - centerX)) < 0.5 ? prev : clamped - centerX);
18531
+ };
18532
+ clamp();
18533
+ const ro = new ResizeObserver(clamp);
18534
+ ro.observe(slot);
18535
+ return () => ro.disconnect();
18536
+ }, [centerX, children]);
18537
+ const mobile = window.innerWidth <= 480;
18538
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18539
+ "div",
18540
+ {
18541
+ ref: slotRef,
18542
+ "data-ohw-bridge": "",
18543
+ "data-ohw-item-interaction": "",
18544
+ className: "pointer-events-auto fixed",
18545
+ style: {
18546
+ top: gridRect.top - (mobile ? TOOLBAR_GRID_GAP_MOBILE : TOOLBAR_GRID_GAP),
18547
+ left: centerX + shift,
18548
+ transform: "translate(-50%, -100%)",
18549
+ zIndex: 2147483645
18550
+ },
18551
+ children
18552
+ }
18553
+ );
18554
+ }
18438
18555
  function requestValidateTree2(postToParent2, tree) {
18439
18556
  return new Promise((resolve) => {
18440
18557
  const id = `ai-validate-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
@@ -18452,40 +18569,93 @@ function requestValidateTree2(postToParent2, tree) {
18452
18569
  postToParent2({ type: "ow:ai-validate-tree-request", id, tree });
18453
18570
  });
18454
18571
  }
18455
- function Pill2({
18456
- label,
18457
- onClick,
18458
- disabled,
18459
- active
18460
- }) {
18572
+ function StyleSwatch({ style }) {
18461
18573
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18462
- "button",
18574
+ "span",
18463
18575
  {
18464
- type: "button",
18465
- onClick,
18466
- disabled,
18467
- style: {
18468
- height: 28,
18469
- padding: "0 10px",
18470
- display: "inline-flex",
18471
- alignItems: "center",
18472
- gap: 4,
18473
- borderRadius: 999,
18474
- border: "none",
18475
- cursor: disabled ? "default" : "pointer",
18476
- background: active ? OHW_BLUE_DARK2 : "#ffffff",
18477
- color: active ? "#ffffff" : OHW_BLUE_DARK2,
18478
- opacity: disabled ? 0.4 : 1,
18479
- fontSize: 12,
18480
- lineHeight: "16px",
18481
- fontFamily: "Figtree, ui-sans-serif, system-ui, sans-serif",
18482
- whiteSpace: "nowrap",
18483
- flex: "0 0 auto"
18484
- },
18485
- children: label
18576
+ "aria-hidden": true,
18577
+ className: cn(
18578
+ "inline-block h-4 w-[18px] shrink-0 rounded-[3px] border border-border bg-background",
18579
+ style === "lift" && "border-transparent shadow-[0_3px_5px_rgba(0,0,0,0.22)]",
18580
+ style === "invert" && "border-foreground bg-foreground",
18581
+ style === "header" && "bg-[linear-gradient(var(--ohw-foreground,#0c0a09)_48%,var(--ohw-background,#ffffff)_48%)]"
18582
+ )
18486
18583
  }
18487
18584
  );
18488
18585
  }
18586
+ function ButtonGlyph() {
18587
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "12", viewBox: "0 0 18 12", fill: "none", "aria-hidden": true, style: { pointerEvents: "none" }, children: [
18588
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "0.75", y: "0.75", width: "16.5", height: "10.5", rx: "3", stroke: "currentColor", strokeWidth: "1.5" }),
18589
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M5.5 6H12.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
18590
+ ] });
18591
+ }
18592
+ function FeatureGlyph({ mode }) {
18593
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": true, style: { pointerEvents: "none" }, children: [
18594
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "8", cy: "8", r: "7.25", stroke: "currentColor", strokeWidth: "1.5" }),
18595
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M5 8.2L7.2 10.3L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
18596
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "13.5", cy: "13.5", r: "4.25", fill: "var(--ohw-background, #ffffff)", stroke: "var(--ohw-background, #ffffff)", strokeWidth: "1" }),
18597
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "13.5", cy: "13.5", r: "3.75", fill: "var(--ohw-background, #ffffff)", stroke: PRIMARY4, strokeWidth: "1" }),
18598
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M11.5 13.5H15.5", stroke: PRIMARY4, strokeWidth: "1.5", strokeLinecap: "round" }),
18599
+ mode === "add" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M13.5 11.5V15.5", stroke: PRIMARY4, strokeWidth: "1.5", strokeLinecap: "round" })
18600
+ ] });
18601
+ }
18602
+ function ToolbarAction({
18603
+ label,
18604
+ onClick,
18605
+ disabled = false,
18606
+ children
18607
+ }) {
18608
+ const button = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CustomToolbarButton, { type: "button", "aria-label": label, disabled, onClick, className: "size-8", children });
18609
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Tooltip, { children: [
18610
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "inline-flex", children: button }) : button }),
18611
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: label })
18612
+ ] });
18613
+ }
18614
+ function ToolbarSeparator() {
18615
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { "aria-hidden": true, className: "mx-0.5 block h-6 w-px shrink-0 bg-border" });
18616
+ }
18617
+ function CardStyleMenu({
18618
+ value,
18619
+ onChange
18620
+ }) {
18621
+ const current = PRICING_CARD_STYLES.find((s) => s.value === value) ?? PRICING_CARD_STYLES[0];
18622
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-1.5 pl-1.5", children: [
18623
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-xs text-muted-foreground", children: "Card style" }),
18624
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenu, { modal: false, children: [
18625
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
18626
+ "button",
18627
+ {
18628
+ type: "button",
18629
+ "aria-label": "Card style",
18630
+ className: "inline-flex h-8 min-w-[110px] items-center gap-[7px] rounded-[6px] bg-transparent px-2 text-[13px] font-medium text-foreground transition-colors hover:bg-muted data-[state=open]:bg-muted",
18631
+ children: [
18632
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyleSwatch, { style: current.value }),
18633
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex-1 text-left", children: current.label }),
18634
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.ChevronDown, { size: 16, style: { pointerEvents: "none" } })
18635
+ ]
18636
+ }
18637
+ ) }),
18638
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuContent, { align: "end", sideOffset: 8, className: "w-[152px] min-w-[152px] p-1", children: PRICING_CARD_STYLES.map((style) => {
18639
+ const selected = style.value === value;
18640
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
18641
+ DropdownMenuItem,
18642
+ {
18643
+ role: "menuitemradio",
18644
+ "aria-checked": selected,
18645
+ onSelect: () => onChange(style.value),
18646
+ className: cn("grid grid-cols-[18px_1fr_16px] gap-2 py-2 pl-2 pr-2 text-[13px]", selected && "bg-muted"),
18647
+ children: [
18648
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyleSwatch, { style: style.value }),
18649
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: style.label }),
18650
+ selected && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Check, { size: 16, className: "text-bridge-primary" })
18651
+ ]
18652
+ },
18653
+ style.value
18654
+ );
18655
+ }) })
18656
+ ] })
18657
+ ] });
18658
+ }
18489
18659
  function PricingCardToolbar({
18490
18660
  entry,
18491
18661
  index,
@@ -18493,8 +18663,8 @@ function PricingCardToolbar({
18493
18663
  error,
18494
18664
  onAddTier,
18495
18665
  onRemoveTier,
18496
- onToggleFeatured,
18497
- onSetTreatment,
18666
+ onSetStyle,
18667
+ onSetFeaturedTag,
18498
18668
  onAddButton,
18499
18669
  onRemoveButton,
18500
18670
  onAddFeature,
@@ -18502,55 +18672,66 @@ function PricingCardToolbar({
18502
18672
  }) {
18503
18673
  const collectionCount = pricingCardCount(entry.tree);
18504
18674
  const card = findPricingCardNode(entry.tree, index);
18505
- const featured = card?.slots?.featured;
18506
- const isFeatured = featured?.enabled === true;
18507
18675
  const buttonCount = (card?.children ?? []).filter((c) => c.type === "button").length;
18508
18676
  const featureCount = pricingCardFeatureCount(entry.tree, index);
18509
- const pillWrap = window.innerWidth <= 480 ? "wrap" : "nowrap";
18510
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
18677
+ const style = pricingCardStyle(entry.tree, index);
18678
+ const featuredTag = pricingCardFeaturedTag(entry.tree, index);
18679
+ const mobile = window.innerWidth <= 480;
18680
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
18511
18681
  "div",
18512
18682
  {
18513
18683
  "data-ohw-bridge": "",
18514
18684
  "data-ohw-toolbar": "",
18515
18685
  onMouseDown: (e) => e.stopPropagation(),
18516
- style: {
18517
- display: "flex",
18518
- flexDirection: "column",
18519
- gap: 6,
18520
- alignItems: "center",
18521
- background: OHW_BLUE2,
18522
- padding: 8,
18523
- borderRadius: 12,
18524
- boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
18525
- pointerEvents: pending ? "none" : "auto",
18526
- opacity: pending ? 0.6 : 1,
18527
- // Only cap width on mobile, where the pill rows wrap — on desktop the row stays on one
18528
- // line and should size to fit it, not get clipped/overflow against a fixed cap.
18529
- maxWidth: pillWrap === "wrap" ? "calc(100vw - 24px)" : "none"
18530
- },
18686
+ className: cn(
18687
+ "flex flex-col items-center gap-1.5 font-sans",
18688
+ pending && "pointer-events-none opacity-60"
18689
+ ),
18690
+ style: { maxWidth: mobile ? "calc(100vw - 24px)" : void 0 },
18531
18691
  children: [
18532
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: [
18533
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "+ Tier", onClick: onAddTier, disabled: collectionCount >= 4 }),
18534
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "- Tier", onClick: onRemoveTier, disabled: collectionCount <= 1 }),
18535
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "Featured", active: isFeatured, onClick: () => onToggleFeatured(!isFeatured) }),
18536
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "+ Button", onClick: onAddButton, disabled: buttonCount >= 2 }),
18537
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "- Button", onClick: onRemoveButton, disabled: buttonCount === 0 }),
18538
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "+ Feature", onClick: onAddFeature, disabled: featureCount >= 10 }),
18539
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill2, { label: "- Feature", onClick: onRemoveFeature, disabled: featureCount <= 1 })
18540
- ] }),
18541
- isFeatured && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: EMPHASIS_TREATMENTS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18542
- Pill2,
18692
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
18693
+ "div",
18543
18694
  {
18544
- label: t.label,
18545
- active: (featured?.treatment ?? "outlined") === t.value,
18546
- onClick: () => onSetTreatment(t.value)
18547
- },
18548
- t.value
18549
- )) }),
18550
- error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
18695
+ className: cn(
18696
+ "flex items-center gap-1 rounded-[10px] border border-border bg-background p-1 whitespace-nowrap",
18697
+ "shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.1),0px_4px_6px_-4px_rgba(0,0,0,0.1)]",
18698
+ mobile ? "flex-wrap justify-center" : "flex-nowrap"
18699
+ ),
18700
+ children: [
18701
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CardStyleMenu, { value: style, onChange: onSetStyle }),
18702
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Tooltip, { children: [
18703
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18704
+ CustomToolbarButton,
18705
+ {
18706
+ type: "button",
18707
+ "aria-label": featuredTag ? "Remove featured tag" : "Add featured tag",
18708
+ "aria-pressed": featuredTag,
18709
+ active: featuredTag,
18710
+ onClick: () => onSetFeaturedTag(!featuredTag),
18711
+ className: "size-8",
18712
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Star, { size: 16, fill: featuredTag ? "currentColor" : "none", style: { pointerEvents: "none" } })
18713
+ }
18714
+ ) }),
18715
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: featuredTag ? "Remove featured tag" : "Add featured tag" })
18716
+ ] }),
18717
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarSeparator, {}),
18718
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarAction, { label: "Add button", onClick: onAddButton, disabled: buttonCount >= 2, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ButtonGlyph, {}) }),
18719
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarAction, { label: "Remove button", onClick: onRemoveButton, disabled: buttonCount === 0, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "relative inline-flex", children: [
18720
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ButtonGlyph, {}),
18721
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Minus, { size: 10, strokeWidth: 2.5, className: "absolute -right-1.5 -top-1.5 rounded-full bg-background text-bridge-primary" })
18722
+ ] }) }),
18723
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarAction, { label: "Add feature", onClick: onAddFeature, disabled: featureCount >= 10, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureGlyph, { mode: "add" }) }),
18724
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarAction, { label: "Remove feature", onClick: onRemoveFeature, disabled: featureCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FeatureGlyph, { mode: "remove" }) }),
18725
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarSeparator, {}),
18726
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarAction, { label: "Add tier", onClick: onAddTier, disabled: collectionCount >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Plus, { size: 16, style: { pointerEvents: "none" } }) }),
18727
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ToolbarAction, { label: "Remove tier", onClick: onRemoveTier, disabled: collectionCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Minus, { size: 16, style: { pointerEvents: "none" } }) })
18728
+ ]
18729
+ }
18730
+ ),
18731
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "max-w-[260px] rounded-md bg-background px-2 py-1 text-center text-[11px] text-destructive shadow-sm", children: error })
18551
18732
  ]
18552
18733
  }
18553
- );
18734
+ ) });
18554
18735
  }
18555
18736
  function findPricingCardNode(tree, index) {
18556
18737
  const stack = tree.rows.flatMap((row) => row.blocks);
@@ -18576,25 +18757,13 @@ function AiPricingCardOverlay({
18576
18757
  activeRef.current = active;
18577
18758
  (0, import_react11.useEffect)(() => {
18578
18759
  const onMove = (e) => {
18760
+ const ref = cardRefFromTarget(e.target);
18579
18761
  const t = e.target;
18580
- if (!(t instanceof HTMLElement)) return;
18581
- if (t.closest("[data-ohw-toolbar], [data-ohw-edit-chrome], [data-ohw-item-interaction], [data-ohw-link-modal-root], [data-ohw-section-picker], [data-ohw-ai-review]")) {
18582
- return;
18583
- }
18584
- const cardEl = t.closest("[data-ohw-pricing-card]");
18585
- if (!cardEl) {
18586
- setHover(null);
18587
- return;
18588
- }
18589
- const sectionEl = cardEl.closest("[data-ohw-section]");
18590
- const unit = sectionEl ? movableUnit(sectionEl) : null;
18591
- const sectionId = unit ? instanceIdOf(unit) || null : null;
18592
- const index = Number(cardEl.dataset.ohwPricingIndex);
18593
- if (!sectionId || Number.isNaN(index)) {
18594
- setHover(null);
18595
- return;
18596
- }
18597
- setHover({ sectionId, index });
18762
+ const overEditable = Boolean(t?.closest?.("[data-ohw-editable], [data-ohw-role], a, button"));
18763
+ setHover((prev) => {
18764
+ const next = ref && !overEditable ? ref : null;
18765
+ return sameRef(prev, next) ? prev : next;
18766
+ });
18598
18767
  };
18599
18768
  const onLeave = () => setHover(null);
18600
18769
  document.addEventListener("mousemove", onMove, { passive: true });
@@ -18606,15 +18775,12 @@ function AiPricingCardOverlay({
18606
18775
  }, []);
18607
18776
  (0, import_react11.useEffect)(() => {
18608
18777
  const onClick = (e) => {
18609
- const current = activeRef.current;
18610
- if (!current) return;
18611
18778
  const t = e.target;
18612
- if (!(t instanceof HTMLElement)) return;
18613
- if (t.closest("[data-ohw-item-interaction]")) return;
18614
- const cardEl = findPricingCardElement(current.sectionId, current.index);
18615
- if (cardEl && cardEl.contains(t)) return;
18616
- setActive(null);
18617
- setError(null);
18779
+ if (!(t instanceof Element)) return;
18780
+ if (t.closest(CHROME_SELECTOR)) return;
18781
+ const ref = cardRefFromTarget(t);
18782
+ setActive((prev) => sameRef(prev, ref) ? prev : ref);
18783
+ if (!ref || !sameRef(activeRef.current, ref)) setError(null);
18618
18784
  };
18619
18785
  document.addEventListener("click", onClick, true);
18620
18786
  return () => document.removeEventListener("click", onClick, true);
@@ -18632,6 +18798,7 @@ function AiPricingCardOverlay({
18632
18798
  const onKeyDown = (e) => {
18633
18799
  if (e.key !== "Escape") return;
18634
18800
  if (!activeRef.current) return;
18801
+ if (document.querySelector('[data-ohw-more-menu][data-state="open"]')) return;
18635
18802
  setActive(null);
18636
18803
  setError(null);
18637
18804
  };
@@ -18677,72 +18844,52 @@ function AiPricingCardOverlay({
18677
18844
  );
18678
18845
  const activeEntry = active ? findEntry(active.sectionId) : null;
18679
18846
  const activeCardRect = useLiveCardRect(active);
18680
- const hoverHandleRect = useLiveCardRect(!active && hover ? hover : null);
18847
+ const activeGridRect = useLiveCardRect(active, true);
18848
+ const hoverRect = useLiveCardRect(hover && !sameRef(hover, active) ? hover : null);
18681
18849
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
18682
- hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18683
- "button",
18684
- {
18685
- type: "button",
18686
- "data-ohw-toolbar": "",
18687
- onClick: () => setActive(hover),
18688
- "aria-label": "Configure pricing tier",
18689
- style: {
18690
- position: "fixed",
18691
- top: hoverHandleRect.top + 8,
18692
- left: hoverHandleRect.left + hoverHandleRect.width - 36,
18693
- width: 28,
18694
- height: 28,
18695
- borderRadius: 8,
18696
- border: `1.5px dashed ${PRIMARY4}`,
18697
- background: "#ffffff",
18698
- color: PRIMARY4,
18699
- display: "flex",
18700
- alignItems: "center",
18701
- justifyContent: "center",
18702
- cursor: "pointer",
18703
- zIndex: 2147483643,
18704
- fontSize: 14,
18705
- fontWeight: 700
18706
- },
18707
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.Star, { size: 14, style: { pointerEvents: "none" } })
18708
- }
18709
- ),
18710
- activeCardRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18711
- ItemInteractionLayer,
18712
- {
18713
- rect: activeCardRect,
18714
- state: "active-top",
18715
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18716
- PricingCardToolbar,
18717
- {
18718
- entry: activeEntry,
18719
- index: active.index,
18720
- pending,
18721
- error,
18722
- onAddTier: () => runMutation(active.sectionId, addPricingTier),
18723
- onRemoveTier: () => {
18724
- void runMutation(active.sectionId, (tree) => removePricingTier(tree, active.index)).then(
18725
- (applied) => {
18726
- if (applied) setActive(null);
18727
- }
18728
- );
18729
- },
18730
- onToggleFeatured: (enabled) => runMutation(
18731
- active.sectionId,
18732
- (tree) => setPricingCardFeatured(tree, active.index, { enabled })
18733
- ),
18734
- onSetTreatment: (treatment) => runMutation(
18735
- active.sectionId,
18736
- (tree) => setPricingCardFeatured(tree, active.index, { enabled: true, treatment })
18737
- ),
18738
- onAddButton: () => runMutation(active.sectionId, (tree) => addPricingCardButton(tree, active.index, "Learn more")),
18739
- onRemoveButton: () => runMutation(active.sectionId, (tree) => removePricingCardButton(tree, active.index)),
18740
- onAddFeature: () => runMutation(active.sectionId, (tree) => addPricingCardFeature(tree, active.index, "New feature")),
18741
- onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
18742
- }
18743
- )
18744
- }
18745
- )
18850
+ hoverRect && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ItemInteractionLayer, { rect: hoverRect, state: "hover" }),
18851
+ activeCardRect && activeGridRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
18852
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ItemInteractionLayer, { rect: activeCardRect, state: "active-top" }),
18853
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(GridToolbarSlot, { gridRect: activeGridRect, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18854
+ PricingCardToolbar,
18855
+ {
18856
+ entry: activeEntry,
18857
+ index: active.index,
18858
+ pending,
18859
+ error,
18860
+ onAddTier: () => runMutation(active.sectionId, addPricingTier),
18861
+ onRemoveTier: () => {
18862
+ void runMutation(active.sectionId, (tree) => removePricingTier(tree, active.index)).then(
18863
+ (applied) => {
18864
+ if (applied) setActive(null);
18865
+ }
18866
+ );
18867
+ },
18868
+ onSetFeaturedTag: (on) => runMutation(active.sectionId, (tree) => setPricingCardFeaturedTag(tree, active.index, on)),
18869
+ onSetStyle: (style) => runMutation(active.sectionId, (tree) => setPricingCardStyle(tree, active.index, style)),
18870
+ onAddButton: () => runMutation(active.sectionId, (tree) => addPricingCardButton(tree, active.index, "Learn more")),
18871
+ onRemoveButton: () => runMutation(active.sectionId, (tree) => removePricingCardButton(tree, active.index)),
18872
+ onAddFeature: () => runMutation(active.sectionId, (tree) => addPricingCardFeature(tree, active.index, "New feature")),
18873
+ onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
18874
+ }
18875
+ ) }),
18876
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
18877
+ "div",
18878
+ {
18879
+ "data-ohw-bridge": "",
18880
+ "data-ohw-item-interaction": "",
18881
+ "aria-hidden": true,
18882
+ className: "pointer-events-none fixed rounded-[4px] px-[7px] py-[3px] font-sans text-[11px] font-medium leading-none text-primary-foreground whitespace-nowrap",
18883
+ style: {
18884
+ top: activeCardRect.top + activeCardRect.height + 10,
18885
+ left: activeCardRect.left - 5,
18886
+ background: PRIMARY4,
18887
+ zIndex: 2147483644
18888
+ },
18889
+ children: "Pricing card"
18890
+ }
18891
+ )
18892
+ ] })
18746
18893
  ] });
18747
18894
  }
18748
18895
 
@@ -18821,8 +18968,8 @@ function extractYouTubeId(input) {
18821
18968
  // src/ui/ai-section/AiVideoOverlay.tsx
18822
18969
  var import_jsx_runtime21 = require("react/jsx-runtime");
18823
18970
  var PRIMARY5 = "#0885FE";
18824
- var OHW_BLUE3 = `var(--ohw-primary, ${PRIMARY5})`;
18825
- var OHW_BLUE_DARK3 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY5}) 60%, #000000)`;
18971
+ var OHW_BLUE2 = `var(--ohw-primary, ${PRIMARY5})`;
18972
+ var OHW_BLUE_DARK2 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY5}) 60%, #000000)`;
18826
18973
  function findVideoBlockElement(sectionId, path) {
18827
18974
  const sectionEl = findByInstanceId(sectionId);
18828
18975
  if (!sectionEl) return null;
@@ -18882,7 +19029,7 @@ function requestValidateTree3(postToParent2, tree) {
18882
19029
  postToParent2({ type: "ow:ai-validate-tree-request", id, tree });
18883
19030
  });
18884
19031
  }
18885
- function Pill3({
19032
+ function Pill2({
18886
19033
  label,
18887
19034
  onClick,
18888
19035
  disabled
@@ -18903,7 +19050,7 @@ function Pill3({
18903
19050
  border: "none",
18904
19051
  cursor: disabled ? "default" : "pointer",
18905
19052
  background: "#ffffff",
18906
- color: OHW_BLUE_DARK3,
19053
+ color: OHW_BLUE_DARK2,
18907
19054
  opacity: disabled ? 0.4 : 1,
18908
19055
  fontSize: 12,
18909
19056
  lineHeight: "16px",
@@ -18968,7 +19115,7 @@ function VideoUrlInput({ value, onCommit }) {
18968
19115
  {
18969
19116
  style: {
18970
19117
  flex: "0 0 auto",
18971
- color: OHW_BLUE_DARK3,
19118
+ color: OHW_BLUE_DARK2,
18972
19119
  fontSize: 10,
18973
19120
  lineHeight: "16px",
18974
19121
  fontWeight: 700,
@@ -19037,7 +19184,7 @@ function VideoToolbar({
19037
19184
  gap: 6,
19038
19185
  alignItems: "center",
19039
19186
  width: 280,
19040
- background: OHW_BLUE3,
19187
+ background: OHW_BLUE2,
19041
19188
  padding: 8,
19042
19189
  borderRadius: 12,
19043
19190
  boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
@@ -19046,7 +19193,7 @@ function VideoToolbar({
19046
19193
  },
19047
19194
  children: [
19048
19195
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(VideoUrlInput, { value: videoId, onCommit: onSetVideoId }),
19049
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Pill3, { label: "Remove video", onClick: onRemove, disabled: !videoId }),
19196
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Pill2, { label: "Remove video", onClick: onRemove, disabled: !videoId }),
19050
19197
  error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
19051
19198
  ]
19052
19199
  }
@@ -19281,8 +19428,8 @@ function setCarouselAutoplay(tree, on) {
19281
19428
  // src/ui/ai-section/AiFadeCarouselOverlay.tsx
19282
19429
  var import_jsx_runtime22 = require("react/jsx-runtime");
19283
19430
  var PRIMARY6 = "#0885FE";
19284
- var OHW_BLUE4 = `var(--ohw-primary, ${PRIMARY6})`;
19285
- var OHW_BLUE_DARK4 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY6}) 60%, #000000)`;
19431
+ var OHW_BLUE3 = `var(--ohw-primary, ${PRIMARY6})`;
19432
+ var OHW_BLUE_DARK3 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY6}) 60%, #000000)`;
19286
19433
  function findCarouselItemElement(sectionId, index) {
19287
19434
  const sectionEl = findByInstanceId(sectionId);
19288
19435
  if (!sectionEl) return null;
@@ -19361,7 +19508,7 @@ function requestAssetPick2(postToParent2) {
19361
19508
  postToParent2({ type: "ow:asset-pick", id });
19362
19509
  });
19363
19510
  }
19364
- function Pill4({ label, onClick, disabled }) {
19511
+ function Pill3({ label, onClick, disabled }) {
19365
19512
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
19366
19513
  "button",
19367
19514
  {
@@ -19378,7 +19525,7 @@ function Pill4({ label, onClick, disabled }) {
19378
19525
  border: "none",
19379
19526
  cursor: disabled ? "default" : "pointer",
19380
19527
  background: "#ffffff",
19381
- color: OHW_BLUE_DARK4,
19528
+ color: OHW_BLUE_DARK3,
19382
19529
  opacity: disabled ? 0.4 : 1,
19383
19530
  fontSize: 12,
19384
19531
  lineHeight: "16px",
@@ -19415,7 +19562,7 @@ function TogglePill({
19415
19562
  border: "none",
19416
19563
  cursor: disabled ? "default" : "pointer",
19417
19564
  background: "#ffffff",
19418
- color: OHW_BLUE_DARK4,
19565
+ color: OHW_BLUE_DARK3,
19419
19566
  opacity: disabled ? 0.4 : 1,
19420
19567
  fontSize: 12,
19421
19568
  lineHeight: "16px",
@@ -19438,7 +19585,7 @@ function TogglePill({
19438
19585
  // Off is a grey track, not a washed-out blue: the pill's own white background already
19439
19586
  // carries the brand colour in the text, and a pale blue track next to it read as
19440
19587
  // "disabled control" rather than "switch that is off".
19441
- background: on ? OHW_BLUE_DARK4 : "#CBD5E1",
19588
+ background: on ? OHW_BLUE_DARK3 : "#CBD5E1",
19442
19589
  transition: "background 120ms ease"
19443
19590
  },
19444
19591
  children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
@@ -19481,7 +19628,7 @@ function CarouselSlideToolbar({
19481
19628
  flexDirection: "column",
19482
19629
  gap: 6,
19483
19630
  alignItems: "center",
19484
- background: OHW_BLUE4,
19631
+ background: OHW_BLUE3,
19485
19632
  padding: 8,
19486
19633
  borderRadius: 12,
19487
19634
  boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
@@ -19494,7 +19641,7 @@ function CarouselSlideToolbar({
19494
19641
  },
19495
19642
  children: [
19496
19643
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
19497
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pill4, { label: "Change Image", onClick: onChangeImage }),
19644
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pill3, { label: "Change Image", onClick: onChangeImage }),
19498
19645
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TogglePill, { label: "Autoplay", on: autoplay, onToggle: onToggleAutoplay })
19499
19646
  ] }),
19500
19647
  error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
@@ -24142,7 +24289,7 @@ function applyVisibleViewport(el, parentScroll) {
24142
24289
  el.style.top = `${top}px`;
24143
24290
  el.style.height = `${height}px`;
24144
24291
  }
24145
- var TOOLBAR_EDGE_MARGIN2 = 4;
24292
+ var TOOLBAR_EDGE_MARGIN3 = 4;
24146
24293
  function clampToolbarToClip(top, transform, rect, clip, approxH, gap) {
24147
24294
  const isAbove = transform.includes("translateY(-100%)");
24148
24295
  let visualTop = isAbove ? top - approxH : top;
@@ -24169,8 +24316,8 @@ function clampToolbarToClip(top, transform, rect, clip, approxH, gap) {
24169
24316
  function clampToolbarLeft(centerX, toolbarWidth) {
24170
24317
  const half = toolbarWidth / 2;
24171
24318
  return Math.max(
24172
- TOOLBAR_EDGE_MARGIN2 + half,
24173
- Math.min(centerX, window.innerWidth - TOOLBAR_EDGE_MARGIN2 - half)
24319
+ TOOLBAR_EDGE_MARGIN3 + half,
24320
+ Math.min(centerX, window.innerWidth - TOOLBAR_EDGE_MARGIN3 - half)
24174
24321
  );
24175
24322
  }
24176
24323
  function calcToolbarPos(rect, parentScroll, toolbarW = 306) {
@@ -30857,7 +31004,7 @@ function OhhwellsBridge() {
30857
31004
  postToParent2({
30858
31005
  type: "ow:ready",
30859
31006
  version: "1",
30860
- bridgeVersion: "0.1.135",
31007
+ bridgeVersion: "0.1.136",
30861
31008
  path: pathname,
30862
31009
  nodes: collectEditableNodes(editContentRef.current),
30863
31010
  sections