@ohhwells/bridge 0.1.117-next.313 → 0.1.117-next.315

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
@@ -75,7 +75,7 @@ __export(index_exports, {
75
75
  module.exports = __toCommonJS(index_exports);
76
76
 
77
77
  // src/OhhwellsBridge.tsx
78
- var import_react18 = __toESM(require("react"), 1);
78
+ var import_react19 = __toESM(require("react"), 1);
79
79
  var import_client2 = require("react-dom/client");
80
80
  var import_react_dom4 = require("react-dom");
81
81
 
@@ -1620,7 +1620,11 @@ function MediaBox({
1620
1620
  aspect,
1621
1621
  radius,
1622
1622
  height,
1623
- editPath
1623
+ editPath,
1624
+ alt,
1625
+ fit,
1626
+ grayscale,
1627
+ fixedSize
1624
1628
  }) {
1625
1629
  const url = refValue ? ctx.resolveMedia(refValue) : null;
1626
1630
  const isIcon = /^(lucide|simple):/.test(refValue);
@@ -1654,9 +1658,10 @@ function MediaBox({
1654
1658
  {
1655
1659
  ...editAttrs,
1656
1660
  style: {
1657
- width: "100%",
1661
+ width: fixedSize ? "auto" : "100%",
1658
1662
  aspectRatio,
1659
- minHeight: height ?? (aspectRatio ? void 0 : 180),
1663
+ height: fixedSize ? height : void 0,
1664
+ minHeight: fixedSize ? void 0 : height ?? (aspectRatio ? void 0 : 180),
1660
1665
  borderRadius: radius,
1661
1666
  overflow: "hidden",
1662
1667
  background: "#DBEAFE",
@@ -1664,7 +1669,8 @@ function MediaBox({
1664
1669
  alignItems: "center",
1665
1670
  justifyContent: "center",
1666
1671
  color: "#93C5FD",
1667
- fontSize: 13
1672
+ fontSize: 13,
1673
+ filter: grayscale ? "grayscale(1)" : void 0
1668
1674
  },
1669
1675
  children: url || keyed ? (
1670
1676
  // Keyed slots always mount an <img> so hydrate overrides have a target.
@@ -1672,8 +1678,13 @@ function MediaBox({
1672
1678
  "img",
1673
1679
  {
1674
1680
  src: url ?? TRANSPARENT_PX,
1675
- alt: "",
1676
- style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
1681
+ alt: alt ?? "",
1682
+ style: {
1683
+ width: fixedSize ? "auto" : "100%",
1684
+ height: "100%",
1685
+ objectFit: fit ?? "cover",
1686
+ display: "block"
1687
+ }
1677
1688
  }
1678
1689
  )
1679
1690
  ) : refValue || "media"
@@ -2328,7 +2339,8 @@ function toggleAccordionItem(button) {
2328
2339
  }
2329
2340
  function AccordionBlock({ node, ctx, path }) {
2330
2341
  const rule = `1px solid ${ctx.brand.palette.dark}33`;
2331
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-ai-accordion": "", style: { borderTop: rule }, children: (node.items ?? []).map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { borderBottom: rule }, children: [
2342
+ const items = node.items ?? [];
2343
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-ai-accordion": "", style: { borderTop: rule }, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { borderBottom: rule }, children: [
2332
2344
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2333
2345
  "button",
2334
2346
  {
@@ -2381,6 +2393,83 @@ function AccordionBlock({ node, ctx, path }) {
2381
2393
  ) })
2382
2394
  ] }, i)) });
2383
2395
  }
2396
+ function MediaStripBlock({ node, ctx, path }) {
2397
+ const slots = node.slots ?? {};
2398
+ const items = node.items ?? [];
2399
+ const variant = slots.variant === "reel" ? "reel" : "logos";
2400
+ const align = slots.align === "left" || slots.align === "right" ? slots.align : "center";
2401
+ const treatment = slots.treatment === "color" || slots.treatment === "grayscale" ? slots.treatment : variant === "logos" ? "grayscale" : "color";
2402
+ const logoMaxHeight = typeof slots.logoMaxHeight === "number" ? slots.logoMaxHeight : 48;
2403
+ const cardWidth = typeof slots.cardWidth === "number" ? slots.cardWidth : 240;
2404
+ const justify = align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center";
2405
+ const label = str(slots.label);
2406
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { "data-ohw-media-strip": "", style: { display: "flex", flexDirection: "column", gap: AI_TREE_TOKENS.spacing6 }, children: [
2407
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: '[data-ohw-media-strip-item]{transition:transform 0.2s ease, opacity 0.2s ease}[data-ohw-media-strip-hover="lift"]:hover{transform:translateY(-4px)}[data-ohw-media-strip-hover="zoom"]:hover{transform:scale(1.05)}[data-ohw-media-strip-hover="fade"]:hover{opacity:0.75}' }),
2408
+ label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2409
+ "div",
2410
+ {
2411
+ ...textAttrs(ctx, `${path}.label`),
2412
+ style: {
2413
+ ...typeStyle(AI_TREE_TOKENS.type.eyebrow, ctx.brand.fonts.body),
2414
+ color: ctx.brand.palette.accent,
2415
+ textAlign: align
2416
+ },
2417
+ children: label
2418
+ }
2419
+ ),
2420
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2421
+ "div",
2422
+ {
2423
+ style: {
2424
+ display: "flex",
2425
+ flexWrap: "wrap",
2426
+ gap: AI_TREE_TOKENS.spacing4,
2427
+ justifyContent: justify,
2428
+ alignItems: variant === "logos" ? "center" : "flex-start"
2429
+ },
2430
+ children: items.map((item, i) => {
2431
+ const hasLink = typeof item.href === "string" && item.href.length > 0;
2432
+ const hoverPreset = slots.hover === "none" || slots.hover === "lift" || slots.hover === "zoom" || slots.hover === "fade" ? slots.hover : hasLink ? "lift" : "none";
2433
+ const box = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2434
+ "div",
2435
+ {
2436
+ "data-ohw-media-strip-item": "",
2437
+ "data-ohw-media-strip-index": i,
2438
+ "data-ohw-media-strip-hover": hoverPreset === "none" ? void 0 : hoverPreset,
2439
+ style: variant === "logos" ? { height: logoMaxHeight, width: "auto" } : { width: cardWidth, flexShrink: 0 },
2440
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2441
+ MediaBox,
2442
+ {
2443
+ refValue: item.assetId,
2444
+ ctx,
2445
+ aspect: variant === "reel" ? "9:16" : void 0,
2446
+ radius: variant === "reel" ? AI_TREE_TOKENS.radiusCard : 4,
2447
+ height: variant === "logos" ? logoMaxHeight : void 0,
2448
+ editPath: `${path}.items.${i}.assetId`,
2449
+ alt: item.alt,
2450
+ fit: variant === "logos" ? "contain" : "cover",
2451
+ grayscale: treatment === "grayscale",
2452
+ fixedSize: variant === "logos"
2453
+ }
2454
+ )
2455
+ }
2456
+ );
2457
+ return hasLink ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2458
+ "a",
2459
+ {
2460
+ href: item.href,
2461
+ target: item.linkTarget === "new-tab" ? "_blank" : void 0,
2462
+ rel: item.linkTarget === "new-tab" ? "noopener noreferrer" : void 0,
2463
+ style: { display: "block", textDecoration: "none" },
2464
+ children: box
2465
+ },
2466
+ i
2467
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: box }, i);
2468
+ })
2469
+ }
2470
+ )
2471
+ ] });
2472
+ }
2384
2473
  function useIsMobile() {
2385
2474
  const [mobile, setMobile] = import_react.default.useState(
2386
2475
  () => typeof window !== "undefined" && window.matchMedia("(max-width: 768px)").matches
@@ -2712,6 +2801,8 @@ function renderNode(node, ctx, path) {
2712
2801
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionBlock, { node, ctx, path });
2713
2802
  case "accordion":
2714
2803
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionBlock, { node, ctx, path });
2804
+ case "media-strip":
2805
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MediaStripBlock, { node, ctx, path });
2715
2806
  case "embed": {
2716
2807
  const child = (node.children ?? [])[0];
2717
2808
  if (child) {
@@ -3211,21 +3302,21 @@ function placeContainer(container, entry) {
3211
3302
  const original = findTemplateSection(entry.replaces);
3212
3303
  if (original) {
3213
3304
  original.insertAdjacentElement("afterend", container);
3214
- return;
3305
+ return "anchored";
3215
3306
  }
3216
3307
  }
3217
3308
  if (entry.beforeSection) {
3218
3309
  const anchor = findPlacementAnchor(entry.beforeSection, container);
3219
3310
  if (anchor) {
3220
3311
  anchor.insertAdjacentElement("beforebegin", container);
3221
- return;
3312
+ return "anchored";
3222
3313
  }
3223
3314
  }
3224
3315
  if (entry.afterSection) {
3225
3316
  const anchor = findPlacementAnchor(entry.afterSection, container);
3226
3317
  if (anchor) {
3227
3318
  anchor.insertAdjacentElement("afterend", container);
3228
- return;
3319
+ return "anchored";
3229
3320
  }
3230
3321
  }
3231
3322
  const footer = findFooterSection();
@@ -3234,6 +3325,7 @@ function placeContainer(container, entry) {
3234
3325
  } else {
3235
3326
  document.body.appendChild(container);
3236
3327
  }
3328
+ return "fallback";
3237
3329
  }
3238
3330
  function syncRemovedSections(state) {
3239
3331
  const removed = new Set(state.removed ?? []);
@@ -3290,6 +3382,10 @@ function syncReplacedOriginals(state) {
3290
3382
  }
3291
3383
  var sectionOrderIndex = /* @__PURE__ */ new Map();
3292
3384
  var removedSectionIds = /* @__PURE__ */ new Set();
3385
+ var persistSectionOrder = null;
3386
+ function setSectionOrderPersistHandler(handler) {
3387
+ persistSectionOrder = handler;
3388
+ }
3293
3389
  function setAiSectionOrder(raw, currentPath) {
3294
3390
  const next = /* @__PURE__ */ new Map();
3295
3391
  const removed = /* @__PURE__ */ new Set();
@@ -3370,6 +3466,7 @@ function applyAiSectionsToDom(state, options) {
3370
3466
  mounted.delete(id);
3371
3467
  }
3372
3468
  }
3469
+ const newlyAnchoredIds = [];
3373
3470
  for (const entry of ordered) {
3374
3471
  const serialized = JSON.stringify(entry) + brandKey;
3375
3472
  const existing = mounted.get(entry.id);
@@ -3389,7 +3486,10 @@ function applyAiSectionsToDom(state, options) {
3389
3486
  container.setAttribute("data-ohw-section", entry.id);
3390
3487
  container.setAttribute("data-ohw-instance", entry.id);
3391
3488
  container.setAttribute("data-ohw-section-label", entry.label);
3392
- if (isNewMount) placeContainer(container, entry);
3489
+ if (isNewMount) {
3490
+ const mode = placeContainer(container, entry);
3491
+ if (mode === "anchored" && !sectionOrderIndex.has(entry.id)) newlyAnchoredIds.push(entry.id);
3492
+ }
3393
3493
  const root = mounted.get(entry.id)?.root ?? (0, import_client.createRoot)(container);
3394
3494
  const resolveMedia = (ref) => entry.media[ref] ?? null;
3395
3495
  (0, import_react_dom.flushSync)(() => {
@@ -3419,6 +3519,16 @@ function applyAiSectionsToDom(state, options) {
3419
3519
  prev = el;
3420
3520
  }
3421
3521
  }
3522
+ if (newlyAnchoredIds.length > 0 && persistSectionOrder) {
3523
+ const snapshot = topLevelSections().map((el, order) => ({
3524
+ instanceId: instanceIdOf(el),
3525
+ type: el.getAttribute("data-ohw-section") ?? "",
3526
+ order,
3527
+ pagePath
3528
+ }));
3529
+ for (const snapEntry of snapshot) sectionOrderIndex.set(snapEntry.instanceId, snapEntry.order);
3530
+ persistSectionOrder(snapshot);
3531
+ }
3422
3532
  syncReplacedOriginals(state);
3423
3533
  syncRemovedSections(state);
3424
3534
  syncTemplateHidden(state, pageSections.length > 0);
@@ -10194,7 +10304,515 @@ function PricingCardToolbar({
10194
10304
  const buttonCount = (card?.children ?? []).filter((c) => c.type === "button").length;
10195
10305
  const featureCount = pricingCardFeatureCount(entry.tree, index);
10196
10306
  const pillWrap = window.innerWidth <= 480 ? "wrap" : "nowrap";
10197
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
10307
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
10308
+ "div",
10309
+ {
10310
+ "data-ohw-bridge": "",
10311
+ "data-ohw-toolbar": "",
10312
+ onMouseDown: (e) => e.stopPropagation(),
10313
+ style: {
10314
+ display: "flex",
10315
+ flexDirection: "column",
10316
+ gap: 6,
10317
+ alignItems: "center",
10318
+ background: OHW_BLUE,
10319
+ padding: 8,
10320
+ borderRadius: 12,
10321
+ boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
10322
+ pointerEvents: pending ? "none" : "auto",
10323
+ opacity: pending ? 0.6 : 1,
10324
+ // Only cap width on mobile, where the pill rows wrap — on desktop the row stays on one
10325
+ // line and should size to fit it, not get clipped/overflow against a fixed cap.
10326
+ maxWidth: pillWrap === "wrap" ? "calc(100vw - 24px)" : "none"
10327
+ },
10328
+ children: [
10329
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: [
10330
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "+ Tier", onClick: onAddTier, disabled: collectionCount >= 4 }),
10331
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "- Tier", onClick: onRemoveTier, disabled: collectionCount <= 1 }),
10332
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "Featured", active: isFeatured, onClick: () => onToggleFeatured(!isFeatured) }),
10333
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "+ Button", onClick: onAddButton, disabled: buttonCount >= 2 }),
10334
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "- Button", onClick: onRemoveButton, disabled: buttonCount === 0 }),
10335
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "+ Feature", onClick: onAddFeature, disabled: featureCount >= 10 }),
10336
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "- Feature", onClick: onRemoveFeature, disabled: featureCount <= 1 })
10337
+ ] }),
10338
+ isFeatured && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: EMPHASIS_TREATMENTS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10339
+ Pill,
10340
+ {
10341
+ label: t.label,
10342
+ active: (featured?.treatment ?? "outlined") === t.value,
10343
+ onClick: () => onSetTreatment(t.value)
10344
+ },
10345
+ t.value
10346
+ )) }),
10347
+ error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
10348
+ ]
10349
+ }
10350
+ );
10351
+ }
10352
+ function findPricingCardNode(tree, index) {
10353
+ const stack = tree.rows.flatMap((row) => row.blocks);
10354
+ while (stack.length) {
10355
+ const node = stack.shift();
10356
+ if (node.type === "collection" && Array.isArray(node.children) && node.children[0]?.type === "card" && node.children[0].slots?.preset === "pricing") {
10357
+ return node.children[index] ?? null;
10358
+ }
10359
+ if (node.children) stack.push(...node.children);
10360
+ }
10361
+ return null;
10362
+ }
10363
+ function AiPricingCardOverlay({
10364
+ postToParent: postToParent2,
10365
+ aiSectionsRef,
10366
+ applyTreeLocalRef
10367
+ }) {
10368
+ const [hover, setHover] = (0, import_react9.useState)(null);
10369
+ const [active, setActive] = (0, import_react9.useState)(null);
10370
+ const [pending, setPending] = (0, import_react9.useState)(false);
10371
+ const [error, setError] = (0, import_react9.useState)(null);
10372
+ const activeRef = (0, import_react9.useRef)(null);
10373
+ activeRef.current = active;
10374
+ (0, import_react9.useEffect)(() => {
10375
+ const onMove = (e) => {
10376
+ const t = e.target;
10377
+ if (!(t instanceof HTMLElement)) return;
10378
+ 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]")) {
10379
+ return;
10380
+ }
10381
+ const cardEl = t.closest("[data-ohw-pricing-card]");
10382
+ if (!cardEl) {
10383
+ setHover(null);
10384
+ return;
10385
+ }
10386
+ const sectionEl = cardEl.closest("[data-ohw-section]");
10387
+ const unit = sectionEl ? movableUnit(sectionEl) : null;
10388
+ const sectionId = unit ? instanceIdOf(unit) || null : null;
10389
+ const index = Number(cardEl.dataset.ohwPricingIndex);
10390
+ if (!sectionId || Number.isNaN(index)) {
10391
+ setHover(null);
10392
+ return;
10393
+ }
10394
+ setHover({ sectionId, index });
10395
+ };
10396
+ const onLeave = () => setHover(null);
10397
+ document.addEventListener("mousemove", onMove, { passive: true });
10398
+ document.documentElement.addEventListener("mouseleave", onLeave);
10399
+ return () => {
10400
+ document.removeEventListener("mousemove", onMove);
10401
+ document.documentElement.removeEventListener("mouseleave", onLeave);
10402
+ };
10403
+ }, []);
10404
+ (0, import_react9.useEffect)(() => {
10405
+ const onClick = (e) => {
10406
+ const current = activeRef.current;
10407
+ if (!current) return;
10408
+ const t = e.target;
10409
+ if (!(t instanceof HTMLElement)) return;
10410
+ if (t.closest("[data-ohw-item-interaction]")) return;
10411
+ const cardEl = findPricingCardElement(current.sectionId, current.index);
10412
+ if (cardEl && cardEl.contains(t)) return;
10413
+ setActive(null);
10414
+ setError(null);
10415
+ };
10416
+ document.addEventListener("click", onClick, true);
10417
+ return () => document.removeEventListener("click", onClick, true);
10418
+ }, []);
10419
+ (0, import_react9.useEffect)(() => {
10420
+ const onBlur = () => {
10421
+ if (!activeRef.current) return;
10422
+ setActive(null);
10423
+ setError(null);
10424
+ };
10425
+ window.addEventListener("blur", onBlur);
10426
+ return () => window.removeEventListener("blur", onBlur);
10427
+ }, []);
10428
+ (0, import_react9.useEffect)(() => {
10429
+ const onKeyDown = (e) => {
10430
+ if (e.key !== "Escape") return;
10431
+ if (!activeRef.current) return;
10432
+ setActive(null);
10433
+ setError(null);
10434
+ };
10435
+ document.addEventListener("keydown", onKeyDown);
10436
+ return () => document.removeEventListener("keydown", onKeyDown);
10437
+ }, []);
10438
+ const findEntry = (0, import_react9.useCallback)(
10439
+ (sectionId) => {
10440
+ const state = parseAiSectionsState(aiSectionsRef.current);
10441
+ return state.sections.find((s) => s.id === sectionId) ?? null;
10442
+ },
10443
+ [aiSectionsRef]
10444
+ );
10445
+ const runMutation = (0, import_react9.useCallback)(
10446
+ async (sectionId, mutate) => {
10447
+ const entry = findEntry(sectionId);
10448
+ if (!entry) return false;
10449
+ const nextTree = mutate(entry.tree);
10450
+ if (!nextTree) return false;
10451
+ setPending(true);
10452
+ setError(null);
10453
+ const { ok, reasons } = await requestValidateTree(postToParent2, nextTree);
10454
+ setPending(false);
10455
+ if (!ok) {
10456
+ setError(reasons[0] ?? "That change is not allowed.");
10457
+ return false;
10458
+ }
10459
+ applyTreeLocalRef.current?.({
10460
+ id: sectionId,
10461
+ mode: "replace",
10462
+ targetSectionId: sectionId,
10463
+ tree: nextTree,
10464
+ label: entry.label,
10465
+ media: entry.media,
10466
+ ...entry.brand ? { brand: entry.brand } : {},
10467
+ // The user is already looking at the card they just edited — recentering the
10468
+ // viewport on every tier add/remove/toggle reads as the section jumping around.
10469
+ skipScrollIntoView: true
10470
+ });
10471
+ return true;
10472
+ },
10473
+ [findEntry, postToParent2, applyTreeLocalRef]
10474
+ );
10475
+ const activeEntry = active ? findEntry(active.sectionId) : null;
10476
+ const activeCardRect = useLiveCardRect(active);
10477
+ const hoverHandleRect = useLiveCardRect(!active && hover ? hover : null);
10478
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
10479
+ hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10480
+ "button",
10481
+ {
10482
+ type: "button",
10483
+ "data-ohw-toolbar": "",
10484
+ onClick: () => setActive(hover),
10485
+ "aria-label": "Configure pricing tier",
10486
+ style: {
10487
+ position: "fixed",
10488
+ top: hoverHandleRect.top + 8,
10489
+ left: hoverHandleRect.left + hoverHandleRect.width - 36,
10490
+ width: 28,
10491
+ height: 28,
10492
+ borderRadius: 8,
10493
+ border: `1.5px dashed ${PRIMARY3}`,
10494
+ background: "#ffffff",
10495
+ color: PRIMARY3,
10496
+ display: "flex",
10497
+ alignItems: "center",
10498
+ justifyContent: "center",
10499
+ cursor: "pointer",
10500
+ zIndex: 2147483643,
10501
+ fontSize: 14,
10502
+ fontWeight: 700
10503
+ },
10504
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Star, { size: 14, style: { pointerEvents: "none" } })
10505
+ }
10506
+ ),
10507
+ activeCardRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10508
+ ItemInteractionLayer,
10509
+ {
10510
+ rect: activeCardRect,
10511
+ state: "active-top",
10512
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10513
+ PricingCardToolbar,
10514
+ {
10515
+ entry: activeEntry,
10516
+ index: active.index,
10517
+ pending,
10518
+ error,
10519
+ onAddTier: () => runMutation(active.sectionId, addPricingTier),
10520
+ onRemoveTier: () => {
10521
+ void runMutation(active.sectionId, (tree) => removePricingTier(tree, active.index)).then(
10522
+ (applied) => {
10523
+ if (applied) setActive(null);
10524
+ }
10525
+ );
10526
+ },
10527
+ onToggleFeatured: (enabled) => runMutation(
10528
+ active.sectionId,
10529
+ (tree) => setPricingCardFeatured(tree, active.index, { enabled })
10530
+ ),
10531
+ onSetTreatment: (treatment) => runMutation(
10532
+ active.sectionId,
10533
+ (tree) => setPricingCardFeatured(tree, active.index, { enabled: true, treatment })
10534
+ ),
10535
+ onAddButton: () => runMutation(active.sectionId, (tree) => addPricingCardButton(tree, active.index, "Learn more")),
10536
+ onRemoveButton: () => runMutation(active.sectionId, (tree) => removePricingCardButton(tree, active.index)),
10537
+ onAddFeature: () => runMutation(active.sectionId, (tree) => addPricingCardFeature(tree, active.index, "New feature")),
10538
+ onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
10539
+ }
10540
+ )
10541
+ }
10542
+ )
10543
+ ] });
10544
+ }
10545
+
10546
+ // src/ui/ai-section/AiMediaStripOverlay.tsx
10547
+ var import_react10 = require("react");
10548
+ var import_lucide_react9 = require("lucide-react");
10549
+
10550
+ // src/lib/ai-media-strip-tree.ts
10551
+ var MEDIA_STRIP_ITEM_MIN = 1;
10552
+ var LOGO_MAX_HEIGHT_MIN = 24;
10553
+ var LOGO_MAX_HEIGHT_MAX = 96;
10554
+ var CARD_WIDTH_MIN = 160;
10555
+ var CARD_WIDTH_MAX = 320;
10556
+ function isMediaStrip(node) {
10557
+ return node.type === "media-strip";
10558
+ }
10559
+ function findBlock(node) {
10560
+ if (isMediaStrip(node)) return node;
10561
+ for (const child of node.children ?? []) {
10562
+ const found = findBlock(child);
10563
+ if (found) return found;
10564
+ }
10565
+ return null;
10566
+ }
10567
+ function findMediaStripBlock(tree) {
10568
+ for (const row of tree.rows ?? []) {
10569
+ for (const block of row.blocks ?? []) {
10570
+ const found = findBlock(block);
10571
+ if (found) return found;
10572
+ }
10573
+ }
10574
+ return null;
10575
+ }
10576
+ function mediaStripItems(tree) {
10577
+ const block = findMediaStripBlock(tree);
10578
+ return block?.items ?? [];
10579
+ }
10580
+ function withMediaStrip(tree, mutate) {
10581
+ const next = JSON.parse(JSON.stringify(tree));
10582
+ const block = findMediaStripBlock(next);
10583
+ if (!block) return null;
10584
+ block.items = block.items ?? [];
10585
+ return mutate(block) ? next : null;
10586
+ }
10587
+ function addMediaStripItem(tree, item, afterIndex) {
10588
+ return withMediaStrip(tree, (block) => {
10589
+ const items = block.items;
10590
+ const at = afterIndex === void 0 ? items.length : Math.min(items.length, afterIndex + 1);
10591
+ items.splice(at, 0, { ...item });
10592
+ return true;
10593
+ });
10594
+ }
10595
+ function removeMediaStripItem(tree, index) {
10596
+ return withMediaStrip(tree, (block) => {
10597
+ const items = block.items;
10598
+ if (items.length <= MEDIA_STRIP_ITEM_MIN) return false;
10599
+ if (index < 0 || index >= items.length) return false;
10600
+ items.splice(index, 1);
10601
+ return true;
10602
+ });
10603
+ }
10604
+ function reorderMediaStripItem(tree, index, direction) {
10605
+ return withMediaStrip(tree, (block) => {
10606
+ const items = block.items;
10607
+ const target = index + direction;
10608
+ if (index < 0 || index >= items.length || target < 0 || target >= items.length) return false;
10609
+ const [moved] = items.splice(index, 1);
10610
+ items.splice(target, 0, moved);
10611
+ return true;
10612
+ });
10613
+ }
10614
+ function setMediaStripVariant(tree, variant) {
10615
+ return withMediaStrip(tree, (block) => {
10616
+ block.slots = { ...block.slots, variant };
10617
+ if (variant === "logos") delete block.slots.cardWidth;
10618
+ if (variant === "reel") delete block.slots.logoMaxHeight;
10619
+ return true;
10620
+ });
10621
+ }
10622
+ function setMediaStripSizing(tree, value) {
10623
+ return withMediaStrip(tree, (block) => {
10624
+ const variant = block.slots?.variant;
10625
+ if (variant === "logos") {
10626
+ block.slots = { ...block.slots, logoMaxHeight: Math.min(LOGO_MAX_HEIGHT_MAX, Math.max(LOGO_MAX_HEIGHT_MIN, value)) };
10627
+ return true;
10628
+ }
10629
+ if (variant === "reel") {
10630
+ block.slots = { ...block.slots, cardWidth: Math.min(CARD_WIDTH_MAX, Math.max(CARD_WIDTH_MIN, value)) };
10631
+ return true;
10632
+ }
10633
+ return false;
10634
+ });
10635
+ }
10636
+ function setMediaStripTreatment(tree, treatment) {
10637
+ return withMediaStrip(tree, (block) => {
10638
+ block.slots = { ...block.slots, treatment };
10639
+ return true;
10640
+ });
10641
+ }
10642
+ function setMediaStripAlign(tree, align) {
10643
+ return withMediaStrip(tree, (block) => {
10644
+ block.slots = { ...block.slots, align };
10645
+ return true;
10646
+ });
10647
+ }
10648
+ function setMediaStripHover(tree, hover) {
10649
+ return withMediaStrip(tree, (block) => {
10650
+ block.slots = { ...block.slots, hover };
10651
+ return true;
10652
+ });
10653
+ }
10654
+
10655
+ // src/ui/ai-section/AiMediaStripOverlay.tsx
10656
+ var import_jsx_runtime19 = require("react/jsx-runtime");
10657
+ var PRIMARY4 = "#0885FE";
10658
+ var OHW_BLUE2 = `var(--ohw-primary, ${PRIMARY4})`;
10659
+ var OHW_BLUE_DARK2 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY4}) 60%, #000000)`;
10660
+ function findMediaStripItemElement(sectionId, index) {
10661
+ const sectionEl = findByInstanceId(sectionId);
10662
+ if (!sectionEl) return null;
10663
+ const items = sectionEl.querySelectorAll("[data-ohw-media-strip-item]");
10664
+ for (const el of Array.from(items)) {
10665
+ if (Number(el.dataset.ohwMediaStripIndex) === index) return el;
10666
+ }
10667
+ return null;
10668
+ }
10669
+ function readRect3(ref) {
10670
+ const el = ref && findMediaStripItemElement(ref.sectionId, ref.index);
10671
+ if (!el) return null;
10672
+ const r2 = el.getBoundingClientRect();
10673
+ if (r2.width <= 0 || r2.height <= 0) return null;
10674
+ return { top: r2.top, left: r2.left, width: r2.width, height: r2.height };
10675
+ }
10676
+ function useLiveItemRect(ref) {
10677
+ const [rect, setRect] = (0, import_react10.useState)(null);
10678
+ (0, import_react10.useEffect)(() => {
10679
+ if (!ref) {
10680
+ setRect(null);
10681
+ return;
10682
+ }
10683
+ const update = () => {
10684
+ const next = readRect3(ref);
10685
+ setRect(
10686
+ (prev) => prev && next && prev.top === next.top && prev.left === next.left && prev.width === next.width && prev.height === next.height ? prev : next
10687
+ );
10688
+ };
10689
+ update();
10690
+ const opts = { capture: true, passive: true };
10691
+ window.addEventListener("scroll", update, opts);
10692
+ window.addEventListener("resize", update);
10693
+ const interval = setInterval(update, 500);
10694
+ return () => {
10695
+ window.removeEventListener("scroll", update, opts);
10696
+ window.removeEventListener("resize", update);
10697
+ clearInterval(interval);
10698
+ };
10699
+ }, [ref?.sectionId, ref?.index]);
10700
+ return rect;
10701
+ }
10702
+ function requestValidateTree2(postToParent2, tree) {
10703
+ return new Promise((resolve) => {
10704
+ const id = `ai-validate-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
10705
+ const timeout = window.setTimeout(() => {
10706
+ window.removeEventListener("message", onMessage);
10707
+ resolve({ ok: false, reasons: ["Validation request timed out."] });
10708
+ }, 8e3);
10709
+ function onMessage(e) {
10710
+ if (e.data?.type !== "ow:ai-validate-tree-result" || e.data.id !== id) return;
10711
+ window.clearTimeout(timeout);
10712
+ window.removeEventListener("message", onMessage);
10713
+ resolve({ ok: e.data.ok === true, reasons: Array.isArray(e.data.reasons) ? e.data.reasons : [] });
10714
+ }
10715
+ window.addEventListener("message", onMessage);
10716
+ postToParent2({ type: "ow:ai-validate-tree-request", id, tree });
10717
+ });
10718
+ }
10719
+ function requestAssetPick(postToParent2) {
10720
+ return new Promise((resolve) => {
10721
+ const id = `ai-asset-pick-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
10722
+ const timeout = window.setTimeout(() => {
10723
+ window.removeEventListener("message", onMessage);
10724
+ resolve(null);
10725
+ }, 3e5);
10726
+ function onMessage(e) {
10727
+ if (e.data?.type !== "ow:asset-picked" || e.data.id !== id) return;
10728
+ window.clearTimeout(timeout);
10729
+ window.removeEventListener("message", onMessage);
10730
+ resolve(
10731
+ typeof e.data.assetId === "string" && typeof e.data.url === "string" ? { assetId: e.data.assetId, url: e.data.url } : null
10732
+ );
10733
+ }
10734
+ window.addEventListener("message", onMessage);
10735
+ postToParent2({ type: "ow:asset-pick", id });
10736
+ });
10737
+ }
10738
+ function Pill2({
10739
+ label,
10740
+ onClick,
10741
+ disabled,
10742
+ active
10743
+ }) {
10744
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
10745
+ "button",
10746
+ {
10747
+ type: "button",
10748
+ onClick,
10749
+ disabled,
10750
+ style: {
10751
+ height: 28,
10752
+ padding: "0 10px",
10753
+ display: "inline-flex",
10754
+ alignItems: "center",
10755
+ gap: 4,
10756
+ borderRadius: 999,
10757
+ border: "none",
10758
+ cursor: disabled ? "default" : "pointer",
10759
+ background: active ? OHW_BLUE_DARK2 : "#ffffff",
10760
+ color: active ? "#ffffff" : OHW_BLUE_DARK2,
10761
+ opacity: disabled ? 0.4 : 1,
10762
+ fontSize: 12,
10763
+ lineHeight: "16px",
10764
+ fontFamily: "Figtree, ui-sans-serif, system-ui, sans-serif",
10765
+ whiteSpace: "nowrap",
10766
+ flex: "0 0 auto"
10767
+ },
10768
+ children: label
10769
+ }
10770
+ );
10771
+ }
10772
+ var VARIANTS = [
10773
+ { value: "logos", label: "Logos" },
10774
+ { value: "reel", label: "Reel" }
10775
+ ];
10776
+ var ALIGNS = [
10777
+ { value: "left", label: "Left" },
10778
+ { value: "center", label: "Center" },
10779
+ { value: "right", label: "Right" }
10780
+ ];
10781
+ var HOVERS = [
10782
+ { value: "none", label: "None" },
10783
+ { value: "lift", label: "Lift" },
10784
+ { value: "zoom", label: "Zoom" },
10785
+ { value: "fade", label: "Fade" }
10786
+ ];
10787
+ var TREATMENTS = [
10788
+ { value: "color", label: "Color" },
10789
+ { value: "grayscale", label: "Grayscale" }
10790
+ ];
10791
+ function MediaStripToolbar({
10792
+ entry,
10793
+ index,
10794
+ pending,
10795
+ error,
10796
+ onSetVariant,
10797
+ onSetAlign,
10798
+ onSetHover,
10799
+ onSetTreatment,
10800
+ onResize,
10801
+ onAddItem,
10802
+ onRemoveItem,
10803
+ onMoveLeft,
10804
+ onMoveRight
10805
+ }) {
10806
+ const items = mediaStripItems(entry.tree);
10807
+ const itemCount = items.length;
10808
+ const slots = findMediaStripSlots(entry.tree);
10809
+ const variant = slots?.variant === "reel" ? "reel" : "logos";
10810
+ const align = slots?.align === "left" || slots?.align === "right" ? slots.align : "center";
10811
+ const hover = slots?.hover === "none" || slots?.hover === "lift" || slots?.hover === "zoom" || slots?.hover === "fade" ? slots.hover : "none";
10812
+ const treatment = slots?.treatment === "color" || slots?.treatment === "grayscale" ? slots.treatment : variant === "logos" ? "grayscale" : "color";
10813
+ const sizeValue = variant === "logos" ? typeof slots?.logoMaxHeight === "number" ? slots.logoMaxHeight : 48 : typeof slots?.cardWidth === "number" ? slots.cardWidth : 240;
10814
+ const pillWrap = window.innerWidth <= 480 ? "wrap" : "nowrap";
10815
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
10198
10816
  "div",
10199
10817
  {
10200
10818
  "data-ohw-bridge": "",
@@ -10205,78 +10823,78 @@ function PricingCardToolbar({
10205
10823
  flexDirection: "column",
10206
10824
  gap: 6,
10207
10825
  alignItems: "center",
10208
- background: OHW_BLUE,
10826
+ background: OHW_BLUE2,
10209
10827
  padding: 8,
10210
10828
  borderRadius: 12,
10211
10829
  boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
10212
10830
  pointerEvents: pending ? "none" : "auto",
10213
10831
  opacity: pending ? 0.6 : 1,
10214
- // Only cap width on mobile, where the pill rows wrap — on desktop the row stays on one
10215
- // line and should size to fit it, not get clipped/overflow against a fixed cap.
10216
10832
  maxWidth: pillWrap === "wrap" ? "calc(100vw - 24px)" : "none"
10217
10833
  },
10218
10834
  children: [
10219
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: [
10220
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "+ Tier", onClick: onAddTier, disabled: collectionCount >= 4 }),
10221
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "- Tier", onClick: onRemoveTier, disabled: collectionCount <= 1 }),
10222
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "Featured", active: isFeatured, onClick: () => onToggleFeatured(!isFeatured) }),
10223
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "+ Button", onClick: onAddButton, disabled: buttonCount >= 2 }),
10224
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "- Button", onClick: onRemoveButton, disabled: buttonCount === 0 }),
10225
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "+ Feature", onClick: onAddFeature, disabled: featureCount >= 10 }),
10226
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Pill, { label: "- Feature", onClick: onRemoveFeature, disabled: featureCount <= 1 })
10835
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: [
10836
+ VARIANTS.map((v) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: v.label, active: variant === v.value, onClick: () => onSetVariant(v.value) }, v.value)),
10837
+ ALIGNS.map((a) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: a.label, active: align === a.value, onClick: () => onSetAlign(a.value) }, a.value))
10227
10838
  ] }),
10228
- isFeatured && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: EMPHASIS_TREATMENTS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10229
- Pill,
10230
- {
10231
- label: t.label,
10232
- active: (featured?.treatment ?? "outlined") === t.value,
10233
- onClick: () => onSetTreatment(t.value)
10234
- },
10235
- t.value
10236
- )) }),
10237
- error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
10839
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: [
10840
+ HOVERS.map((h) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: h.label, active: hover === h.value, onClick: () => onSetHover(h.value) }, h.value)),
10841
+ TREATMENTS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: t.label, active: treatment === t.value, onClick: () => onSetTreatment(t.value) }, t.value))
10842
+ ] }),
10843
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
10844
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: "\u2212", onClick: () => onResize(-8) }),
10845
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { style: { color: "#ffffff", fontSize: 12, minWidth: 34, textAlign: "center" }, children: [
10846
+ sizeValue,
10847
+ "px"
10848
+ ] }),
10849
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: "+", onClick: () => onResize(8) })
10850
+ ] }),
10851
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", gap: 6, flexWrap: pillWrap, justifyContent: "center" }, children: [
10852
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: "+ Item", onClick: onAddItem }),
10853
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: "\u2212 Item", onClick: onRemoveItem, disabled: itemCount <= 1 }),
10854
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: "\u2190 Move", onClick: onMoveLeft, disabled: index <= 0 }),
10855
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Pill2, { label: "\u2192 Move", onClick: onMoveRight, disabled: index >= itemCount - 1 })
10856
+ ] }),
10857
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
10238
10858
  ]
10239
10859
  }
10240
10860
  );
10241
10861
  }
10242
- function findPricingCardNode(tree, index) {
10862
+ function findMediaStripSlots(tree) {
10243
10863
  const stack = tree.rows.flatMap((row) => row.blocks);
10244
10864
  while (stack.length) {
10245
10865
  const node = stack.shift();
10246
- if (node.type === "collection" && Array.isArray(node.children) && node.children[0]?.type === "card" && node.children[0].slots?.preset === "pricing") {
10247
- return node.children[index] ?? null;
10248
- }
10866
+ if (node.type === "media-strip") return node.slots ?? {};
10249
10867
  if (node.children) stack.push(...node.children);
10250
10868
  }
10251
10869
  return null;
10252
10870
  }
10253
- function AiPricingCardOverlay({
10871
+ function AiMediaStripOverlay({
10254
10872
  postToParent: postToParent2,
10255
10873
  aiSectionsRef,
10256
10874
  applyTreeLocalRef
10257
10875
  }) {
10258
- const [hover, setHover] = (0, import_react9.useState)(null);
10259
- const [active, setActive] = (0, import_react9.useState)(null);
10260
- const [pending, setPending] = (0, import_react9.useState)(false);
10261
- const [error, setError] = (0, import_react9.useState)(null);
10262
- const activeRef = (0, import_react9.useRef)(null);
10876
+ const [hover, setHover] = (0, import_react10.useState)(null);
10877
+ const [active, setActive] = (0, import_react10.useState)(null);
10878
+ const [pending, setPending] = (0, import_react10.useState)(false);
10879
+ const [error, setError] = (0, import_react10.useState)(null);
10880
+ const activeRef = (0, import_react10.useRef)(null);
10263
10881
  activeRef.current = active;
10264
- (0, import_react9.useEffect)(() => {
10882
+ (0, import_react10.useEffect)(() => {
10265
10883
  const onMove = (e) => {
10266
10884
  const t = e.target;
10267
10885
  if (!(t instanceof HTMLElement)) return;
10268
10886
  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]")) {
10269
10887
  return;
10270
10888
  }
10271
- const cardEl = t.closest("[data-ohw-pricing-card]");
10272
- if (!cardEl) {
10889
+ const itemEl = t.closest("[data-ohw-media-strip-item]");
10890
+ if (!itemEl) {
10273
10891
  setHover(null);
10274
10892
  return;
10275
10893
  }
10276
- const sectionEl = cardEl.closest("[data-ohw-section]");
10894
+ const sectionEl = itemEl.closest("[data-ohw-section]");
10277
10895
  const unit = sectionEl ? movableUnit(sectionEl) : null;
10278
10896
  const sectionId = unit ? instanceIdOf(unit) || null : null;
10279
- const index = Number(cardEl.dataset.ohwPricingIndex);
10897
+ const index = Number(itemEl.dataset.ohwMediaStripIndex);
10280
10898
  if (!sectionId || Number.isNaN(index)) {
10281
10899
  setHover(null);
10282
10900
  return;
@@ -10291,22 +10909,22 @@ function AiPricingCardOverlay({
10291
10909
  document.documentElement.removeEventListener("mouseleave", onLeave);
10292
10910
  };
10293
10911
  }, []);
10294
- (0, import_react9.useEffect)(() => {
10912
+ (0, import_react10.useEffect)(() => {
10295
10913
  const onClick = (e) => {
10296
10914
  const current = activeRef.current;
10297
10915
  if (!current) return;
10298
10916
  const t = e.target;
10299
10917
  if (!(t instanceof HTMLElement)) return;
10300
10918
  if (t.closest("[data-ohw-item-interaction]")) return;
10301
- const cardEl = findPricingCardElement(current.sectionId, current.index);
10302
- if (cardEl && cardEl.contains(t)) return;
10919
+ const itemEl = findMediaStripItemElement(current.sectionId, current.index);
10920
+ if (itemEl && itemEl.contains(t)) return;
10303
10921
  setActive(null);
10304
10922
  setError(null);
10305
10923
  };
10306
10924
  document.addEventListener("click", onClick, true);
10307
10925
  return () => document.removeEventListener("click", onClick, true);
10308
10926
  }, []);
10309
- (0, import_react9.useEffect)(() => {
10927
+ (0, import_react10.useEffect)(() => {
10310
10928
  const onBlur = () => {
10311
10929
  if (!activeRef.current) return;
10312
10930
  setActive(null);
@@ -10315,7 +10933,7 @@ function AiPricingCardOverlay({
10315
10933
  window.addEventListener("blur", onBlur);
10316
10934
  return () => window.removeEventListener("blur", onBlur);
10317
10935
  }, []);
10318
- (0, import_react9.useEffect)(() => {
10936
+ (0, import_react10.useEffect)(() => {
10319
10937
  const onKeyDown = (e) => {
10320
10938
  if (e.key !== "Escape") return;
10321
10939
  if (!activeRef.current) return;
@@ -10325,14 +10943,14 @@ function AiPricingCardOverlay({
10325
10943
  document.addEventListener("keydown", onKeyDown);
10326
10944
  return () => document.removeEventListener("keydown", onKeyDown);
10327
10945
  }, []);
10328
- const findEntry = (0, import_react9.useCallback)(
10946
+ const findEntry = (0, import_react10.useCallback)(
10329
10947
  (sectionId) => {
10330
10948
  const state = parseAiSectionsState(aiSectionsRef.current);
10331
10949
  return state.sections.find((s) => s.id === sectionId) ?? null;
10332
10950
  },
10333
10951
  [aiSectionsRef]
10334
10952
  );
10335
- const runMutation = (0, import_react9.useCallback)(
10953
+ const runMutation = (0, import_react10.useCallback)(
10336
10954
  async (sectionId, mutate) => {
10337
10955
  const entry = findEntry(sectionId);
10338
10956
  if (!entry) return false;
@@ -10340,7 +10958,7 @@ function AiPricingCardOverlay({
10340
10958
  if (!nextTree) return false;
10341
10959
  setPending(true);
10342
10960
  setError(null);
10343
- const { ok, reasons } = await requestValidateTree(postToParent2, nextTree);
10961
+ const { ok, reasons } = await requestValidateTree2(postToParent2, nextTree);
10344
10962
  setPending(false);
10345
10963
  if (!ok) {
10346
10964
  setError(reasons[0] ?? "That change is not allowed.");
@@ -10354,8 +10972,6 @@ function AiPricingCardOverlay({
10354
10972
  label: entry.label,
10355
10973
  media: entry.media,
10356
10974
  ...entry.brand ? { brand: entry.brand } : {},
10357
- // The user is already looking at the card they just edited — recentering the
10358
- // viewport on every tier add/remove/toggle reads as the section jumping around.
10359
10975
  skipScrollIntoView: true
10360
10976
  });
10361
10977
  return true;
@@ -10363,16 +10979,16 @@ function AiPricingCardOverlay({
10363
10979
  [findEntry, postToParent2, applyTreeLocalRef]
10364
10980
  );
10365
10981
  const activeEntry = active ? findEntry(active.sectionId) : null;
10366
- const activeCardRect = useLiveCardRect(active);
10367
- const hoverHandleRect = useLiveCardRect(!active && hover ? hover : null);
10368
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
10369
- hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10982
+ const hoverHandleRect = useLiveItemRect(!active && hover ? hover : null);
10983
+ const activeItemRect = useLiveItemRect(active);
10984
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
10985
+ hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
10370
10986
  "button",
10371
10987
  {
10372
10988
  type: "button",
10373
10989
  "data-ohw-toolbar": "",
10374
10990
  onClick: () => setActive(hover),
10375
- "aria-label": "Configure pricing tier",
10991
+ "aria-label": "Configure media item",
10376
10992
  style: {
10377
10993
  position: "fixed",
10378
10994
  top: hoverHandleRect.top + 8,
@@ -10380,9 +10996,9 @@ function AiPricingCardOverlay({
10380
10996
  width: 28,
10381
10997
  height: 28,
10382
10998
  borderRadius: 8,
10383
- border: `1.5px dashed ${PRIMARY3}`,
10999
+ border: `1.5px dashed ${PRIMARY4}`,
10384
11000
  background: "#ffffff",
10385
- color: PRIMARY3,
11001
+ color: PRIMARY4,
10386
11002
  display: "flex",
10387
11003
  alignItems: "center",
10388
11004
  justifyContent: "center",
@@ -10391,41 +11007,63 @@ function AiPricingCardOverlay({
10391
11007
  fontSize: 14,
10392
11008
  fontWeight: 700
10393
11009
  },
10394
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.Star, { size: 14, style: { pointerEvents: "none" } })
11010
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Star, { size: 14, style: { pointerEvents: "none" } })
10395
11011
  }
10396
11012
  ),
10397
- activeCardRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
11013
+ activeItemRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
10398
11014
  ItemInteractionLayer,
10399
11015
  {
10400
- rect: activeCardRect,
11016
+ rect: activeItemRect,
10401
11017
  state: "active-top",
10402
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
10403
- PricingCardToolbar,
11018
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11019
+ MediaStripToolbar,
10404
11020
  {
10405
11021
  entry: activeEntry,
10406
11022
  index: active.index,
10407
11023
  pending,
10408
11024
  error,
10409
- onAddTier: () => runMutation(active.sectionId, addPricingTier),
10410
- onRemoveTier: () => {
10411
- void runMutation(active.sectionId, (tree) => removePricingTier(tree, active.index)).then(
11025
+ onSetVariant: (variant) => runMutation(active.sectionId, (tree) => setMediaStripVariant(tree, variant)),
11026
+ onSetAlign: (align) => runMutation(active.sectionId, (tree) => setMediaStripAlign(tree, align)),
11027
+ onSetHover: (hoverPreset) => runMutation(active.sectionId, (tree) => setMediaStripHover(tree, hoverPreset)),
11028
+ onSetTreatment: (treatment) => runMutation(active.sectionId, (tree) => setMediaStripTreatment(tree, treatment)),
11029
+ onResize: (delta) => {
11030
+ const slots = findMediaStripSlots(activeEntry.tree);
11031
+ const variant = slots?.variant === "reel" ? "reel" : "logos";
11032
+ const current = variant === "logos" ? typeof slots?.logoMaxHeight === "number" ? slots.logoMaxHeight : 48 : typeof slots?.cardWidth === "number" ? slots.cardWidth : 240;
11033
+ void runMutation(active.sectionId, (tree) => setMediaStripSizing(tree, current + delta));
11034
+ },
11035
+ onAddItem: () => {
11036
+ void requestAssetPick(postToParent2).then((picked) => {
11037
+ if (!picked) return;
11038
+ const item = { assetId: picked.assetId, alt: "Logo" };
11039
+ void runMutation(active.sectionId, (tree) => addMediaStripItem(tree, item, active.index)).then(
11040
+ (applied) => {
11041
+ if (applied) setActive({ sectionId: active.sectionId, index: active.index + 1 });
11042
+ }
11043
+ );
11044
+ });
11045
+ },
11046
+ onRemoveItem: () => {
11047
+ void runMutation(active.sectionId, (tree) => removeMediaStripItem(tree, active.index)).then(
10412
11048
  (applied) => {
10413
11049
  if (applied) setActive(null);
10414
11050
  }
10415
11051
  );
10416
11052
  },
10417
- onToggleFeatured: (enabled) => runMutation(
10418
- active.sectionId,
10419
- (tree) => setPricingCardFeatured(tree, active.index, { enabled })
10420
- ),
10421
- onSetTreatment: (treatment) => runMutation(
10422
- active.sectionId,
10423
- (tree) => setPricingCardFeatured(tree, active.index, { enabled: true, treatment })
10424
- ),
10425
- onAddButton: () => runMutation(active.sectionId, (tree) => addPricingCardButton(tree, active.index, "Learn more")),
10426
- onRemoveButton: () => runMutation(active.sectionId, (tree) => removePricingCardButton(tree, active.index)),
10427
- onAddFeature: () => runMutation(active.sectionId, (tree) => addPricingCardFeature(tree, active.index, "New feature")),
10428
- onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
11053
+ onMoveLeft: () => {
11054
+ void runMutation(active.sectionId, (tree) => reorderMediaStripItem(tree, active.index, -1)).then(
11055
+ (applied) => {
11056
+ if (applied) setActive({ sectionId: active.sectionId, index: active.index - 1 });
11057
+ }
11058
+ );
11059
+ },
11060
+ onMoveRight: () => {
11061
+ void runMutation(active.sectionId, (tree) => reorderMediaStripItem(tree, active.index, 1)).then(
11062
+ (applied) => {
11063
+ if (applied) setActive({ sectionId: active.sectionId, index: active.index + 1 });
11064
+ }
11065
+ );
11066
+ }
10429
11067
  }
10430
11068
  )
10431
11069
  }
@@ -10737,28 +11375,28 @@ function scrollToHashSectionWhenReady(behavior = "smooth") {
10737
11375
  }
10738
11376
 
10739
11377
  // src/ui/link-modal/LinkPopover.tsx
10740
- var import_react13 = require("react");
11378
+ var import_react14 = require("react");
10741
11379
 
10742
11380
  // src/ui/dialog.tsx
10743
11381
  var React9 = __toESM(require("react"), 1);
10744
11382
  var import_radix_ui6 = require("radix-ui");
10745
- var import_lucide_react9 = require("lucide-react");
10746
- var import_jsx_runtime19 = require("react/jsx-runtime");
11383
+ var import_lucide_react10 = require("lucide-react");
11384
+ var import_jsx_runtime20 = require("react/jsx-runtime");
10747
11385
  function Dialog2({
10748
11386
  ...props
10749
11387
  }) {
10750
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_radix_ui6.Dialog.Root, { "data-slot": "dialog", ...props });
11388
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui6.Dialog.Root, { "data-slot": "dialog", ...props });
10751
11389
  }
10752
11390
  function DialogPortal({
10753
11391
  ...props
10754
11392
  }) {
10755
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_radix_ui6.Dialog.Portal, { ...props });
11393
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui6.Dialog.Portal, { ...props });
10756
11394
  }
10757
11395
  function DialogOverlay({
10758
11396
  className,
10759
11397
  ...props
10760
11398
  }) {
10761
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11399
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10762
11400
  import_radix_ui6.Dialog.Overlay,
10763
11401
  {
10764
11402
  "data-slot": "dialog-overlay",
@@ -10771,9 +11409,9 @@ function DialogOverlay({
10771
11409
  var DialogContent = React9.forwardRef(
10772
11410
  ({ className, children, showCloseButton = true, container, ...props }, ref) => {
10773
11411
  const positionMode = container ? "absolute" : "fixed";
10774
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DialogPortal, { container: container ?? void 0, children: [
10775
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
10776
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
11412
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPortal, { container: container ?? void 0, children: [
11413
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
11414
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
10777
11415
  import_radix_ui6.Dialog.Content,
10778
11416
  {
10779
11417
  ref,
@@ -10789,13 +11427,13 @@ var DialogContent = React9.forwardRef(
10789
11427
  ...props,
10790
11428
  children: [
10791
11429
  children,
10792
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11430
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10793
11431
  import_radix_ui6.Dialog.Close,
10794
11432
  {
10795
11433
  type: "button",
10796
11434
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
10797
11435
  "aria-label": "Close",
10798
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.X, { size: 16, "aria-hidden": true })
11436
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.X, { size: 16, "aria-hidden": true })
10799
11437
  }
10800
11438
  ) : null
10801
11439
  ]
@@ -10809,13 +11447,13 @@ function DialogHeader({
10809
11447
  className,
10810
11448
  ...props
10811
11449
  }) {
10812
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
11450
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
10813
11451
  }
10814
11452
  function DialogFooter({
10815
11453
  className,
10816
11454
  ...props
10817
11455
  }) {
10818
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11456
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10819
11457
  "div",
10820
11458
  {
10821
11459
  className: cn("flex items-center justify-end gap-2", className),
@@ -10823,7 +11461,7 @@ function DialogFooter({
10823
11461
  }
10824
11462
  );
10825
11463
  }
10826
- var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11464
+ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10827
11465
  import_radix_ui6.Dialog.Title,
10828
11466
  {
10829
11467
  ref,
@@ -10835,7 +11473,7 @@ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
10835
11473
  }
10836
11474
  ));
10837
11475
  DialogTitle.displayName = import_radix_ui6.Dialog.Title.displayName;
10838
- var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11476
+ var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10839
11477
  import_radix_ui6.Dialog.Description,
10840
11478
  {
10841
11479
  ref,
@@ -10847,63 +11485,63 @@ DialogDescription.displayName = import_radix_ui6.Dialog.Description.displayName;
10847
11485
  var DialogClose = import_radix_ui6.Dialog.Close;
10848
11486
 
10849
11487
  // src/ui/link-modal/LinkEditorPanel.tsx
10850
- var import_lucide_react13 = require("lucide-react");
11488
+ var import_lucide_react14 = require("lucide-react");
10851
11489
 
10852
11490
  // src/ui/link-modal/DestinationBreadcrumb.tsx
10853
- var import_lucide_react10 = require("lucide-react");
10854
- var import_jsx_runtime20 = require("react/jsx-runtime");
11491
+ var import_lucide_react11 = require("lucide-react");
11492
+ var import_jsx_runtime21 = require("react/jsx-runtime");
10855
11493
  function DestinationBreadcrumb({
10856
11494
  pageTitle,
10857
11495
  sectionLabel
10858
11496
  }) {
10859
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
10860
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm font-medium! text-foreground m-0", children: "Destination" }),
10861
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-3", children: [
10862
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
10863
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.File, { size: 16, className: "shrink-0 text-foreground", "aria-hidden": true }),
10864
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium leading-none text-foreground!", children: pageTitle })
11497
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
11498
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm font-medium! text-foreground m-0", children: "Destination" }),
11499
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-3", children: [
11500
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
11501
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react11.File, { size: 16, className: "shrink-0 text-foreground", "aria-hidden": true }),
11502
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm font-medium leading-none text-foreground!", children: pageTitle })
10865
11503
  ] }),
10866
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10867
- import_lucide_react10.ArrowRight,
11504
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11505
+ import_lucide_react11.ArrowRight,
10868
11506
  {
10869
11507
  size: 16,
10870
11508
  className: "shrink-0 text-muted-foreground",
10871
11509
  "aria-hidden": true
10872
11510
  }
10873
11511
  ),
10874
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
10875
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10876
- import_lucide_react10.GalleryVertical,
11512
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
11513
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11514
+ import_lucide_react11.GalleryVertical,
10877
11515
  {
10878
11516
  size: 16,
10879
11517
  className: "shrink-0 text-foreground",
10880
11518
  "aria-hidden": true
10881
11519
  }
10882
11520
  ),
10883
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
11521
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
10884
11522
  ] })
10885
11523
  ] })
10886
11524
  ] });
10887
11525
  }
10888
11526
 
10889
11527
  // src/ui/link-modal/SectionTreeItem.tsx
10890
- var import_lucide_react11 = require("lucide-react");
10891
- var import_jsx_runtime21 = require("react/jsx-runtime");
11528
+ var import_lucide_react12 = require("lucide-react");
11529
+ var import_jsx_runtime22 = require("react/jsx-runtime");
10892
11530
  function SectionTreeItem({
10893
11531
  section,
10894
11532
  onSelect,
10895
11533
  selected
10896
11534
  }) {
10897
11535
  const interactive = Boolean(onSelect);
10898
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
10899
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11536
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
11537
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10900
11538
  "div",
10901
11539
  {
10902
11540
  className: "-mr-px h-9 w-2 shrink-0 rounded-bl-sm border-b border-l border-border mb-4",
10903
11541
  "aria-hidden": true
10904
11542
  }
10905
11543
  ),
10906
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
11544
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10907
11545
  "div",
10908
11546
  {
10909
11547
  role: interactive ? "button" : void 0,
@@ -10921,15 +11559,15 @@ function SectionTreeItem({
10921
11559
  interactive && selected && "border-bridge-primary"
10922
11560
  ),
10923
11561
  children: [
10924
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
10925
- import_lucide_react11.GalleryVertical,
11562
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11563
+ import_lucide_react12.GalleryVertical,
10926
11564
  {
10927
11565
  size: 16,
10928
11566
  className: "shrink-0 text-foreground",
10929
11567
  "aria-hidden": true
10930
11568
  }
10931
11569
  ),
10932
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
11570
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
10933
11571
  ]
10934
11572
  }
10935
11573
  )
@@ -10937,14 +11575,14 @@ function SectionTreeItem({
10937
11575
  }
10938
11576
 
10939
11577
  // src/ui/link-modal/UrlOrPageInput.tsx
10940
- var import_react10 = require("react");
11578
+ var import_react11 = require("react");
10941
11579
 
10942
11580
  // src/ui/input.tsx
10943
11581
  var React10 = __toESM(require("react"), 1);
10944
- var import_jsx_runtime22 = require("react/jsx-runtime");
11582
+ var import_jsx_runtime23 = require("react/jsx-runtime");
10945
11583
  var Input = React10.forwardRef(
10946
11584
  ({ className, type, ...props }, ref) => {
10947
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11585
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10948
11586
  "input",
10949
11587
  {
10950
11588
  type,
@@ -10963,9 +11601,9 @@ Input.displayName = "Input";
10963
11601
 
10964
11602
  // src/ui/label.tsx
10965
11603
  var import_radix_ui7 = require("radix-ui");
10966
- var import_jsx_runtime23 = require("react/jsx-runtime");
11604
+ var import_jsx_runtime24 = require("react/jsx-runtime");
10967
11605
  function Label({ className, ...props }) {
10968
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11606
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10969
11607
  import_radix_ui7.Label.Root,
10970
11608
  {
10971
11609
  "data-slot": "label",
@@ -10976,12 +11614,12 @@ function Label({ className, ...props }) {
10976
11614
  }
10977
11615
 
10978
11616
  // src/ui/link-modal/UrlOrPageInput.tsx
10979
- var import_lucide_react12 = require("lucide-react");
10980
- var import_jsx_runtime24 = require("react/jsx-runtime");
11617
+ var import_lucide_react13 = require("lucide-react");
11618
+ var import_jsx_runtime25 = require("react/jsx-runtime");
10981
11619
  function FieldChevron({
10982
11620
  onClick
10983
11621
  }) {
10984
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
11622
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10985
11623
  "button",
10986
11624
  {
10987
11625
  type: "button",
@@ -10989,7 +11627,7 @@ function FieldChevron({
10989
11627
  onClick,
10990
11628
  "aria-label": "Open page list",
10991
11629
  tabIndex: -1,
10992
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.ChevronDown, { size: 16 })
11630
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.ChevronDown, { size: 16 })
10993
11631
  }
10994
11632
  );
10995
11633
  }
@@ -11005,11 +11643,11 @@ function UrlOrPageInput({
11005
11643
  readOnly = false,
11006
11644
  urlError
11007
11645
  }) {
11008
- const inputId = (0, import_react10.useId)();
11009
- const inputRef = (0, import_react10.useRef)(null);
11010
- const rootRef = (0, import_react10.useRef)(null);
11011
- const [isFocused, setIsFocused] = (0, import_react10.useState)(false);
11012
- (0, import_react10.useEffect)(() => {
11646
+ const inputId = (0, import_react11.useId)();
11647
+ const inputRef = (0, import_react11.useRef)(null);
11648
+ const rootRef = (0, import_react11.useRef)(null);
11649
+ const [isFocused, setIsFocused] = (0, import_react11.useState)(false);
11650
+ (0, import_react11.useEffect)(() => {
11013
11651
  if (!dropdownOpen) return;
11014
11652
  const isOutside = (e) => {
11015
11653
  const root = rootRef.current;
@@ -11050,19 +11688,19 @@ function UrlOrPageInput({
11050
11688
  "data-ohw-link-field flex h-[36px] w-full items-center overflow-hidden rounded-md border bg-background pl-3 pr-3 py-2 outline-none transition-[border-color,box-shadow]",
11051
11689
  urlError ? "border-destructive shadow-[0_0_0_1px_var(--ohw-destructive)]" : isFocused ? "border-bridge-primary shadow-[0_0_0_1px_var(--ohw-primary)]" : "border-input"
11052
11690
  );
11053
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
11054
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
11055
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
11056
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
11057
- selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
11058
- import_lucide_react12.File,
11691
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
11692
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
11693
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
11694
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
11695
+ selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11696
+ import_lucide_react13.File,
11059
11697
  {
11060
11698
  size: 16,
11061
11699
  className: "shrink-0 text-foreground",
11062
11700
  "aria-hidden": true
11063
11701
  }
11064
11702
  ) }) : null,
11065
- readOnly ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
11703
+ readOnly ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11066
11704
  Input,
11067
11705
  {
11068
11706
  ref: inputRef,
@@ -11088,7 +11726,7 @@ function UrlOrPageInput({
11088
11726
  )
11089
11727
  }
11090
11728
  ),
11091
- selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
11729
+ selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11092
11730
  "button",
11093
11731
  {
11094
11732
  type: "button",
@@ -11096,26 +11734,26 @@ function UrlOrPageInput({
11096
11734
  onMouseDown: clearSelection,
11097
11735
  "aria-label": "Clear selected page",
11098
11736
  tabIndex: -1,
11099
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.X, { size: 16, "aria-hidden": true })
11737
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.X, { size: 16, "aria-hidden": true })
11100
11738
  }
11101
11739
  ) : null,
11102
- !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
11740
+ !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
11103
11741
  ] }),
11104
- dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
11742
+ dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11105
11743
  "div",
11106
11744
  {
11107
11745
  "data-ohw-link-page-dropdown": "",
11108
11746
  className: "absolute left-0 right-0 top-[calc(100%+4px)] z-50 max-h-48 overflow-auto rounded-lg border border-border bg-popover py-1 shadow-lg",
11109
11747
  onMouseDown: (e) => e.preventDefault(),
11110
- children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
11748
+ children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
11111
11749
  "button",
11112
11750
  {
11113
11751
  type: "button",
11114
11752
  className: "flex h-9 w-full items-center gap-2 border-0 bg-transparent px-3 text-left text-sm leading-5 text-foreground outline-none hover:bg-muted",
11115
11753
  onClick: () => onPageSelect(page),
11116
11754
  children: [
11117
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.File, { size: 16, className: "shrink-0", "aria-hidden": true }),
11118
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate", children: page.title })
11755
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.File, { size: 16, className: "shrink-0", "aria-hidden": true }),
11756
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: page.title })
11119
11757
  ]
11120
11758
  },
11121
11759
  page.path
@@ -11123,34 +11761,34 @@ function UrlOrPageInput({
11123
11761
  }
11124
11762
  ) : null
11125
11763
  ] }),
11126
- urlError ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
11764
+ urlError ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
11127
11765
  ] });
11128
11766
  }
11129
11767
 
11130
11768
  // src/ui/link-modal/LinkEditorPanel.tsx
11131
- var import_jsx_runtime25 = require("react/jsx-runtime");
11769
+ var import_jsx_runtime26 = require("react/jsx-runtime");
11132
11770
  function LinkEditorPanel({ state, onClose }) {
11133
11771
  const isCancel = state.secondaryLabel === "Cancel" || state.secondaryLabel === "Back to sections";
11134
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
11135
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11772
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
11773
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11136
11774
  "button",
11137
11775
  {
11138
11776
  type: "button",
11139
11777
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50 h-7",
11140
11778
  "aria-label": "Close",
11141
11779
  onClick: onClose,
11142
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.X, { size: 16, "aria-hidden": true })
11780
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.X, { size: 16, "aria-hidden": true })
11143
11781
  }
11144
11782
  ) }),
11145
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
11146
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
11147
- state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11783
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
11784
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
11785
+ state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11148
11786
  DestinationBreadcrumb,
11149
11787
  {
11150
11788
  pageTitle: state.selectedPage.title,
11151
11789
  sectionLabel: state.selectedSection.label
11152
11790
  }
11153
- ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11791
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11154
11792
  UrlOrPageInput,
11155
11793
  {
11156
11794
  value: state.searchValue,
@@ -11163,8 +11801,8 @@ function LinkEditorPanel({ state, onClose }) {
11163
11801
  urlError: state.urlError
11164
11802
  }
11165
11803
  ),
11166
- state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
11167
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11804
+ state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
11805
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11168
11806
  Button,
11169
11807
  {
11170
11808
  type: "button",
@@ -11175,15 +11813,15 @@ function LinkEditorPanel({ state, onClose }) {
11175
11813
  children: "Choose a section"
11176
11814
  }
11177
11815
  ),
11178
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
11179
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.Info, { size: 16, className: "shrink-0", "aria-hidden": true }),
11180
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Pick a section this link should scroll to." })
11816
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
11817
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.Info, { size: 16, className: "shrink-0", "aria-hidden": true }),
11818
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Pick a section this link should scroll to." })
11181
11819
  ] })
11182
11820
  ] }) : null,
11183
- state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
11821
+ state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
11184
11822
  ] }),
11185
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
11186
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11823
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
11824
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11187
11825
  Button,
11188
11826
  {
11189
11827
  type: "button",
@@ -11198,7 +11836,7 @@ function LinkEditorPanel({ state, onClose }) {
11198
11836
  children: state.secondaryLabel
11199
11837
  }
11200
11838
  ),
11201
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11839
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11202
11840
  Button,
11203
11841
  {
11204
11842
  type: "button",
@@ -11217,9 +11855,9 @@ function LinkEditorPanel({ state, onClose }) {
11217
11855
  }
11218
11856
 
11219
11857
  // src/ui/link-modal/SectionPickerOverlay.tsx
11220
- var import_react11 = require("react");
11858
+ var import_react12 = require("react");
11221
11859
  var import_react_dom3 = require("react-dom");
11222
- var import_lucide_react14 = require("lucide-react");
11860
+ var import_lucide_react15 = require("lucide-react");
11223
11861
  var import_navigation2 = require("next/navigation");
11224
11862
 
11225
11863
  // src/lib/parent-scroll.ts
@@ -11241,7 +11879,7 @@ function getIframeChromeClip(parentScroll) {
11241
11879
  }
11242
11880
 
11243
11881
  // src/ui/link-modal/SectionPickerOverlay.tsx
11244
- var import_jsx_runtime26 = require("react/jsx-runtime");
11882
+ var import_jsx_runtime27 = require("react/jsx-runtime");
11245
11883
  var DIM_OVERLAY = "rgba(0, 0, 0, 0.45)";
11246
11884
  function rectsEqual(a, b) {
11247
11885
  if (a.size !== b.size) return false;
@@ -11274,12 +11912,12 @@ function hitTestSectionId(x, y, sectionIds, rects) {
11274
11912
  return null;
11275
11913
  }
11276
11914
  function useSectionRects(sectionIdsKey, enabled) {
11277
- const [rects, setRects] = (0, import_react11.useState)(/* @__PURE__ */ new Map());
11278
- const sectionIds = (0, import_react11.useMemo)(
11915
+ const [rects, setRects] = (0, import_react12.useState)(/* @__PURE__ */ new Map());
11916
+ const sectionIds = (0, import_react12.useMemo)(
11279
11917
  () => sectionIdsKey ? sectionIdsKey.split("\0") : [],
11280
11918
  [sectionIdsKey]
11281
11919
  );
11282
- (0, import_react11.useEffect)(() => {
11920
+ (0, import_react12.useEffect)(() => {
11283
11921
  if (!enabled || sectionIds.length === 0) {
11284
11922
  setRects((prev) => prev.size === 0 ? prev : /* @__PURE__ */ new Map());
11285
11923
  return;
@@ -11320,13 +11958,13 @@ function SectionPickerOverlay({
11320
11958
  }) {
11321
11959
  const router = (0, import_navigation2.useRouter)();
11322
11960
  const pathname = (0, import_navigation2.usePathname)();
11323
- const [selectedId, setSelectedId] = (0, import_react11.useState)(null);
11324
- const [hoveredId, setHoveredId] = (0, import_react11.useState)(null);
11325
- const pointerRef = (0, import_react11.useRef)(null);
11326
- const pointerScreenRef = (0, import_react11.useRef)(null);
11327
- const iframeOffsetTopRef = (0, import_react11.useRef)(null);
11328
- const sectionIdsRef = (0, import_react11.useRef)([]);
11329
- const [chromeClip, setChromeClip] = (0, import_react11.useState)(
11961
+ const [selectedId, setSelectedId] = (0, import_react12.useState)(null);
11962
+ const [hoveredId, setHoveredId] = (0, import_react12.useState)(null);
11963
+ const pointerRef = (0, import_react12.useRef)(null);
11964
+ const pointerScreenRef = (0, import_react12.useRef)(null);
11965
+ const iframeOffsetTopRef = (0, import_react12.useRef)(null);
11966
+ const sectionIdsRef = (0, import_react12.useRef)([]);
11967
+ const [chromeClip, setChromeClip] = (0, import_react12.useState)(
11330
11968
  () => ({
11331
11969
  top: 0,
11332
11970
  bottom: typeof window !== "undefined" ? window.innerHeight : 0
@@ -11334,12 +11972,12 @@ function SectionPickerOverlay({
11334
11972
  );
11335
11973
  const normalizedTarget = normalizePath(pagePath);
11336
11974
  const isOnTargetPage = normalizePath(pathname) === normalizedTarget;
11337
- (0, import_react11.useEffect)(() => {
11975
+ (0, import_react12.useEffect)(() => {
11338
11976
  if (isOnTargetPage) return;
11339
11977
  const search = readPreservedSearch();
11340
11978
  router.push(`${normalizedTarget}${search}`);
11341
11979
  }, [isOnTargetPage, normalizedTarget, router]);
11342
- (0, import_react11.useEffect)(() => {
11980
+ (0, import_react12.useEffect)(() => {
11343
11981
  document.documentElement.setAttribute("data-ohw-section-picking", "");
11344
11982
  document.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
11345
11983
  el.removeAttribute("data-ohw-hovered");
@@ -11351,24 +11989,24 @@ function SectionPickerOverlay({
11351
11989
  document.documentElement.removeAttribute("data-ohw-section-picking");
11352
11990
  };
11353
11991
  }, []);
11354
- const liveSections = (0, import_react11.useMemo)(() => {
11992
+ const liveSections = (0, import_react12.useMemo)(() => {
11355
11993
  if (!isOnTargetPage) return sections;
11356
11994
  const live = collectSectionsFromDom();
11357
11995
  if (live.length === 0) return sections;
11358
11996
  const labels = new Map(sections.map((s) => [s.id, s.label]));
11359
11997
  return live.map((s) => ({ id: s.id, label: labels.get(s.id) ?? s.label }));
11360
11998
  }, [isOnTargetPage, sections, pathname]);
11361
- const sectionIdsKey = (0, import_react11.useMemo)(
11999
+ const sectionIdsKey = (0, import_react12.useMemo)(
11362
12000
  () => liveSections.map((s) => s.id).join("\0"),
11363
12001
  [liveSections]
11364
12002
  );
11365
- const sectionIds = (0, import_react11.useMemo)(
12003
+ const sectionIds = (0, import_react12.useMemo)(
11366
12004
  () => liveSections.map((s) => s.id),
11367
12005
  [liveSections]
11368
12006
  );
11369
12007
  sectionIdsRef.current = sectionIds;
11370
12008
  const rects = useSectionRects(sectionIdsKey, isOnTargetPage);
11371
- const applyHoverAt = (0, import_react11.useCallback)(
12009
+ const applyHoverAt = (0, import_react12.useCallback)(
11372
12010
  (x, y, liveRects) => {
11373
12011
  const ids = sectionIdsRef.current;
11374
12012
  const map = liveRects ?? readSectionRects(ids);
@@ -11377,7 +12015,7 @@ function SectionPickerOverlay({
11377
12015
  },
11378
12016
  []
11379
12017
  );
11380
- (0, import_react11.useEffect)(() => {
12018
+ (0, import_react12.useEffect)(() => {
11381
12019
  const applyClip = (iframeOffsetTop, visibleCanvasTop, canvasH, promptBarH = 0) => {
11382
12020
  const next = getIframeVisibleClip({
11383
12021
  iframeOffsetTop,
@@ -11421,12 +12059,12 @@ function SectionPickerOverlay({
11421
12059
  window.removeEventListener("resize", onResize);
11422
12060
  };
11423
12061
  }, [applyHoverAt]);
11424
- (0, import_react11.useEffect)(() => {
12062
+ (0, import_react12.useEffect)(() => {
11425
12063
  const ptr = pointerRef.current;
11426
12064
  if (!ptr) return;
11427
12065
  applyHoverAt(ptr.x, ptr.y, rects);
11428
12066
  }, [rects, applyHoverAt]);
11429
- (0, import_react11.useEffect)(() => {
12067
+ (0, import_react12.useEffect)(() => {
11430
12068
  const rememberPointer = (clientX, clientY) => {
11431
12069
  pointerRef.current = { x: clientX, y: clientY };
11432
12070
  const top = iframeOffsetTopRef.current;
@@ -11450,7 +12088,7 @@ function SectionPickerOverlay({
11450
12088
  window.removeEventListener("message", onPointerSync);
11451
12089
  };
11452
12090
  }, [rects, applyHoverAt]);
11453
- const handleSelect = (0, import_react11.useCallback)(
12091
+ const handleSelect = (0, import_react12.useCallback)(
11454
12092
  (section) => {
11455
12093
  if (selectedId) return;
11456
12094
  setSelectedId(section.id);
@@ -11458,7 +12096,7 @@ function SectionPickerOverlay({
11458
12096
  },
11459
12097
  [selectedId, onSelect]
11460
12098
  );
11461
- (0, import_react11.useEffect)(() => {
12099
+ (0, import_react12.useEffect)(() => {
11462
12100
  const onKeyDown = (e) => {
11463
12101
  if (e.key === "Escape") {
11464
12102
  e.preventDefault();
@@ -11472,7 +12110,7 @@ function SectionPickerOverlay({
11472
12110
  const portalRoot = typeof document !== "undefined" ? document.querySelector("[data-ohw-bridge-root]") ?? document.body : null;
11473
12111
  if (!portalRoot) return null;
11474
12112
  return (0, import_react_dom3.createPortal)(
11475
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
12113
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
11476
12114
  "div",
11477
12115
  {
11478
12116
  "data-ohw-section-picker": "",
@@ -11482,12 +12120,12 @@ function SectionPickerOverlay({
11482
12120
  role: "dialog",
11483
12121
  "aria-label": "Choose a section",
11484
12122
  children: [
11485
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12123
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11486
12124
  "div",
11487
12125
  {
11488
12126
  className: "pointer-events-auto fixed left-5 z-[2]",
11489
12127
  style: { top: chromeClip.top + 20 },
11490
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
12128
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
11491
12129
  Button,
11492
12130
  {
11493
12131
  type: "button",
@@ -11496,14 +12134,14 @@ function SectionPickerOverlay({
11496
12134
  className: "h-8 min-w-0 gap-1 border-border bg-background px-2 py-1.5 shadow-sm hover:bg-muted cursor-pointer",
11497
12135
  onClick: onBack,
11498
12136
  children: [
11499
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.ArrowLeft, { className: "size-4 shrink-0", "aria-hidden": true }),
12137
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.ArrowLeft, { className: "size-4 shrink-0", "aria-hidden": true }),
11500
12138
  "Back"
11501
12139
  ]
11502
12140
  }
11503
12141
  )
11504
12142
  }
11505
12143
  ),
11506
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12144
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11507
12145
  "div",
11508
12146
  {
11509
12147
  className: "pointer-events-none fixed left-1/2 z-[2] rounded-lg px-4 py-3 text-xs leading-4 tracking-[0.18px] text-white shadow-md",
@@ -11516,7 +12154,7 @@ function SectionPickerOverlay({
11516
12154
  children: "Click on section to select"
11517
12155
  }
11518
12156
  ),
11519
- !isOnTargetPage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12157
+ !isOnTargetPage ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11520
12158
  "div",
11521
12159
  {
11522
12160
  className: "pointer-events-none fixed left-1/2 z-[1] -translate-x-1/2 rounded-md px-3 py-2 text-sm text-muted-foreground shadow-sm",
@@ -11524,14 +12162,14 @@ function SectionPickerOverlay({
11524
12162
  children: "Loading page preview\u2026"
11525
12163
  }
11526
12164
  ) : null,
11527
- isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pointer-events-auto fixed inset-0 z-[1] flex items-center justify-center bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." }) }) : null,
12165
+ isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pointer-events-auto fixed inset-0 z-[1] flex items-center justify-center bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." }) }) : null,
11528
12166
  isOnTargetPage ? liveSections.map((section) => {
11529
12167
  const rect = rects.get(section.id);
11530
12168
  if (!rect || rect.width <= 0 || rect.height <= 0) return null;
11531
12169
  const isSelected = selectedId === section.id;
11532
12170
  const isHovered = hoveredId === section.id;
11533
12171
  const isLit = isSelected || isHovered;
11534
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
12172
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
11535
12173
  "button",
11536
12174
  {
11537
12175
  type: "button",
@@ -11546,7 +12184,7 @@ function SectionPickerOverlay({
11546
12184
  "aria-label": `Select section ${section.label}`,
11547
12185
  onClick: () => handleSelect(section),
11548
12186
  children: [
11549
- isLit ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12187
+ isLit ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11550
12188
  "span",
11551
12189
  {
11552
12190
  className: "pointer-events-none absolute",
@@ -11559,13 +12197,13 @@ function SectionPickerOverlay({
11559
12197
  "aria-hidden": true
11560
12198
  }
11561
12199
  ) : null,
11562
- isSelected ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12200
+ isSelected ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11563
12201
  "span",
11564
12202
  {
11565
12203
  className: "absolute right-3 top-3 flex size-8 items-center justify-center rounded-full text-white",
11566
12204
  style: { backgroundColor: "var(--ohw-primary, #0885fe)" },
11567
12205
  "aria-hidden": true,
11568
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.Check, { className: "size-5" })
12206
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Check, { className: "size-5" })
11569
12207
  }
11570
12208
  ) : null
11571
12209
  ]
@@ -11581,7 +12219,7 @@ function SectionPickerOverlay({
11581
12219
  }
11582
12220
 
11583
12221
  // src/ui/link-modal/useLinkModalState.ts
11584
- var import_react12 = require("react");
12222
+ var import_react13 = require("react");
11585
12223
  function useLinkModalState({
11586
12224
  open,
11587
12225
  mode,
@@ -11593,14 +12231,14 @@ function useLinkModalState({
11593
12231
  onClose,
11594
12232
  onSubmit
11595
12233
  }) {
11596
- const availablePages = (0, import_react12.useMemo)(() => pages, [pages]);
11597
- const [searchValue, setSearchValue] = (0, import_react12.useState)("");
11598
- const [selectedPage, setSelectedPage] = (0, import_react12.useState)(null);
11599
- const [selectedSection, setSelectedSection] = (0, import_react12.useState)(null);
11600
- const [step, setStep] = (0, import_react12.useState)("input");
11601
- const [dropdownOpen, setDropdownOpen] = (0, import_react12.useState)(false);
11602
- const [urlError, setUrlError] = (0, import_react12.useState)("");
11603
- const reset = (0, import_react12.useCallback)(() => {
12234
+ const availablePages = (0, import_react13.useMemo)(() => pages, [pages]);
12235
+ const [searchValue, setSearchValue] = (0, import_react13.useState)("");
12236
+ const [selectedPage, setSelectedPage] = (0, import_react13.useState)(null);
12237
+ const [selectedSection, setSelectedSection] = (0, import_react13.useState)(null);
12238
+ const [step, setStep] = (0, import_react13.useState)("input");
12239
+ const [dropdownOpen, setDropdownOpen] = (0, import_react13.useState)(false);
12240
+ const [urlError, setUrlError] = (0, import_react13.useState)("");
12241
+ const reset = (0, import_react13.useCallback)(() => {
11604
12242
  setSearchValue("");
11605
12243
  setSelectedPage(null);
11606
12244
  setSelectedSection(null);
@@ -11608,7 +12246,7 @@ function useLinkModalState({
11608
12246
  setDropdownOpen(false);
11609
12247
  setUrlError("");
11610
12248
  }, []);
11611
- (0, import_react12.useEffect)(() => {
12249
+ (0, import_react13.useEffect)(() => {
11612
12250
  if (!open) return;
11613
12251
  if (mode === "edit" && initialTarget) {
11614
12252
  const { pageRoute } = parseTarget(initialTarget);
@@ -11624,11 +12262,11 @@ function useLinkModalState({
11624
12262
  setDropdownOpen(false);
11625
12263
  setUrlError("");
11626
12264
  }, [open, mode, initialTarget, reset]);
11627
- const filteredPages = (0, import_react12.useMemo)(() => {
12265
+ const filteredPages = (0, import_react13.useMemo)(() => {
11628
12266
  if (!searchValue.trim()) return availablePages;
11629
12267
  return availablePages.filter((p) => p.title.toLowerCase().startsWith(searchValue.toLowerCase()));
11630
12268
  }, [availablePages, searchValue]);
11631
- const activeSections = (0, import_react12.useMemo)(() => {
12269
+ const activeSections = (0, import_react13.useMemo)(() => {
11632
12270
  if (!selectedPage) return [];
11633
12271
  return getSectionsForPath(sectionsByPath, selectedPage.path);
11634
12272
  }, [selectedPage, sectionsByPath]);
@@ -11677,7 +12315,7 @@ function useLinkModalState({
11677
12315
  reset();
11678
12316
  onClose();
11679
12317
  };
11680
- const isValid = (0, import_react12.useMemo)(() => {
12318
+ const isValid = (0, import_react13.useMemo)(() => {
11681
12319
  if (urlError) return false;
11682
12320
  if (showBreadcrumb) return true;
11683
12321
  if (selectedPage) return true;
@@ -11745,7 +12383,7 @@ function useLinkModalState({
11745
12383
  }
11746
12384
 
11747
12385
  // src/ui/link-modal/LinkPopover.tsx
11748
- var import_jsx_runtime27 = require("react/jsx-runtime");
12386
+ var import_jsx_runtime28 = require("react/jsx-runtime");
11749
12387
  function postToParent(data) {
11750
12388
  window.parent?.postMessage(data, "*");
11751
12389
  }
@@ -11774,7 +12412,7 @@ function LinkPopover({
11774
12412
  onSubmit
11775
12413
  });
11776
12414
  const sectionPickerActive = state.showSectionPicker && Boolean(state.selectedPage);
11777
- (0, import_react13.useEffect)(() => {
12415
+ (0, import_react14.useEffect)(() => {
11778
12416
  if (!open) return;
11779
12417
  if (sectionPickerActive) {
11780
12418
  postToParent({ type: "ui:unlock" });
@@ -11841,15 +12479,15 @@ function LinkPopover({
11841
12479
  );
11842
12480
  };
11843
12481
  }, [open, sectionPickerActive]);
11844
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
11845
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12482
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
12483
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11846
12484
  Dialog2,
11847
12485
  {
11848
12486
  open: open && !sectionPickerActive,
11849
12487
  onOpenChange: (next) => {
11850
12488
  if (!next) onClose?.();
11851
12489
  },
11852
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12490
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11853
12491
  DialogContent,
11854
12492
  {
11855
12493
  ref: panelRef,
@@ -11859,12 +12497,12 @@ function LinkPopover({
11859
12497
  "data-ohw-bridge": "",
11860
12498
  showCloseButton: false,
11861
12499
  className: "gap-0 p-0 w-full max-w-[448px] pointer-events-auto z-[2147483646] overflow-visible",
11862
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LinkEditorPanel, { state, onClose })
12500
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LinkEditorPanel, { state, onClose })
11863
12501
  }
11864
12502
  )
11865
12503
  }
11866
12504
  ),
11867
- sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12505
+ sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11868
12506
  SectionPickerOverlay,
11869
12507
  {
11870
12508
  pagePath: state.selectedPage.path,
@@ -15053,9 +15691,9 @@ function addFooterColumnWithPersist({
15053
15691
  }
15054
15692
 
15055
15693
  // src/ui/FloatingPanel.tsx
15056
- var import_react14 = require("react");
15057
- var import_lucide_react15 = require("lucide-react");
15058
- var import_jsx_runtime28 = require("react/jsx-runtime");
15694
+ var import_react15 = require("react");
15695
+ var import_lucide_react16 = require("lucide-react");
15696
+ var import_jsx_runtime29 = require("react/jsx-runtime");
15059
15697
  var PANEL_WIDTH = 256;
15060
15698
  var EDGE_MARGIN = 16;
15061
15699
  var HEADER_MIN = 56;
@@ -15103,24 +15741,24 @@ function FloatingPanel({
15103
15741
  className,
15104
15742
  bodyClassName
15105
15743
  }) {
15106
- const panelRef = (0, import_react14.useRef)(null);
15107
- const [measured, setMeasured] = (0, import_react14.useState)({ w: PANEL_WIDTH, h: 280 });
15108
- const dragRef = (0, import_react14.useRef)(null);
15744
+ const panelRef = (0, import_react15.useRef)(null);
15745
+ const [measured, setMeasured] = (0, import_react15.useState)({ w: PANEL_WIDTH, h: 280 });
15746
+ const dragRef = (0, import_react15.useRef)(null);
15109
15747
  const resolved = position ?? defaultFloatingPanelPosition(parentScroll);
15110
15748
  const clamped = clampPosition(resolved, parentScroll, measured.w);
15111
15749
  const maxHeight = availablePanelHeight(parentScroll, clamped.y);
15112
- (0, import_react14.useLayoutEffect)(() => {
15750
+ (0, import_react15.useLayoutEffect)(() => {
15113
15751
  if (!open || !panelRef.current) return;
15114
15752
  const el = panelRef.current;
15115
15753
  const next = { w: el.offsetWidth || PANEL_WIDTH, h: el.offsetHeight || 280 };
15116
15754
  setMeasured((prev) => prev.w === next.w && prev.h === next.h ? prev : next);
15117
15755
  }, [open, children, title, context]);
15118
- (0, import_react14.useEffect)(() => {
15756
+ (0, import_react15.useEffect)(() => {
15119
15757
  if (!open || !position || !onPositionChange) return;
15120
15758
  const next = clampPosition(position, parentScroll, measured.w, measured.h);
15121
15759
  if (next.x !== position.x || next.y !== position.y) onPositionChange(next);
15122
15760
  }, [open, parentScroll, measured.w, measured.h, position, onPositionChange]);
15123
- const onHeaderPointerDown = (0, import_react14.useCallback)(
15761
+ const onHeaderPointerDown = (0, import_react15.useCallback)(
15124
15762
  (e) => {
15125
15763
  if (e.button !== 0) return;
15126
15764
  if (e.target.closest("[data-ohw-floating-panel-close]")) return;
@@ -15139,7 +15777,7 @@ function FloatingPanel({
15139
15777
  },
15140
15778
  [clamped.x, clamped.y]
15141
15779
  );
15142
- const onHeaderPointerMove = (0, import_react14.useCallback)(
15780
+ const onHeaderPointerMove = (0, import_react15.useCallback)(
15143
15781
  (e) => {
15144
15782
  const drag = dragRef.current;
15145
15783
  if (!drag || drag.pointerId !== e.pointerId) return;
@@ -15166,7 +15804,7 @@ function FloatingPanel({
15166
15804
  },
15167
15805
  [measured.h, measured.w, onPositionChange, parentScroll]
15168
15806
  );
15169
- const endDrag = (0, import_react14.useCallback)((e) => {
15807
+ const endDrag = (0, import_react15.useCallback)((e) => {
15170
15808
  const drag = dragRef.current;
15171
15809
  if (!drag || drag.pointerId !== e.pointerId) return;
15172
15810
  dragRef.current = null;
@@ -15176,13 +15814,13 @@ function FloatingPanel({
15176
15814
  } catch {
15177
15815
  }
15178
15816
  }, []);
15179
- (0, import_react14.useEffect)(() => {
15817
+ (0, import_react15.useEffect)(() => {
15180
15818
  if (open) return;
15181
15819
  document.documentElement.removeAttribute("data-ohw-panel-dragging");
15182
15820
  }, [open]);
15183
- (0, import_react14.useEffect)(() => () => document.documentElement.removeAttribute("data-ohw-panel-dragging"), []);
15821
+ (0, import_react15.useEffect)(() => () => document.documentElement.removeAttribute("data-ohw-panel-dragging"), []);
15184
15822
  if (!open) return null;
15185
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
15823
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
15186
15824
  "div",
15187
15825
  {
15188
15826
  ref: panelRef,
@@ -15199,7 +15837,7 @@ function FloatingPanel({
15199
15837
  onPointerDown: (e) => e.stopPropagation(),
15200
15838
  onClick: (e) => e.stopPropagation(),
15201
15839
  children: [
15202
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
15840
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
15203
15841
  "div",
15204
15842
  {
15205
15843
  "data-ohw-floating-panel-header": "",
@@ -15209,14 +15847,14 @@ function FloatingPanel({
15209
15847
  onPointerUp: endDrag,
15210
15848
  onPointerCancel: endDrag,
15211
15849
  children: [
15212
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
15213
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
15214
- icon ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "shrink-0 text-foreground", children: icon }) : null,
15215
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "min-w-0 flex-1 text-lg font-semibold leading-7 text-foreground", children: title })
15850
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
15851
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
15852
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "shrink-0 text-foreground", children: icon }) : null,
15853
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "min-w-0 flex-1 text-lg font-semibold leading-7 text-foreground", children: title })
15216
15854
  ] }),
15217
- context ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "w-full text-sm leading-5 text-muted-foreground", children: context }) : null
15855
+ context ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "w-full text-sm leading-5 text-muted-foreground", children: context }) : null
15218
15856
  ] }),
15219
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15857
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15220
15858
  "button",
15221
15859
  {
15222
15860
  type: "button",
@@ -15228,13 +15866,13 @@ function FloatingPanel({
15228
15866
  onClose();
15229
15867
  },
15230
15868
  onPointerDown: (e) => e.stopPropagation(),
15231
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.X, { size: 16, "aria-hidden": true })
15869
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.X, { size: 16, "aria-hidden": true })
15232
15870
  }
15233
15871
  )
15234
15872
  ]
15235
15873
  }
15236
15874
  ),
15237
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
15875
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15238
15876
  "div",
15239
15877
  {
15240
15878
  "data-ohw-floating-panel-body": "",
@@ -15242,6 +15880,7 @@ function FloatingPanel({
15242
15880
  "flex min-h-0 w-full flex-1 flex-col gap-4 overflow-y-auto overscroll-contain p-5",
15243
15881
  bodyClassName
15244
15882
  ),
15883
+ style: { WebkitOverflowScrolling: "touch" },
15245
15884
  children
15246
15885
  }
15247
15886
  )
@@ -15251,15 +15890,15 @@ function FloatingPanel({
15251
15890
  }
15252
15891
 
15253
15892
  // src/ui/socials-display-panel.tsx
15254
- var import_jsx_runtime29 = require("react/jsx-runtime");
15893
+ var import_jsx_runtime30 = require("react/jsx-runtime");
15255
15894
  function DisplaySwitch({
15256
15895
  label,
15257
15896
  checked,
15258
15897
  disabled,
15259
15898
  onChange
15260
15899
  }) {
15261
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
15262
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15900
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
15901
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15263
15902
  "span",
15264
15903
  {
15265
15904
  className: cn(
@@ -15269,7 +15908,7 @@ function DisplaySwitch({
15269
15908
  children: label
15270
15909
  }
15271
15910
  ),
15272
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15911
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15273
15912
  "button",
15274
15913
  {
15275
15914
  type: "button",
@@ -15283,7 +15922,7 @@ function DisplaySwitch({
15283
15922
  checked ? "bg-bridge-primary" : "bg-primary-50",
15284
15923
  disabled ? "cursor-default opacity-50" : "cursor-pointer"
15285
15924
  ),
15286
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15925
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15287
15926
  "span",
15288
15927
  {
15289
15928
  className: cn(
@@ -15297,8 +15936,8 @@ function DisplaySwitch({
15297
15936
  ] });
15298
15937
  }
15299
15938
  function SocialsDisplayPanel({ display, onChange, className }) {
15300
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
15301
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15939
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
15940
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15302
15941
  DisplaySwitch,
15303
15942
  {
15304
15943
  label: "Text",
@@ -15307,7 +15946,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
15307
15946
  onChange: (text) => onChange({ ...display, text })
15308
15947
  }
15309
15948
  ),
15310
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15949
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15311
15950
  DisplaySwitch,
15312
15951
  {
15313
15952
  label: "Icon",
@@ -15320,7 +15959,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
15320
15959
  }
15321
15960
 
15322
15961
  // src/ui/button-style-panel.tsx
15323
- var import_lucide_react16 = require("lucide-react");
15962
+ var import_lucide_react17 = require("lucide-react");
15324
15963
 
15325
15964
  // src/lib/button-styles.ts
15326
15965
  var BUTTON_VARIANTS_KEY = "__ohw_button_variants";
@@ -16020,7 +16659,7 @@ function withAssignment(content, id, assignment) {
16020
16659
  }
16021
16660
 
16022
16661
  // src/ui/button-style-panel.tsx
16023
- var import_jsx_runtime30 = require("react/jsx-runtime");
16662
+ var import_jsx_runtime31 = require("react/jsx-runtime");
16024
16663
  var SIZE_LABEL = { s: "S", m: "M", l: "L" };
16025
16664
  function ButtonStylePanel({
16026
16665
  variants,
@@ -16034,15 +16673,15 @@ function ButtonStylePanel({
16034
16673
  }) {
16035
16674
  const preview = scaleGeometry(sizes.m, 0.75);
16036
16675
  const label = previewLabel.trim() || "Book Now";
16037
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
16038
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
16039
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500", children: "Variants" }),
16040
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex w-full flex-col gap-2.5", children: BUTTON_VARIANT_IDS.map((id) => {
16676
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
16677
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
16678
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500", children: "Variants" }),
16679
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex w-full flex-col gap-2.5", children: BUTTON_VARIANT_IDS.map((id) => {
16041
16680
  const chrome = variants[id];
16042
16681
  const selected = id === variant;
16043
16682
  const hasBorder = parseFloat(chrome.borderWidth) > 0;
16044
16683
  const cardSlot = previewSlotForChrome(chrome, slotBackground);
16045
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16684
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
16046
16685
  "button",
16047
16686
  {
16048
16687
  type: "button",
@@ -16058,12 +16697,12 @@ function ButtonStylePanel({
16058
16697
  selected ? "border-2 border-primary" : "border border-border"
16059
16698
  ),
16060
16699
  children: [
16061
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16700
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16062
16701
  "div",
16063
16702
  {
16064
16703
  className: "flex w-full items-center justify-center py-5",
16065
16704
  style: { background: cardSlot },
16066
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16705
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16067
16706
  "span",
16068
16707
  {
16069
16708
  className: "inline-flex items-center justify-center whitespace-nowrap font-semibold uppercase leading-none",
@@ -16085,12 +16724,12 @@ function ButtonStylePanel({
16085
16724
  )
16086
16725
  }
16087
16726
  ),
16088
- selected ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16727
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16089
16728
  "span",
16090
16729
  {
16091
16730
  className: "absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground",
16092
16731
  "aria-hidden": true,
16093
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.Check, { className: "size-3", strokeWidth: 3 })
16732
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.Check, { className: "size-3", strokeWidth: 3 })
16094
16733
  }
16095
16734
  ) : null
16096
16735
  ]
@@ -16099,9 +16738,9 @@ function ButtonStylePanel({
16099
16738
  );
16100
16739
  }) })
16101
16740
  ] }),
16102
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
16103
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500", children: "Size" }),
16104
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16741
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
16742
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500", children: "Size" }),
16743
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16105
16744
  "div",
16106
16745
  {
16107
16746
  className: "flex w-full items-start rounded-lg bg-stone-100 p-1",
@@ -16109,7 +16748,7 @@ function ButtonStylePanel({
16109
16748
  "aria-label": "Size",
16110
16749
  children: BUTTON_SIZE_IDS.map((id) => {
16111
16750
  const selected = id === size;
16112
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16751
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16113
16752
  "button",
16114
16753
  {
16115
16754
  type: "button",
@@ -16851,7 +17490,7 @@ function hitTestNavDropSlot(clientX, clientY, draggedHrefKey, draggedEl) {
16851
17490
  }
16852
17491
 
16853
17492
  // src/useNavItemDrag.ts
16854
- var import_react15 = require("react");
17493
+ var import_react16 = require("react");
16855
17494
  function useNavItemDrag({
16856
17495
  isEditMode,
16857
17496
  editContentRef,
@@ -16875,11 +17514,11 @@ function useNavItemDrag({
16875
17514
  getNavigationItemAnchor: getNavigationItemAnchor2,
16876
17515
  isDragHandleDisabled: isDragHandleDisabled2
16877
17516
  }) {
16878
- const navDragRef = (0, import_react15.useRef)(null);
16879
- const [navDropSlots, setNavDropSlots] = (0, import_react15.useState)([]);
16880
- const [activeNavDropIndex, setActiveNavDropIndex] = (0, import_react15.useState)(null);
16881
- const navPointerDragRef = (0, import_react15.useRef)(null);
16882
- const clearNavDragVisuals = (0, import_react15.useCallback)(() => {
17517
+ const navDragRef = (0, import_react16.useRef)(null);
17518
+ const [navDropSlots, setNavDropSlots] = (0, import_react16.useState)([]);
17519
+ const [activeNavDropIndex, setActiveNavDropIndex] = (0, import_react16.useState)(null);
17520
+ const navPointerDragRef = (0, import_react16.useRef)(null);
17521
+ const clearNavDragVisuals = (0, import_react16.useCallback)(() => {
16883
17522
  const session = navDragRef.current;
16884
17523
  const nestedHrefKey = session?.draggedEl?.closest("[data-ohw-nav-children]") != null ? session.hrefKey : null;
16885
17524
  navDragRef.current = null;
@@ -16912,7 +17551,7 @@ function useNavItemDrag({
16912
17551
  document.documentElement.removeAttribute("data-ohw-nav-dragging-root");
16913
17552
  unlockItemDragInteraction();
16914
17553
  }, [setDraggedItemRect, setIsItemDragging, setSiblingHintRects]);
16915
- const refreshNavDragVisuals = (0, import_react15.useCallback)(
17554
+ const refreshNavDragVisuals = (0, import_react16.useCallback)(
16916
17555
  (session, activeSlot, clientX, clientY) => {
16917
17556
  setDraggedItemRect(session.draggedEl.getBoundingClientRect());
16918
17557
  if (typeof clientX === "number" && typeof clientY === "number") {
@@ -16930,13 +17569,13 @@ function useNavItemDrag({
16930
17569
  },
16931
17570
  [setDraggedItemRect, setSiblingHintRects]
16932
17571
  );
16933
- const refreshNavDragVisualsRef = (0, import_react15.useRef)(refreshNavDragVisuals);
17572
+ const refreshNavDragVisualsRef = (0, import_react16.useRef)(refreshNavDragVisuals);
16934
17573
  refreshNavDragVisualsRef.current = refreshNavDragVisuals;
16935
- const commitNavDragRef = (0, import_react15.useRef)(() => {
17574
+ const commitNavDragRef = (0, import_react16.useRef)(() => {
16936
17575
  });
16937
- const beginNavDragRef = (0, import_react15.useRef)(() => {
17576
+ const beginNavDragRef = (0, import_react16.useRef)(() => {
16938
17577
  });
16939
- const beginNavDrag = (0, import_react15.useCallback)(
17578
+ const beginNavDrag = (0, import_react16.useCallback)(
16940
17579
  (session) => {
16941
17580
  const rect = session.draggedEl.getBoundingClientRect();
16942
17581
  session.lastClientX = session.lastClientX || rect.left + rect.width / 2;
@@ -16975,7 +17614,7 @@ function useNavItemDrag({
16975
17614
  ]
16976
17615
  );
16977
17616
  beginNavDragRef.current = beginNavDrag;
16978
- const commitNavDrag = (0, import_react15.useCallback)(
17617
+ const commitNavDrag = (0, import_react16.useCallback)(
16979
17618
  (clientX, clientY) => {
16980
17619
  const session = navDragRef.current;
16981
17620
  if (!session) {
@@ -17054,7 +17693,7 @@ function useNavItemDrag({
17054
17693
  [clearNavDragVisuals, deselectRef, editContentRef, postToParentRef, selectRef]
17055
17694
  );
17056
17695
  commitNavDragRef.current = commitNavDrag;
17057
- const startNavLinkDrag = (0, import_react15.useCallback)(
17696
+ const startNavLinkDrag = (0, import_react16.useCallback)(
17058
17697
  (anchor, clientX, clientY, wasSelected) => {
17059
17698
  if (footerDragRef.current) return false;
17060
17699
  const hrefKey = anchor.getAttribute("data-ohw-href-key");
@@ -17072,7 +17711,7 @@ function useNavItemDrag({
17072
17711
  },
17073
17712
  [beginNavDrag, footerDragRef, isDragHandleDisabled2, isCtaButton]
17074
17713
  );
17075
- const onNavDragOver = (0, import_react15.useCallback)(
17714
+ const onNavDragOver = (0, import_react16.useCallback)(
17076
17715
  (e) => {
17077
17716
  const session = navDragRef.current;
17078
17717
  if (!session) return false;
@@ -17084,7 +17723,7 @@ function useNavItemDrag({
17084
17723
  },
17085
17724
  []
17086
17725
  );
17087
- (0, import_react15.useEffect)(() => {
17726
+ (0, import_react16.useEffect)(() => {
17088
17727
  if (!isEditMode) return;
17089
17728
  const THRESHOLD = 10;
17090
17729
  const resolveWasSelected = (el) => {
@@ -17211,7 +17850,7 @@ function useNavItemDrag({
17211
17850
  setLinkPopover,
17212
17851
  suppressNextClickRef
17213
17852
  ]);
17214
- const armNavPressFromChrome = (0, import_react15.useCallback)(
17853
+ const armNavPressFromChrome = (0, import_react16.useCallback)(
17215
17854
  (selected, clientX, clientY, pointerId) => {
17216
17855
  const hrefKey = selected.getAttribute("data-ohw-href-key");
17217
17856
  if (!hrefKey || !isNavbarHrefKey(hrefKey)) return false;
@@ -17243,7 +17882,7 @@ function useNavItemDrag({
17243
17882
  }
17244
17883
 
17245
17884
  // src/useSectionDrag.ts
17246
- var import_react16 = require("react");
17885
+ var import_react17 = require("react");
17247
17886
 
17248
17887
  // src/lib/section-dnd.ts
17249
17888
  function isFooterSection(el) {
@@ -17336,21 +17975,21 @@ function useSectionDrag({
17336
17975
  suppressNextClickRef,
17337
17976
  suppressClickUntilRef
17338
17977
  }) {
17339
- const sectionDragRef = (0, import_react16.useRef)(null);
17340
- const [sectionDropSlots, setSectionDropSlots] = (0, import_react16.useState)([]);
17341
- const [activeSectionDropIndex, setActiveSectionDropIndex] = (0, import_react16.useState)(null);
17342
- const [isSectionDragging, setIsSectionDragging] = (0, import_react16.useState)(false);
17343
- const sectionPointerDragRef = (0, import_react16.useRef)(null);
17344
- const autoScrollRafRef = (0, import_react16.useRef)(null);
17345
- const autoScrollDeltaRef = (0, import_react16.useRef)(0);
17346
- const stopAutoScroll = (0, import_react16.useCallback)(() => {
17978
+ const sectionDragRef = (0, import_react17.useRef)(null);
17979
+ const [sectionDropSlots, setSectionDropSlots] = (0, import_react17.useState)([]);
17980
+ const [activeSectionDropIndex, setActiveSectionDropIndex] = (0, import_react17.useState)(null);
17981
+ const [isSectionDragging, setIsSectionDragging] = (0, import_react17.useState)(false);
17982
+ const sectionPointerDragRef = (0, import_react17.useRef)(null);
17983
+ const autoScrollRafRef = (0, import_react17.useRef)(null);
17984
+ const autoScrollDeltaRef = (0, import_react17.useRef)(0);
17985
+ const stopAutoScroll = (0, import_react17.useCallback)(() => {
17347
17986
  if (autoScrollRafRef.current != null) {
17348
17987
  cancelAnimationFrame(autoScrollRafRef.current);
17349
17988
  autoScrollRafRef.current = null;
17350
17989
  }
17351
17990
  autoScrollDeltaRef.current = 0;
17352
17991
  }, []);
17353
- const tickAutoScroll = (0, import_react16.useCallback)(() => {
17992
+ const tickAutoScroll = (0, import_react17.useCallback)(() => {
17354
17993
  if (!sectionDragRef.current) {
17355
17994
  stopAutoScroll();
17356
17995
  return;
@@ -17360,7 +17999,7 @@ function useSectionDrag({
17360
17999
  }
17361
18000
  autoScrollRafRef.current = requestAnimationFrame(tickAutoScroll);
17362
18001
  }, [postToParentRef, stopAutoScroll]);
17363
- const updateAutoScroll = (0, import_react16.useCallback)(
18002
+ const updateAutoScroll = (0, import_react17.useCallback)(
17364
18003
  (clientY) => {
17365
18004
  const clip = getIframeChromeClip(parentScrollRef.current);
17366
18005
  let delta = 0;
@@ -17382,7 +18021,7 @@ function useSectionDrag({
17382
18021
  },
17383
18022
  [parentScrollRef, stopAutoScroll, tickAutoScroll]
17384
18023
  );
17385
- const clearSectionDragVisuals = (0, import_react16.useCallback)(() => {
18024
+ const clearSectionDragVisuals = (0, import_react17.useCallback)(() => {
17386
18025
  sectionDragRef.current?.draggedEl.removeAttribute("data-ohw-section-dragging");
17387
18026
  sectionDragRef.current = null;
17388
18027
  setSectionDropSlots([]);
@@ -17392,7 +18031,7 @@ function useSectionDrag({
17392
18031
  document.documentElement.removeAttribute("data-ohw-section-dragging-root");
17393
18032
  unlockItemDragInteraction();
17394
18033
  }, [stopAutoScroll]);
17395
- const refreshSectionDragVisuals = (0, import_react16.useCallback)(
18034
+ const refreshSectionDragVisuals = (0, import_react17.useCallback)(
17396
18035
  (session, clientX, clientY) => {
17397
18036
  session.lastClientX = clientX;
17398
18037
  session.lastClientY = clientY;
@@ -17406,7 +18045,7 @@ function useSectionDrag({
17406
18045
  },
17407
18046
  [updateAutoScroll]
17408
18047
  );
17409
- const beginSectionDrag = (0, import_react16.useCallback)(
18048
+ const beginSectionDrag = (0, import_react17.useCallback)(
17410
18049
  (session) => {
17411
18050
  sectionDragRef.current = session;
17412
18051
  setIsSectionDragging(true);
@@ -17417,7 +18056,7 @@ function useSectionDrag({
17417
18056
  },
17418
18057
  [refreshSectionDragVisuals]
17419
18058
  );
17420
- const commitSectionDrag = (0, import_react16.useCallback)(() => {
18059
+ const commitSectionDrag = (0, import_react17.useCallback)(() => {
17421
18060
  const session = sectionDragRef.current;
17422
18061
  if (!session) {
17423
18062
  clearSectionDragVisuals();
@@ -17446,7 +18085,7 @@ function useSectionDrag({
17446
18085
  });
17447
18086
  });
17448
18087
  }, [clearSectionDragVisuals, editContentRef, postToParentRef]);
17449
- const startSectionPressDrag = (0, import_react16.useCallback)(
18088
+ const startSectionPressDrag = (0, import_react17.useCallback)(
17450
18089
  (el, clientX, clientY, pointerId) => {
17451
18090
  if (navDragRef.current || footerDragRef.current || sectionDragRef.current) return false;
17452
18091
  const instanceId = instanceIdOf(el);
@@ -17463,7 +18102,7 @@ function useSectionDrag({
17463
18102
  },
17464
18103
  [footerDragRef, navDragRef]
17465
18104
  );
17466
- (0, import_react16.useEffect)(() => {
18105
+ (0, import_react17.useEffect)(() => {
17467
18106
  if (!isEditMode) return;
17468
18107
  const onPointerDown = (e) => {
17469
18108
  if (e.button !== 0) return;
@@ -17568,8 +18207,8 @@ function useSectionDrag({
17568
18207
  }
17569
18208
 
17570
18209
  // src/ui/footer-container-chrome.tsx
17571
- var import_lucide_react17 = require("lucide-react");
17572
- var import_jsx_runtime31 = require("react/jsx-runtime");
18210
+ var import_lucide_react18 = require("lucide-react");
18211
+ var import_jsx_runtime32 = require("react/jsx-runtime");
17573
18212
  function FooterContainerChrome({
17574
18213
  rect,
17575
18214
  onAdd,
@@ -17577,7 +18216,7 @@ function FooterContainerChrome({
17577
18216
  }) {
17578
18217
  const chromeGap = 6;
17579
18218
  const buttonMargin = 7;
17580
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
18219
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17581
18220
  "div",
17582
18221
  {
17583
18222
  "data-ohw-footer-container-chrome": "",
@@ -17589,8 +18228,8 @@ function FooterContainerChrome({
17589
18228
  width: rect.width + chromeGap * 2,
17590
18229
  height: rect.height + chromeGap * 2
17591
18230
  },
17592
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tooltip, { children: [
17593
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
18231
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Tooltip, { children: [
18232
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17594
18233
  "button",
17595
18234
  {
17596
18235
  type: "button",
@@ -17609,17 +18248,17 @@ function FooterContainerChrome({
17609
18248
  if (addDisabled) return;
17610
18249
  onAdd();
17611
18250
  },
17612
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
18251
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react18.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
17613
18252
  }
17614
18253
  ) }),
17615
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
18254
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
17616
18255
  ] })
17617
18256
  }
17618
18257
  ) });
17619
18258
  }
17620
18259
 
17621
18260
  // src/lib/carousel.ts
17622
- var import_react17 = require("react");
18261
+ var import_react18 = require("react");
17623
18262
  var CAROUSEL_ATTR = "data-ohw-carousel";
17624
18263
  var CAROUSEL_VALUE_ATTR = "data-ohw-carousel-value";
17625
18264
  var CAROUSEL_SLIDE_ATTR = "data-ohw-carousel-slide";
@@ -17681,8 +18320,8 @@ function applyCarouselNode(key, val) {
17681
18320
  return true;
17682
18321
  }
17683
18322
  function useOhwCarousel(key, initial) {
17684
- const [images, setImages] = (0, import_react17.useState)(initial);
17685
- (0, import_react17.useEffect)(() => {
18323
+ const [images, setImages] = (0, import_react18.useState)(initial);
18324
+ (0, import_react18.useEffect)(() => {
17686
18325
  const el = document.querySelector(
17687
18326
  `[${CAROUSEL_ATTR}][data-ohw-key="${CSS.escape(key)}"]`
17688
18327
  );
@@ -18101,14 +18740,14 @@ function deleteSelectedNavFooterItem(deps) {
18101
18740
  }
18102
18741
 
18103
18742
  // src/ui/navbar-container-chrome.tsx
18104
- var import_lucide_react18 = require("lucide-react");
18105
- var import_jsx_runtime32 = require("react/jsx-runtime");
18743
+ var import_lucide_react19 = require("lucide-react");
18744
+ var import_jsx_runtime33 = require("react/jsx-runtime");
18106
18745
  function NavbarContainerChrome({
18107
18746
  rect,
18108
18747
  onAdd
18109
18748
  }) {
18110
18749
  const chromeGap = 6;
18111
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
18750
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18112
18751
  "div",
18113
18752
  {
18114
18753
  "data-ohw-navbar-container-chrome": "",
@@ -18120,7 +18759,7 @@ function NavbarContainerChrome({
18120
18759
  width: rect.width + chromeGap * 2,
18121
18760
  height: rect.height + chromeGap * 2
18122
18761
  },
18123
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
18762
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18124
18763
  "button",
18125
18764
  {
18126
18765
  type: "button",
@@ -18137,7 +18776,7 @@ function NavbarContainerChrome({
18137
18776
  e.stopPropagation();
18138
18777
  onAdd();
18139
18778
  },
18140
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react18.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
18779
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react19.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
18141
18780
  }
18142
18781
  )
18143
18782
  }
@@ -18146,7 +18785,7 @@ function NavbarContainerChrome({
18146
18785
 
18147
18786
  // src/ui/drop-indicator.tsx
18148
18787
  var React11 = __toESM(require("react"), 1);
18149
- var import_jsx_runtime33 = require("react/jsx-runtime");
18788
+ var import_jsx_runtime34 = require("react/jsx-runtime");
18150
18789
  var dropIndicatorVariants = cva(
18151
18790
  "ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
18152
18791
  {
@@ -18170,7 +18809,7 @@ var dropIndicatorVariants = cva(
18170
18809
  );
18171
18810
  var DropIndicator = React11.forwardRef(
18172
18811
  ({ className, direction, state, ...props }, ref) => {
18173
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18812
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
18174
18813
  "div",
18175
18814
  {
18176
18815
  ref,
@@ -18187,7 +18826,7 @@ var DropIndicator = React11.forwardRef(
18187
18826
  DropIndicator.displayName = "DropIndicator";
18188
18827
 
18189
18828
  // src/ui/badge.tsx
18190
- var import_jsx_runtime34 = require("react/jsx-runtime");
18829
+ var import_jsx_runtime35 = require("react/jsx-runtime");
18191
18830
  var badgeVariants = cva(
18192
18831
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
18193
18832
  {
@@ -18205,13 +18844,13 @@ var badgeVariants = cva(
18205
18844
  }
18206
18845
  );
18207
18846
  function Badge({ className, variant, ...props }) {
18208
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
18847
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
18209
18848
  }
18210
18849
 
18211
18850
  // src/OhhwellsBridge.tsx
18212
- var import_lucide_react19 = require("lucide-react");
18213
- var import_jsx_runtime35 = require("react/jsx-runtime");
18214
- var PRIMARY4 = "#0885FE";
18851
+ var import_lucide_react20 = require("lucide-react");
18852
+ var import_jsx_runtime36 = require("react/jsx-runtime");
18853
+ var PRIMARY5 = "#0885FE";
18215
18854
  var IMAGE_FADE_MS = 300;
18216
18855
  var MEDIA_SETTLE_TIMEOUT_MS = 2500;
18217
18856
  function runOpacityFade(el, onDone) {
@@ -18332,7 +18971,7 @@ function duplicateSchedulingWidget(instanceId, scheduleId) {
18332
18971
  schedulingRoots.set(container, root);
18333
18972
  (0, import_react_dom4.flushSync)(() => {
18334
18973
  root.render(
18335
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
18974
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
18336
18975
  SchedulingWidget,
18337
18976
  {
18338
18977
  notifyOnConnect: false,
@@ -18460,7 +19099,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
18460
19099
  schedulingRoots.set(container, root);
18461
19100
  (0, import_react_dom4.flushSync)(() => {
18462
19101
  root.render(
18463
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19102
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
18464
19103
  SchedulingWidget,
18465
19104
  {
18466
19105
  notifyOnConnect,
@@ -19190,7 +19829,7 @@ var TOOLBAR_STROKE_GAP2 = 4;
19190
19829
  var TOOLBAR_OFFSET_FROM_ELEMENT = SELECTION_CHROME_GAP2 + TOOLBAR_STROKE_GAP2;
19191
19830
  var HOVER_STROKE_WIDTH = 1.5;
19192
19831
  var TEXT_HOVER_SIDE_PAD = 4;
19193
- var CHROME_PRIMARY = `var(--ohw-primary, ${PRIMARY4})`;
19832
+ var CHROME_PRIMARY = `var(--ohw-primary, ${PRIMARY5})`;
19194
19833
  var TOOLBAR_GROUPS = [
19195
19834
  [
19196
19835
  { cmd: "bold", title: "Bold" },
@@ -19216,7 +19855,7 @@ function EditGlowChrome({
19216
19855
  hideHandle = false
19217
19856
  }) {
19218
19857
  const GAP = SELECTION_CHROME_GAP2;
19219
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19858
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19220
19859
  "div",
19221
19860
  {
19222
19861
  ref: elRef,
@@ -19231,7 +19870,7 @@ function EditGlowChrome({
19231
19870
  zIndex: 2147483646
19232
19871
  },
19233
19872
  children: [
19234
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19873
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19235
19874
  "div",
19236
19875
  {
19237
19876
  style: {
@@ -19245,7 +19884,7 @@ function EditGlowChrome({
19245
19884
  }
19246
19885
  }
19247
19886
  ),
19248
- reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19887
+ reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19249
19888
  "div",
19250
19889
  {
19251
19890
  "data-ohw-drag-handle-container": "",
@@ -19257,7 +19896,7 @@ function EditGlowChrome({
19257
19896
  transform: "translate(calc(-100% - 7px), -50%)",
19258
19897
  pointerEvents: dragDisabled ? "none" : "auto"
19259
19898
  },
19260
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19899
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19261
19900
  DragHandle,
19262
19901
  {
19263
19902
  "aria-label": `Reorder ${reorderHrefKey}`,
@@ -19434,9 +20073,9 @@ function FloatingToolbar({
19434
20073
  showEditLink,
19435
20074
  onEditLink
19436
20075
  }) {
19437
- const localRef = import_react18.default.useRef(null);
19438
- const [measuredW, setMeasuredW] = import_react18.default.useState(330);
19439
- const setRefs = import_react18.default.useCallback(
20076
+ const localRef = import_react19.default.useRef(null);
20077
+ const [measuredW, setMeasuredW] = import_react19.default.useState(330);
20078
+ const setRefs = import_react19.default.useCallback(
19440
20079
  (node) => {
19441
20080
  localRef.current = node;
19442
20081
  if (typeof elRef === "function") elRef(node);
@@ -19448,7 +20087,7 @@ function FloatingToolbar({
19448
20087
  },
19449
20088
  [elRef]
19450
20089
  );
19451
- import_react18.default.useLayoutEffect(() => {
20090
+ import_react19.default.useLayoutEffect(() => {
19452
20091
  const node = localRef.current;
19453
20092
  if (!node) return;
19454
20093
  const update = () => {
@@ -19461,7 +20100,7 @@ function FloatingToolbar({
19461
20100
  return () => ro.disconnect();
19462
20101
  }, [showEditLink, activeCommands]);
19463
20102
  const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
19464
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20103
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19465
20104
  "div",
19466
20105
  {
19467
20106
  ref: setRefs,
@@ -19473,12 +20112,12 @@ function FloatingToolbar({
19473
20112
  zIndex: 2147483647,
19474
20113
  pointerEvents: "auto"
19475
20114
  },
19476
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CustomToolbar, { children: [
19477
- TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react18.default.Fragment, { children: [
19478
- gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomToolbarDivider, {}),
20115
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CustomToolbar, { children: [
20116
+ TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react19.default.Fragment, { children: [
20117
+ gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomToolbarDivider, {}),
19479
20118
  btns.map((btn) => {
19480
20119
  const isActive = activeCommands.has(btn.cmd);
19481
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20120
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19482
20121
  CustomToolbarButton,
19483
20122
  {
19484
20123
  title: btn.title,
@@ -19487,7 +20126,7 @@ function FloatingToolbar({
19487
20126
  e.preventDefault();
19488
20127
  onCommand(btn.cmd);
19489
20128
  },
19490
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20129
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19491
20130
  "svg",
19492
20131
  {
19493
20132
  width: "16",
@@ -19508,7 +20147,7 @@ function FloatingToolbar({
19508
20147
  );
19509
20148
  })
19510
20149
  ] }, gi)),
19511
- showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20150
+ showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19512
20151
  CustomToolbarButton,
19513
20152
  {
19514
20153
  type: "button",
@@ -19522,7 +20161,7 @@ function FloatingToolbar({
19522
20161
  e.preventDefault();
19523
20162
  e.stopPropagation();
19524
20163
  },
19525
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Link, { className: "size-4 shrink-0", "aria-hidden": true })
20164
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Link, { className: "size-4 shrink-0", "aria-hidden": true })
19526
20165
  }
19527
20166
  ) : null
19528
20167
  ] })
@@ -19539,7 +20178,7 @@ function StateToggle({
19539
20178
  states,
19540
20179
  onStateChange
19541
20180
  }) {
19542
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20181
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19543
20182
  ToggleGroup,
19544
20183
  {
19545
20184
  "data-ohw-state-toggle": "",
@@ -19553,7 +20192,7 @@ function StateToggle({
19553
20192
  left: rect.right - 8,
19554
20193
  transform: "translateX(-100%)"
19555
20194
  },
19556
- children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
20195
+ children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
19557
20196
  }
19558
20197
  );
19559
20198
  }
@@ -19570,9 +20209,9 @@ var OHW_LOADER_STYLE = {
19570
20209
  justifyContent: "center"
19571
20210
  };
19572
20211
  function OhwLoaderSpinner() {
19573
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
19574
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
19575
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20212
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
20213
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
20214
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19576
20215
  "circle",
19577
20216
  {
19578
20217
  cx: "14",
@@ -19582,7 +20221,7 @@ function OhwLoaderSpinner() {
19582
20221
  strokeWidth: "3",
19583
20222
  strokeDasharray: "17 52",
19584
20223
  strokeLinecap: "round",
19585
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20224
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19586
20225
  "animateTransform",
19587
20226
  {
19588
20227
  attributeName: "transform",
@@ -19598,7 +20237,7 @@ function OhwLoaderSpinner() {
19598
20237
  ] });
19599
20238
  }
19600
20239
  function OhwBrandMark() {
19601
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
20240
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19602
20241
  "svg",
19603
20242
  {
19604
20243
  width: "16",
@@ -19609,7 +20248,7 @@ function OhwBrandMark() {
19609
20248
  style: { display: "block", flexShrink: 0 },
19610
20249
  xmlns: "http://www.w3.org/2000/svg",
19611
20250
  children: [
19612
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20251
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19613
20252
  "mask",
19614
20253
  {
19615
20254
  id: "ohw-badge-mark",
@@ -19619,15 +20258,15 @@ function OhwBrandMark() {
19619
20258
  y: "0",
19620
20259
  width: "48",
19621
20260
  height: "48",
19622
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M23.8741 48C37.0594 48 47.7481 37.2548 47.7481 24C47.7481 10.7452 37.0594 0 23.8741 0C10.6888 0 0 10.7452 0 24C0 37.2548 10.6888 48 23.8741 48Z", fill: "white" })
20261
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M23.8741 48C37.0594 48 47.7481 37.2548 47.7481 24C47.7481 10.7452 37.0594 0 23.8741 0C10.6888 0 0 10.7452 0 24C0 37.2548 10.6888 48 23.8741 48Z", fill: "white" })
19623
20262
  }
19624
20263
  ),
19625
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
19626
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M23.8731 48.0497C37.0584 48.0497 47.7472 37.3046 47.7472 24.0497C47.7472 10.7949 37.0584 0.0497208 23.8731 0.0497208C10.6878 0.0497208 -0.000976562 10.7949 -0.000976562 24.0497C-0.000976562 37.3046 10.6878 48.0497 23.8731 48.0497Z", fill: "#0078E5" }),
19627
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M17.1307 14.7172C13.1687 14.7172 9.38102 18.1154 8.65114 22.34C8.38885 23.8488 8.5598 25.2581 9.06929 26.4451C6.20005 29.1677 1.77216 27.8721 -1.40212 26.1536C-2.73618 25.4317 -3.92695 27.4745 -2.59037 28.1981C1.33389 30.3226 6.86037 31.6621 10.4402 28.4188C11.4718 29.3859 12.867 29.9621 14.4894 29.9621C18.4161 29.9621 22.2038 26.5318 22.9337 22.34C23.6636 18.1162 21.0566 14.7172 17.1298 14.7172H17.1307ZM19.9798 22.34C19.5281 25.0399 17.2689 27.231 14.9754 27.231C12.6466 27.231 11.1877 25.0399 11.6394 22.34C12.1262 19.6401 14.3151 17.4482 16.6438 17.4482C18.9374 17.4482 20.4667 19.6401 19.9798 22.34Z", fill: "white" }),
19628
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M40.0017 27.0262C39.1797 27.081 38.2721 26.995 37.4668 26.7415C37.3344 26.6993 37.28 26.5401 37.3529 26.4205C37.5959 26.0212 37.8255 25.6152 38.009 25.1889C38.1071 24.9918 38.2018 24.793 38.2897 24.5908C38.3274 24.5041 38.4163 24.451 38.5101 24.4619C38.63 24.4754 38.7054 24.4821 38.8881 24.4821L39.1529 24.4796L39.8283 24.4543C45.9229 24.0492 50.4765 20.4319 54.8466 16.9014C56.0172 15.9554 57.6932 17.6208 56.5116 18.5752C51.7687 22.4065 47.1966 26.5081 40.9319 26.9689", fill: "white" }),
19629
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M37.9687 24.27C38.4472 23.1319 38.7656 21.9045 38.9609 20.6991C39.5927 16.76 38.5058 14.2193 36.1553 14.2193C34.1835 14.2193 33.1469 17.2427 32.9199 18.8694C32.743 19.9872 32.5914 22.1219 33.6028 23.9524C33.7553 24.259 34.15 24.7712 34.471 25.1259C34.5447 25.2067 34.6746 25.2 34.7349 25.1082C34.9528 24.7788 35.1615 24.4039 35.3584 24.0257C35.5444 23.6677 35.5888 23.6138 35.8587 23.0207C35.8838 22.966 35.8813 22.9002 35.8478 22.8505C35.5888 22.4597 35.2168 21.9787 35.1204 21.4614C34.9184 20.4455 34.9436 19.2257 35.2218 18.1078C35.4413 17.3118 35.7195 16.7844 35.9039 16.5106C35.9466 16.4466 36.0279 16.4129 36.0975 16.4449C36.369 16.5671 36.5827 16.8838 36.7385 17.396C37.0167 18.2089 37.0167 19.3782 36.814 20.6999C36.6991 21.5271 36.4771 22.3729 36.1746 23.1673C36.1293 23.308 36.0757 23.4461 36.0187 23.5826C36.0187 23.5868 36.0187 23.591 36.0187 23.5961C35.9911 23.6946 35.9207 23.8067 35.8846 23.901C35.5536 24.5497 35.2344 25.1697 34.8439 25.7838C34.8388 25.7863 34.8346 25.7914 34.8296 25.7931C34.6528 26.0525 34.4718 26.2901 34.2866 26.4965C34.2774 26.5099 34.2682 26.5234 34.2589 26.5369C34.2405 26.5638 34.2179 26.5815 34.1944 26.595C33.5064 27.3212 32.7665 27.6893 32.0123 27.6893C31.8606 27.6893 31.6838 27.664 31.507 27.4349C31.3042 27.1299 30.85 26.0879 31.2539 22.9112C31.4785 21.3949 31.8011 20.0268 31.931 19.5408C31.9579 19.4413 31.8908 19.3419 31.7886 19.3293L30.0062 19.1162C29.9241 19.1061 29.8478 19.1566 29.8252 19.2366C29.2704 21.1615 27.0305 27.6885 24.9599 27.6885C24.328 27.6885 24.1512 26.6211 24.1001 26.2909C23.775 23.6264 25.528 18.5492 29.5302 16.2267C29.6048 16.1838 29.635 16.0928 29.5998 16.0136L28.9042 14.467C28.8632 14.3752 28.7501 14.3389 28.6638 14.3886C25.8079 16.0414 24.1847 18.5231 23.2915 20.3436C22.2046 22.5793 21.6993 25.0189 21.9515 26.8738C22.1795 28.7794 23.1398 29.872 24.6054 29.872C26.0543 29.872 27.4369 28.9066 28.7098 27.0187C28.7953 26.8915 28.9889 26.9311 29.0149 27.0819C29.2646 28.5283 29.9811 29.872 31.6579 29.872C33.5282 29.872 35.3232 28.7288 36.7134 26.6447C36.7712 26.5874 36.7972 26.5411 36.8181 26.4906C36.8232 26.4931 36.8282 26.4948 36.8332 26.4973C37.01 26.2025 37.181 25.9051 37.3444 25.6027C37.4508 25.4005 37.5572 25.1992 37.6586 24.9945C37.7181 24.874 37.7743 24.7527 37.8262 24.6289C37.838 24.6002 37.8547 24.5665 37.8706 24.5337", fill: "white" }),
19630
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M30.5839 31.6397C25.7546 34.8577 19.4773 34.7853 14.6907 31.5243C13.5368 30.7384 12.5044 32.6498 13.6474 33.4281C19.034 37.0985 26.3077 37.096 31.7218 33.488C32.8791 32.7172 31.7478 30.8639 30.5839 31.6397Z", fill: "white" })
20264
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
20265
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M23.8731 48.0497C37.0584 48.0497 47.7472 37.3046 47.7472 24.0497C47.7472 10.7949 37.0584 0.0497208 23.8731 0.0497208C10.6878 0.0497208 -0.000976562 10.7949 -0.000976562 24.0497C-0.000976562 37.3046 10.6878 48.0497 23.8731 48.0497Z", fill: "#0078E5" }),
20266
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M17.1307 14.7172C13.1687 14.7172 9.38102 18.1154 8.65114 22.34C8.38885 23.8488 8.5598 25.2581 9.06929 26.4451C6.20005 29.1677 1.77216 27.8721 -1.40212 26.1536C-2.73618 25.4317 -3.92695 27.4745 -2.59037 28.1981C1.33389 30.3226 6.86037 31.6621 10.4402 28.4188C11.4718 29.3859 12.867 29.9621 14.4894 29.9621C18.4161 29.9621 22.2038 26.5318 22.9337 22.34C23.6636 18.1162 21.0566 14.7172 17.1298 14.7172H17.1307ZM19.9798 22.34C19.5281 25.0399 17.2689 27.231 14.9754 27.231C12.6466 27.231 11.1877 25.0399 11.6394 22.34C12.1262 19.6401 14.3151 17.4482 16.6438 17.4482C18.9374 17.4482 20.4667 19.6401 19.9798 22.34Z", fill: "white" }),
20267
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M40.0017 27.0262C39.1797 27.081 38.2721 26.995 37.4668 26.7415C37.3344 26.6993 37.28 26.5401 37.3529 26.4205C37.5959 26.0212 37.8255 25.6152 38.009 25.1889C38.1071 24.9918 38.2018 24.793 38.2897 24.5908C38.3274 24.5041 38.4163 24.451 38.5101 24.4619C38.63 24.4754 38.7054 24.4821 38.8881 24.4821L39.1529 24.4796L39.8283 24.4543C45.9229 24.0492 50.4765 20.4319 54.8466 16.9014C56.0172 15.9554 57.6932 17.6208 56.5116 18.5752C51.7687 22.4065 47.1966 26.5081 40.9319 26.9689", fill: "white" }),
20268
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M37.9687 24.27C38.4472 23.1319 38.7656 21.9045 38.9609 20.6991C39.5927 16.76 38.5058 14.2193 36.1553 14.2193C34.1835 14.2193 33.1469 17.2427 32.9199 18.8694C32.743 19.9872 32.5914 22.1219 33.6028 23.9524C33.7553 24.259 34.15 24.7712 34.471 25.1259C34.5447 25.2067 34.6746 25.2 34.7349 25.1082C34.9528 24.7788 35.1615 24.4039 35.3584 24.0257C35.5444 23.6677 35.5888 23.6138 35.8587 23.0207C35.8838 22.966 35.8813 22.9002 35.8478 22.8505C35.5888 22.4597 35.2168 21.9787 35.1204 21.4614C34.9184 20.4455 34.9436 19.2257 35.2218 18.1078C35.4413 17.3118 35.7195 16.7844 35.9039 16.5106C35.9466 16.4466 36.0279 16.4129 36.0975 16.4449C36.369 16.5671 36.5827 16.8838 36.7385 17.396C37.0167 18.2089 37.0167 19.3782 36.814 20.6999C36.6991 21.5271 36.4771 22.3729 36.1746 23.1673C36.1293 23.308 36.0757 23.4461 36.0187 23.5826C36.0187 23.5868 36.0187 23.591 36.0187 23.5961C35.9911 23.6946 35.9207 23.8067 35.8846 23.901C35.5536 24.5497 35.2344 25.1697 34.8439 25.7838C34.8388 25.7863 34.8346 25.7914 34.8296 25.7931C34.6528 26.0525 34.4718 26.2901 34.2866 26.4965C34.2774 26.5099 34.2682 26.5234 34.2589 26.5369C34.2405 26.5638 34.2179 26.5815 34.1944 26.595C33.5064 27.3212 32.7665 27.6893 32.0123 27.6893C31.8606 27.6893 31.6838 27.664 31.507 27.4349C31.3042 27.1299 30.85 26.0879 31.2539 22.9112C31.4785 21.3949 31.8011 20.0268 31.931 19.5408C31.9579 19.4413 31.8908 19.3419 31.7886 19.3293L30.0062 19.1162C29.9241 19.1061 29.8478 19.1566 29.8252 19.2366C29.2704 21.1615 27.0305 27.6885 24.9599 27.6885C24.328 27.6885 24.1512 26.6211 24.1001 26.2909C23.775 23.6264 25.528 18.5492 29.5302 16.2267C29.6048 16.1838 29.635 16.0928 29.5998 16.0136L28.9042 14.467C28.8632 14.3752 28.7501 14.3389 28.6638 14.3886C25.8079 16.0414 24.1847 18.5231 23.2915 20.3436C22.2046 22.5793 21.6993 25.0189 21.9515 26.8738C22.1795 28.7794 23.1398 29.872 24.6054 29.872C26.0543 29.872 27.4369 28.9066 28.7098 27.0187C28.7953 26.8915 28.9889 26.9311 29.0149 27.0819C29.2646 28.5283 29.9811 29.872 31.6579 29.872C33.5282 29.872 35.3232 28.7288 36.7134 26.6447C36.7712 26.5874 36.7972 26.5411 36.8181 26.4906C36.8232 26.4931 36.8282 26.4948 36.8332 26.4973C37.01 26.2025 37.181 25.9051 37.3444 25.6027C37.4508 25.4005 37.5572 25.1992 37.6586 24.9945C37.7181 24.874 37.7743 24.7527 37.8262 24.6289C37.838 24.6002 37.8547 24.5665 37.8706 24.5337", fill: "white" }),
20269
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M30.5839 31.6397C25.7546 34.8577 19.4773 34.7853 14.6907 31.5243C13.5368 30.7384 12.5044 32.6498 13.6474 33.4281C19.034 37.0985 26.3077 37.096 31.7218 33.488C32.8791 32.7172 31.7478 30.8639 30.5839 31.6397Z", fill: "white" })
19631
20270
  ] })
19632
20271
  ]
19633
20272
  }
@@ -19664,7 +20303,7 @@ var OHW_BADGE_LABEL_STYLE = {
19664
20303
  whiteSpace: "nowrap"
19665
20304
  };
19666
20305
  function MadeWithOhhWells() {
19667
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
20306
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19668
20307
  "a",
19669
20308
  {
19670
20309
  href: "https://ohhwells.com",
@@ -19674,8 +20313,8 @@ function MadeWithOhhWells() {
19674
20313
  "data-ohw-badge": "",
19675
20314
  style: OHW_BADGE_STYLE,
19676
20315
  children: [
19677
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OhwBrandMark, {}),
19678
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: OHW_BADGE_LABEL_STYLE, children: "Made with OhhWells" })
20316
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OhwBrandMark, {}),
20317
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: OHW_BADGE_LABEL_STYLE, children: "Made with OhhWells" })
19679
20318
  ]
19680
20319
  }
19681
20320
  );
@@ -19721,8 +20360,8 @@ function OhhwellsBridge() {
19721
20360
  const router = (0, import_navigation3.useRouter)();
19722
20361
  const searchParams = (0, import_navigation3.useSearchParams)();
19723
20362
  const isEditMode = isEditSessionActive();
19724
- const [bridgeRoot, setBridgeRoot] = (0, import_react18.useState)(null);
19725
- (0, import_react18.useEffect)(() => {
20363
+ const [bridgeRoot, setBridgeRoot] = (0, import_react19.useState)(null);
20364
+ (0, import_react19.useEffect)(() => {
19726
20365
  const figtreeFontId = "ohw-figtree-font";
19727
20366
  if (!document.getElementById(figtreeFontId)) {
19728
20367
  const preconnect1 = Object.assign(document.createElement("link"), { rel: "preconnect", href: "https://fonts.googleapis.com" });
@@ -19748,8 +20387,8 @@ function OhhwellsBridge() {
19748
20387
  };
19749
20388
  }, []);
19750
20389
  const subdomainFromQuery = searchParams.get("subdomain");
19751
- const [subdomain, setSubdomain] = (0, import_react18.useState)(() => resolveSubdomain(subdomainFromQuery));
19752
- (0, import_react18.useLayoutEffect)(() => {
20390
+ const [subdomain, setSubdomain] = (0, import_react19.useState)(() => resolveSubdomain(subdomainFromQuery));
20391
+ (0, import_react19.useLayoutEffect)(() => {
19753
20392
  const next = resolveSubdomain(subdomainFromQuery);
19754
20393
  if (next !== subdomain) setSubdomain(next);
19755
20394
  if (next) return;
@@ -19761,7 +20400,7 @@ function OhhwellsBridge() {
19761
20400
  }, 0);
19762
20401
  return () => window.clearTimeout(t);
19763
20402
  }, [subdomainFromQuery, subdomain]);
19764
- (0, import_react18.useEffect)(() => {
20403
+ (0, import_react19.useEffect)(() => {
19765
20404
  if (!subdomainFromQuery || typeof window === "undefined") return;
19766
20405
  const url = new URL(window.location.href);
19767
20406
  if (!url.searchParams.has("subdomain")) return;
@@ -19770,45 +20409,45 @@ function OhhwellsBridge() {
19770
20409
  }, [subdomainFromQuery]);
19771
20410
  useLinkHrefGuardian(pathname, subdomain, isEditMode);
19772
20411
  useSavedLinkNavigation(isEditMode);
19773
- const postToParent2 = (0, import_react18.useCallback)((data) => {
20412
+ const postToParent2 = (0, import_react19.useCallback)((data) => {
19774
20413
  if (typeof window !== "undefined" && window.parent !== window) {
19775
20414
  window.parent.postMessage(data, "*");
19776
20415
  }
19777
20416
  }, []);
19778
- const [fetchState, setFetchState] = (0, import_react18.useState)("idle");
19779
- const [showBranding, setShowBranding] = (0, import_react18.useState)(false);
19780
- const autoSaveTimers = (0, import_react18.useRef)(/* @__PURE__ */ new Map());
19781
- const activeElRef = (0, import_react18.useRef)(null);
19782
- const pointerHeldRef = (0, import_react18.useRef)(false);
19783
- const selectedElRef = (0, import_react18.useRef)(null);
19784
- const selectedHrefKeyRef = (0, import_react18.useRef)(null);
19785
- const selectedFooterColAttrRef = (0, import_react18.useRef)(null);
19786
- const originalContentRef = (0, import_react18.useRef)(null);
19787
- const activeStateElRef = (0, import_react18.useRef)(null);
19788
- const parentScrollRef = (0, import_react18.useRef)(null);
19789
- const visibleViewportRef = (0, import_react18.useRef)(null);
19790
- const [dialogPortalContainer, setDialogPortalContainer] = (0, import_react18.useState)(null);
19791
- const attachVisibleViewport = (0, import_react18.useCallback)((node) => {
20417
+ const [fetchState, setFetchState] = (0, import_react19.useState)("idle");
20418
+ const [showBranding, setShowBranding] = (0, import_react19.useState)(false);
20419
+ const autoSaveTimers = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
20420
+ const activeElRef = (0, import_react19.useRef)(null);
20421
+ const pointerHeldRef = (0, import_react19.useRef)(false);
20422
+ const selectedElRef = (0, import_react19.useRef)(null);
20423
+ const selectedHrefKeyRef = (0, import_react19.useRef)(null);
20424
+ const selectedFooterColAttrRef = (0, import_react19.useRef)(null);
20425
+ const originalContentRef = (0, import_react19.useRef)(null);
20426
+ const activeStateElRef = (0, import_react19.useRef)(null);
20427
+ const parentScrollRef = (0, import_react19.useRef)(null);
20428
+ const visibleViewportRef = (0, import_react19.useRef)(null);
20429
+ const [dialogPortalContainer, setDialogPortalContainer] = (0, import_react19.useState)(null);
20430
+ const attachVisibleViewport = (0, import_react19.useCallback)((node) => {
19792
20431
  visibleViewportRef.current = node;
19793
20432
  setDialogPortalContainer(node);
19794
20433
  if (node) applyVisibleViewport(node, parentScrollRef.current);
19795
20434
  }, []);
19796
- const toolbarElRef = (0, import_react18.useRef)(null);
19797
- const glowElRef = (0, import_react18.useRef)(null);
19798
- const hoveredImageRef = (0, import_react18.useRef)(null);
19799
- const hoveredImageHasTextOverlapRef = (0, import_react18.useRef)(false);
19800
- const dragOverElRef = (0, import_react18.useRef)(null);
19801
- const [mediaHover, setMediaHover] = (0, import_react18.useState)(null);
19802
- const [selectedAiSectionId, setSelectedAiSectionId] = (0, import_react18.useState)(null);
19803
- const selectedAiSectionIdRef = (0, import_react18.useRef)(null);
19804
- const handleAiSectionSelectionChange = (0, import_react18.useCallback)((id) => {
20435
+ const toolbarElRef = (0, import_react19.useRef)(null);
20436
+ const glowElRef = (0, import_react19.useRef)(null);
20437
+ const hoveredImageRef = (0, import_react19.useRef)(null);
20438
+ const hoveredImageHasTextOverlapRef = (0, import_react19.useRef)(false);
20439
+ const dragOverElRef = (0, import_react19.useRef)(null);
20440
+ const [mediaHover, setMediaHover] = (0, import_react19.useState)(null);
20441
+ const [selectedAiSectionId, setSelectedAiSectionId] = (0, import_react19.useState)(null);
20442
+ const selectedAiSectionIdRef = (0, import_react19.useRef)(null);
20443
+ const handleAiSectionSelectionChange = (0, import_react19.useCallback)((id) => {
19805
20444
  selectedAiSectionIdRef.current = id;
19806
20445
  setSelectedAiSectionId(id);
19807
20446
  }, []);
19808
- const [selectedMedia, setSelectedMedia] = (0, import_react18.useState)(null);
19809
- const selectedMediaElRef = (0, import_react18.useRef)(null);
19810
- const mediaKeyDropTokenRef = (0, import_react18.useRef)(0);
19811
- const clearMediaSelection = (0, import_react18.useCallback)(() => {
20447
+ const [selectedMedia, setSelectedMedia] = (0, import_react19.useState)(null);
20448
+ const selectedMediaElRef = (0, import_react19.useRef)(null);
20449
+ const mediaKeyDropTokenRef = (0, import_react19.useRef)(0);
20450
+ const clearMediaSelection = (0, import_react19.useCallback)(() => {
19812
20451
  const prev = selectedMediaElRef.current;
19813
20452
  selectedMediaElRef.current = null;
19814
20453
  setSelectedMedia(null);
@@ -19833,9 +20472,9 @@ function OhhwellsBridge() {
19833
20472
  window.postMessage({ type: "ow:media-key-drop", token }, "*");
19834
20473
  }
19835
20474
  }, []);
19836
- const clearMediaSelectionRef = (0, import_react18.useRef)(clearMediaSelection);
20475
+ const clearMediaSelectionRef = (0, import_react19.useRef)(clearMediaSelection);
19837
20476
  clearMediaSelectionRef.current = clearMediaSelection;
19838
- const selectMediaElement = (0, import_react18.useCallback)((el) => {
20477
+ const selectMediaElement = (0, import_react19.useCallback)((el) => {
19839
20478
  const r2 = el.getBoundingClientRect();
19840
20479
  const video = el.dataset.ohwEditable === "video" ? el.querySelector("video") : null;
19841
20480
  selectedMediaElRef.current = el;
@@ -19859,9 +20498,9 @@ function OhhwellsBridge() {
19859
20498
  keyLabel: el.dataset.ohwEditable === "video" ? "Video" : el.dataset.ohwEditable === "bg-image" ? "Background" : "Image"
19860
20499
  });
19861
20500
  }, []);
19862
- const selectMediaElementRef = (0, import_react18.useRef)(selectMediaElement);
20501
+ const selectMediaElementRef = (0, import_react19.useRef)(selectMediaElement);
19863
20502
  selectMediaElementRef.current = selectMediaElement;
19864
- (0, import_react18.useEffect)(() => {
20503
+ (0, import_react19.useEffect)(() => {
19865
20504
  if (!selectedMedia) return;
19866
20505
  const update = () => {
19867
20506
  const el = selectedMediaElRef.current;
@@ -19881,55 +20520,55 @@ function OhhwellsBridge() {
19881
20520
  window.removeEventListener("resize", update);
19882
20521
  };
19883
20522
  }, [selectedMedia !== null]);
19884
- const [carouselHover, setCarouselHover] = (0, import_react18.useState)(null);
19885
- const [uploadingRects, setUploadingRects] = (0, import_react18.useState)({});
19886
- const hoveredGapRef = (0, import_react18.useRef)(null);
19887
- const imageUnhoverTimerRef = (0, import_react18.useRef)(null);
19888
- const imageShowTimerRef = (0, import_react18.useRef)(null);
19889
- const editStylesRef = (0, import_react18.useRef)(null);
19890
- const activateRef = (0, import_react18.useRef)(() => {
20523
+ const [carouselHover, setCarouselHover] = (0, import_react19.useState)(null);
20524
+ const [uploadingRects, setUploadingRects] = (0, import_react19.useState)({});
20525
+ const hoveredGapRef = (0, import_react19.useRef)(null);
20526
+ const imageUnhoverTimerRef = (0, import_react19.useRef)(null);
20527
+ const imageShowTimerRef = (0, import_react19.useRef)(null);
20528
+ const editStylesRef = (0, import_react19.useRef)(null);
20529
+ const activateRef = (0, import_react19.useRef)(() => {
19891
20530
  });
19892
- const deactivateRef = (0, import_react18.useRef)(() => {
20531
+ const deactivateRef = (0, import_react19.useRef)(() => {
19893
20532
  });
19894
- const selectRef = (0, import_react18.useRef)(() => {
20533
+ const selectRef = (0, import_react19.useRef)(() => {
19895
20534
  });
19896
- const selectFrameRef = (0, import_react18.useRef)(() => {
20535
+ const selectFrameRef = (0, import_react19.useRef)(() => {
19897
20536
  });
19898
- const selectLogoRef = (0, import_react18.useRef)(() => {
20537
+ const selectLogoRef = (0, import_react19.useRef)(() => {
19899
20538
  });
19900
- const openLogoSizePanelRef = (0, import_react18.useRef)(() => {
20539
+ const openLogoSizePanelRef = (0, import_react19.useRef)(() => {
19901
20540
  });
19902
- const deselectRef = (0, import_react18.useRef)(() => {
20541
+ const deselectRef = (0, import_react19.useRef)(() => {
19903
20542
  });
19904
- const closeFloatingPanelOnlyRef = (0, import_react18.useRef)(() => {
20543
+ const closeFloatingPanelOnlyRef = (0, import_react19.useRef)(() => {
19905
20544
  });
19906
- const reselectNavigationItemRef = (0, import_react18.useRef)(() => {
20545
+ const reselectNavigationItemRef = (0, import_react19.useRef)(() => {
19907
20546
  });
19908
- const commitNavigationTextEditRef = (0, import_react18.useRef)(() => {
20547
+ const commitNavigationTextEditRef = (0, import_react19.useRef)(() => {
19909
20548
  });
19910
- const handleDeleteSelectedRef = (0, import_react18.useRef)(() => false);
19911
- const runPendingDeleteUndoRef = (0, import_react18.useRef)(() => false);
19912
- const isFooterFrameSelectionRef = (0, import_react18.useRef)(false);
19913
- const refreshActiveCommandsRef = (0, import_react18.useRef)(() => {
20549
+ const handleDeleteSelectedRef = (0, import_react19.useRef)(() => false);
20550
+ const runPendingDeleteUndoRef = (0, import_react19.useRef)(() => false);
20551
+ const isFooterFrameSelectionRef = (0, import_react19.useRef)(false);
20552
+ const refreshActiveCommandsRef = (0, import_react19.useRef)(() => {
19914
20553
  });
19915
- const postToParentRef = (0, import_react18.useRef)(postToParent2);
20554
+ const postToParentRef = (0, import_react19.useRef)(postToParent2);
19916
20555
  postToParentRef.current = postToParent2;
19917
- const aiSectionApiRef = (0, import_react18.useRef)(null);
19918
- const applyTreeLocalRef = (0, import_react18.useRef)(null);
19919
- const sectionsLoadedRef = (0, import_react18.useRef)(false);
19920
- const pendingScheduleConfigRequests = (0, import_react18.useRef)([]);
19921
- const [toolbarRect, setToolbarRect] = (0, import_react18.useState)(null);
19922
- const [formPickRect, setFormPickRect] = (0, import_react18.useState)(null);
19923
- const formPickElRef = (0, import_react18.useRef)(null);
19924
- const [formViewState, setFormViewStateUi] = (0, import_react18.useState)("default");
19925
- const [formPickCount, setFormPickCount] = (0, import_react18.useState)(null);
19926
- const [formHoverRect, setFormHoverRect] = (0, import_react18.useState)(null);
19927
- const formHoverElRef = (0, import_react18.useRef)(null);
19928
- const [fieldPickRect, setFieldPickRect] = (0, import_react18.useState)(null);
19929
- const fieldPickElRef = (0, import_react18.useRef)(null);
19930
- const [fieldPickState, setFieldPickState] = (0, import_react18.useState)(null);
19931
- const [fieldTypePickerOpen, setFieldTypePickerOpen] = (0, import_react18.useState)(false);
19932
- const clearFormPick = (0, import_react18.useCallback)(() => {
20556
+ const aiSectionApiRef = (0, import_react19.useRef)(null);
20557
+ const applyTreeLocalRef = (0, import_react19.useRef)(null);
20558
+ const sectionsLoadedRef = (0, import_react19.useRef)(false);
20559
+ const pendingScheduleConfigRequests = (0, import_react19.useRef)([]);
20560
+ const [toolbarRect, setToolbarRect] = (0, import_react19.useState)(null);
20561
+ const [formPickRect, setFormPickRect] = (0, import_react19.useState)(null);
20562
+ const formPickElRef = (0, import_react19.useRef)(null);
20563
+ const [formViewState, setFormViewStateUi] = (0, import_react19.useState)("default");
20564
+ const [formPickCount, setFormPickCount] = (0, import_react19.useState)(null);
20565
+ const [formHoverRect, setFormHoverRect] = (0, import_react19.useState)(null);
20566
+ const formHoverElRef = (0, import_react19.useRef)(null);
20567
+ const [fieldPickRect, setFieldPickRect] = (0, import_react19.useState)(null);
20568
+ const fieldPickElRef = (0, import_react19.useRef)(null);
20569
+ const [fieldPickState, setFieldPickState] = (0, import_react19.useState)(null);
20570
+ const [fieldTypePickerOpen, setFieldTypePickerOpen] = (0, import_react19.useState)(false);
20571
+ const clearFormPick = (0, import_react19.useCallback)(() => {
19933
20572
  const form = formPickElRef.current;
19934
20573
  const editing = fieldPickElRef.current;
19935
20574
  if (commitPlaceholderEdit(editing) && editing) {
@@ -19949,7 +20588,7 @@ function OhhwellsBridge() {
19949
20588
  formPickElRef.current = null;
19950
20589
  setFormPickRect(null);
19951
20590
  }, []);
19952
- const clearFieldPick = (0, import_react18.useCallback)(() => {
20591
+ const clearFieldPick = (0, import_react19.useCallback)(() => {
19953
20592
  const wrapper = fieldPickElRef.current;
19954
20593
  if (commitPlaceholderEdit(wrapper) && wrapper) {
19955
20594
  const form = wrapper.closest('[data-ohw-editable="form"]');
@@ -19959,9 +20598,9 @@ function OhhwellsBridge() {
19959
20598
  setFieldPickRect(null);
19960
20599
  setFieldPickState(null);
19961
20600
  }, []);
19962
- const persistFieldsRef = (0, import_react18.useRef)(() => {
20601
+ const persistFieldsRef = (0, import_react19.useRef)(() => {
19963
20602
  });
19964
- const persistFields = (0, import_react18.useCallback)(
20603
+ const persistFields = (0, import_react19.useCallback)(
19965
20604
  (form) => {
19966
20605
  const key = formKeyOf(form);
19967
20606
  if (!key) return;
@@ -19972,7 +20611,7 @@ function OhhwellsBridge() {
19972
20611
  []
19973
20612
  );
19974
20613
  persistFieldsRef.current = persistFields;
19975
- const selectField = (0, import_react18.useCallback)((wrapper) => {
20614
+ const selectField = (0, import_react19.useCallback)((wrapper) => {
19976
20615
  if (fieldPickElRef.current && fieldPickElRef.current !== wrapper) {
19977
20616
  commitPlaceholderEdit(fieldPickElRef.current);
19978
20617
  }
@@ -19985,7 +20624,7 @@ function OhhwellsBridge() {
19985
20624
  setFieldPickState({ type: fieldTypeOf(wrapper), required: isFieldRequired(wrapper) });
19986
20625
  setFieldTypePickerOpen(false);
19987
20626
  }, []);
19988
- const withSelectedField = (0, import_react18.useCallback)(
20627
+ const withSelectedField = (0, import_react19.useCallback)(
19989
20628
  (run) => {
19990
20629
  const wrapper = fieldPickElRef.current;
19991
20630
  const form = formPickElRef.current;
@@ -19998,28 +20637,28 @@ function OhhwellsBridge() {
19998
20637
  },
19999
20638
  [persistFields]
20000
20639
  );
20001
- const handleFieldTypeChange = (0, import_react18.useCallback)(
20640
+ const handleFieldTypeChange = (0, import_react19.useCallback)(
20002
20641
  (type) => withSelectedField((_form, wrapper) => {
20003
20642
  applyFieldType(wrapper, type);
20004
20643
  selectField(wrapper);
20005
20644
  }),
20006
20645
  [selectField, withSelectedField]
20007
20646
  );
20008
- const handleFieldRequiredToggle = (0, import_react18.useCallback)(
20647
+ const handleFieldRequiredToggle = (0, import_react19.useCallback)(
20009
20648
  () => withSelectedField((_form, wrapper) => {
20010
20649
  setFieldRequired(wrapper, !isFieldRequired(wrapper));
20011
20650
  selectField(wrapper);
20012
20651
  }),
20013
20652
  [selectField, withSelectedField]
20014
20653
  );
20015
- const handleFieldDuplicate = (0, import_react18.useCallback)(
20654
+ const handleFieldDuplicate = (0, import_react19.useCallback)(
20016
20655
  () => withSelectedField((form, wrapper) => {
20017
20656
  const copy = duplicateField(form, wrapper);
20018
20657
  selectField(copy);
20019
20658
  }),
20020
20659
  [selectField, withSelectedField]
20021
20660
  );
20022
- const handleFieldDelete = (0, import_react18.useCallback)(
20661
+ const handleFieldDelete = (0, import_react19.useCallback)(
20023
20662
  () => withSelectedField((_form, wrapper) => {
20024
20663
  removeField(wrapper);
20025
20664
  clearFieldPick();
@@ -20027,7 +20666,7 @@ function OhhwellsBridge() {
20027
20666
  }),
20028
20667
  [clearFieldPick, withSelectedField]
20029
20668
  );
20030
- const handleAddField = (0, import_react18.useCallback)(
20669
+ const handleAddField = (0, import_react19.useCallback)(
20031
20670
  (type) => {
20032
20671
  const form = formPickElRef.current;
20033
20672
  if (!form) return;
@@ -20043,8 +20682,8 @@ function OhhwellsBridge() {
20043
20682
  },
20044
20683
  [persistFields, selectField]
20045
20684
  );
20046
- const fieldDragRef = (0, import_react18.useRef)(null);
20047
- const buildFieldDropSlots = (0, import_react18.useCallback)((form, draggedKey) => {
20685
+ const fieldDragRef = (0, import_react19.useRef)(null);
20686
+ const buildFieldDropSlots = (0, import_react19.useCallback)((form, draggedKey) => {
20048
20687
  const others = listFieldWrappers(form).filter((el) => fieldKeyOf(el) !== draggedKey);
20049
20688
  const slots = others.map((el) => {
20050
20689
  const rect = el.getBoundingClientRect();
@@ -20057,7 +20696,7 @@ function OhhwellsBridge() {
20057
20696
  }
20058
20697
  return slots;
20059
20698
  }, []);
20060
- const handleFieldDragStart = (0, import_react18.useCallback)(() => {
20699
+ const handleFieldDragStart = (0, import_react19.useCallback)(() => {
20061
20700
  const wrapper = fieldPickElRef.current;
20062
20701
  const form = formPickElRef.current;
20063
20702
  if (!wrapper || !form) return;
@@ -20066,18 +20705,18 @@ function OhhwellsBridge() {
20066
20705
  setFieldDragging(true);
20067
20706
  setFieldDropSlots(buildFieldDropSlots(form, key));
20068
20707
  }, [buildFieldDropSlots]);
20069
- const handleFieldDragEnd = (0, import_react18.useCallback)(() => {
20708
+ const handleFieldDragEnd = (0, import_react19.useCallback)(() => {
20070
20709
  fieldDragRef.current = null;
20071
20710
  setFieldDropIndex(null);
20072
20711
  setFieldDropSlots([]);
20073
20712
  setFieldDragging(false);
20074
20713
  }, []);
20075
- const [fieldDropIndex, setFieldDropIndex] = (0, import_react18.useState)(null);
20076
- const [fieldDropSlots, setFieldDropSlots] = (0, import_react18.useState)([]);
20077
- const [fieldDragging, setFieldDragging] = (0, import_react18.useState)(false);
20078
- const clearFormPickRef = (0, import_react18.useRef)(clearFormPick);
20714
+ const [fieldDropIndex, setFieldDropIndex] = (0, import_react19.useState)(null);
20715
+ const [fieldDropSlots, setFieldDropSlots] = (0, import_react19.useState)([]);
20716
+ const [fieldDragging, setFieldDragging] = (0, import_react19.useState)(false);
20717
+ const clearFormPickRef = (0, import_react19.useRef)(clearFormPick);
20079
20718
  clearFormPickRef.current = clearFormPick;
20080
- (0, import_react18.useEffect)(() => {
20719
+ (0, import_react19.useEffect)(() => {
20081
20720
  const el = fieldPickElRef.current;
20082
20721
  if (!el || fieldPickRect === null) return;
20083
20722
  const observer = new ResizeObserver(() => {
@@ -20086,7 +20725,7 @@ function OhhwellsBridge() {
20086
20725
  observer.observe(el);
20087
20726
  return () => observer.disconnect();
20088
20727
  }, [fieldPickRect !== null, fieldPickState]);
20089
- (0, import_react18.useEffect)(() => {
20728
+ (0, import_react19.useEffect)(() => {
20090
20729
  const el = formPickElRef.current;
20091
20730
  if (!el || formPickRect === null) return;
20092
20731
  const observer = new ResizeObserver(() => {
@@ -20095,25 +20734,25 @@ function OhhwellsBridge() {
20095
20734
  observer.observe(el);
20096
20735
  return () => observer.disconnect();
20097
20736
  }, [formPickRect !== null, formViewState]);
20098
- const [toolbarVariant, setToolbarVariant] = (0, import_react18.useState)("none");
20099
- const toolbarVariantRef = (0, import_react18.useRef)("none");
20737
+ const [toolbarVariant, setToolbarVariant] = (0, import_react19.useState)("none");
20738
+ const toolbarVariantRef = (0, import_react19.useRef)("none");
20100
20739
  toolbarVariantRef.current = toolbarVariant;
20101
- const [selectedIsCta, setSelectedIsCta] = (0, import_react18.useState)(false);
20102
- const [selectedIsSocial, setSelectedIsSocial] = (0, import_react18.useState)(false);
20103
- const [selectedIsSocialsRow, setSelectedIsSocialsRow] = (0, import_react18.useState)(false);
20104
- const [reorderHrefKey, setReorderHrefKey] = (0, import_react18.useState)(null);
20105
- const [reorderDragDisabled, setReorderDragDisabled] = (0, import_react18.useState)(false);
20106
- const [toggleState, setToggleState] = (0, import_react18.useState)(null);
20107
- const [maxBadge, setMaxBadge] = (0, import_react18.useState)(null);
20108
- const [activeCommands, setActiveCommands] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
20109
- const [sectionGap, setSectionGap] = (0, import_react18.useState)(null);
20110
- const [toolbarShowEditLink, setToolbarShowEditLink] = (0, import_react18.useState)(false);
20111
- const hoveredNavContainerRef = (0, import_react18.useRef)(null);
20112
- const [hoveredNavContainerRect, setHoveredNavContainerRect] = (0, import_react18.useState)(null);
20113
- const hoveredItemElRef = (0, import_react18.useRef)(null);
20114
- const [hoveredItemRect, setHoveredItemRect] = (0, import_react18.useState)(null);
20115
- const [hoveredTextRect, setHoveredTextRect] = (0, import_react18.useState)(null);
20116
- (0, import_react18.useEffect)(() => {
20740
+ const [selectedIsCta, setSelectedIsCta] = (0, import_react19.useState)(false);
20741
+ const [selectedIsSocial, setSelectedIsSocial] = (0, import_react19.useState)(false);
20742
+ const [selectedIsSocialsRow, setSelectedIsSocialsRow] = (0, import_react19.useState)(false);
20743
+ const [reorderHrefKey, setReorderHrefKey] = (0, import_react19.useState)(null);
20744
+ const [reorderDragDisabled, setReorderDragDisabled] = (0, import_react19.useState)(false);
20745
+ const [toggleState, setToggleState] = (0, import_react19.useState)(null);
20746
+ const [maxBadge, setMaxBadge] = (0, import_react19.useState)(null);
20747
+ const [activeCommands, setActiveCommands] = (0, import_react19.useState)(/* @__PURE__ */ new Set());
20748
+ const [sectionGap, setSectionGap] = (0, import_react19.useState)(null);
20749
+ const [toolbarShowEditLink, setToolbarShowEditLink] = (0, import_react19.useState)(false);
20750
+ const hoveredNavContainerRef = (0, import_react19.useRef)(null);
20751
+ const [hoveredNavContainerRect, setHoveredNavContainerRect] = (0, import_react19.useState)(null);
20752
+ const hoveredItemElRef = (0, import_react19.useRef)(null);
20753
+ const [hoveredItemRect, setHoveredItemRect] = (0, import_react19.useState)(null);
20754
+ const [hoveredTextRect, setHoveredTextRect] = (0, import_react19.useState)(null);
20755
+ (0, import_react19.useEffect)(() => {
20117
20756
  const sync = () => {
20118
20757
  const el = document.querySelector(
20119
20758
  '[data-ohw-hovered]:not([contenteditable]):not([data-ohw-href-key]):not([data-ohw-editable="form"] *)'
@@ -20157,53 +20796,53 @@ function OhhwellsBridge() {
20157
20796
  });
20158
20797
  return () => observer.disconnect();
20159
20798
  }, []);
20160
- const siblingHintElRef = (0, import_react18.useRef)(null);
20161
- const [siblingHintRect, setSiblingHintRect] = (0, import_react18.useState)(null);
20162
- const [siblingHintRects, setSiblingHintRects] = (0, import_react18.useState)([]);
20163
- const [isItemDragging, setIsItemDragging] = (0, import_react18.useState)(false);
20164
- const [isFooterFrameSelection, setIsFooterFrameSelection] = (0, import_react18.useState)(false);
20799
+ const siblingHintElRef = (0, import_react19.useRef)(null);
20800
+ const [siblingHintRect, setSiblingHintRect] = (0, import_react19.useState)(null);
20801
+ const [siblingHintRects, setSiblingHintRects] = (0, import_react19.useState)([]);
20802
+ const [isItemDragging, setIsItemDragging] = (0, import_react19.useState)(false);
20803
+ const [isFooterFrameSelection, setIsFooterFrameSelection] = (0, import_react19.useState)(false);
20165
20804
  isFooterFrameSelectionRef.current = isFooterFrameSelection;
20166
- const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = (0, import_react18.useState)(null);
20167
- const [footerHeadingVisible, setFooterHeadingVisible] = (0, import_react18.useState)(null);
20168
- const footerDragRef = (0, import_react18.useRef)(null);
20169
- const [footerDropSlots, setFooterDropSlots] = (0, import_react18.useState)([]);
20170
- const [activeFooterDropIndex, setActiveFooterDropIndex] = (0, import_react18.useState)(null);
20171
- const [draggedItemRect, setDraggedItemRect] = (0, import_react18.useState)(null);
20172
- const footerPointerDragRef = (0, import_react18.useRef)(null);
20173
- const suppressNextClickRef = (0, import_react18.useRef)(false);
20174
- const suppressClickUntilRef = (0, import_react18.useRef)(0);
20175
- const [linkPopover, setLinkPopover] = (0, import_react18.useState)(null);
20176
- const linkPopoverSessionRef = (0, import_react18.useRef)(null);
20177
- const addNavAfterAnchorRef = (0, import_react18.useRef)(null);
20178
- const editContentRef = (0, import_react18.useRef)({});
20179
- const aiSectionsRef = (0, import_react18.useRef)("");
20180
- const brandKitRef = (0, import_react18.useRef)("");
20181
- const stylesRef = (0, import_react18.useRef)("");
20182
- const appliedDrawerRef = (0, import_react18.useRef)(null);
20183
- const pendingDeleteUndoRef = (0, import_react18.useRef)(null);
20184
- const [floatingPanel, setFloatingPanel] = (0, import_react18.useState)(null);
20185
- const floatingPanelOpenRef = (0, import_react18.useRef)(false);
20186
- const floatingPanelRef = (0, import_react18.useRef)(null);
20805
+ const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = (0, import_react19.useState)(null);
20806
+ const [footerHeadingVisible, setFooterHeadingVisible] = (0, import_react19.useState)(null);
20807
+ const footerDragRef = (0, import_react19.useRef)(null);
20808
+ const [footerDropSlots, setFooterDropSlots] = (0, import_react19.useState)([]);
20809
+ const [activeFooterDropIndex, setActiveFooterDropIndex] = (0, import_react19.useState)(null);
20810
+ const [draggedItemRect, setDraggedItemRect] = (0, import_react19.useState)(null);
20811
+ const footerPointerDragRef = (0, import_react19.useRef)(null);
20812
+ const suppressNextClickRef = (0, import_react19.useRef)(false);
20813
+ const suppressClickUntilRef = (0, import_react19.useRef)(0);
20814
+ const [linkPopover, setLinkPopover] = (0, import_react19.useState)(null);
20815
+ const linkPopoverSessionRef = (0, import_react19.useRef)(null);
20816
+ const addNavAfterAnchorRef = (0, import_react19.useRef)(null);
20817
+ const editContentRef = (0, import_react19.useRef)({});
20818
+ const aiSectionsRef = (0, import_react19.useRef)("");
20819
+ const brandKitRef = (0, import_react19.useRef)("");
20820
+ const stylesRef = (0, import_react19.useRef)("");
20821
+ const appliedDrawerRef = (0, import_react19.useRef)(null);
20822
+ const pendingDeleteUndoRef = (0, import_react19.useRef)(null);
20823
+ const [floatingPanel, setFloatingPanel] = (0, import_react19.useState)(null);
20824
+ const floatingPanelOpenRef = (0, import_react19.useRef)(false);
20825
+ const floatingPanelRef = (0, import_react19.useRef)(null);
20187
20826
  floatingPanelRef.current = floatingPanel;
20188
- const setFloatingPanelRef = (0, import_react18.useRef)(setFloatingPanel);
20189
- const [floatingPanelPos, setFloatingPanelPos] = (0, import_react18.useState)(null);
20190
- const buttonCollectionDragRef = (0, import_react18.useRef)(null);
20191
- const [buttonStyleTick, setButtonStyleTick] = (0, import_react18.useState)(0);
20192
- const [logoSizeDraft, setLogoSizeDraft] = (0, import_react18.useState)(null);
20193
- const [editorViewport, setEditorViewport] = (0, import_react18.useState)("desktop");
20194
- const [parentScrollSnap, setParentScrollSnap] = (0, import_react18.useState)(null);
20195
- const [sitePages, setSitePages] = (0, import_react18.useState)([]);
20196
- const [sectionsByPath, setSectionsByPath] = (0, import_react18.useState)({});
20197
- const sectionsPrefetchGenRef = (0, import_react18.useRef)(0);
20198
- const setLinkPopoverRef = (0, import_react18.useRef)(setLinkPopover);
20199
- const linkPopoverPanelRef = (0, import_react18.useRef)(null);
20200
- const linkPopoverOpenRef = (0, import_react18.useRef)(false);
20201
- const linkPopoverGraceUntilRef = (0, import_react18.useRef)(0);
20827
+ const setFloatingPanelRef = (0, import_react19.useRef)(setFloatingPanel);
20828
+ const [floatingPanelPos, setFloatingPanelPos] = (0, import_react19.useState)(null);
20829
+ const buttonCollectionDragRef = (0, import_react19.useRef)(null);
20830
+ const [buttonStyleTick, setButtonStyleTick] = (0, import_react19.useState)(0);
20831
+ const [logoSizeDraft, setLogoSizeDraft] = (0, import_react19.useState)(null);
20832
+ const [editorViewport, setEditorViewport] = (0, import_react19.useState)("desktop");
20833
+ const [parentScrollSnap, setParentScrollSnap] = (0, import_react19.useState)(null);
20834
+ const [sitePages, setSitePages] = (0, import_react19.useState)([]);
20835
+ const [sectionsByPath, setSectionsByPath] = (0, import_react19.useState)({});
20836
+ const sectionsPrefetchGenRef = (0, import_react19.useRef)(0);
20837
+ const setLinkPopoverRef = (0, import_react19.useRef)(setLinkPopover);
20838
+ const linkPopoverPanelRef = (0, import_react19.useRef)(null);
20839
+ const linkPopoverOpenRef = (0, import_react19.useRef)(false);
20840
+ const linkPopoverGraceUntilRef = (0, import_react19.useRef)(0);
20202
20841
  setLinkPopoverRef.current = setLinkPopover;
20203
20842
  setFloatingPanelRef.current = setFloatingPanel;
20204
20843
  linkPopoverSessionRef.current = linkPopover;
20205
20844
  floatingPanelOpenRef.current = Boolean(floatingPanel);
20206
- (0, import_react18.useEffect)(() => {
20845
+ (0, import_react19.useEffect)(() => {
20207
20846
  const syncViewport = () => {
20208
20847
  const next = window.innerWidth <= 480 ? "mobile" : "desktop";
20209
20848
  setEditorViewport((prev) => prev === next ? prev : next);
@@ -20212,6 +20851,16 @@ function OhhwellsBridge() {
20212
20851
  window.addEventListener("resize", syncViewport);
20213
20852
  return () => window.removeEventListener("resize", syncViewport);
20214
20853
  }, []);
20854
+ (0, import_react19.useEffect)(() => {
20855
+ setSectionOrderPersistHandler((entries) => {
20856
+ const currentPath = window.location.pathname;
20857
+ const merged = mergePageSectionOrder(editContentRef.current[SECTION_ORDER_KEY], currentPath, entries);
20858
+ const text = JSON.stringify(merged);
20859
+ editContentRef.current = { ...editContentRef.current, [SECTION_ORDER_KEY]: text };
20860
+ postToParentRef.current({ type: "ow:change", nodes: [{ key: SECTION_ORDER_KEY, text }] });
20861
+ });
20862
+ return () => setSectionOrderPersistHandler(null);
20863
+ }, []);
20215
20864
  const {
20216
20865
  navDragRef,
20217
20866
  navPointerDragRef,
@@ -20258,7 +20907,7 @@ function OhhwellsBridge() {
20258
20907
  const bumpLinkPopoverGrace = () => {
20259
20908
  linkPopoverGraceUntilRef.current = Date.now() + 350;
20260
20909
  };
20261
- const runSectionsPrefetch = (0, import_react18.useCallback)((pages) => {
20910
+ const runSectionsPrefetch = (0, import_react19.useCallback)((pages) => {
20262
20911
  if (!isEditMode || shouldUseDevFixtures() || pages.length === 0) return;
20263
20912
  const gen = ++sectionsPrefetchGenRef.current;
20264
20913
  const paths = pages.map((p) => p.path);
@@ -20277,9 +20926,9 @@ function OhhwellsBridge() {
20277
20926
  );
20278
20927
  });
20279
20928
  }, [isEditMode, pathname]);
20280
- const runSectionsPrefetchRef = (0, import_react18.useRef)(runSectionsPrefetch);
20929
+ const runSectionsPrefetchRef = (0, import_react19.useRef)(runSectionsPrefetch);
20281
20930
  runSectionsPrefetchRef.current = runSectionsPrefetch;
20282
- (0, import_react18.useEffect)(() => {
20931
+ (0, import_react19.useEffect)(() => {
20283
20932
  if (!linkPopover) {
20284
20933
  document.documentElement.removeAttribute("data-ohw-link-popover-open");
20285
20934
  return;
@@ -20307,7 +20956,7 @@ function OhhwellsBridge() {
20307
20956
  document.documentElement.removeAttribute("data-ohw-link-popover-open");
20308
20957
  };
20309
20958
  }, [linkPopover, postToParent2]);
20310
- (0, import_react18.useEffect)(() => {
20959
+ (0, import_react19.useEffect)(() => {
20311
20960
  if (!isEditMode) return;
20312
20961
  const useFixtures = shouldUseDevFixtures();
20313
20962
  if (useFixtures) {
@@ -20331,14 +20980,14 @@ function OhhwellsBridge() {
20331
20980
  if (!useFixtures) postToParent2({ type: "ow:request-site-pages" });
20332
20981
  return () => window.removeEventListener("message", onSitePages);
20333
20982
  }, [isEditMode, postToParent2]);
20334
- (0, import_react18.useEffect)(() => {
20983
+ (0, import_react19.useEffect)(() => {
20335
20984
  if (!isEditMode || shouldUseDevFixtures()) return;
20336
20985
  void loadAllSectionsManifest().then((manifest) => {
20337
20986
  if (Object.keys(manifest).length === 0) return;
20338
20987
  setSectionsByPath((prev) => ({ ...manifest, ...prev }));
20339
20988
  });
20340
20989
  }, [isEditMode]);
20341
- (0, import_react18.useEffect)(() => {
20990
+ (0, import_react19.useEffect)(() => {
20342
20991
  const update = () => {
20343
20992
  const el = activeElRef.current ?? selectedElRef.current;
20344
20993
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
@@ -20362,10 +21011,10 @@ function OhhwellsBridge() {
20362
21011
  vvp.removeEventListener("resize", update);
20363
21012
  };
20364
21013
  }, []);
20365
- const refreshStateRules = (0, import_react18.useCallback)(() => {
21014
+ const refreshStateRules = (0, import_react19.useCallback)(() => {
20366
21015
  editStylesRef.current?.forceHover && (editStylesRef.current.forceHover.textContent = collectStateRules());
20367
21016
  }, []);
20368
- const processConfigRequest = (0, import_react18.useCallback)((insertAfterVal) => {
21017
+ const processConfigRequest = (0, import_react19.useCallback)((insertAfterVal) => {
20369
21018
  const tracker = getSectionsTracker();
20370
21019
  let entries = [];
20371
21020
  try {
@@ -20388,7 +21037,7 @@ function OhhwellsBridge() {
20388
21037
  }
20389
21038
  window.postMessage({ type: "ow:schedule-config", insertAfter: insertAfterVal, scheduleId: null }, "*");
20390
21039
  }, [isEditMode]);
20391
- const deactivate = (0, import_react18.useCallback)(() => {
21040
+ const deactivate = (0, import_react19.useCallback)(() => {
20392
21041
  const el = activeElRef.current;
20393
21042
  if (!el) return;
20394
21043
  const isFormBlock = el.dataset.ohwEditable === "form";
@@ -20439,12 +21088,12 @@ function OhhwellsBridge() {
20439
21088
  setToolbarShowEditLink(false);
20440
21089
  postToParent2({ type: "ow:exit-edit" });
20441
21090
  }, [postToParent2]);
20442
- const clearSelectedAttr = (0, import_react18.useCallback)(() => {
21091
+ const clearSelectedAttr = (0, import_react19.useCallback)(() => {
20443
21092
  document.querySelectorAll("[data-ohw-selected]").forEach((el) => {
20444
21093
  el.removeAttribute("data-ohw-selected");
20445
21094
  });
20446
21095
  }, []);
20447
- const deselect = (0, import_react18.useCallback)(() => {
21096
+ const deselect = (0, import_react19.useCallback)(() => {
20448
21097
  const nestedGroup = selectedElRef.current?.closest("[data-ohw-nav-children]") != null ? selectedElRef.current.closest("[data-ohw-nav-group]") : null;
20449
21098
  clearSelectedAttr();
20450
21099
  selectedElRef.current = null;
@@ -20479,20 +21128,20 @@ function OhhwellsBridge() {
20479
21128
  setToolbarVariant("none");
20480
21129
  }
20481
21130
  }, [clearSelectedAttr]);
20482
- const markSelected = (0, import_react18.useCallback)((el) => {
21131
+ const markSelected = (0, import_react19.useCallback)((el) => {
20483
21132
  clearSelectedAttr();
20484
21133
  el.removeAttribute("data-ohw-hovered");
20485
21134
  el.setAttribute("data-ohw-selected", "");
20486
21135
  }, [clearSelectedAttr]);
20487
- const isSelectedForHover = (0, import_react18.useCallback)((el) => {
21136
+ const isSelectedForHover = (0, import_react19.useCallback)((el) => {
20488
21137
  if (!el) return false;
20489
21138
  return [selectedElRef.current, activeElRef.current].some(
20490
21139
  (busy) => busy && (el === busy || busy.contains(el) || el.contains(busy))
20491
21140
  );
20492
21141
  }, []);
20493
- const isSelectedForHoverRef = (0, import_react18.useRef)(isSelectedForHover);
21142
+ const isSelectedForHoverRef = (0, import_react19.useRef)(isSelectedForHover);
20494
21143
  isSelectedForHoverRef.current = isSelectedForHover;
20495
- const resolveHrefKeyElement = (0, import_react18.useCallback)((hrefKey) => {
21144
+ const resolveHrefKeyElement = (0, import_react19.useCallback)((hrefKey) => {
20496
21145
  if (isFooterHrefKey(hrefKey)) {
20497
21146
  return document.querySelector(
20498
21147
  `footer [data-ohw-href-key="${CSS.escape(hrefKey)}"]`
@@ -20507,7 +21156,7 @@ function OhhwellsBridge() {
20507
21156
  `[data-ohw-href-key="${CSS.escape(hrefKey)}"]`
20508
21157
  );
20509
21158
  }, []);
20510
- const resyncSelectedNavigationItem = (0, import_react18.useCallback)(() => {
21159
+ const resyncSelectedNavigationItem = (0, import_react19.useCallback)(() => {
20511
21160
  const hrefKey = selectedHrefKeyRef.current;
20512
21161
  if (hrefKey) {
20513
21162
  const link = resolveHrefKeyElement(hrefKey);
@@ -20545,7 +21194,7 @@ function OhhwellsBridge() {
20545
21194
  );
20546
21195
  }
20547
21196
  }, [resolveHrefKeyElement]);
20548
- const reselectNavigationItem = (0, import_react18.useCallback)((navAnchor) => {
21197
+ const reselectNavigationItem = (0, import_react19.useCallback)((navAnchor) => {
20549
21198
  selectedElRef.current = navAnchor;
20550
21199
  selectedHrefKeyRef.current = navAnchor.getAttribute("data-ohw-href-key");
20551
21200
  selectedFooterColAttrRef.current = null;
@@ -20576,7 +21225,7 @@ function OhhwellsBridge() {
20576
21225
  setToolbarShowEditLink(false);
20577
21226
  setActiveCommands(/* @__PURE__ */ new Set());
20578
21227
  }, [markSelected]);
20579
- const commitNavigationTextEdit = (0, import_react18.useCallback)((navAnchor) => {
21228
+ const commitNavigationTextEdit = (0, import_react19.useCallback)((navAnchor) => {
20580
21229
  const el = activeElRef.current;
20581
21230
  if (!el) return;
20582
21231
  const key = el.dataset.ohwKey;
@@ -20609,7 +21258,7 @@ function OhhwellsBridge() {
20609
21258
  postToParent2({ type: "ow:exit-edit" });
20610
21259
  reselectNavigationItem(navAnchor);
20611
21260
  }, [postToParent2, reselectNavigationItem]);
20612
- const handleAddTopLevelNavItem = (0, import_react18.useCallback)(() => {
21261
+ const handleAddTopLevelNavItem = (0, import_react19.useCallback)(() => {
20613
21262
  const items = listNavbarRootItems();
20614
21263
  addNavAfterAnchorRef.current = items[items.length - 1] ?? null;
20615
21264
  deselectRef.current();
@@ -20621,7 +21270,7 @@ function OhhwellsBridge() {
20621
21270
  intent: "add-nav"
20622
21271
  });
20623
21272
  }, []);
20624
- const maybeWarnNavLinkDropdownConflict = (0, import_react18.useCallback)(
21273
+ const maybeWarnNavLinkDropdownConflict = (0, import_react19.useCallback)(
20625
21274
  (anchor) => {
20626
21275
  if (!isNavbarHrefKey(anchor.getAttribute("data-ohw-href-key"))) return;
20627
21276
  if (!navDropdownsOpenOnClick()) return;
@@ -20634,7 +21283,7 @@ function OhhwellsBridge() {
20634
21283
  },
20635
21284
  [postToParent2]
20636
21285
  );
20637
- const handleNavDropdownOpenChange = (0, import_react18.useCallback)((open) => {
21286
+ const handleNavDropdownOpenChange = (0, import_react19.useCallback)((open) => {
20638
21287
  const selected = selectedElRef.current;
20639
21288
  if (!selected || !isNavigationItem2(selected)) return;
20640
21289
  if (isNestedNavChild(selected)) return;
@@ -20650,7 +21299,7 @@ function OhhwellsBridge() {
20650
21299
  }
20651
21300
  });
20652
21301
  }, []);
20653
- const handleFooterHeadingVisibleChange = (0, import_react18.useCallback)(
21302
+ const handleFooterHeadingVisibleChange = (0, import_react19.useCallback)(
20654
21303
  (visible) => {
20655
21304
  const selected = selectedElRef.current;
20656
21305
  if (!selected || !isFooterFrameSelectionRef.current) return;
@@ -20674,7 +21323,7 @@ function OhhwellsBridge() {
20674
21323
  },
20675
21324
  [postToParent2]
20676
21325
  );
20677
- const enterEditOnNewItem = (0, import_react18.useCallback)((anchor) => {
21326
+ const enterEditOnNewItem = (0, import_react19.useCallback)((anchor) => {
20678
21327
  const label = anchor.querySelector('[data-ohw-editable="text"]');
20679
21328
  if (!label) {
20680
21329
  selectRef.current(anchor);
@@ -20683,8 +21332,8 @@ function OhhwellsBridge() {
20683
21332
  setNavGroupForceOpen(anchor, true);
20684
21333
  activateRef.current(label);
20685
21334
  }, []);
20686
- const pendingSocialAddRef = (0, import_react18.useRef)(null);
20687
- const handleAddChildItem = (0, import_react18.useCallback)(() => {
21335
+ const pendingSocialAddRef = (0, import_react19.useRef)(null);
21336
+ const handleAddChildItem = (0, import_react19.useCallback)(() => {
20688
21337
  const selected = selectedElRef.current;
20689
21338
  if (!selected) return;
20690
21339
  const socialsRow = isSocialsRow(selected) ? selected : findSocialsRow(selected);
@@ -20795,7 +21444,7 @@ function OhhwellsBridge() {
20795
21444
  });
20796
21445
  });
20797
21446
  }, [enterEditOnNewItem, isFooterFrameSelection, maybeWarnNavLinkDropdownConflict, postToParent2]);
20798
- const handleAddFooterColumn = (0, import_react18.useCallback)(() => {
21447
+ const handleAddFooterColumn = (0, import_react19.useCallback)(() => {
20799
21448
  if (!canAddFooterColumn()) {
20800
21449
  postToParent2({
20801
21450
  type: "ow:toast",
@@ -20816,7 +21465,7 @@ function OhhwellsBridge() {
20816
21465
  selectRef.current(result.firstLink);
20817
21466
  });
20818
21467
  }, [postToParent2]);
20819
- const clearFooterDragVisuals = (0, import_react18.useCallback)(() => {
21468
+ const clearFooterDragVisuals = (0, import_react19.useCallback)(() => {
20820
21469
  footerDragRef.current = null;
20821
21470
  setSiblingHintRects([]);
20822
21471
  setFooterDropSlots([]);
@@ -20825,7 +21474,7 @@ function OhhwellsBridge() {
20825
21474
  setIsItemDragging(false);
20826
21475
  unlockFooterDragInteraction();
20827
21476
  }, []);
20828
- const refreshFooterDragVisuals = (0, import_react18.useCallback)((session, activeSlot, clientX, clientY) => {
21477
+ const refreshFooterDragVisuals = (0, import_react19.useCallback)((session, activeSlot, clientX, clientY) => {
20829
21478
  const dragged = session.draggedEl;
20830
21479
  setDraggedItemRect(dragged.getBoundingClientRect());
20831
21480
  if (typeof clientX === "number" && typeof clientY === "number") {
@@ -20857,13 +21506,13 @@ function OhhwellsBridge() {
20857
21506
  const activeIdx = activeSlot ? slots.findIndex((s) => s.insertIndex === activeSlot.insertIndex) : -1;
20858
21507
  setActiveFooterDropIndex(activeIdx >= 0 ? activeIdx : null);
20859
21508
  }, []);
20860
- const refreshFooterDragVisualsRef = (0, import_react18.useRef)(refreshFooterDragVisuals);
21509
+ const refreshFooterDragVisualsRef = (0, import_react19.useRef)(refreshFooterDragVisuals);
20861
21510
  refreshFooterDragVisualsRef.current = refreshFooterDragVisuals;
20862
- const commitFooterDragRef = (0, import_react18.useRef)(() => {
21511
+ const commitFooterDragRef = (0, import_react19.useRef)(() => {
20863
21512
  });
20864
- const beginFooterDragRef = (0, import_react18.useRef)(() => {
21513
+ const beginFooterDragRef = (0, import_react19.useRef)(() => {
20865
21514
  });
20866
- const beginFooterDrag = (0, import_react18.useCallback)(
21515
+ const beginFooterDrag = (0, import_react19.useCallback)(
20867
21516
  (session) => {
20868
21517
  const rect = session.draggedEl.getBoundingClientRect();
20869
21518
  session.lastClientX = session.lastClientX || rect.left + rect.width / 2;
@@ -20883,7 +21532,7 @@ function OhhwellsBridge() {
20883
21532
  [refreshFooterDragVisuals]
20884
21533
  );
20885
21534
  beginFooterDragRef.current = beginFooterDrag;
20886
- const commitFooterDrag = (0, import_react18.useCallback)(
21535
+ const commitFooterDrag = (0, import_react19.useCallback)(
20887
21536
  (clientX, clientY) => {
20888
21537
  const session = footerDragRef.current;
20889
21538
  if (!session) {
@@ -21012,7 +21661,7 @@ function OhhwellsBridge() {
21012
21661
  [clearFooterDragVisuals, resolveHrefKeyElement, resyncSelectedNavigationItem]
21013
21662
  );
21014
21663
  commitFooterDragRef.current = commitFooterDrag;
21015
- const startFooterLinkDrag = (0, import_react18.useCallback)(
21664
+ const startFooterLinkDrag = (0, import_react19.useCallback)(
21016
21665
  (anchor, clientX, clientY, wasSelected) => {
21017
21666
  const hrefKey = anchor.getAttribute("data-ohw-href-key");
21018
21667
  if (!hrefKey) return false;
@@ -21048,7 +21697,7 @@ function OhhwellsBridge() {
21048
21697
  },
21049
21698
  [beginFooterDrag]
21050
21699
  );
21051
- const startFooterColumnDrag = (0, import_react18.useCallback)(
21700
+ const startFooterColumnDrag = (0, import_react19.useCallback)(
21052
21701
  (columnEl, clientX, clientY, wasSelected) => {
21053
21702
  const columns = listFooterColumns();
21054
21703
  const idx = columns.indexOf(columnEl);
@@ -21068,7 +21717,7 @@ function OhhwellsBridge() {
21068
21717
  },
21069
21718
  [beginFooterDrag]
21070
21719
  );
21071
- const handleItemDragStart = (0, import_react18.useCallback)(
21720
+ const handleItemDragStart = (0, import_react19.useCallback)(
21072
21721
  (e) => {
21073
21722
  const selected = selectedElRef.current;
21074
21723
  if (!selected) {
@@ -21097,7 +21746,7 @@ function OhhwellsBridge() {
21097
21746
  },
21098
21747
  [startFooterColumnDrag, startFooterLinkDrag, startNavLinkDrag]
21099
21748
  );
21100
- const handleItemDragEnd = (0, import_react18.useCallback)(
21749
+ const handleItemDragEnd = (0, import_react19.useCallback)(
21101
21750
  (e) => {
21102
21751
  const collectionButton = buttonCollectionDragRef.current;
21103
21752
  if (collectionButton) {
@@ -21140,7 +21789,7 @@ function OhhwellsBridge() {
21140
21789
  },
21141
21790
  [commitFooterDrag, commitNavDrag, navDragRef, postToParent2]
21142
21791
  );
21143
- const handleItemChromePointerDown = (0, import_react18.useCallback)((e) => {
21792
+ const handleItemChromePointerDown = (0, import_react19.useCallback)((e) => {
21144
21793
  if (e.button !== 0) return;
21145
21794
  const selected = selectedElRef.current;
21146
21795
  if (!selected) return;
@@ -21171,7 +21820,7 @@ function OhhwellsBridge() {
21171
21820
  }
21172
21821
  if (armNavPressFromChrome(selected, e.clientX, e.clientY, e.pointerId)) return;
21173
21822
  }, [armNavPressFromChrome]);
21174
- const handleItemChromeClick = (0, import_react18.useCallback)((clientX, clientY) => {
21823
+ const handleItemChromeClick = (0, import_react19.useCallback)((clientX, clientY) => {
21175
21824
  if (suppressNextClickRef.current || Date.now() < suppressClickUntilRef.current) {
21176
21825
  suppressNextClickRef.current = false;
21177
21826
  return;
@@ -21184,7 +21833,7 @@ function OhhwellsBridge() {
21184
21833
  }, []);
21185
21834
  reselectNavigationItemRef.current = reselectNavigationItem;
21186
21835
  commitNavigationTextEditRef.current = commitNavigationTextEdit;
21187
- const select = (0, import_react18.useCallback)((anchor) => {
21836
+ const select = (0, import_react19.useCallback)((anchor) => {
21188
21837
  if (!isNavigationItem2(anchor)) return;
21189
21838
  if (activeElRef.current) deactivate();
21190
21839
  aiSectionApiRef.current?.selectFromElement(anchor);
@@ -21244,7 +21893,7 @@ function OhhwellsBridge() {
21244
21893
  setLogoSizeDraft(null);
21245
21894
  }
21246
21895
  }, [deactivate, markSelected]);
21247
- const selectFrame = (0, import_react18.useCallback)((el) => {
21896
+ const selectFrame = (0, import_react19.useCallback)((el) => {
21248
21897
  if (!isNavigationContainer(el)) return;
21249
21898
  if (activeElRef.current) deactivate();
21250
21899
  aiSectionApiRef.current?.selectFromElement(el);
@@ -21285,7 +21934,7 @@ function OhhwellsBridge() {
21285
21934
  setFloatingPanelPos(null);
21286
21935
  setLogoSizeDraft(null);
21287
21936
  }, [deactivate, markSelected, postToParent2]);
21288
- const selectLogo = (0, import_react18.useCallback)(
21937
+ const selectLogo = (0, import_react19.useCallback)(
21289
21938
  (logoEl) => {
21290
21939
  if (activeElRef.current) deactivate();
21291
21940
  selectedElRef.current = logoEl;
@@ -21314,7 +21963,7 @@ function OhhwellsBridge() {
21314
21963
  },
21315
21964
  [deactivate, markSelected]
21316
21965
  );
21317
- const openLogoSizePanel = (0, import_react18.useCallback)((logoEl) => {
21966
+ const openLogoSizePanel = (0, import_react19.useCallback)((logoEl) => {
21318
21967
  const placement = getLogoPlacement(logoEl);
21319
21968
  const draft = readLogoSizeState(editContentRef.current, placement);
21320
21969
  setLogoSizeDraft(draft);
@@ -21327,7 +21976,7 @@ function OhhwellsBridge() {
21327
21976
  placement
21328
21977
  });
21329
21978
  }, []);
21330
- const openSocialsDisplayPanel = (0, import_react18.useCallback)((row) => {
21979
+ const openSocialsDisplayPanel = (0, import_react19.useCallback)((row) => {
21331
21980
  setParentScrollSnap(parentScrollRef.current);
21332
21981
  setFloatingPanel({
21333
21982
  key: "socials-display",
@@ -21337,7 +21986,7 @@ function OhhwellsBridge() {
21337
21986
  row
21338
21987
  });
21339
21988
  }, []);
21340
- const rememberButtonTokens = (0, import_react18.useCallback)(
21989
+ const rememberButtonTokens = (0, import_react19.useCallback)(
21341
21990
  (content, tokens, nodes) => {
21342
21991
  if (nodes.length === 0) return content;
21343
21992
  const next = { ...content };
@@ -21348,7 +21997,7 @@ function OhhwellsBridge() {
21348
21997
  },
21349
21998
  [postToParent2]
21350
21999
  );
21351
- const tokensForButton = (0, import_react18.useCallback)(
22000
+ const tokensForButton = (0, import_react19.useCallback)(
21352
22001
  (el, persistFallback = false) => {
21353
22002
  const stored = readStoredStyleTokens(editContentRef.current);
21354
22003
  if (stored) return stored;
@@ -21363,7 +22012,7 @@ function OhhwellsBridge() {
21363
22012
  },
21364
22013
  [rememberButtonTokens]
21365
22014
  );
21366
- const openButtonStylePanel = (0, import_react18.useCallback)(
22015
+ const openButtonStylePanel = (0, import_react19.useCallback)(
21367
22016
  (anchor) => {
21368
22017
  const id = buttonId(anchor);
21369
22018
  if (!id) return;
@@ -21381,7 +22030,7 @@ function OhhwellsBridge() {
21381
22030
  },
21382
22031
  [tokensForButton]
21383
22032
  );
21384
- const applySelectedButtonStyle = (0, import_react18.useCallback)(
22033
+ const applySelectedButtonStyle = (0, import_react19.useCallback)(
21385
22034
  (patch) => {
21386
22035
  const panel = floatingPanelRef.current;
21387
22036
  const id = panel?.kind === "button-style" ? panel.buttonId : null;
@@ -21399,7 +22048,7 @@ function OhhwellsBridge() {
21399
22048
  },
21400
22049
  [postToParent2]
21401
22050
  );
21402
- (0, import_react18.useEffect)(() => {
22051
+ (0, import_react19.useEffect)(() => {
21403
22052
  const onDragOver = (e) => {
21404
22053
  const dragged = buttonCollectionDragRef.current;
21405
22054
  if (!dragged) return;
@@ -21418,11 +22067,11 @@ function OhhwellsBridge() {
21418
22067
  document.removeEventListener("drop", onDrop);
21419
22068
  };
21420
22069
  }, []);
21421
- const isEditModeRef = (0, import_react18.useRef)(false);
21422
- const requestMissingSocialIconsRef = (0, import_react18.useRef)(() => {
22070
+ const isEditModeRef = (0, import_react19.useRef)(false);
22071
+ const requestMissingSocialIconsRef = (0, import_react19.useRef)(() => {
21423
22072
  });
21424
- const askedSocialIconsRef = (0, import_react18.useRef)(/* @__PURE__ */ new Set());
21425
- const requestMissingSocialIcons = (0, import_react18.useCallback)(() => {
22073
+ const askedSocialIconsRef = (0, import_react19.useRef)(/* @__PURE__ */ new Set());
22074
+ const requestMissingSocialIcons = (0, import_react19.useCallback)(() => {
21426
22075
  const items = Array.from(document.querySelectorAll(`[${SOCIALS_ROW_ATTR}]`)).filter((row) => socialsDisplayFor(row, editContentRef.current).icon).flatMap((row) => {
21427
22076
  const missing = socialsMissingIcons(row);
21428
22077
  listSocialItems(row).forEach((item) => ensureIconSlot(item));
@@ -21434,7 +22083,7 @@ function OhhwellsBridge() {
21434
22083
  }, []);
21435
22084
  requestMissingSocialIconsRef.current = requestMissingSocialIcons;
21436
22085
  isEditModeRef.current = isEditMode;
21437
- const changeSocialsDisplay = (0, import_react18.useCallback)(
22086
+ const changeSocialsDisplay = (0, import_react19.useCallback)(
21438
22087
  (row, next) => {
21439
22088
  if (next.icon) {
21440
22089
  const missing = socialsMissingIcons(row);
@@ -21458,19 +22107,19 @@ function OhhwellsBridge() {
21458
22107
  },
21459
22108
  []
21460
22109
  );
21461
- const closeFloatingPanelOnly = (0, import_react18.useCallback)(() => {
22110
+ const closeFloatingPanelOnly = (0, import_react19.useCallback)(() => {
21462
22111
  setFloatingPanel(null);
21463
22112
  setFloatingPanelPos(null);
21464
22113
  setLogoSizeDraft(null);
21465
22114
  }, []);
21466
22115
  closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
21467
- const closeFloatingPanelAndDeselect = (0, import_react18.useCallback)(() => {
22116
+ const closeFloatingPanelAndDeselect = (0, import_react19.useCallback)(() => {
21468
22117
  setFloatingPanel(null);
21469
22118
  setFloatingPanelPos(null);
21470
22119
  setLogoSizeDraft(null);
21471
22120
  deselectRef.current();
21472
22121
  }, []);
21473
- (0, import_react18.useEffect)(() => {
22122
+ (0, import_react19.useEffect)(() => {
21474
22123
  const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
21475
22124
  if (!session || !logoSizeDraft) {
21476
22125
  postToParentRef.current({ type: "ow:logo-size-panel", open: false });
@@ -21489,7 +22138,7 @@ function OhhwellsBridge() {
21489
22138
  max: LOGO_SIZE_MAX
21490
22139
  });
21491
22140
  }, [floatingPanel, logoSizeDraft, editorViewport]);
21492
- const persistLogoSizeDraft = (0, import_react18.useCallback)(
22141
+ const persistLogoSizeDraft = (0, import_react19.useCallback)(
21493
22142
  (placement, draft) => {
21494
22143
  const desktopKey = LOGO_SIZE_DESKTOP_KEYS[placement];
21495
22144
  const mobileKey = LOGO_SIZE_MOBILE_KEYS[placement];
@@ -21529,7 +22178,7 @@ function OhhwellsBridge() {
21529
22178
  },
21530
22179
  [postToParent2]
21531
22180
  );
21532
- const activate = (0, import_react18.useCallback)((el, options) => {
22181
+ const activate = (0, import_react19.useCallback)((el, options) => {
21533
22182
  if (activeElRef.current === el) return;
21534
22183
  document.querySelectorAll("[data-ohw-hovered]").forEach((hovered) => {
21535
22184
  hovered.removeAttribute("data-ohw-hovered");
@@ -21627,8 +22276,8 @@ function OhhwellsBridge() {
21627
22276
  openLogoSizePanelRef.current = openLogoSizePanel;
21628
22277
  deselectRef.current = deselect;
21629
22278
  closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
21630
- const lastSiteWideScopeRef = (0, import_react18.useRef)(null);
21631
- (0, import_react18.useEffect)(() => {
22279
+ const lastSiteWideScopeRef = (0, import_react19.useRef)(null);
22280
+ (0, import_react19.useEffect)(() => {
21632
22281
  if (!isEditMode) {
21633
22282
  if (lastSiteWideScopeRef.current !== false) {
21634
22283
  lastSiteWideScopeRef.current = false;
@@ -21654,7 +22303,7 @@ function OhhwellsBridge() {
21654
22303
  isFooterFrameSelection,
21655
22304
  postToParent2
21656
22305
  ]);
21657
- (0, import_react18.useLayoutEffect)(() => {
22306
+ (0, import_react19.useLayoutEffect)(() => {
21658
22307
  if (!subdomain || isEditMode) {
21659
22308
  setFetchState("done");
21660
22309
  return;
@@ -21777,7 +22426,7 @@ function OhhwellsBridge() {
21777
22426
  cancelled = true;
21778
22427
  };
21779
22428
  }, [subdomain, isEditMode]);
21780
- (0, import_react18.useEffect)(() => {
22429
+ (0, import_react19.useEffect)(() => {
21781
22430
  if (!isEditMode) return;
21782
22431
  const resolveIndex = (form, clientY) => {
21783
22432
  const wrappers = listFieldWrappers(form).filter((el) => fieldKeyOf(el) !== fieldDragRef.current?.key);
@@ -21818,7 +22467,7 @@ function OhhwellsBridge() {
21818
22467
  window.removeEventListener("drop", onDrop, true);
21819
22468
  };
21820
22469
  }, [buildFieldDropSlots, isEditMode, persistFields, selectField]);
21821
- (0, import_react18.useEffect)(() => {
22470
+ (0, import_react19.useEffect)(() => {
21822
22471
  if (!isEditMode) return;
21823
22472
  const mark = () => document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
21824
22473
  markFormFields(form);
@@ -21830,7 +22479,7 @@ function OhhwellsBridge() {
21830
22479
  });
21831
22480
  return () => observer.disconnect();
21832
22481
  }, [isEditMode, fetchState, pathname]);
21833
- (0, import_react18.useEffect)(() => {
22482
+ (0, import_react19.useEffect)(() => {
21834
22483
  if (!isEditMode) return;
21835
22484
  let saveTimer = null;
21836
22485
  const onInput = (e) => {
@@ -21852,14 +22501,14 @@ function OhhwellsBridge() {
21852
22501
  document.addEventListener("input", onInput, true);
21853
22502
  return () => document.removeEventListener("input", onInput, true);
21854
22503
  }, [isEditMode, persistFields]);
21855
- (0, import_react18.useEffect)(() => {
22504
+ (0, import_react19.useEffect)(() => {
21856
22505
  if (isEditMode || fetchState !== "done") return;
21857
22506
  const content = contentCache.get(subdomain) ?? {};
21858
22507
  document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
21859
22508
  reconcileFieldsFromContent(form, content);
21860
22509
  });
21861
22510
  }, [isEditMode, fetchState, subdomain]);
21862
- (0, import_react18.useEffect)(() => {
22511
+ (0, import_react19.useEffect)(() => {
21863
22512
  if (!isEditMode) return;
21864
22513
  const swallow = (e) => {
21865
22514
  const target = e.target;
@@ -21868,14 +22517,14 @@ function OhhwellsBridge() {
21868
22517
  document.addEventListener("submit", swallow, true);
21869
22518
  return () => document.removeEventListener("submit", swallow, true);
21870
22519
  }, [isEditMode]);
21871
- (0, import_react18.useEffect)(() => {
22520
+ (0, import_react19.useEffect)(() => {
21872
22521
  if (isEditMode || fetchState !== "done") return;
21873
22522
  console.log("env", process.env.NEXT_PUBLIC_FLOWOPS_API_URL);
21874
22523
  const apiUrl = process.env.NEXT_PUBLIC_FLOWOPS_API_URL ?? "https://flowops-backend-staging-2yfdh7pwpq-as.a.run.app";
21875
22524
  console.log({ apiUrl, subdomain });
21876
22525
  bindPublishedForms(apiUrl, subdomain, contentCache.get(subdomain) ?? {});
21877
22526
  }, [isEditMode, fetchState, subdomain]);
21878
- (0, import_react18.useEffect)(() => {
22527
+ (0, import_react19.useEffect)(() => {
21879
22528
  if (!subdomain || isEditMode) return;
21880
22529
  let debounceTimer = null;
21881
22530
  let observer = null;
@@ -21977,16 +22626,16 @@ function OhhwellsBridge() {
21977
22626
  if (debounceTimer) clearTimeout(debounceTimer);
21978
22627
  };
21979
22628
  }, [subdomain, isEditMode, pathname]);
21980
- (0, import_react18.useLayoutEffect)(() => {
22629
+ (0, import_react19.useLayoutEffect)(() => {
21981
22630
  const el = document.getElementById("ohw-loader");
21982
22631
  if (!el) return;
21983
22632
  const visible = Boolean(subdomain) && fetchState !== "done";
21984
22633
  el.style.display = visible ? "flex" : "none";
21985
22634
  }, [subdomain, fetchState]);
21986
- (0, import_react18.useEffect)(() => {
22635
+ (0, import_react19.useEffect)(() => {
21987
22636
  postToParent2({ type: "ow:navigation", path: pathname });
21988
22637
  }, [pathname, postToParent2]);
21989
- (0, import_react18.useEffect)(() => {
22638
+ (0, import_react19.useEffect)(() => {
21990
22639
  if (!subdomain || isEditMode) return;
21991
22640
  const content = contentCache.get(subdomain);
21992
22641
  if (!content) return;
@@ -22002,7 +22651,7 @@ function OhhwellsBridge() {
22002
22651
  applyAiSectionsToDom(parseAiSectionsState(content[AI_SECTIONS_KEY]));
22003
22652
  }
22004
22653
  }, [pathname, subdomain, isEditMode]);
22005
- (0, import_react18.useEffect)(() => {
22654
+ (0, import_react19.useEffect)(() => {
22006
22655
  if (!isEditMode) return;
22007
22656
  if (linkPopoverSessionRef.current?.intent === "add-nav") return;
22008
22657
  if (document.querySelector("[data-ohw-section-picker]")) return;
@@ -22010,11 +22659,11 @@ function OhhwellsBridge() {
22010
22659
  deselectRef.current();
22011
22660
  deactivateRef.current();
22012
22661
  }, [pathname, isEditMode]);
22013
- (0, import_react18.useEffect)(() => {
22662
+ (0, import_react19.useEffect)(() => {
22014
22663
  if (!isEditMode) return;
22015
22664
  initSectionInstancesFromContent(editContentRef.current, pathname);
22016
22665
  }, [pathname, isEditMode]);
22017
- (0, import_react18.useEffect)(() => {
22666
+ (0, import_react19.useEffect)(() => {
22018
22667
  if (!isEditMode) return;
22019
22668
  const observer = new MutationObserver(() => {
22020
22669
  const drawer = document.querySelector("[data-ohw-nav-drawer]");
@@ -22025,7 +22674,7 @@ function OhhwellsBridge() {
22025
22674
  observer.observe(document.body, { childList: true, subtree: true });
22026
22675
  return () => observer.disconnect();
22027
22676
  }, [isEditMode, pathname]);
22028
- (0, import_react18.useEffect)(() => {
22677
+ (0, import_react19.useEffect)(() => {
22029
22678
  const contentForNav = () => {
22030
22679
  if (isEditMode) return editContentRef.current;
22031
22680
  if (!subdomain) return {};
@@ -22098,7 +22747,7 @@ function OhhwellsBridge() {
22098
22747
  observer?.disconnect();
22099
22748
  };
22100
22749
  }, [isEditMode, pathname, subdomain, fetchState, resyncSelectedNavigationItem]);
22101
- (0, import_react18.useEffect)(() => {
22750
+ (0, import_react19.useEffect)(() => {
22102
22751
  if (!isEditMode) return;
22103
22752
  let applying = false;
22104
22753
  let rafId = null;
@@ -22136,7 +22785,7 @@ function OhhwellsBridge() {
22136
22785
  observer.disconnect();
22137
22786
  };
22138
22787
  }, [isEditMode, pathname]);
22139
- (0, import_react18.useEffect)(() => {
22788
+ (0, import_react19.useEffect)(() => {
22140
22789
  if (!isEditMode) return;
22141
22790
  let lastPosted = 0;
22142
22791
  const measure = () => {
@@ -22165,7 +22814,7 @@ function OhhwellsBridge() {
22165
22814
  ro.disconnect();
22166
22815
  };
22167
22816
  }, [pathname, isEditMode, postToParent2]);
22168
- (0, import_react18.useEffect)(() => {
22817
+ (0, import_react19.useEffect)(() => {
22169
22818
  if (!subdomainFromQuery || isEditMode) return;
22170
22819
  const handleClick = (e) => {
22171
22820
  const anchor = e.target.closest("a");
@@ -22181,7 +22830,7 @@ function OhhwellsBridge() {
22181
22830
  document.addEventListener("click", handleClick, true);
22182
22831
  return () => document.removeEventListener("click", handleClick, true);
22183
22832
  }, [subdomainFromQuery, isEditMode, router]);
22184
- (0, import_react18.useEffect)(() => {
22833
+ (0, import_react19.useEffect)(() => {
22185
22834
  if (!isEditMode) {
22186
22835
  editStylesRef.current?.base.remove();
22187
22836
  editStylesRef.current?.forceHover.remove();
@@ -22407,11 +23056,11 @@ function OhhwellsBridge() {
22407
23056
  footer [data-ohw-href-key] [data-ohw-editable][contenteditable],
22408
23057
  footer [data-ohw-href-key] [data-ohw-editable][contenteditable] * {
22409
23058
  outline: none !important;
22410
- caret-color: ${PRIMARY4} !important;
23059
+ caret-color: ${PRIMARY5} !important;
22411
23060
  cursor: text !important;
22412
23061
  }
22413
23062
  [data-ohw-editable][contenteditable]::selection,
22414
- [data-ohw-editable][contenteditable] *::selection { background: ${PRIMARY4}59 !important; }
23063
+ [data-ohw-editable][contenteditable] *::selection { background: ${PRIMARY5}59 !important; }
22415
23064
  [data-ohw-editable-state], [data-ohw-editable-state] * { pointer-events: none !important; }
22416
23065
  [data-ohw-editable-state][data-ohw-active-state] [data-ohw-editable] { pointer-events: auto !important; }
22417
23066
  [data-ohw-editable-state][data-ohw-active-state][data-ohw-editable] { pointer-events: auto !important; }
@@ -25259,7 +25908,7 @@ function OhhwellsBridge() {
25259
25908
  if (imageShowTimerRef.current) clearTimeout(imageShowTimerRef.current);
25260
25909
  };
25261
25910
  }, [isEditMode, refreshStateRules]);
25262
- (0, import_react18.useEffect)(() => {
25911
+ (0, import_react19.useEffect)(() => {
25263
25912
  if (!isEditMode) return;
25264
25913
  const THRESHOLD = 10;
25265
25914
  const resolveWasSelected = (el) => {
@@ -25415,7 +26064,7 @@ function OhhwellsBridge() {
25415
26064
  unlockFooterDragInteraction();
25416
26065
  };
25417
26066
  }, [isEditMode]);
25418
- (0, import_react18.useEffect)(() => {
26067
+ (0, import_react19.useEffect)(() => {
25419
26068
  const handler = (e) => {
25420
26069
  if (e.data?.type !== "ow:request-schedule-config") return;
25421
26070
  const insertAfterVal = e.data.insertAfter;
@@ -25431,7 +26080,7 @@ function OhhwellsBridge() {
25431
26080
  window.addEventListener("message", handler);
25432
26081
  return () => window.removeEventListener("message", handler);
25433
26082
  }, [processConfigRequest]);
25434
- (0, import_react18.useEffect)(() => {
26083
+ (0, import_react19.useEffect)(() => {
25435
26084
  if (!isEditMode) return;
25436
26085
  document.querySelectorAll("[data-ohw-active-state]").forEach((el) => {
25437
26086
  el.removeAttribute("data-ohw-active-state");
@@ -25467,13 +26116,13 @@ function OhhwellsBridge() {
25467
26116
  clearTimeout(timer);
25468
26117
  };
25469
26118
  }, [pathname, isEditMode, refreshStateRules, postToParent2]);
25470
- (0, import_react18.useEffect)(() => {
26119
+ (0, import_react19.useEffect)(() => {
25471
26120
  scrollToHashSectionWhenReady();
25472
26121
  const onHashChange = () => scrollToHashSectionWhenReady();
25473
26122
  window.addEventListener("hashchange", onHashChange);
25474
26123
  return () => window.removeEventListener("hashchange", onHashChange);
25475
26124
  }, [pathname]);
25476
- const handleCommand = (0, import_react18.useCallback)((cmd) => {
26125
+ const handleCommand = (0, import_react19.useCallback)((cmd) => {
25477
26126
  const el = activeElRef.current;
25478
26127
  const selBefore = window.getSelection();
25479
26128
  let savedOffsets = null;
@@ -25509,7 +26158,7 @@ function OhhwellsBridge() {
25509
26158
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
25510
26159
  refreshActiveCommandsRef.current();
25511
26160
  }, []);
25512
- (0, import_react18.useEffect)(() => {
26161
+ (0, import_react19.useEffect)(() => {
25513
26162
  const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
25514
26163
  if (!session || !logoSizeDraft) return;
25515
26164
  const onPanelAction = (e) => {
@@ -25547,7 +26196,7 @@ function OhhwellsBridge() {
25547
26196
  window.addEventListener("message", onPanelAction);
25548
26197
  return () => window.removeEventListener("message", onPanelAction);
25549
26198
  }, [floatingPanel, logoSizeDraft, editorViewport, persistLogoSizeDraft, closeFloatingPanelAndDeselect]);
25550
- const handleStateChange = (0, import_react18.useCallback)((state) => {
26199
+ const handleStateChange = (0, import_react19.useCallback)((state) => {
25551
26200
  if (!activeStateElRef.current) return;
25552
26201
  const el = activeStateElRef.current;
25553
26202
  if (state === "Default") {
@@ -25560,7 +26209,7 @@ function OhhwellsBridge() {
25560
26209
  }
25561
26210
  setToggleState((prev) => prev ? { ...prev, activeState: state } : null);
25562
26211
  }, [deactivate]);
25563
- const reselectAfterLinkPopover = (0, import_react18.useCallback)(
26212
+ const reselectAfterLinkPopover = (0, import_react19.useCallback)(
25564
26213
  (hrefKey) => {
25565
26214
  requestAnimationFrame(() => {
25566
26215
  const el = resolveHrefKeyElement(hrefKey);
@@ -25569,7 +26218,7 @@ function OhhwellsBridge() {
25569
26218
  },
25570
26219
  [resolveHrefKeyElement]
25571
26220
  );
25572
- const closeLinkPopover = (0, import_react18.useCallback)(() => {
26221
+ const closeLinkPopover = (0, import_react19.useCallback)(() => {
25573
26222
  const session = linkPopoverSessionRef.current;
25574
26223
  addNavAfterAnchorRef.current = null;
25575
26224
  setLinkPopover(null);
@@ -25577,9 +26226,9 @@ function OhhwellsBridge() {
25577
26226
  reselectAfterLinkPopover(session.key);
25578
26227
  }
25579
26228
  }, [reselectAfterLinkPopover]);
25580
- const closeLinkPopoverRef = (0, import_react18.useRef)(closeLinkPopover);
26229
+ const closeLinkPopoverRef = (0, import_react19.useRef)(closeLinkPopover);
25581
26230
  closeLinkPopoverRef.current = closeLinkPopover;
25582
- const openLinkPopoverForActive = (0, import_react18.useCallback)(() => {
26231
+ const openLinkPopoverForActive = (0, import_react19.useCallback)(() => {
25583
26232
  const hrefCtx = getHrefKeyFromElement(activeElRef.current);
25584
26233
  if (!hrefCtx) return;
25585
26234
  bumpLinkPopoverGrace();
@@ -25590,7 +26239,7 @@ function OhhwellsBridge() {
25590
26239
  });
25591
26240
  deactivate();
25592
26241
  }, [deactivate]);
25593
- const openLinkPopoverForSelected = (0, import_react18.useCallback)(() => {
26242
+ const openLinkPopoverForSelected = (0, import_react19.useCallback)(() => {
25594
26243
  const anchor = selectedElRef.current;
25595
26244
  if (!anchor) return;
25596
26245
  const key = anchor.getAttribute("data-ohw-href-key");
@@ -25607,7 +26256,7 @@ function OhhwellsBridge() {
25607
26256
  });
25608
26257
  deselect();
25609
26258
  }, [deselect]);
25610
- const handleSelectParent = (0, import_react18.useCallback)(() => {
26259
+ const handleSelectParent = (0, import_react19.useCallback)(() => {
25611
26260
  const selected = selectedElRef.current;
25612
26261
  if (!selected) return;
25613
26262
  if (toolbarVariantRef.current === "select-frame") {
@@ -25634,7 +26283,7 @@ function OhhwellsBridge() {
25634
26283
  }
25635
26284
  deselectRef.current();
25636
26285
  }, []);
25637
- const handleDuplicateSelected = (0, import_react18.useCallback)(() => {
26286
+ const handleDuplicateSelected = (0, import_react19.useCallback)(() => {
25638
26287
  const selected = selectedElRef.current;
25639
26288
  if (!selected || !isNavigationItem2(selected)) return;
25640
26289
  if (isCtaButton(selected)) {
@@ -25797,7 +26446,7 @@ function OhhwellsBridge() {
25797
26446
  });
25798
26447
  }
25799
26448
  }, [postToParent2, tokensForButton]);
25800
- const runPendingDeleteUndo = (0, import_react18.useCallback)(() => {
26449
+ const runPendingDeleteUndo = (0, import_react19.useCallback)(() => {
25801
26450
  const pending = pendingDeleteUndoRef.current;
25802
26451
  if (!pending) return false;
25803
26452
  pendingDeleteUndoRef.current = null;
@@ -25805,7 +26454,7 @@ function OhhwellsBridge() {
25805
26454
  enforceLinkHrefs();
25806
26455
  return true;
25807
26456
  }, []);
25808
- const handleDeleteSelected = (0, import_react18.useCallback)(() => {
26457
+ const handleDeleteSelected = (0, import_react19.useCallback)(() => {
25809
26458
  const selected = selectedElRef.current;
25810
26459
  if (!selected) return false;
25811
26460
  if (isCtaButton(selected)) {
@@ -25858,7 +26507,7 @@ function OhhwellsBridge() {
25858
26507
  }, [postToParent2]);
25859
26508
  handleDeleteSelectedRef.current = handleDeleteSelected;
25860
26509
  runPendingDeleteUndoRef.current = runPendingDeleteUndo;
25861
- const handleLinkPopoverSubmit = (0, import_react18.useCallback)(
26510
+ const handleLinkPopoverSubmit = (0, import_react19.useCallback)(
25862
26511
  (target) => {
25863
26512
  const session = linkPopoverSessionRef.current;
25864
26513
  if (!session) return;
@@ -25924,14 +26573,14 @@ function OhhwellsBridge() {
25924
26573
  const showEditLink = toolbarShowEditLink;
25925
26574
  const currentSections = sectionsByPath[pathname] ?? [];
25926
26575
  linkPopoverOpenRef.current = linkPopover !== null;
25927
- const handleMediaSelect = (0, import_react18.useCallback)((key) => {
26576
+ const handleMediaSelect = (0, import_react19.useCallback)((key) => {
25928
26577
  const el = hoveredImageRef.current?.dataset.ohwKey === key ? hoveredImageRef.current : Array.from(document.querySelectorAll(MEDIA_SELECTOR)).find(
25929
26578
  (m) => (m.dataset.ohwKey ?? "") === key
25930
26579
  ) ?? null;
25931
26580
  if (!el) return;
25932
26581
  selectMediaElementRef.current(el);
25933
26582
  }, []);
25934
- const handleMediaReplace = (0, import_react18.useCallback)(
26583
+ const handleMediaReplace = (0, import_react19.useCallback)(
25935
26584
  (key) => {
25936
26585
  postToParent2({
25937
26586
  type: "ow:image-pick",
@@ -25941,13 +26590,13 @@ function OhhwellsBridge() {
25941
26590
  },
25942
26591
  [postToParent2, mediaHover?.elementType, selectedMedia?.elementType]
25943
26592
  );
25944
- const handleEditCarousel = (0, import_react18.useCallback)(
26593
+ const handleEditCarousel = (0, import_react19.useCallback)(
25945
26594
  (key) => {
25946
26595
  postToParent2({ type: "ow:carousel-open", key, images: readCarouselValue(key) });
25947
26596
  },
25948
26597
  [postToParent2]
25949
26598
  );
25950
- const handleMediaFadeOutComplete = (0, import_react18.useCallback)((key) => {
26599
+ const handleMediaFadeOutComplete = (0, import_react19.useCallback)((key) => {
25951
26600
  setUploadingRects((prev) => {
25952
26601
  if (!(key in prev)) return prev;
25953
26602
  const next = { ...prev };
@@ -25955,7 +26604,7 @@ function OhhwellsBridge() {
25955
26604
  return next;
25956
26605
  });
25957
26606
  }, []);
25958
- const handleVideoSettingsChange = (0, import_react18.useCallback)(
26607
+ const handleVideoSettingsChange = (0, import_react19.useCallback)(
25959
26608
  (key, settings) => {
25960
26609
  document.querySelectorAll(`[data-ohw-key="${key}"]`).forEach((el) => {
25961
26610
  const video = getVideoEl2(el);
@@ -25977,14 +26626,14 @@ function OhhwellsBridge() {
25977
26626
  },
25978
26627
  [postToParent2]
25979
26628
  );
25980
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
25981
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OhwLoaderSpinner, {}) }),
25982
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
25983
- subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MadeWithOhhWells, {}),
26629
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
26630
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OhwLoaderSpinner, {}) }),
26631
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
26632
+ subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MadeWithOhhWells, {}),
25984
26633
  bridgeRoot ? (0, import_react_dom5.createPortal)(
25985
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
25986
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
25987
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26634
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
26635
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
26636
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
25988
26637
  AiSectionOverlay,
25989
26638
  {
25990
26639
  postToParent: postToParent2,
@@ -25992,7 +26641,7 @@ function OhhwellsBridge() {
25992
26641
  onSelectionChange: handleAiSectionSelectionChange
25993
26642
  }
25994
26643
  ),
25995
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26644
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
25996
26645
  AiPricingCardOverlay,
25997
26646
  {
25998
26647
  postToParent: postToParent2,
@@ -26000,12 +26649,20 @@ function OhhwellsBridge() {
26000
26649
  applyTreeLocalRef
26001
26650
  }
26002
26651
  ),
26003
- isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26652
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26653
+ AiMediaStripOverlay,
26654
+ {
26655
+ postToParent: postToParent2,
26656
+ aiSectionsRef,
26657
+ applyTreeLocalRef
26658
+ }
26659
+ ),
26660
+ isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26004
26661
  "div",
26005
26662
  {
26006
26663
  className: "pointer-events-none fixed z-2147483646",
26007
26664
  style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
26008
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26665
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26009
26666
  DropIndicator,
26010
26667
  {
26011
26668
  direction: "horizontal",
@@ -26016,7 +26673,7 @@ function OhhwellsBridge() {
26016
26673
  },
26017
26674
  `section-drop-${slot.insertIndex}-${i}`
26018
26675
  )),
26019
- Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26676
+ Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26020
26677
  MediaOverlay,
26021
26678
  {
26022
26679
  hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
@@ -26027,7 +26684,7 @@ function OhhwellsBridge() {
26027
26684
  },
26028
26685
  `uploading-${key}`
26029
26686
  )),
26030
- mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26687
+ mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26031
26688
  MediaOverlay,
26032
26689
  {
26033
26690
  hover: mediaHover,
@@ -26038,7 +26695,7 @@ function OhhwellsBridge() {
26038
26695
  onVideoSettingsChange: handleVideoSettingsChange
26039
26696
  }
26040
26697
  ),
26041
- selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26698
+ selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26042
26699
  MediaOverlay,
26043
26700
  {
26044
26701
  hover: selectedMedia,
@@ -26050,7 +26707,7 @@ function OhhwellsBridge() {
26050
26707
  onVideoSettingsChange: handleVideoSettingsChange
26051
26708
  }
26052
26709
  ),
26053
- carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26710
+ carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26054
26711
  CarouselOverlay,
26055
26712
  {
26056
26713
  hover: carouselHover,
@@ -26058,10 +26715,10 @@ function OhhwellsBridge() {
26058
26715
  cueOnly: !!carouselHover.fullBleedSectionId && carouselHover.fullBleedSectionId !== selectedAiSectionId
26059
26716
  }
26060
26717
  ),
26061
- siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
26062
- siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
26063
- isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
26064
- isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26718
+ siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
26719
+ siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
26720
+ isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
26721
+ isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26065
26722
  "div",
26066
26723
  {
26067
26724
  className: "pointer-events-none fixed z-2147483646",
@@ -26071,7 +26728,7 @@ function OhhwellsBridge() {
26071
26728
  width: slot.width,
26072
26729
  height: slot.height
26073
26730
  },
26074
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26731
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26075
26732
  DropIndicator,
26076
26733
  {
26077
26734
  direction: slot.direction,
@@ -26082,7 +26739,7 @@ function OhhwellsBridge() {
26082
26739
  },
26083
26740
  `footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
26084
26741
  )),
26085
- isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26742
+ isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26086
26743
  "div",
26087
26744
  {
26088
26745
  className: "pointer-events-none fixed z-2147483646",
@@ -26092,7 +26749,7 @@ function OhhwellsBridge() {
26092
26749
  width: slot.width,
26093
26750
  height: slot.height
26094
26751
  },
26095
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26752
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26096
26753
  DropIndicator,
26097
26754
  {
26098
26755
  direction: slot.direction,
@@ -26103,10 +26760,10 @@ function OhhwellsBridge() {
26103
26760
  },
26104
26761
  `nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
26105
26762
  )),
26106
- hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
26107
- hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
26108
- hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
26109
- formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26763
+ hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
26764
+ hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
26765
+ hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
26766
+ formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26110
26767
  ItemInteractionLayer,
26111
26768
  {
26112
26769
  rect: formPickRect,
@@ -26114,13 +26771,13 @@ function OhhwellsBridge() {
26114
26771
  itemDragSurface: false,
26115
26772
  toolbarAlign: "left",
26116
26773
  chromeGap: 24,
26117
- toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
26774
+ toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26118
26775
  "div",
26119
26776
  {
26120
26777
  "data-ohw-form-toolbar": "",
26121
26778
  className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
26122
26779
  children: [
26123
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26780
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26124
26781
  "button",
26125
26782
  {
26126
26783
  type: "button",
@@ -26128,11 +26785,11 @@ function OhhwellsBridge() {
26128
26785
  className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
26129
26786
  onClick: () => setFieldTypePickerOpen((open) => !open),
26130
26787
  "data-ohw-add-field": "",
26131
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Plus, { size: 15, "aria-hidden": true })
26788
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Plus, { size: 15, "aria-hidden": true })
26132
26789
  }
26133
26790
  ),
26134
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
26135
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
26791
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
26792
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26136
26793
  "button",
26137
26794
  {
26138
26795
  type: "button",
@@ -26148,11 +26805,11 @@ function OhhwellsBridge() {
26148
26805
  });
26149
26806
  },
26150
26807
  children: [
26151
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Settings, { size: 14, "aria-hidden": true }),
26808
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Settings, { size: 14, "aria-hidden": true }),
26152
26809
  "Form settings",
26153
26810
  formPickCount ? (
26154
26811
  // Counter pill, per the design — not a text suffix.
26155
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26812
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26156
26813
  "span",
26157
26814
  {
26158
26815
  "data-ohw-form-count": "",
@@ -26164,8 +26821,8 @@ function OhhwellsBridge() {
26164
26821
  ]
26165
26822
  }
26166
26823
  ),
26167
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
26168
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26824
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
26825
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26169
26826
  "button",
26170
26827
  {
26171
26828
  type: "button",
@@ -26196,7 +26853,7 @@ function OhhwellsBridge() {
26196
26853
  )
26197
26854
  }
26198
26855
  ),
26199
- formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26856
+ formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26200
26857
  ItemInteractionLayer,
26201
26858
  {
26202
26859
  rect: formHoverRect,
@@ -26204,7 +26861,7 @@ function OhhwellsBridge() {
26204
26861
  chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
26205
26862
  }
26206
26863
  ),
26207
- fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26864
+ fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26208
26865
  ItemInteractionLayer,
26209
26866
  {
26210
26867
  rect: fieldPickRect,
@@ -26216,7 +26873,7 @@ function OhhwellsBridge() {
26216
26873
  dragHandleLabel: "Reorder field",
26217
26874
  onDragHandleDragStart: handleFieldDragStart,
26218
26875
  onDragHandleDragEnd: handleFieldDragEnd,
26219
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26876
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26220
26877
  FormFieldToolbar,
26221
26878
  {
26222
26879
  type: fieldPickState.type,
@@ -26229,12 +26886,12 @@ function OhhwellsBridge() {
26229
26886
  )
26230
26887
  }
26231
26888
  ),
26232
- fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26889
+ fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26233
26890
  "div",
26234
26891
  {
26235
26892
  className: "pointer-events-none fixed z-[2147483644]",
26236
26893
  style: { top: slot.top, left: slot.left, width: slot.width },
26237
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26894
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26238
26895
  DropIndicator,
26239
26896
  {
26240
26897
  direction: "horizontal",
@@ -26247,7 +26904,7 @@ function OhhwellsBridge() {
26247
26904
  )) : null,
26248
26905
  fieldTypePickerOpen && formPickRect ? (() => {
26249
26906
  const toolbar = document.querySelector("[data-ohw-form-toolbar]")?.getBoundingClientRect();
26250
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26907
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26251
26908
  "div",
26252
26909
  {
26253
26910
  className: "pointer-events-none fixed z-[2147483645]",
@@ -26255,12 +26912,12 @@ function OhhwellsBridge() {
26255
26912
  top: toolbar ? toolbar.bottom + 6 : formPickRect.top + 16,
26256
26913
  left: toolbar ? toolbar.left : formPickRect.left + 24
26257
26914
  },
26258
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FieldTypePicker, { onPick: handleAddField })
26915
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FieldTypePicker, { onPick: handleAddField })
26259
26916
  }
26260
26917
  );
26261
26918
  })() : null,
26262
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
26263
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26919
+ toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
26920
+ toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26264
26921
  FooterContainerChrome,
26265
26922
  {
26266
26923
  rect: toolbarRect,
@@ -26268,7 +26925,7 @@ function OhhwellsBridge() {
26268
26925
  addDisabled: !canAddFooterColumn()
26269
26926
  }
26270
26927
  ),
26271
- toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26928
+ toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26272
26929
  ItemInteractionLayer,
26273
26930
  {
26274
26931
  rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected) ? draggedItemRect : toolbarRect,
@@ -26284,7 +26941,7 @@ function OhhwellsBridge() {
26284
26941
  onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
26285
26942
  onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
26286
26943
  itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection && !selectedIsSocialsRow,
26287
- toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26944
+ toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26288
26945
  ItemActionToolbar,
26289
26946
  {
26290
26947
  onEditLink: openLinkPopoverForSelected,
@@ -26335,8 +26992,8 @@ function OhhwellsBridge() {
26335
26992
  ) : void 0
26336
26993
  }
26337
26994
  ),
26338
- toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
26339
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26995
+ toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
26996
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26340
26997
  EditGlowChrome,
26341
26998
  {
26342
26999
  rect: toolbarRect,
@@ -26346,7 +27003,7 @@ function OhhwellsBridge() {
26346
27003
  hideHandle: isItemDragging
26347
27004
  }
26348
27005
  ),
26349
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27006
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26350
27007
  FloatingToolbar,
26351
27008
  {
26352
27009
  rect: toolbarRect,
@@ -26359,7 +27016,7 @@ function OhhwellsBridge() {
26359
27016
  }
26360
27017
  )
26361
27018
  ] }),
26362
- maxBadge && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
27019
+ maxBadge && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26363
27020
  "div",
26364
27021
  {
26365
27022
  "data-ohw-max-badge": "",
@@ -26385,7 +27042,7 @@ function OhhwellsBridge() {
26385
27042
  ]
26386
27043
  }
26387
27044
  ),
26388
- toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27045
+ toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26389
27046
  StateToggle,
26390
27047
  {
26391
27048
  rect: toggleState.rect,
@@ -26394,15 +27051,15 @@ function OhhwellsBridge() {
26394
27051
  onStateChange: handleStateChange
26395
27052
  }
26396
27053
  ),
26397
- sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
27054
+ sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26398
27055
  "div",
26399
27056
  {
26400
27057
  "data-ohw-section-insert-line": "",
26401
27058
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
26402
27059
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
26403
27060
  children: [
26404
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
26405
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27061
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
27062
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26406
27063
  Badge,
26407
27064
  {
26408
27065
  className: "px-8 py-1 bg-bridge-primary hover:bg-bridge-primary text-primary-foreground text-xs font-medium shrink-0 rounded-full cursor-pointer pointer-events-auto",
@@ -26419,11 +27076,11 @@ function OhhwellsBridge() {
26419
27076
  children: "Add Section"
26420
27077
  }
26421
27078
  ),
26422
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } })
27079
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } })
26423
27080
  ]
26424
27081
  }
26425
27082
  ),
26426
- linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27083
+ linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26427
27084
  LinkPopover,
26428
27085
  {
26429
27086
  panelRef: linkPopoverPanelRef,
@@ -26440,7 +27097,7 @@ function OhhwellsBridge() {
26440
27097
  },
26441
27098
  linkPopover.key
26442
27099
  ) : null,
26443
- floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27100
+ floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26444
27101
  FloatingPanel,
26445
27102
  {
26446
27103
  open: true,
@@ -26450,7 +27107,7 @@ function OhhwellsBridge() {
26450
27107
  onPositionChange: setFloatingPanelPos,
26451
27108
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
26452
27109
  onClose: closeFloatingPanelOnly,
26453
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27110
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26454
27111
  SocialsDisplayPanel,
26455
27112
  {
26456
27113
  display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
@@ -26471,19 +27128,19 @@ function OhhwellsBridge() {
26471
27128
  const tokens = tokensFromButton(button);
26472
27129
  const current = assignmentFor(button, editContentRef.current, tokens);
26473
27130
  void buttonStyleTick;
26474
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27131
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26475
27132
  FloatingPanel,
26476
27133
  {
26477
27134
  open: true,
26478
27135
  title: floatingPanel.title,
26479
27136
  context: floatingPanel.context,
26480
- icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Brush, { className: "size-4 shrink-0", "aria-hidden": true }),
27137
+ icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Brush, { className: "size-4 shrink-0", "aria-hidden": true }),
26481
27138
  position: floatingPanelPos,
26482
27139
  onPositionChange: setFloatingPanelPos,
26483
27140
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
26484
27141
  onClose: closeFloatingPanelOnly,
26485
27142
  bodyClassName: "gap-5",
26486
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27143
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26487
27144
  ButtonStylePanel,
26488
27145
  {
26489
27146
  variants: tokens.variants,
@@ -26511,10 +27168,10 @@ function OhhwellsBridge() {
26511
27168
 
26512
27169
  // src/ui/EmptySection.tsx
26513
27170
  var import_link = __toESM(require("next/link"), 1);
26514
- var import_jsx_runtime36 = require("react/jsx-runtime");
27171
+ var import_jsx_runtime37 = require("react/jsx-runtime");
26515
27172
  function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
26516
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
26517
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
27173
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
27174
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
26518
27175
  "p",
26519
27176
  {
26520
27177
  style: {
@@ -26526,10 +27183,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
26526
27183
  color: "var(--brand-accent)",
26527
27184
  marginBottom: "1.5rem"
26528
27185
  },
26529
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
27186
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
26530
27187
  }
26531
27188
  ),
26532
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
27189
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
26533
27190
  "h1",
26534
27191
  {
26535
27192
  style: {
@@ -26544,7 +27201,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
26544
27201
  children: title
26545
27202
  }
26546
27203
  ),
26547
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
27204
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
26548
27205
  "p",
26549
27206
  {
26550
27207
  style: {