@ohhwells/bridge 0.1.117-next.314 → 0.1.117-next.316

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": "",
@@ -15252,15 +15890,15 @@ function FloatingPanel({
15252
15890
  }
15253
15891
 
15254
15892
  // src/ui/socials-display-panel.tsx
15255
- var import_jsx_runtime29 = require("react/jsx-runtime");
15893
+ var import_jsx_runtime30 = require("react/jsx-runtime");
15256
15894
  function DisplaySwitch({
15257
15895
  label,
15258
15896
  checked,
15259
15897
  disabled,
15260
15898
  onChange
15261
15899
  }) {
15262
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
15263
- /* @__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)(
15264
15902
  "span",
15265
15903
  {
15266
15904
  className: cn(
@@ -15270,7 +15908,7 @@ function DisplaySwitch({
15270
15908
  children: label
15271
15909
  }
15272
15910
  ),
15273
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15911
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15274
15912
  "button",
15275
15913
  {
15276
15914
  type: "button",
@@ -15284,7 +15922,7 @@ function DisplaySwitch({
15284
15922
  checked ? "bg-bridge-primary" : "bg-primary-50",
15285
15923
  disabled ? "cursor-default opacity-50" : "cursor-pointer"
15286
15924
  ),
15287
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15925
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15288
15926
  "span",
15289
15927
  {
15290
15928
  className: cn(
@@ -15298,8 +15936,8 @@ function DisplaySwitch({
15298
15936
  ] });
15299
15937
  }
15300
15938
  function SocialsDisplayPanel({ display, onChange, className }) {
15301
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
15302
- /* @__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)(
15303
15941
  DisplaySwitch,
15304
15942
  {
15305
15943
  label: "Text",
@@ -15308,7 +15946,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
15308
15946
  onChange: (text) => onChange({ ...display, text })
15309
15947
  }
15310
15948
  ),
15311
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
15949
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
15312
15950
  DisplaySwitch,
15313
15951
  {
15314
15952
  label: "Icon",
@@ -15321,7 +15959,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
15321
15959
  }
15322
15960
 
15323
15961
  // src/ui/button-style-panel.tsx
15324
- var import_lucide_react16 = require("lucide-react");
15962
+ var import_lucide_react17 = require("lucide-react");
15325
15963
 
15326
15964
  // src/lib/button-styles.ts
15327
15965
  var BUTTON_VARIANTS_KEY = "__ohw_button_variants";
@@ -16021,7 +16659,7 @@ function withAssignment(content, id, assignment) {
16021
16659
  }
16022
16660
 
16023
16661
  // src/ui/button-style-panel.tsx
16024
- var import_jsx_runtime30 = require("react/jsx-runtime");
16662
+ var import_jsx_runtime31 = require("react/jsx-runtime");
16025
16663
  var SIZE_LABEL = { s: "S", m: "M", l: "L" };
16026
16664
  function ButtonStylePanel({
16027
16665
  variants,
@@ -16035,15 +16673,15 @@ function ButtonStylePanel({
16035
16673
  }) {
16036
16674
  const preview = scaleGeometry(sizes.m, 0.75);
16037
16675
  const label = previewLabel.trim() || "Book Now";
16038
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
16039
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
16040
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500", children: "Variants" }),
16041
- /* @__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 font-sans", 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) => {
16042
16680
  const chrome = variants[id];
16043
16681
  const selected = id === variant;
16044
16682
  const hasBorder = parseFloat(chrome.borderWidth) > 0;
16045
16683
  const cardSlot = previewSlotForChrome(chrome, slotBackground);
16046
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16684
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
16047
16685
  "button",
16048
16686
  {
16049
16687
  type: "button",
@@ -16059,12 +16697,12 @@ function ButtonStylePanel({
16059
16697
  selected ? "border-2 border-primary" : "border border-border"
16060
16698
  ),
16061
16699
  children: [
16062
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16700
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16063
16701
  "div",
16064
16702
  {
16065
16703
  className: "flex w-full items-center justify-center py-5",
16066
16704
  style: { background: cardSlot },
16067
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16705
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16068
16706
  "span",
16069
16707
  {
16070
16708
  className: "inline-flex items-center justify-center whitespace-nowrap font-semibold uppercase leading-none",
@@ -16086,12 +16724,12 @@ function ButtonStylePanel({
16086
16724
  )
16087
16725
  }
16088
16726
  ),
16089
- selected ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16727
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16090
16728
  "span",
16091
16729
  {
16092
16730
  className: "absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground",
16093
16731
  "aria-hidden": true,
16094
- 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 })
16095
16733
  }
16096
16734
  ) : null
16097
16735
  ]
@@ -16100,9 +16738,9 @@ function ButtonStylePanel({
16100
16738
  );
16101
16739
  }) })
16102
16740
  ] }),
16103
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
16104
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500", children: "Size" }),
16105
- /* @__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 font-sans", children: "Size" }),
16743
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16106
16744
  "div",
16107
16745
  {
16108
16746
  className: "flex w-full items-start rounded-lg bg-stone-100 p-1",
@@ -16110,7 +16748,7 @@ function ButtonStylePanel({
16110
16748
  "aria-label": "Size",
16111
16749
  children: BUTTON_SIZE_IDS.map((id) => {
16112
16750
  const selected = id === size;
16113
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16751
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16114
16752
  "button",
16115
16753
  {
16116
16754
  type: "button",
@@ -16852,7 +17490,7 @@ function hitTestNavDropSlot(clientX, clientY, draggedHrefKey, draggedEl) {
16852
17490
  }
16853
17491
 
16854
17492
  // src/useNavItemDrag.ts
16855
- var import_react15 = require("react");
17493
+ var import_react16 = require("react");
16856
17494
  function useNavItemDrag({
16857
17495
  isEditMode,
16858
17496
  editContentRef,
@@ -16876,11 +17514,11 @@ function useNavItemDrag({
16876
17514
  getNavigationItemAnchor: getNavigationItemAnchor2,
16877
17515
  isDragHandleDisabled: isDragHandleDisabled2
16878
17516
  }) {
16879
- const navDragRef = (0, import_react15.useRef)(null);
16880
- const [navDropSlots, setNavDropSlots] = (0, import_react15.useState)([]);
16881
- const [activeNavDropIndex, setActiveNavDropIndex] = (0, import_react15.useState)(null);
16882
- const navPointerDragRef = (0, import_react15.useRef)(null);
16883
- 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)(() => {
16884
17522
  const session = navDragRef.current;
16885
17523
  const nestedHrefKey = session?.draggedEl?.closest("[data-ohw-nav-children]") != null ? session.hrefKey : null;
16886
17524
  navDragRef.current = null;
@@ -16913,7 +17551,7 @@ function useNavItemDrag({
16913
17551
  document.documentElement.removeAttribute("data-ohw-nav-dragging-root");
16914
17552
  unlockItemDragInteraction();
16915
17553
  }, [setDraggedItemRect, setIsItemDragging, setSiblingHintRects]);
16916
- const refreshNavDragVisuals = (0, import_react15.useCallback)(
17554
+ const refreshNavDragVisuals = (0, import_react16.useCallback)(
16917
17555
  (session, activeSlot, clientX, clientY) => {
16918
17556
  setDraggedItemRect(session.draggedEl.getBoundingClientRect());
16919
17557
  if (typeof clientX === "number" && typeof clientY === "number") {
@@ -16931,13 +17569,13 @@ function useNavItemDrag({
16931
17569
  },
16932
17570
  [setDraggedItemRect, setSiblingHintRects]
16933
17571
  );
16934
- const refreshNavDragVisualsRef = (0, import_react15.useRef)(refreshNavDragVisuals);
17572
+ const refreshNavDragVisualsRef = (0, import_react16.useRef)(refreshNavDragVisuals);
16935
17573
  refreshNavDragVisualsRef.current = refreshNavDragVisuals;
16936
- const commitNavDragRef = (0, import_react15.useRef)(() => {
17574
+ const commitNavDragRef = (0, import_react16.useRef)(() => {
16937
17575
  });
16938
- const beginNavDragRef = (0, import_react15.useRef)(() => {
17576
+ const beginNavDragRef = (0, import_react16.useRef)(() => {
16939
17577
  });
16940
- const beginNavDrag = (0, import_react15.useCallback)(
17578
+ const beginNavDrag = (0, import_react16.useCallback)(
16941
17579
  (session) => {
16942
17580
  const rect = session.draggedEl.getBoundingClientRect();
16943
17581
  session.lastClientX = session.lastClientX || rect.left + rect.width / 2;
@@ -16976,7 +17614,7 @@ function useNavItemDrag({
16976
17614
  ]
16977
17615
  );
16978
17616
  beginNavDragRef.current = beginNavDrag;
16979
- const commitNavDrag = (0, import_react15.useCallback)(
17617
+ const commitNavDrag = (0, import_react16.useCallback)(
16980
17618
  (clientX, clientY) => {
16981
17619
  const session = navDragRef.current;
16982
17620
  if (!session) {
@@ -17055,7 +17693,7 @@ function useNavItemDrag({
17055
17693
  [clearNavDragVisuals, deselectRef, editContentRef, postToParentRef, selectRef]
17056
17694
  );
17057
17695
  commitNavDragRef.current = commitNavDrag;
17058
- const startNavLinkDrag = (0, import_react15.useCallback)(
17696
+ const startNavLinkDrag = (0, import_react16.useCallback)(
17059
17697
  (anchor, clientX, clientY, wasSelected) => {
17060
17698
  if (footerDragRef.current) return false;
17061
17699
  const hrefKey = anchor.getAttribute("data-ohw-href-key");
@@ -17073,7 +17711,7 @@ function useNavItemDrag({
17073
17711
  },
17074
17712
  [beginNavDrag, footerDragRef, isDragHandleDisabled2, isCtaButton]
17075
17713
  );
17076
- const onNavDragOver = (0, import_react15.useCallback)(
17714
+ const onNavDragOver = (0, import_react16.useCallback)(
17077
17715
  (e) => {
17078
17716
  const session = navDragRef.current;
17079
17717
  if (!session) return false;
@@ -17085,7 +17723,7 @@ function useNavItemDrag({
17085
17723
  },
17086
17724
  []
17087
17725
  );
17088
- (0, import_react15.useEffect)(() => {
17726
+ (0, import_react16.useEffect)(() => {
17089
17727
  if (!isEditMode) return;
17090
17728
  const THRESHOLD = 10;
17091
17729
  const resolveWasSelected = (el) => {
@@ -17212,7 +17850,7 @@ function useNavItemDrag({
17212
17850
  setLinkPopover,
17213
17851
  suppressNextClickRef
17214
17852
  ]);
17215
- const armNavPressFromChrome = (0, import_react15.useCallback)(
17853
+ const armNavPressFromChrome = (0, import_react16.useCallback)(
17216
17854
  (selected, clientX, clientY, pointerId) => {
17217
17855
  const hrefKey = selected.getAttribute("data-ohw-href-key");
17218
17856
  if (!hrefKey || !isNavbarHrefKey(hrefKey)) return false;
@@ -17244,7 +17882,7 @@ function useNavItemDrag({
17244
17882
  }
17245
17883
 
17246
17884
  // src/useSectionDrag.ts
17247
- var import_react16 = require("react");
17885
+ var import_react17 = require("react");
17248
17886
 
17249
17887
  // src/lib/section-dnd.ts
17250
17888
  function isFooterSection(el) {
@@ -17337,21 +17975,21 @@ function useSectionDrag({
17337
17975
  suppressNextClickRef,
17338
17976
  suppressClickUntilRef
17339
17977
  }) {
17340
- const sectionDragRef = (0, import_react16.useRef)(null);
17341
- const [sectionDropSlots, setSectionDropSlots] = (0, import_react16.useState)([]);
17342
- const [activeSectionDropIndex, setActiveSectionDropIndex] = (0, import_react16.useState)(null);
17343
- const [isSectionDragging, setIsSectionDragging] = (0, import_react16.useState)(false);
17344
- const sectionPointerDragRef = (0, import_react16.useRef)(null);
17345
- const autoScrollRafRef = (0, import_react16.useRef)(null);
17346
- const autoScrollDeltaRef = (0, import_react16.useRef)(0);
17347
- 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)(() => {
17348
17986
  if (autoScrollRafRef.current != null) {
17349
17987
  cancelAnimationFrame(autoScrollRafRef.current);
17350
17988
  autoScrollRafRef.current = null;
17351
17989
  }
17352
17990
  autoScrollDeltaRef.current = 0;
17353
17991
  }, []);
17354
- const tickAutoScroll = (0, import_react16.useCallback)(() => {
17992
+ const tickAutoScroll = (0, import_react17.useCallback)(() => {
17355
17993
  if (!sectionDragRef.current) {
17356
17994
  stopAutoScroll();
17357
17995
  return;
@@ -17361,7 +17999,7 @@ function useSectionDrag({
17361
17999
  }
17362
18000
  autoScrollRafRef.current = requestAnimationFrame(tickAutoScroll);
17363
18001
  }, [postToParentRef, stopAutoScroll]);
17364
- const updateAutoScroll = (0, import_react16.useCallback)(
18002
+ const updateAutoScroll = (0, import_react17.useCallback)(
17365
18003
  (clientY) => {
17366
18004
  const clip = getIframeChromeClip(parentScrollRef.current);
17367
18005
  let delta = 0;
@@ -17383,7 +18021,7 @@ function useSectionDrag({
17383
18021
  },
17384
18022
  [parentScrollRef, stopAutoScroll, tickAutoScroll]
17385
18023
  );
17386
- const clearSectionDragVisuals = (0, import_react16.useCallback)(() => {
18024
+ const clearSectionDragVisuals = (0, import_react17.useCallback)(() => {
17387
18025
  sectionDragRef.current?.draggedEl.removeAttribute("data-ohw-section-dragging");
17388
18026
  sectionDragRef.current = null;
17389
18027
  setSectionDropSlots([]);
@@ -17393,7 +18031,7 @@ function useSectionDrag({
17393
18031
  document.documentElement.removeAttribute("data-ohw-section-dragging-root");
17394
18032
  unlockItemDragInteraction();
17395
18033
  }, [stopAutoScroll]);
17396
- const refreshSectionDragVisuals = (0, import_react16.useCallback)(
18034
+ const refreshSectionDragVisuals = (0, import_react17.useCallback)(
17397
18035
  (session, clientX, clientY) => {
17398
18036
  session.lastClientX = clientX;
17399
18037
  session.lastClientY = clientY;
@@ -17407,7 +18045,7 @@ function useSectionDrag({
17407
18045
  },
17408
18046
  [updateAutoScroll]
17409
18047
  );
17410
- const beginSectionDrag = (0, import_react16.useCallback)(
18048
+ const beginSectionDrag = (0, import_react17.useCallback)(
17411
18049
  (session) => {
17412
18050
  sectionDragRef.current = session;
17413
18051
  setIsSectionDragging(true);
@@ -17418,7 +18056,7 @@ function useSectionDrag({
17418
18056
  },
17419
18057
  [refreshSectionDragVisuals]
17420
18058
  );
17421
- const commitSectionDrag = (0, import_react16.useCallback)(() => {
18059
+ const commitSectionDrag = (0, import_react17.useCallback)(() => {
17422
18060
  const session = sectionDragRef.current;
17423
18061
  if (!session) {
17424
18062
  clearSectionDragVisuals();
@@ -17447,7 +18085,7 @@ function useSectionDrag({
17447
18085
  });
17448
18086
  });
17449
18087
  }, [clearSectionDragVisuals, editContentRef, postToParentRef]);
17450
- const startSectionPressDrag = (0, import_react16.useCallback)(
18088
+ const startSectionPressDrag = (0, import_react17.useCallback)(
17451
18089
  (el, clientX, clientY, pointerId) => {
17452
18090
  if (navDragRef.current || footerDragRef.current || sectionDragRef.current) return false;
17453
18091
  const instanceId = instanceIdOf(el);
@@ -17464,7 +18102,7 @@ function useSectionDrag({
17464
18102
  },
17465
18103
  [footerDragRef, navDragRef]
17466
18104
  );
17467
- (0, import_react16.useEffect)(() => {
18105
+ (0, import_react17.useEffect)(() => {
17468
18106
  if (!isEditMode) return;
17469
18107
  const onPointerDown = (e) => {
17470
18108
  if (e.button !== 0) return;
@@ -17569,8 +18207,8 @@ function useSectionDrag({
17569
18207
  }
17570
18208
 
17571
18209
  // src/ui/footer-container-chrome.tsx
17572
- var import_lucide_react17 = require("lucide-react");
17573
- 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");
17574
18212
  function FooterContainerChrome({
17575
18213
  rect,
17576
18214
  onAdd,
@@ -17578,7 +18216,7 @@ function FooterContainerChrome({
17578
18216
  }) {
17579
18217
  const chromeGap = 6;
17580
18218
  const buttonMargin = 7;
17581
- 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)(
17582
18220
  "div",
17583
18221
  {
17584
18222
  "data-ohw-footer-container-chrome": "",
@@ -17590,8 +18228,8 @@ function FooterContainerChrome({
17590
18228
  width: rect.width + chromeGap * 2,
17591
18229
  height: rect.height + chromeGap * 2
17592
18230
  },
17593
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tooltip, { children: [
17594
- /* @__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)(
17595
18233
  "button",
17596
18234
  {
17597
18235
  type: "button",
@@ -17610,17 +18248,17 @@ function FooterContainerChrome({
17610
18248
  if (addDisabled) return;
17611
18249
  onAdd();
17612
18250
  },
17613
- 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 })
17614
18252
  }
17615
18253
  ) }),
17616
- /* @__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" })
17617
18255
  ] })
17618
18256
  }
17619
18257
  ) });
17620
18258
  }
17621
18259
 
17622
18260
  // src/lib/carousel.ts
17623
- var import_react17 = require("react");
18261
+ var import_react18 = require("react");
17624
18262
  var CAROUSEL_ATTR = "data-ohw-carousel";
17625
18263
  var CAROUSEL_VALUE_ATTR = "data-ohw-carousel-value";
17626
18264
  var CAROUSEL_SLIDE_ATTR = "data-ohw-carousel-slide";
@@ -17682,8 +18320,8 @@ function applyCarouselNode(key, val) {
17682
18320
  return true;
17683
18321
  }
17684
18322
  function useOhwCarousel(key, initial) {
17685
- const [images, setImages] = (0, import_react17.useState)(initial);
17686
- (0, import_react17.useEffect)(() => {
18323
+ const [images, setImages] = (0, import_react18.useState)(initial);
18324
+ (0, import_react18.useEffect)(() => {
17687
18325
  const el = document.querySelector(
17688
18326
  `[${CAROUSEL_ATTR}][data-ohw-key="${CSS.escape(key)}"]`
17689
18327
  );
@@ -18102,14 +18740,14 @@ function deleteSelectedNavFooterItem(deps) {
18102
18740
  }
18103
18741
 
18104
18742
  // src/ui/navbar-container-chrome.tsx
18105
- var import_lucide_react18 = require("lucide-react");
18106
- 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");
18107
18745
  function NavbarContainerChrome({
18108
18746
  rect,
18109
18747
  onAdd
18110
18748
  }) {
18111
18749
  const chromeGap = 6;
18112
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
18750
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18113
18751
  "div",
18114
18752
  {
18115
18753
  "data-ohw-navbar-container-chrome": "",
@@ -18121,7 +18759,7 @@ function NavbarContainerChrome({
18121
18759
  width: rect.width + chromeGap * 2,
18122
18760
  height: rect.height + chromeGap * 2
18123
18761
  },
18124
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
18762
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18125
18763
  "button",
18126
18764
  {
18127
18765
  type: "button",
@@ -18138,7 +18776,7 @@ function NavbarContainerChrome({
18138
18776
  e.stopPropagation();
18139
18777
  onAdd();
18140
18778
  },
18141
- 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 })
18142
18780
  }
18143
18781
  )
18144
18782
  }
@@ -18147,7 +18785,7 @@ function NavbarContainerChrome({
18147
18785
 
18148
18786
  // src/ui/drop-indicator.tsx
18149
18787
  var React11 = __toESM(require("react"), 1);
18150
- var import_jsx_runtime33 = require("react/jsx-runtime");
18788
+ var import_jsx_runtime34 = require("react/jsx-runtime");
18151
18789
  var dropIndicatorVariants = cva(
18152
18790
  "ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
18153
18791
  {
@@ -18171,7 +18809,7 @@ var dropIndicatorVariants = cva(
18171
18809
  );
18172
18810
  var DropIndicator = React11.forwardRef(
18173
18811
  ({ className, direction, state, ...props }, ref) => {
18174
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18812
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
18175
18813
  "div",
18176
18814
  {
18177
18815
  ref,
@@ -18188,7 +18826,7 @@ var DropIndicator = React11.forwardRef(
18188
18826
  DropIndicator.displayName = "DropIndicator";
18189
18827
 
18190
18828
  // src/ui/badge.tsx
18191
- var import_jsx_runtime34 = require("react/jsx-runtime");
18829
+ var import_jsx_runtime35 = require("react/jsx-runtime");
18192
18830
  var badgeVariants = cva(
18193
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",
18194
18832
  {
@@ -18206,13 +18844,13 @@ var badgeVariants = cva(
18206
18844
  }
18207
18845
  );
18208
18846
  function Badge({ className, variant, ...props }) {
18209
- 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 });
18210
18848
  }
18211
18849
 
18212
18850
  // src/OhhwellsBridge.tsx
18213
- var import_lucide_react19 = require("lucide-react");
18214
- var import_jsx_runtime35 = require("react/jsx-runtime");
18215
- var PRIMARY4 = "#0885FE";
18851
+ var import_lucide_react20 = require("lucide-react");
18852
+ var import_jsx_runtime36 = require("react/jsx-runtime");
18853
+ var PRIMARY5 = "#0885FE";
18216
18854
  var IMAGE_FADE_MS = 300;
18217
18855
  var MEDIA_SETTLE_TIMEOUT_MS = 2500;
18218
18856
  function runOpacityFade(el, onDone) {
@@ -18333,7 +18971,7 @@ function duplicateSchedulingWidget(instanceId, scheduleId) {
18333
18971
  schedulingRoots.set(container, root);
18334
18972
  (0, import_react_dom4.flushSync)(() => {
18335
18973
  root.render(
18336
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
18974
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
18337
18975
  SchedulingWidget,
18338
18976
  {
18339
18977
  notifyOnConnect: false,
@@ -18461,7 +19099,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
18461
19099
  schedulingRoots.set(container, root);
18462
19100
  (0, import_react_dom4.flushSync)(() => {
18463
19101
  root.render(
18464
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19102
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
18465
19103
  SchedulingWidget,
18466
19104
  {
18467
19105
  notifyOnConnect,
@@ -19191,7 +19829,7 @@ var TOOLBAR_STROKE_GAP2 = 4;
19191
19829
  var TOOLBAR_OFFSET_FROM_ELEMENT = SELECTION_CHROME_GAP2 + TOOLBAR_STROKE_GAP2;
19192
19830
  var HOVER_STROKE_WIDTH = 1.5;
19193
19831
  var TEXT_HOVER_SIDE_PAD = 4;
19194
- var CHROME_PRIMARY = `var(--ohw-primary, ${PRIMARY4})`;
19832
+ var CHROME_PRIMARY = `var(--ohw-primary, ${PRIMARY5})`;
19195
19833
  var TOOLBAR_GROUPS = [
19196
19834
  [
19197
19835
  { cmd: "bold", title: "Bold" },
@@ -19217,7 +19855,7 @@ function EditGlowChrome({
19217
19855
  hideHandle = false
19218
19856
  }) {
19219
19857
  const GAP = SELECTION_CHROME_GAP2;
19220
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
19858
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19221
19859
  "div",
19222
19860
  {
19223
19861
  ref: elRef,
@@ -19232,7 +19870,7 @@ function EditGlowChrome({
19232
19870
  zIndex: 2147483646
19233
19871
  },
19234
19872
  children: [
19235
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19873
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19236
19874
  "div",
19237
19875
  {
19238
19876
  style: {
@@ -19246,7 +19884,7 @@ function EditGlowChrome({
19246
19884
  }
19247
19885
  }
19248
19886
  ),
19249
- reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19887
+ reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19250
19888
  "div",
19251
19889
  {
19252
19890
  "data-ohw-drag-handle-container": "",
@@ -19258,7 +19896,7 @@ function EditGlowChrome({
19258
19896
  transform: "translate(calc(-100% - 7px), -50%)",
19259
19897
  pointerEvents: dragDisabled ? "none" : "auto"
19260
19898
  },
19261
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19899
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19262
19900
  DragHandle,
19263
19901
  {
19264
19902
  "aria-label": `Reorder ${reorderHrefKey}`,
@@ -19435,9 +20073,9 @@ function FloatingToolbar({
19435
20073
  showEditLink,
19436
20074
  onEditLink
19437
20075
  }) {
19438
- const localRef = import_react18.default.useRef(null);
19439
- const [measuredW, setMeasuredW] = import_react18.default.useState(330);
19440
- 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(
19441
20079
  (node) => {
19442
20080
  localRef.current = node;
19443
20081
  if (typeof elRef === "function") elRef(node);
@@ -19449,7 +20087,7 @@ function FloatingToolbar({
19449
20087
  },
19450
20088
  [elRef]
19451
20089
  );
19452
- import_react18.default.useLayoutEffect(() => {
20090
+ import_react19.default.useLayoutEffect(() => {
19453
20091
  const node = localRef.current;
19454
20092
  if (!node) return;
19455
20093
  const update = () => {
@@ -19462,7 +20100,7 @@ function FloatingToolbar({
19462
20100
  return () => ro.disconnect();
19463
20101
  }, [showEditLink, activeCommands]);
19464
20102
  const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
19465
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20103
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19466
20104
  "div",
19467
20105
  {
19468
20106
  ref: setRefs,
@@ -19474,12 +20112,12 @@ function FloatingToolbar({
19474
20112
  zIndex: 2147483647,
19475
20113
  pointerEvents: "auto"
19476
20114
  },
19477
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CustomToolbar, { children: [
19478
- TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react18.default.Fragment, { children: [
19479
- 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, {}),
19480
20118
  btns.map((btn) => {
19481
20119
  const isActive = activeCommands.has(btn.cmd);
19482
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20120
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19483
20121
  CustomToolbarButton,
19484
20122
  {
19485
20123
  title: btn.title,
@@ -19488,7 +20126,7 @@ function FloatingToolbar({
19488
20126
  e.preventDefault();
19489
20127
  onCommand(btn.cmd);
19490
20128
  },
19491
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20129
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19492
20130
  "svg",
19493
20131
  {
19494
20132
  width: "16",
@@ -19509,7 +20147,7 @@ function FloatingToolbar({
19509
20147
  );
19510
20148
  })
19511
20149
  ] }, gi)),
19512
- showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20150
+ showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19513
20151
  CustomToolbarButton,
19514
20152
  {
19515
20153
  type: "button",
@@ -19523,7 +20161,7 @@ function FloatingToolbar({
19523
20161
  e.preventDefault();
19524
20162
  e.stopPropagation();
19525
20163
  },
19526
- 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 })
19527
20165
  }
19528
20166
  ) : null
19529
20167
  ] })
@@ -19540,7 +20178,7 @@ function StateToggle({
19540
20178
  states,
19541
20179
  onStateChange
19542
20180
  }) {
19543
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20181
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19544
20182
  ToggleGroup,
19545
20183
  {
19546
20184
  "data-ohw-state-toggle": "",
@@ -19554,7 +20192,7 @@ function StateToggle({
19554
20192
  left: rect.right - 8,
19555
20193
  transform: "translateX(-100%)"
19556
20194
  },
19557
- 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))
19558
20196
  }
19559
20197
  );
19560
20198
  }
@@ -19571,9 +20209,9 @@ var OHW_LOADER_STYLE = {
19571
20209
  justifyContent: "center"
19572
20210
  };
19573
20211
  function OhwLoaderSpinner() {
19574
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
19575
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
19576
- /* @__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)(
19577
20215
  "circle",
19578
20216
  {
19579
20217
  cx: "14",
@@ -19583,7 +20221,7 @@ function OhwLoaderSpinner() {
19583
20221
  strokeWidth: "3",
19584
20222
  strokeDasharray: "17 52",
19585
20223
  strokeLinecap: "round",
19586
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20224
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19587
20225
  "animateTransform",
19588
20226
  {
19589
20227
  attributeName: "transform",
@@ -19599,7 +20237,7 @@ function OhwLoaderSpinner() {
19599
20237
  ] });
19600
20238
  }
19601
20239
  function OhwBrandMark() {
19602
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
20240
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19603
20241
  "svg",
19604
20242
  {
19605
20243
  width: "16",
@@ -19610,7 +20248,7 @@ function OhwBrandMark() {
19610
20248
  style: { display: "block", flexShrink: 0 },
19611
20249
  xmlns: "http://www.w3.org/2000/svg",
19612
20250
  children: [
19613
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
20251
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
19614
20252
  "mask",
19615
20253
  {
19616
20254
  id: "ohw-badge-mark",
@@ -19620,15 +20258,15 @@ function OhwBrandMark() {
19620
20258
  y: "0",
19621
20259
  width: "48",
19622
20260
  height: "48",
19623
- 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" })
19624
20262
  }
19625
20263
  ),
19626
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
19627
- /* @__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" }),
19628
- /* @__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" }),
19629
- /* @__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" }),
19630
- /* @__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" }),
19631
- /* @__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" })
19632
20270
  ] })
19633
20271
  ]
19634
20272
  }
@@ -19665,7 +20303,7 @@ var OHW_BADGE_LABEL_STYLE = {
19665
20303
  whiteSpace: "nowrap"
19666
20304
  };
19667
20305
  function MadeWithOhhWells() {
19668
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
20306
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
19669
20307
  "a",
19670
20308
  {
19671
20309
  href: "https://ohhwells.com",
@@ -19675,8 +20313,8 @@ function MadeWithOhhWells() {
19675
20313
  "data-ohw-badge": "",
19676
20314
  style: OHW_BADGE_STYLE,
19677
20315
  children: [
19678
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OhwBrandMark, {}),
19679
- /* @__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" })
19680
20318
  ]
19681
20319
  }
19682
20320
  );
@@ -19722,8 +20360,8 @@ function OhhwellsBridge() {
19722
20360
  const router = (0, import_navigation3.useRouter)();
19723
20361
  const searchParams = (0, import_navigation3.useSearchParams)();
19724
20362
  const isEditMode = isEditSessionActive();
19725
- const [bridgeRoot, setBridgeRoot] = (0, import_react18.useState)(null);
19726
- (0, import_react18.useEffect)(() => {
20363
+ const [bridgeRoot, setBridgeRoot] = (0, import_react19.useState)(null);
20364
+ (0, import_react19.useEffect)(() => {
19727
20365
  const figtreeFontId = "ohw-figtree-font";
19728
20366
  if (!document.getElementById(figtreeFontId)) {
19729
20367
  const preconnect1 = Object.assign(document.createElement("link"), { rel: "preconnect", href: "https://fonts.googleapis.com" });
@@ -19749,8 +20387,8 @@ function OhhwellsBridge() {
19749
20387
  };
19750
20388
  }, []);
19751
20389
  const subdomainFromQuery = searchParams.get("subdomain");
19752
- const [subdomain, setSubdomain] = (0, import_react18.useState)(() => resolveSubdomain(subdomainFromQuery));
19753
- (0, import_react18.useLayoutEffect)(() => {
20390
+ const [subdomain, setSubdomain] = (0, import_react19.useState)(() => resolveSubdomain(subdomainFromQuery));
20391
+ (0, import_react19.useLayoutEffect)(() => {
19754
20392
  const next = resolveSubdomain(subdomainFromQuery);
19755
20393
  if (next !== subdomain) setSubdomain(next);
19756
20394
  if (next) return;
@@ -19762,7 +20400,7 @@ function OhhwellsBridge() {
19762
20400
  }, 0);
19763
20401
  return () => window.clearTimeout(t);
19764
20402
  }, [subdomainFromQuery, subdomain]);
19765
- (0, import_react18.useEffect)(() => {
20403
+ (0, import_react19.useEffect)(() => {
19766
20404
  if (!subdomainFromQuery || typeof window === "undefined") return;
19767
20405
  const url = new URL(window.location.href);
19768
20406
  if (!url.searchParams.has("subdomain")) return;
@@ -19771,45 +20409,45 @@ function OhhwellsBridge() {
19771
20409
  }, [subdomainFromQuery]);
19772
20410
  useLinkHrefGuardian(pathname, subdomain, isEditMode);
19773
20411
  useSavedLinkNavigation(isEditMode);
19774
- const postToParent2 = (0, import_react18.useCallback)((data) => {
20412
+ const postToParent2 = (0, import_react19.useCallback)((data) => {
19775
20413
  if (typeof window !== "undefined" && window.parent !== window) {
19776
20414
  window.parent.postMessage(data, "*");
19777
20415
  }
19778
20416
  }, []);
19779
- const [fetchState, setFetchState] = (0, import_react18.useState)("idle");
19780
- const [showBranding, setShowBranding] = (0, import_react18.useState)(false);
19781
- const autoSaveTimers = (0, import_react18.useRef)(/* @__PURE__ */ new Map());
19782
- const activeElRef = (0, import_react18.useRef)(null);
19783
- const pointerHeldRef = (0, import_react18.useRef)(false);
19784
- const selectedElRef = (0, import_react18.useRef)(null);
19785
- const selectedHrefKeyRef = (0, import_react18.useRef)(null);
19786
- const selectedFooterColAttrRef = (0, import_react18.useRef)(null);
19787
- const originalContentRef = (0, import_react18.useRef)(null);
19788
- const activeStateElRef = (0, import_react18.useRef)(null);
19789
- const parentScrollRef = (0, import_react18.useRef)(null);
19790
- const visibleViewportRef = (0, import_react18.useRef)(null);
19791
- const [dialogPortalContainer, setDialogPortalContainer] = (0, import_react18.useState)(null);
19792
- 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) => {
19793
20431
  visibleViewportRef.current = node;
19794
20432
  setDialogPortalContainer(node);
19795
20433
  if (node) applyVisibleViewport(node, parentScrollRef.current);
19796
20434
  }, []);
19797
- const toolbarElRef = (0, import_react18.useRef)(null);
19798
- const glowElRef = (0, import_react18.useRef)(null);
19799
- const hoveredImageRef = (0, import_react18.useRef)(null);
19800
- const hoveredImageHasTextOverlapRef = (0, import_react18.useRef)(false);
19801
- const dragOverElRef = (0, import_react18.useRef)(null);
19802
- const [mediaHover, setMediaHover] = (0, import_react18.useState)(null);
19803
- const [selectedAiSectionId, setSelectedAiSectionId] = (0, import_react18.useState)(null);
19804
- const selectedAiSectionIdRef = (0, import_react18.useRef)(null);
19805
- 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) => {
19806
20444
  selectedAiSectionIdRef.current = id;
19807
20445
  setSelectedAiSectionId(id);
19808
20446
  }, []);
19809
- const [selectedMedia, setSelectedMedia] = (0, import_react18.useState)(null);
19810
- const selectedMediaElRef = (0, import_react18.useRef)(null);
19811
- const mediaKeyDropTokenRef = (0, import_react18.useRef)(0);
19812
- 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)(() => {
19813
20451
  const prev = selectedMediaElRef.current;
19814
20452
  selectedMediaElRef.current = null;
19815
20453
  setSelectedMedia(null);
@@ -19834,9 +20472,9 @@ function OhhwellsBridge() {
19834
20472
  window.postMessage({ type: "ow:media-key-drop", token }, "*");
19835
20473
  }
19836
20474
  }, []);
19837
- const clearMediaSelectionRef = (0, import_react18.useRef)(clearMediaSelection);
20475
+ const clearMediaSelectionRef = (0, import_react19.useRef)(clearMediaSelection);
19838
20476
  clearMediaSelectionRef.current = clearMediaSelection;
19839
- const selectMediaElement = (0, import_react18.useCallback)((el) => {
20477
+ const selectMediaElement = (0, import_react19.useCallback)((el) => {
19840
20478
  const r2 = el.getBoundingClientRect();
19841
20479
  const video = el.dataset.ohwEditable === "video" ? el.querySelector("video") : null;
19842
20480
  selectedMediaElRef.current = el;
@@ -19860,9 +20498,9 @@ function OhhwellsBridge() {
19860
20498
  keyLabel: el.dataset.ohwEditable === "video" ? "Video" : el.dataset.ohwEditable === "bg-image" ? "Background" : "Image"
19861
20499
  });
19862
20500
  }, []);
19863
- const selectMediaElementRef = (0, import_react18.useRef)(selectMediaElement);
20501
+ const selectMediaElementRef = (0, import_react19.useRef)(selectMediaElement);
19864
20502
  selectMediaElementRef.current = selectMediaElement;
19865
- (0, import_react18.useEffect)(() => {
20503
+ (0, import_react19.useEffect)(() => {
19866
20504
  if (!selectedMedia) return;
19867
20505
  const update = () => {
19868
20506
  const el = selectedMediaElRef.current;
@@ -19882,55 +20520,55 @@ function OhhwellsBridge() {
19882
20520
  window.removeEventListener("resize", update);
19883
20521
  };
19884
20522
  }, [selectedMedia !== null]);
19885
- const [carouselHover, setCarouselHover] = (0, import_react18.useState)(null);
19886
- const [uploadingRects, setUploadingRects] = (0, import_react18.useState)({});
19887
- const hoveredGapRef = (0, import_react18.useRef)(null);
19888
- const imageUnhoverTimerRef = (0, import_react18.useRef)(null);
19889
- const imageShowTimerRef = (0, import_react18.useRef)(null);
19890
- const editStylesRef = (0, import_react18.useRef)(null);
19891
- 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)(() => {
19892
20530
  });
19893
- const deactivateRef = (0, import_react18.useRef)(() => {
20531
+ const deactivateRef = (0, import_react19.useRef)(() => {
19894
20532
  });
19895
- const selectRef = (0, import_react18.useRef)(() => {
20533
+ const selectRef = (0, import_react19.useRef)(() => {
19896
20534
  });
19897
- const selectFrameRef = (0, import_react18.useRef)(() => {
20535
+ const selectFrameRef = (0, import_react19.useRef)(() => {
19898
20536
  });
19899
- const selectLogoRef = (0, import_react18.useRef)(() => {
20537
+ const selectLogoRef = (0, import_react19.useRef)(() => {
19900
20538
  });
19901
- const openLogoSizePanelRef = (0, import_react18.useRef)(() => {
20539
+ const openLogoSizePanelRef = (0, import_react19.useRef)(() => {
19902
20540
  });
19903
- const deselectRef = (0, import_react18.useRef)(() => {
20541
+ const deselectRef = (0, import_react19.useRef)(() => {
19904
20542
  });
19905
- const closeFloatingPanelOnlyRef = (0, import_react18.useRef)(() => {
20543
+ const closeFloatingPanelOnlyRef = (0, import_react19.useRef)(() => {
19906
20544
  });
19907
- const reselectNavigationItemRef = (0, import_react18.useRef)(() => {
20545
+ const reselectNavigationItemRef = (0, import_react19.useRef)(() => {
19908
20546
  });
19909
- const commitNavigationTextEditRef = (0, import_react18.useRef)(() => {
20547
+ const commitNavigationTextEditRef = (0, import_react19.useRef)(() => {
19910
20548
  });
19911
- const handleDeleteSelectedRef = (0, import_react18.useRef)(() => false);
19912
- const runPendingDeleteUndoRef = (0, import_react18.useRef)(() => false);
19913
- const isFooterFrameSelectionRef = (0, import_react18.useRef)(false);
19914
- 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)(() => {
19915
20553
  });
19916
- const postToParentRef = (0, import_react18.useRef)(postToParent2);
20554
+ const postToParentRef = (0, import_react19.useRef)(postToParent2);
19917
20555
  postToParentRef.current = postToParent2;
19918
- const aiSectionApiRef = (0, import_react18.useRef)(null);
19919
- const applyTreeLocalRef = (0, import_react18.useRef)(null);
19920
- const sectionsLoadedRef = (0, import_react18.useRef)(false);
19921
- const pendingScheduleConfigRequests = (0, import_react18.useRef)([]);
19922
- const [toolbarRect, setToolbarRect] = (0, import_react18.useState)(null);
19923
- const [formPickRect, setFormPickRect] = (0, import_react18.useState)(null);
19924
- const formPickElRef = (0, import_react18.useRef)(null);
19925
- const [formViewState, setFormViewStateUi] = (0, import_react18.useState)("default");
19926
- const [formPickCount, setFormPickCount] = (0, import_react18.useState)(null);
19927
- const [formHoverRect, setFormHoverRect] = (0, import_react18.useState)(null);
19928
- const formHoverElRef = (0, import_react18.useRef)(null);
19929
- const [fieldPickRect, setFieldPickRect] = (0, import_react18.useState)(null);
19930
- const fieldPickElRef = (0, import_react18.useRef)(null);
19931
- const [fieldPickState, setFieldPickState] = (0, import_react18.useState)(null);
19932
- const [fieldTypePickerOpen, setFieldTypePickerOpen] = (0, import_react18.useState)(false);
19933
- 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)(() => {
19934
20572
  const form = formPickElRef.current;
19935
20573
  const editing = fieldPickElRef.current;
19936
20574
  if (commitPlaceholderEdit(editing) && editing) {
@@ -19950,7 +20588,7 @@ function OhhwellsBridge() {
19950
20588
  formPickElRef.current = null;
19951
20589
  setFormPickRect(null);
19952
20590
  }, []);
19953
- const clearFieldPick = (0, import_react18.useCallback)(() => {
20591
+ const clearFieldPick = (0, import_react19.useCallback)(() => {
19954
20592
  const wrapper = fieldPickElRef.current;
19955
20593
  if (commitPlaceholderEdit(wrapper) && wrapper) {
19956
20594
  const form = wrapper.closest('[data-ohw-editable="form"]');
@@ -19960,9 +20598,9 @@ function OhhwellsBridge() {
19960
20598
  setFieldPickRect(null);
19961
20599
  setFieldPickState(null);
19962
20600
  }, []);
19963
- const persistFieldsRef = (0, import_react18.useRef)(() => {
20601
+ const persistFieldsRef = (0, import_react19.useRef)(() => {
19964
20602
  });
19965
- const persistFields = (0, import_react18.useCallback)(
20603
+ const persistFields = (0, import_react19.useCallback)(
19966
20604
  (form) => {
19967
20605
  const key = formKeyOf(form);
19968
20606
  if (!key) return;
@@ -19973,7 +20611,7 @@ function OhhwellsBridge() {
19973
20611
  []
19974
20612
  );
19975
20613
  persistFieldsRef.current = persistFields;
19976
- const selectField = (0, import_react18.useCallback)((wrapper) => {
20614
+ const selectField = (0, import_react19.useCallback)((wrapper) => {
19977
20615
  if (fieldPickElRef.current && fieldPickElRef.current !== wrapper) {
19978
20616
  commitPlaceholderEdit(fieldPickElRef.current);
19979
20617
  }
@@ -19986,7 +20624,7 @@ function OhhwellsBridge() {
19986
20624
  setFieldPickState({ type: fieldTypeOf(wrapper), required: isFieldRequired(wrapper) });
19987
20625
  setFieldTypePickerOpen(false);
19988
20626
  }, []);
19989
- const withSelectedField = (0, import_react18.useCallback)(
20627
+ const withSelectedField = (0, import_react19.useCallback)(
19990
20628
  (run) => {
19991
20629
  const wrapper = fieldPickElRef.current;
19992
20630
  const form = formPickElRef.current;
@@ -19999,28 +20637,28 @@ function OhhwellsBridge() {
19999
20637
  },
20000
20638
  [persistFields]
20001
20639
  );
20002
- const handleFieldTypeChange = (0, import_react18.useCallback)(
20640
+ const handleFieldTypeChange = (0, import_react19.useCallback)(
20003
20641
  (type) => withSelectedField((_form, wrapper) => {
20004
20642
  applyFieldType(wrapper, type);
20005
20643
  selectField(wrapper);
20006
20644
  }),
20007
20645
  [selectField, withSelectedField]
20008
20646
  );
20009
- const handleFieldRequiredToggle = (0, import_react18.useCallback)(
20647
+ const handleFieldRequiredToggle = (0, import_react19.useCallback)(
20010
20648
  () => withSelectedField((_form, wrapper) => {
20011
20649
  setFieldRequired(wrapper, !isFieldRequired(wrapper));
20012
20650
  selectField(wrapper);
20013
20651
  }),
20014
20652
  [selectField, withSelectedField]
20015
20653
  );
20016
- const handleFieldDuplicate = (0, import_react18.useCallback)(
20654
+ const handleFieldDuplicate = (0, import_react19.useCallback)(
20017
20655
  () => withSelectedField((form, wrapper) => {
20018
20656
  const copy = duplicateField(form, wrapper);
20019
20657
  selectField(copy);
20020
20658
  }),
20021
20659
  [selectField, withSelectedField]
20022
20660
  );
20023
- const handleFieldDelete = (0, import_react18.useCallback)(
20661
+ const handleFieldDelete = (0, import_react19.useCallback)(
20024
20662
  () => withSelectedField((_form, wrapper) => {
20025
20663
  removeField(wrapper);
20026
20664
  clearFieldPick();
@@ -20028,7 +20666,7 @@ function OhhwellsBridge() {
20028
20666
  }),
20029
20667
  [clearFieldPick, withSelectedField]
20030
20668
  );
20031
- const handleAddField = (0, import_react18.useCallback)(
20669
+ const handleAddField = (0, import_react19.useCallback)(
20032
20670
  (type) => {
20033
20671
  const form = formPickElRef.current;
20034
20672
  if (!form) return;
@@ -20044,8 +20682,8 @@ function OhhwellsBridge() {
20044
20682
  },
20045
20683
  [persistFields, selectField]
20046
20684
  );
20047
- const fieldDragRef = (0, import_react18.useRef)(null);
20048
- 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) => {
20049
20687
  const others = listFieldWrappers(form).filter((el) => fieldKeyOf(el) !== draggedKey);
20050
20688
  const slots = others.map((el) => {
20051
20689
  const rect = el.getBoundingClientRect();
@@ -20058,7 +20696,7 @@ function OhhwellsBridge() {
20058
20696
  }
20059
20697
  return slots;
20060
20698
  }, []);
20061
- const handleFieldDragStart = (0, import_react18.useCallback)(() => {
20699
+ const handleFieldDragStart = (0, import_react19.useCallback)(() => {
20062
20700
  const wrapper = fieldPickElRef.current;
20063
20701
  const form = formPickElRef.current;
20064
20702
  if (!wrapper || !form) return;
@@ -20067,18 +20705,18 @@ function OhhwellsBridge() {
20067
20705
  setFieldDragging(true);
20068
20706
  setFieldDropSlots(buildFieldDropSlots(form, key));
20069
20707
  }, [buildFieldDropSlots]);
20070
- const handleFieldDragEnd = (0, import_react18.useCallback)(() => {
20708
+ const handleFieldDragEnd = (0, import_react19.useCallback)(() => {
20071
20709
  fieldDragRef.current = null;
20072
20710
  setFieldDropIndex(null);
20073
20711
  setFieldDropSlots([]);
20074
20712
  setFieldDragging(false);
20075
20713
  }, []);
20076
- const [fieldDropIndex, setFieldDropIndex] = (0, import_react18.useState)(null);
20077
- const [fieldDropSlots, setFieldDropSlots] = (0, import_react18.useState)([]);
20078
- const [fieldDragging, setFieldDragging] = (0, import_react18.useState)(false);
20079
- 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);
20080
20718
  clearFormPickRef.current = clearFormPick;
20081
- (0, import_react18.useEffect)(() => {
20719
+ (0, import_react19.useEffect)(() => {
20082
20720
  const el = fieldPickElRef.current;
20083
20721
  if (!el || fieldPickRect === null) return;
20084
20722
  const observer = new ResizeObserver(() => {
@@ -20087,7 +20725,7 @@ function OhhwellsBridge() {
20087
20725
  observer.observe(el);
20088
20726
  return () => observer.disconnect();
20089
20727
  }, [fieldPickRect !== null, fieldPickState]);
20090
- (0, import_react18.useEffect)(() => {
20728
+ (0, import_react19.useEffect)(() => {
20091
20729
  const el = formPickElRef.current;
20092
20730
  if (!el || formPickRect === null) return;
20093
20731
  const observer = new ResizeObserver(() => {
@@ -20096,25 +20734,25 @@ function OhhwellsBridge() {
20096
20734
  observer.observe(el);
20097
20735
  return () => observer.disconnect();
20098
20736
  }, [formPickRect !== null, formViewState]);
20099
- const [toolbarVariant, setToolbarVariant] = (0, import_react18.useState)("none");
20100
- const toolbarVariantRef = (0, import_react18.useRef)("none");
20737
+ const [toolbarVariant, setToolbarVariant] = (0, import_react19.useState)("none");
20738
+ const toolbarVariantRef = (0, import_react19.useRef)("none");
20101
20739
  toolbarVariantRef.current = toolbarVariant;
20102
- const [selectedIsCta, setSelectedIsCta] = (0, import_react18.useState)(false);
20103
- const [selectedIsSocial, setSelectedIsSocial] = (0, import_react18.useState)(false);
20104
- const [selectedIsSocialsRow, setSelectedIsSocialsRow] = (0, import_react18.useState)(false);
20105
- const [reorderHrefKey, setReorderHrefKey] = (0, import_react18.useState)(null);
20106
- const [reorderDragDisabled, setReorderDragDisabled] = (0, import_react18.useState)(false);
20107
- const [toggleState, setToggleState] = (0, import_react18.useState)(null);
20108
- const [maxBadge, setMaxBadge] = (0, import_react18.useState)(null);
20109
- const [activeCommands, setActiveCommands] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
20110
- const [sectionGap, setSectionGap] = (0, import_react18.useState)(null);
20111
- const [toolbarShowEditLink, setToolbarShowEditLink] = (0, import_react18.useState)(false);
20112
- const hoveredNavContainerRef = (0, import_react18.useRef)(null);
20113
- const [hoveredNavContainerRect, setHoveredNavContainerRect] = (0, import_react18.useState)(null);
20114
- const hoveredItemElRef = (0, import_react18.useRef)(null);
20115
- const [hoveredItemRect, setHoveredItemRect] = (0, import_react18.useState)(null);
20116
- const [hoveredTextRect, setHoveredTextRect] = (0, import_react18.useState)(null);
20117
- (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)(() => {
20118
20756
  const sync = () => {
20119
20757
  const el = document.querySelector(
20120
20758
  '[data-ohw-hovered]:not([contenteditable]):not([data-ohw-href-key]):not([data-ohw-editable="form"] *)'
@@ -20158,53 +20796,53 @@ function OhhwellsBridge() {
20158
20796
  });
20159
20797
  return () => observer.disconnect();
20160
20798
  }, []);
20161
- const siblingHintElRef = (0, import_react18.useRef)(null);
20162
- const [siblingHintRect, setSiblingHintRect] = (0, import_react18.useState)(null);
20163
- const [siblingHintRects, setSiblingHintRects] = (0, import_react18.useState)([]);
20164
- const [isItemDragging, setIsItemDragging] = (0, import_react18.useState)(false);
20165
- 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);
20166
20804
  isFooterFrameSelectionRef.current = isFooterFrameSelection;
20167
- const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = (0, import_react18.useState)(null);
20168
- const [footerHeadingVisible, setFooterHeadingVisible] = (0, import_react18.useState)(null);
20169
- const footerDragRef = (0, import_react18.useRef)(null);
20170
- const [footerDropSlots, setFooterDropSlots] = (0, import_react18.useState)([]);
20171
- const [activeFooterDropIndex, setActiveFooterDropIndex] = (0, import_react18.useState)(null);
20172
- const [draggedItemRect, setDraggedItemRect] = (0, import_react18.useState)(null);
20173
- const footerPointerDragRef = (0, import_react18.useRef)(null);
20174
- const suppressNextClickRef = (0, import_react18.useRef)(false);
20175
- const suppressClickUntilRef = (0, import_react18.useRef)(0);
20176
- const [linkPopover, setLinkPopover] = (0, import_react18.useState)(null);
20177
- const linkPopoverSessionRef = (0, import_react18.useRef)(null);
20178
- const addNavAfterAnchorRef = (0, import_react18.useRef)(null);
20179
- const editContentRef = (0, import_react18.useRef)({});
20180
- const aiSectionsRef = (0, import_react18.useRef)("");
20181
- const brandKitRef = (0, import_react18.useRef)("");
20182
- const stylesRef = (0, import_react18.useRef)("");
20183
- const appliedDrawerRef = (0, import_react18.useRef)(null);
20184
- const pendingDeleteUndoRef = (0, import_react18.useRef)(null);
20185
- const [floatingPanel, setFloatingPanel] = (0, import_react18.useState)(null);
20186
- const floatingPanelOpenRef = (0, import_react18.useRef)(false);
20187
- 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);
20188
20826
  floatingPanelRef.current = floatingPanel;
20189
- const setFloatingPanelRef = (0, import_react18.useRef)(setFloatingPanel);
20190
- const [floatingPanelPos, setFloatingPanelPos] = (0, import_react18.useState)(null);
20191
- const buttonCollectionDragRef = (0, import_react18.useRef)(null);
20192
- const [buttonStyleTick, setButtonStyleTick] = (0, import_react18.useState)(0);
20193
- const [logoSizeDraft, setLogoSizeDraft] = (0, import_react18.useState)(null);
20194
- const [editorViewport, setEditorViewport] = (0, import_react18.useState)("desktop");
20195
- const [parentScrollSnap, setParentScrollSnap] = (0, import_react18.useState)(null);
20196
- const [sitePages, setSitePages] = (0, import_react18.useState)([]);
20197
- const [sectionsByPath, setSectionsByPath] = (0, import_react18.useState)({});
20198
- const sectionsPrefetchGenRef = (0, import_react18.useRef)(0);
20199
- const setLinkPopoverRef = (0, import_react18.useRef)(setLinkPopover);
20200
- const linkPopoverPanelRef = (0, import_react18.useRef)(null);
20201
- const linkPopoverOpenRef = (0, import_react18.useRef)(false);
20202
- 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);
20203
20841
  setLinkPopoverRef.current = setLinkPopover;
20204
20842
  setFloatingPanelRef.current = setFloatingPanel;
20205
20843
  linkPopoverSessionRef.current = linkPopover;
20206
20844
  floatingPanelOpenRef.current = Boolean(floatingPanel);
20207
- (0, import_react18.useEffect)(() => {
20845
+ (0, import_react19.useEffect)(() => {
20208
20846
  const syncViewport = () => {
20209
20847
  const next = window.innerWidth <= 480 ? "mobile" : "desktop";
20210
20848
  setEditorViewport((prev) => prev === next ? prev : next);
@@ -20213,6 +20851,16 @@ function OhhwellsBridge() {
20213
20851
  window.addEventListener("resize", syncViewport);
20214
20852
  return () => window.removeEventListener("resize", syncViewport);
20215
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
+ }, []);
20216
20864
  const {
20217
20865
  navDragRef,
20218
20866
  navPointerDragRef,
@@ -20259,7 +20907,7 @@ function OhhwellsBridge() {
20259
20907
  const bumpLinkPopoverGrace = () => {
20260
20908
  linkPopoverGraceUntilRef.current = Date.now() + 350;
20261
20909
  };
20262
- const runSectionsPrefetch = (0, import_react18.useCallback)((pages) => {
20910
+ const runSectionsPrefetch = (0, import_react19.useCallback)((pages) => {
20263
20911
  if (!isEditMode || shouldUseDevFixtures() || pages.length === 0) return;
20264
20912
  const gen = ++sectionsPrefetchGenRef.current;
20265
20913
  const paths = pages.map((p) => p.path);
@@ -20278,9 +20926,9 @@ function OhhwellsBridge() {
20278
20926
  );
20279
20927
  });
20280
20928
  }, [isEditMode, pathname]);
20281
- const runSectionsPrefetchRef = (0, import_react18.useRef)(runSectionsPrefetch);
20929
+ const runSectionsPrefetchRef = (0, import_react19.useRef)(runSectionsPrefetch);
20282
20930
  runSectionsPrefetchRef.current = runSectionsPrefetch;
20283
- (0, import_react18.useEffect)(() => {
20931
+ (0, import_react19.useEffect)(() => {
20284
20932
  if (!linkPopover) {
20285
20933
  document.documentElement.removeAttribute("data-ohw-link-popover-open");
20286
20934
  return;
@@ -20308,7 +20956,7 @@ function OhhwellsBridge() {
20308
20956
  document.documentElement.removeAttribute("data-ohw-link-popover-open");
20309
20957
  };
20310
20958
  }, [linkPopover, postToParent2]);
20311
- (0, import_react18.useEffect)(() => {
20959
+ (0, import_react19.useEffect)(() => {
20312
20960
  if (!isEditMode) return;
20313
20961
  const useFixtures = shouldUseDevFixtures();
20314
20962
  if (useFixtures) {
@@ -20332,14 +20980,14 @@ function OhhwellsBridge() {
20332
20980
  if (!useFixtures) postToParent2({ type: "ow:request-site-pages" });
20333
20981
  return () => window.removeEventListener("message", onSitePages);
20334
20982
  }, [isEditMode, postToParent2]);
20335
- (0, import_react18.useEffect)(() => {
20983
+ (0, import_react19.useEffect)(() => {
20336
20984
  if (!isEditMode || shouldUseDevFixtures()) return;
20337
20985
  void loadAllSectionsManifest().then((manifest) => {
20338
20986
  if (Object.keys(manifest).length === 0) return;
20339
20987
  setSectionsByPath((prev) => ({ ...manifest, ...prev }));
20340
20988
  });
20341
20989
  }, [isEditMode]);
20342
- (0, import_react18.useEffect)(() => {
20990
+ (0, import_react19.useEffect)(() => {
20343
20991
  const update = () => {
20344
20992
  const el = activeElRef.current ?? selectedElRef.current;
20345
20993
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
@@ -20363,10 +21011,10 @@ function OhhwellsBridge() {
20363
21011
  vvp.removeEventListener("resize", update);
20364
21012
  };
20365
21013
  }, []);
20366
- const refreshStateRules = (0, import_react18.useCallback)(() => {
21014
+ const refreshStateRules = (0, import_react19.useCallback)(() => {
20367
21015
  editStylesRef.current?.forceHover && (editStylesRef.current.forceHover.textContent = collectStateRules());
20368
21016
  }, []);
20369
- const processConfigRequest = (0, import_react18.useCallback)((insertAfterVal) => {
21017
+ const processConfigRequest = (0, import_react19.useCallback)((insertAfterVal) => {
20370
21018
  const tracker = getSectionsTracker();
20371
21019
  let entries = [];
20372
21020
  try {
@@ -20389,7 +21037,7 @@ function OhhwellsBridge() {
20389
21037
  }
20390
21038
  window.postMessage({ type: "ow:schedule-config", insertAfter: insertAfterVal, scheduleId: null }, "*");
20391
21039
  }, [isEditMode]);
20392
- const deactivate = (0, import_react18.useCallback)(() => {
21040
+ const deactivate = (0, import_react19.useCallback)(() => {
20393
21041
  const el = activeElRef.current;
20394
21042
  if (!el) return;
20395
21043
  const isFormBlock = el.dataset.ohwEditable === "form";
@@ -20440,12 +21088,12 @@ function OhhwellsBridge() {
20440
21088
  setToolbarShowEditLink(false);
20441
21089
  postToParent2({ type: "ow:exit-edit" });
20442
21090
  }, [postToParent2]);
20443
- const clearSelectedAttr = (0, import_react18.useCallback)(() => {
21091
+ const clearSelectedAttr = (0, import_react19.useCallback)(() => {
20444
21092
  document.querySelectorAll("[data-ohw-selected]").forEach((el) => {
20445
21093
  el.removeAttribute("data-ohw-selected");
20446
21094
  });
20447
21095
  }, []);
20448
- const deselect = (0, import_react18.useCallback)(() => {
21096
+ const deselect = (0, import_react19.useCallback)(() => {
20449
21097
  const nestedGroup = selectedElRef.current?.closest("[data-ohw-nav-children]") != null ? selectedElRef.current.closest("[data-ohw-nav-group]") : null;
20450
21098
  clearSelectedAttr();
20451
21099
  selectedElRef.current = null;
@@ -20480,20 +21128,20 @@ function OhhwellsBridge() {
20480
21128
  setToolbarVariant("none");
20481
21129
  }
20482
21130
  }, [clearSelectedAttr]);
20483
- const markSelected = (0, import_react18.useCallback)((el) => {
21131
+ const markSelected = (0, import_react19.useCallback)((el) => {
20484
21132
  clearSelectedAttr();
20485
21133
  el.removeAttribute("data-ohw-hovered");
20486
21134
  el.setAttribute("data-ohw-selected", "");
20487
21135
  }, [clearSelectedAttr]);
20488
- const isSelectedForHover = (0, import_react18.useCallback)((el) => {
21136
+ const isSelectedForHover = (0, import_react19.useCallback)((el) => {
20489
21137
  if (!el) return false;
20490
21138
  return [selectedElRef.current, activeElRef.current].some(
20491
21139
  (busy) => busy && (el === busy || busy.contains(el) || el.contains(busy))
20492
21140
  );
20493
21141
  }, []);
20494
- const isSelectedForHoverRef = (0, import_react18.useRef)(isSelectedForHover);
21142
+ const isSelectedForHoverRef = (0, import_react19.useRef)(isSelectedForHover);
20495
21143
  isSelectedForHoverRef.current = isSelectedForHover;
20496
- const resolveHrefKeyElement = (0, import_react18.useCallback)((hrefKey) => {
21144
+ const resolveHrefKeyElement = (0, import_react19.useCallback)((hrefKey) => {
20497
21145
  if (isFooterHrefKey(hrefKey)) {
20498
21146
  return document.querySelector(
20499
21147
  `footer [data-ohw-href-key="${CSS.escape(hrefKey)}"]`
@@ -20508,7 +21156,7 @@ function OhhwellsBridge() {
20508
21156
  `[data-ohw-href-key="${CSS.escape(hrefKey)}"]`
20509
21157
  );
20510
21158
  }, []);
20511
- const resyncSelectedNavigationItem = (0, import_react18.useCallback)(() => {
21159
+ const resyncSelectedNavigationItem = (0, import_react19.useCallback)(() => {
20512
21160
  const hrefKey = selectedHrefKeyRef.current;
20513
21161
  if (hrefKey) {
20514
21162
  const link = resolveHrefKeyElement(hrefKey);
@@ -20546,7 +21194,7 @@ function OhhwellsBridge() {
20546
21194
  );
20547
21195
  }
20548
21196
  }, [resolveHrefKeyElement]);
20549
- const reselectNavigationItem = (0, import_react18.useCallback)((navAnchor) => {
21197
+ const reselectNavigationItem = (0, import_react19.useCallback)((navAnchor) => {
20550
21198
  selectedElRef.current = navAnchor;
20551
21199
  selectedHrefKeyRef.current = navAnchor.getAttribute("data-ohw-href-key");
20552
21200
  selectedFooterColAttrRef.current = null;
@@ -20577,7 +21225,7 @@ function OhhwellsBridge() {
20577
21225
  setToolbarShowEditLink(false);
20578
21226
  setActiveCommands(/* @__PURE__ */ new Set());
20579
21227
  }, [markSelected]);
20580
- const commitNavigationTextEdit = (0, import_react18.useCallback)((navAnchor) => {
21228
+ const commitNavigationTextEdit = (0, import_react19.useCallback)((navAnchor) => {
20581
21229
  const el = activeElRef.current;
20582
21230
  if (!el) return;
20583
21231
  const key = el.dataset.ohwKey;
@@ -20610,7 +21258,7 @@ function OhhwellsBridge() {
20610
21258
  postToParent2({ type: "ow:exit-edit" });
20611
21259
  reselectNavigationItem(navAnchor);
20612
21260
  }, [postToParent2, reselectNavigationItem]);
20613
- const handleAddTopLevelNavItem = (0, import_react18.useCallback)(() => {
21261
+ const handleAddTopLevelNavItem = (0, import_react19.useCallback)(() => {
20614
21262
  const items = listNavbarRootItems();
20615
21263
  addNavAfterAnchorRef.current = items[items.length - 1] ?? null;
20616
21264
  deselectRef.current();
@@ -20622,7 +21270,7 @@ function OhhwellsBridge() {
20622
21270
  intent: "add-nav"
20623
21271
  });
20624
21272
  }, []);
20625
- const maybeWarnNavLinkDropdownConflict = (0, import_react18.useCallback)(
21273
+ const maybeWarnNavLinkDropdownConflict = (0, import_react19.useCallback)(
20626
21274
  (anchor) => {
20627
21275
  if (!isNavbarHrefKey(anchor.getAttribute("data-ohw-href-key"))) return;
20628
21276
  if (!navDropdownsOpenOnClick()) return;
@@ -20635,7 +21283,7 @@ function OhhwellsBridge() {
20635
21283
  },
20636
21284
  [postToParent2]
20637
21285
  );
20638
- const handleNavDropdownOpenChange = (0, import_react18.useCallback)((open) => {
21286
+ const handleNavDropdownOpenChange = (0, import_react19.useCallback)((open) => {
20639
21287
  const selected = selectedElRef.current;
20640
21288
  if (!selected || !isNavigationItem2(selected)) return;
20641
21289
  if (isNestedNavChild(selected)) return;
@@ -20651,7 +21299,7 @@ function OhhwellsBridge() {
20651
21299
  }
20652
21300
  });
20653
21301
  }, []);
20654
- const handleFooterHeadingVisibleChange = (0, import_react18.useCallback)(
21302
+ const handleFooterHeadingVisibleChange = (0, import_react19.useCallback)(
20655
21303
  (visible) => {
20656
21304
  const selected = selectedElRef.current;
20657
21305
  if (!selected || !isFooterFrameSelectionRef.current) return;
@@ -20675,7 +21323,7 @@ function OhhwellsBridge() {
20675
21323
  },
20676
21324
  [postToParent2]
20677
21325
  );
20678
- const enterEditOnNewItem = (0, import_react18.useCallback)((anchor) => {
21326
+ const enterEditOnNewItem = (0, import_react19.useCallback)((anchor) => {
20679
21327
  const label = anchor.querySelector('[data-ohw-editable="text"]');
20680
21328
  if (!label) {
20681
21329
  selectRef.current(anchor);
@@ -20684,8 +21332,8 @@ function OhhwellsBridge() {
20684
21332
  setNavGroupForceOpen(anchor, true);
20685
21333
  activateRef.current(label);
20686
21334
  }, []);
20687
- const pendingSocialAddRef = (0, import_react18.useRef)(null);
20688
- const handleAddChildItem = (0, import_react18.useCallback)(() => {
21335
+ const pendingSocialAddRef = (0, import_react19.useRef)(null);
21336
+ const handleAddChildItem = (0, import_react19.useCallback)(() => {
20689
21337
  const selected = selectedElRef.current;
20690
21338
  if (!selected) return;
20691
21339
  const socialsRow = isSocialsRow(selected) ? selected : findSocialsRow(selected);
@@ -20796,7 +21444,7 @@ function OhhwellsBridge() {
20796
21444
  });
20797
21445
  });
20798
21446
  }, [enterEditOnNewItem, isFooterFrameSelection, maybeWarnNavLinkDropdownConflict, postToParent2]);
20799
- const handleAddFooterColumn = (0, import_react18.useCallback)(() => {
21447
+ const handleAddFooterColumn = (0, import_react19.useCallback)(() => {
20800
21448
  if (!canAddFooterColumn()) {
20801
21449
  postToParent2({
20802
21450
  type: "ow:toast",
@@ -20817,7 +21465,7 @@ function OhhwellsBridge() {
20817
21465
  selectRef.current(result.firstLink);
20818
21466
  });
20819
21467
  }, [postToParent2]);
20820
- const clearFooterDragVisuals = (0, import_react18.useCallback)(() => {
21468
+ const clearFooterDragVisuals = (0, import_react19.useCallback)(() => {
20821
21469
  footerDragRef.current = null;
20822
21470
  setSiblingHintRects([]);
20823
21471
  setFooterDropSlots([]);
@@ -20826,7 +21474,7 @@ function OhhwellsBridge() {
20826
21474
  setIsItemDragging(false);
20827
21475
  unlockFooterDragInteraction();
20828
21476
  }, []);
20829
- const refreshFooterDragVisuals = (0, import_react18.useCallback)((session, activeSlot, clientX, clientY) => {
21477
+ const refreshFooterDragVisuals = (0, import_react19.useCallback)((session, activeSlot, clientX, clientY) => {
20830
21478
  const dragged = session.draggedEl;
20831
21479
  setDraggedItemRect(dragged.getBoundingClientRect());
20832
21480
  if (typeof clientX === "number" && typeof clientY === "number") {
@@ -20858,13 +21506,13 @@ function OhhwellsBridge() {
20858
21506
  const activeIdx = activeSlot ? slots.findIndex((s) => s.insertIndex === activeSlot.insertIndex) : -1;
20859
21507
  setActiveFooterDropIndex(activeIdx >= 0 ? activeIdx : null);
20860
21508
  }, []);
20861
- const refreshFooterDragVisualsRef = (0, import_react18.useRef)(refreshFooterDragVisuals);
21509
+ const refreshFooterDragVisualsRef = (0, import_react19.useRef)(refreshFooterDragVisuals);
20862
21510
  refreshFooterDragVisualsRef.current = refreshFooterDragVisuals;
20863
- const commitFooterDragRef = (0, import_react18.useRef)(() => {
21511
+ const commitFooterDragRef = (0, import_react19.useRef)(() => {
20864
21512
  });
20865
- const beginFooterDragRef = (0, import_react18.useRef)(() => {
21513
+ const beginFooterDragRef = (0, import_react19.useRef)(() => {
20866
21514
  });
20867
- const beginFooterDrag = (0, import_react18.useCallback)(
21515
+ const beginFooterDrag = (0, import_react19.useCallback)(
20868
21516
  (session) => {
20869
21517
  const rect = session.draggedEl.getBoundingClientRect();
20870
21518
  session.lastClientX = session.lastClientX || rect.left + rect.width / 2;
@@ -20884,7 +21532,7 @@ function OhhwellsBridge() {
20884
21532
  [refreshFooterDragVisuals]
20885
21533
  );
20886
21534
  beginFooterDragRef.current = beginFooterDrag;
20887
- const commitFooterDrag = (0, import_react18.useCallback)(
21535
+ const commitFooterDrag = (0, import_react19.useCallback)(
20888
21536
  (clientX, clientY) => {
20889
21537
  const session = footerDragRef.current;
20890
21538
  if (!session) {
@@ -21013,7 +21661,7 @@ function OhhwellsBridge() {
21013
21661
  [clearFooterDragVisuals, resolveHrefKeyElement, resyncSelectedNavigationItem]
21014
21662
  );
21015
21663
  commitFooterDragRef.current = commitFooterDrag;
21016
- const startFooterLinkDrag = (0, import_react18.useCallback)(
21664
+ const startFooterLinkDrag = (0, import_react19.useCallback)(
21017
21665
  (anchor, clientX, clientY, wasSelected) => {
21018
21666
  const hrefKey = anchor.getAttribute("data-ohw-href-key");
21019
21667
  if (!hrefKey) return false;
@@ -21049,7 +21697,7 @@ function OhhwellsBridge() {
21049
21697
  },
21050
21698
  [beginFooterDrag]
21051
21699
  );
21052
- const startFooterColumnDrag = (0, import_react18.useCallback)(
21700
+ const startFooterColumnDrag = (0, import_react19.useCallback)(
21053
21701
  (columnEl, clientX, clientY, wasSelected) => {
21054
21702
  const columns = listFooterColumns();
21055
21703
  const idx = columns.indexOf(columnEl);
@@ -21069,7 +21717,7 @@ function OhhwellsBridge() {
21069
21717
  },
21070
21718
  [beginFooterDrag]
21071
21719
  );
21072
- const handleItemDragStart = (0, import_react18.useCallback)(
21720
+ const handleItemDragStart = (0, import_react19.useCallback)(
21073
21721
  (e) => {
21074
21722
  const selected = selectedElRef.current;
21075
21723
  if (!selected) {
@@ -21098,7 +21746,7 @@ function OhhwellsBridge() {
21098
21746
  },
21099
21747
  [startFooterColumnDrag, startFooterLinkDrag, startNavLinkDrag]
21100
21748
  );
21101
- const handleItemDragEnd = (0, import_react18.useCallback)(
21749
+ const handleItemDragEnd = (0, import_react19.useCallback)(
21102
21750
  (e) => {
21103
21751
  const collectionButton = buttonCollectionDragRef.current;
21104
21752
  if (collectionButton) {
@@ -21141,7 +21789,7 @@ function OhhwellsBridge() {
21141
21789
  },
21142
21790
  [commitFooterDrag, commitNavDrag, navDragRef, postToParent2]
21143
21791
  );
21144
- const handleItemChromePointerDown = (0, import_react18.useCallback)((e) => {
21792
+ const handleItemChromePointerDown = (0, import_react19.useCallback)((e) => {
21145
21793
  if (e.button !== 0) return;
21146
21794
  const selected = selectedElRef.current;
21147
21795
  if (!selected) return;
@@ -21172,7 +21820,7 @@ function OhhwellsBridge() {
21172
21820
  }
21173
21821
  if (armNavPressFromChrome(selected, e.clientX, e.clientY, e.pointerId)) return;
21174
21822
  }, [armNavPressFromChrome]);
21175
- const handleItemChromeClick = (0, import_react18.useCallback)((clientX, clientY) => {
21823
+ const handleItemChromeClick = (0, import_react19.useCallback)((clientX, clientY) => {
21176
21824
  if (suppressNextClickRef.current || Date.now() < suppressClickUntilRef.current) {
21177
21825
  suppressNextClickRef.current = false;
21178
21826
  return;
@@ -21185,7 +21833,7 @@ function OhhwellsBridge() {
21185
21833
  }, []);
21186
21834
  reselectNavigationItemRef.current = reselectNavigationItem;
21187
21835
  commitNavigationTextEditRef.current = commitNavigationTextEdit;
21188
- const select = (0, import_react18.useCallback)((anchor) => {
21836
+ const select = (0, import_react19.useCallback)((anchor) => {
21189
21837
  if (!isNavigationItem2(anchor)) return;
21190
21838
  if (activeElRef.current) deactivate();
21191
21839
  aiSectionApiRef.current?.selectFromElement(anchor);
@@ -21245,7 +21893,7 @@ function OhhwellsBridge() {
21245
21893
  setLogoSizeDraft(null);
21246
21894
  }
21247
21895
  }, [deactivate, markSelected]);
21248
- const selectFrame = (0, import_react18.useCallback)((el) => {
21896
+ const selectFrame = (0, import_react19.useCallback)((el) => {
21249
21897
  if (!isNavigationContainer(el)) return;
21250
21898
  if (activeElRef.current) deactivate();
21251
21899
  aiSectionApiRef.current?.selectFromElement(el);
@@ -21286,7 +21934,7 @@ function OhhwellsBridge() {
21286
21934
  setFloatingPanelPos(null);
21287
21935
  setLogoSizeDraft(null);
21288
21936
  }, [deactivate, markSelected, postToParent2]);
21289
- const selectLogo = (0, import_react18.useCallback)(
21937
+ const selectLogo = (0, import_react19.useCallback)(
21290
21938
  (logoEl) => {
21291
21939
  if (activeElRef.current) deactivate();
21292
21940
  selectedElRef.current = logoEl;
@@ -21315,7 +21963,7 @@ function OhhwellsBridge() {
21315
21963
  },
21316
21964
  [deactivate, markSelected]
21317
21965
  );
21318
- const openLogoSizePanel = (0, import_react18.useCallback)((logoEl) => {
21966
+ const openLogoSizePanel = (0, import_react19.useCallback)((logoEl) => {
21319
21967
  const placement = getLogoPlacement(logoEl);
21320
21968
  const draft = readLogoSizeState(editContentRef.current, placement);
21321
21969
  setLogoSizeDraft(draft);
@@ -21328,7 +21976,7 @@ function OhhwellsBridge() {
21328
21976
  placement
21329
21977
  });
21330
21978
  }, []);
21331
- const openSocialsDisplayPanel = (0, import_react18.useCallback)((row) => {
21979
+ const openSocialsDisplayPanel = (0, import_react19.useCallback)((row) => {
21332
21980
  setParentScrollSnap(parentScrollRef.current);
21333
21981
  setFloatingPanel({
21334
21982
  key: "socials-display",
@@ -21338,7 +21986,7 @@ function OhhwellsBridge() {
21338
21986
  row
21339
21987
  });
21340
21988
  }, []);
21341
- const rememberButtonTokens = (0, import_react18.useCallback)(
21989
+ const rememberButtonTokens = (0, import_react19.useCallback)(
21342
21990
  (content, tokens, nodes) => {
21343
21991
  if (nodes.length === 0) return content;
21344
21992
  const next = { ...content };
@@ -21349,7 +21997,7 @@ function OhhwellsBridge() {
21349
21997
  },
21350
21998
  [postToParent2]
21351
21999
  );
21352
- const tokensForButton = (0, import_react18.useCallback)(
22000
+ const tokensForButton = (0, import_react19.useCallback)(
21353
22001
  (el, persistFallback = false) => {
21354
22002
  const stored = readStoredStyleTokens(editContentRef.current);
21355
22003
  if (stored) return stored;
@@ -21364,7 +22012,7 @@ function OhhwellsBridge() {
21364
22012
  },
21365
22013
  [rememberButtonTokens]
21366
22014
  );
21367
- const openButtonStylePanel = (0, import_react18.useCallback)(
22015
+ const openButtonStylePanel = (0, import_react19.useCallback)(
21368
22016
  (anchor) => {
21369
22017
  const id = buttonId(anchor);
21370
22018
  if (!id) return;
@@ -21382,7 +22030,7 @@ function OhhwellsBridge() {
21382
22030
  },
21383
22031
  [tokensForButton]
21384
22032
  );
21385
- const applySelectedButtonStyle = (0, import_react18.useCallback)(
22033
+ const applySelectedButtonStyle = (0, import_react19.useCallback)(
21386
22034
  (patch) => {
21387
22035
  const panel = floatingPanelRef.current;
21388
22036
  const id = panel?.kind === "button-style" ? panel.buttonId : null;
@@ -21400,7 +22048,7 @@ function OhhwellsBridge() {
21400
22048
  },
21401
22049
  [postToParent2]
21402
22050
  );
21403
- (0, import_react18.useEffect)(() => {
22051
+ (0, import_react19.useEffect)(() => {
21404
22052
  const onDragOver = (e) => {
21405
22053
  const dragged = buttonCollectionDragRef.current;
21406
22054
  if (!dragged) return;
@@ -21419,11 +22067,11 @@ function OhhwellsBridge() {
21419
22067
  document.removeEventListener("drop", onDrop);
21420
22068
  };
21421
22069
  }, []);
21422
- const isEditModeRef = (0, import_react18.useRef)(false);
21423
- const requestMissingSocialIconsRef = (0, import_react18.useRef)(() => {
22070
+ const isEditModeRef = (0, import_react19.useRef)(false);
22071
+ const requestMissingSocialIconsRef = (0, import_react19.useRef)(() => {
21424
22072
  });
21425
- const askedSocialIconsRef = (0, import_react18.useRef)(/* @__PURE__ */ new Set());
21426
- const requestMissingSocialIcons = (0, import_react18.useCallback)(() => {
22073
+ const askedSocialIconsRef = (0, import_react19.useRef)(/* @__PURE__ */ new Set());
22074
+ const requestMissingSocialIcons = (0, import_react19.useCallback)(() => {
21427
22075
  const items = Array.from(document.querySelectorAll(`[${SOCIALS_ROW_ATTR}]`)).filter((row) => socialsDisplayFor(row, editContentRef.current).icon).flatMap((row) => {
21428
22076
  const missing = socialsMissingIcons(row);
21429
22077
  listSocialItems(row).forEach((item) => ensureIconSlot(item));
@@ -21435,7 +22083,7 @@ function OhhwellsBridge() {
21435
22083
  }, []);
21436
22084
  requestMissingSocialIconsRef.current = requestMissingSocialIcons;
21437
22085
  isEditModeRef.current = isEditMode;
21438
- const changeSocialsDisplay = (0, import_react18.useCallback)(
22086
+ const changeSocialsDisplay = (0, import_react19.useCallback)(
21439
22087
  (row, next) => {
21440
22088
  if (next.icon) {
21441
22089
  const missing = socialsMissingIcons(row);
@@ -21459,19 +22107,19 @@ function OhhwellsBridge() {
21459
22107
  },
21460
22108
  []
21461
22109
  );
21462
- const closeFloatingPanelOnly = (0, import_react18.useCallback)(() => {
22110
+ const closeFloatingPanelOnly = (0, import_react19.useCallback)(() => {
21463
22111
  setFloatingPanel(null);
21464
22112
  setFloatingPanelPos(null);
21465
22113
  setLogoSizeDraft(null);
21466
22114
  }, []);
21467
22115
  closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
21468
- const closeFloatingPanelAndDeselect = (0, import_react18.useCallback)(() => {
22116
+ const closeFloatingPanelAndDeselect = (0, import_react19.useCallback)(() => {
21469
22117
  setFloatingPanel(null);
21470
22118
  setFloatingPanelPos(null);
21471
22119
  setLogoSizeDraft(null);
21472
22120
  deselectRef.current();
21473
22121
  }, []);
21474
- (0, import_react18.useEffect)(() => {
22122
+ (0, import_react19.useEffect)(() => {
21475
22123
  const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
21476
22124
  if (!session || !logoSizeDraft) {
21477
22125
  postToParentRef.current({ type: "ow:logo-size-panel", open: false });
@@ -21490,7 +22138,7 @@ function OhhwellsBridge() {
21490
22138
  max: LOGO_SIZE_MAX
21491
22139
  });
21492
22140
  }, [floatingPanel, logoSizeDraft, editorViewport]);
21493
- const persistLogoSizeDraft = (0, import_react18.useCallback)(
22141
+ const persistLogoSizeDraft = (0, import_react19.useCallback)(
21494
22142
  (placement, draft) => {
21495
22143
  const desktopKey = LOGO_SIZE_DESKTOP_KEYS[placement];
21496
22144
  const mobileKey = LOGO_SIZE_MOBILE_KEYS[placement];
@@ -21530,7 +22178,7 @@ function OhhwellsBridge() {
21530
22178
  },
21531
22179
  [postToParent2]
21532
22180
  );
21533
- const activate = (0, import_react18.useCallback)((el, options) => {
22181
+ const activate = (0, import_react19.useCallback)((el, options) => {
21534
22182
  if (activeElRef.current === el) return;
21535
22183
  document.querySelectorAll("[data-ohw-hovered]").forEach((hovered) => {
21536
22184
  hovered.removeAttribute("data-ohw-hovered");
@@ -21628,8 +22276,8 @@ function OhhwellsBridge() {
21628
22276
  openLogoSizePanelRef.current = openLogoSizePanel;
21629
22277
  deselectRef.current = deselect;
21630
22278
  closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
21631
- const lastSiteWideScopeRef = (0, import_react18.useRef)(null);
21632
- (0, import_react18.useEffect)(() => {
22279
+ const lastSiteWideScopeRef = (0, import_react19.useRef)(null);
22280
+ (0, import_react19.useEffect)(() => {
21633
22281
  if (!isEditMode) {
21634
22282
  if (lastSiteWideScopeRef.current !== false) {
21635
22283
  lastSiteWideScopeRef.current = false;
@@ -21655,7 +22303,7 @@ function OhhwellsBridge() {
21655
22303
  isFooterFrameSelection,
21656
22304
  postToParent2
21657
22305
  ]);
21658
- (0, import_react18.useLayoutEffect)(() => {
22306
+ (0, import_react19.useLayoutEffect)(() => {
21659
22307
  if (!subdomain || isEditMode) {
21660
22308
  setFetchState("done");
21661
22309
  return;
@@ -21778,7 +22426,7 @@ function OhhwellsBridge() {
21778
22426
  cancelled = true;
21779
22427
  };
21780
22428
  }, [subdomain, isEditMode]);
21781
- (0, import_react18.useEffect)(() => {
22429
+ (0, import_react19.useEffect)(() => {
21782
22430
  if (!isEditMode) return;
21783
22431
  const resolveIndex = (form, clientY) => {
21784
22432
  const wrappers = listFieldWrappers(form).filter((el) => fieldKeyOf(el) !== fieldDragRef.current?.key);
@@ -21819,7 +22467,7 @@ function OhhwellsBridge() {
21819
22467
  window.removeEventListener("drop", onDrop, true);
21820
22468
  };
21821
22469
  }, [buildFieldDropSlots, isEditMode, persistFields, selectField]);
21822
- (0, import_react18.useEffect)(() => {
22470
+ (0, import_react19.useEffect)(() => {
21823
22471
  if (!isEditMode) return;
21824
22472
  const mark = () => document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
21825
22473
  markFormFields(form);
@@ -21831,7 +22479,7 @@ function OhhwellsBridge() {
21831
22479
  });
21832
22480
  return () => observer.disconnect();
21833
22481
  }, [isEditMode, fetchState, pathname]);
21834
- (0, import_react18.useEffect)(() => {
22482
+ (0, import_react19.useEffect)(() => {
21835
22483
  if (!isEditMode) return;
21836
22484
  let saveTimer = null;
21837
22485
  const onInput = (e) => {
@@ -21853,14 +22501,14 @@ function OhhwellsBridge() {
21853
22501
  document.addEventListener("input", onInput, true);
21854
22502
  return () => document.removeEventListener("input", onInput, true);
21855
22503
  }, [isEditMode, persistFields]);
21856
- (0, import_react18.useEffect)(() => {
22504
+ (0, import_react19.useEffect)(() => {
21857
22505
  if (isEditMode || fetchState !== "done") return;
21858
22506
  const content = contentCache.get(subdomain) ?? {};
21859
22507
  document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
21860
22508
  reconcileFieldsFromContent(form, content);
21861
22509
  });
21862
22510
  }, [isEditMode, fetchState, subdomain]);
21863
- (0, import_react18.useEffect)(() => {
22511
+ (0, import_react19.useEffect)(() => {
21864
22512
  if (!isEditMode) return;
21865
22513
  const swallow = (e) => {
21866
22514
  const target = e.target;
@@ -21869,14 +22517,14 @@ function OhhwellsBridge() {
21869
22517
  document.addEventListener("submit", swallow, true);
21870
22518
  return () => document.removeEventListener("submit", swallow, true);
21871
22519
  }, [isEditMode]);
21872
- (0, import_react18.useEffect)(() => {
22520
+ (0, import_react19.useEffect)(() => {
21873
22521
  if (isEditMode || fetchState !== "done") return;
21874
22522
  console.log("env", process.env.NEXT_PUBLIC_FLOWOPS_API_URL);
21875
22523
  const apiUrl = process.env.NEXT_PUBLIC_FLOWOPS_API_URL ?? "https://flowops-backend-staging-2yfdh7pwpq-as.a.run.app";
21876
22524
  console.log({ apiUrl, subdomain });
21877
22525
  bindPublishedForms(apiUrl, subdomain, contentCache.get(subdomain) ?? {});
21878
22526
  }, [isEditMode, fetchState, subdomain]);
21879
- (0, import_react18.useEffect)(() => {
22527
+ (0, import_react19.useEffect)(() => {
21880
22528
  if (!subdomain || isEditMode) return;
21881
22529
  let debounceTimer = null;
21882
22530
  let observer = null;
@@ -21978,16 +22626,16 @@ function OhhwellsBridge() {
21978
22626
  if (debounceTimer) clearTimeout(debounceTimer);
21979
22627
  };
21980
22628
  }, [subdomain, isEditMode, pathname]);
21981
- (0, import_react18.useLayoutEffect)(() => {
22629
+ (0, import_react19.useLayoutEffect)(() => {
21982
22630
  const el = document.getElementById("ohw-loader");
21983
22631
  if (!el) return;
21984
22632
  const visible = Boolean(subdomain) && fetchState !== "done";
21985
22633
  el.style.display = visible ? "flex" : "none";
21986
22634
  }, [subdomain, fetchState]);
21987
- (0, import_react18.useEffect)(() => {
22635
+ (0, import_react19.useEffect)(() => {
21988
22636
  postToParent2({ type: "ow:navigation", path: pathname });
21989
22637
  }, [pathname, postToParent2]);
21990
- (0, import_react18.useEffect)(() => {
22638
+ (0, import_react19.useEffect)(() => {
21991
22639
  if (!subdomain || isEditMode) return;
21992
22640
  const content = contentCache.get(subdomain);
21993
22641
  if (!content) return;
@@ -22003,7 +22651,7 @@ function OhhwellsBridge() {
22003
22651
  applyAiSectionsToDom(parseAiSectionsState(content[AI_SECTIONS_KEY]));
22004
22652
  }
22005
22653
  }, [pathname, subdomain, isEditMode]);
22006
- (0, import_react18.useEffect)(() => {
22654
+ (0, import_react19.useEffect)(() => {
22007
22655
  if (!isEditMode) return;
22008
22656
  if (linkPopoverSessionRef.current?.intent === "add-nav") return;
22009
22657
  if (document.querySelector("[data-ohw-section-picker]")) return;
@@ -22011,11 +22659,11 @@ function OhhwellsBridge() {
22011
22659
  deselectRef.current();
22012
22660
  deactivateRef.current();
22013
22661
  }, [pathname, isEditMode]);
22014
- (0, import_react18.useEffect)(() => {
22662
+ (0, import_react19.useEffect)(() => {
22015
22663
  if (!isEditMode) return;
22016
22664
  initSectionInstancesFromContent(editContentRef.current, pathname);
22017
22665
  }, [pathname, isEditMode]);
22018
- (0, import_react18.useEffect)(() => {
22666
+ (0, import_react19.useEffect)(() => {
22019
22667
  if (!isEditMode) return;
22020
22668
  const observer = new MutationObserver(() => {
22021
22669
  const drawer = document.querySelector("[data-ohw-nav-drawer]");
@@ -22026,7 +22674,7 @@ function OhhwellsBridge() {
22026
22674
  observer.observe(document.body, { childList: true, subtree: true });
22027
22675
  return () => observer.disconnect();
22028
22676
  }, [isEditMode, pathname]);
22029
- (0, import_react18.useEffect)(() => {
22677
+ (0, import_react19.useEffect)(() => {
22030
22678
  const contentForNav = () => {
22031
22679
  if (isEditMode) return editContentRef.current;
22032
22680
  if (!subdomain) return {};
@@ -22099,7 +22747,7 @@ function OhhwellsBridge() {
22099
22747
  observer?.disconnect();
22100
22748
  };
22101
22749
  }, [isEditMode, pathname, subdomain, fetchState, resyncSelectedNavigationItem]);
22102
- (0, import_react18.useEffect)(() => {
22750
+ (0, import_react19.useEffect)(() => {
22103
22751
  if (!isEditMode) return;
22104
22752
  let applying = false;
22105
22753
  let rafId = null;
@@ -22137,7 +22785,7 @@ function OhhwellsBridge() {
22137
22785
  observer.disconnect();
22138
22786
  };
22139
22787
  }, [isEditMode, pathname]);
22140
- (0, import_react18.useEffect)(() => {
22788
+ (0, import_react19.useEffect)(() => {
22141
22789
  if (!isEditMode) return;
22142
22790
  let lastPosted = 0;
22143
22791
  const measure = () => {
@@ -22166,7 +22814,7 @@ function OhhwellsBridge() {
22166
22814
  ro.disconnect();
22167
22815
  };
22168
22816
  }, [pathname, isEditMode, postToParent2]);
22169
- (0, import_react18.useEffect)(() => {
22817
+ (0, import_react19.useEffect)(() => {
22170
22818
  if (!subdomainFromQuery || isEditMode) return;
22171
22819
  const handleClick = (e) => {
22172
22820
  const anchor = e.target.closest("a");
@@ -22182,7 +22830,7 @@ function OhhwellsBridge() {
22182
22830
  document.addEventListener("click", handleClick, true);
22183
22831
  return () => document.removeEventListener("click", handleClick, true);
22184
22832
  }, [subdomainFromQuery, isEditMode, router]);
22185
- (0, import_react18.useEffect)(() => {
22833
+ (0, import_react19.useEffect)(() => {
22186
22834
  if (!isEditMode) {
22187
22835
  editStylesRef.current?.base.remove();
22188
22836
  editStylesRef.current?.forceHover.remove();
@@ -22408,11 +23056,11 @@ function OhhwellsBridge() {
22408
23056
  footer [data-ohw-href-key] [data-ohw-editable][contenteditable],
22409
23057
  footer [data-ohw-href-key] [data-ohw-editable][contenteditable] * {
22410
23058
  outline: none !important;
22411
- caret-color: ${PRIMARY4} !important;
23059
+ caret-color: ${PRIMARY5} !important;
22412
23060
  cursor: text !important;
22413
23061
  }
22414
23062
  [data-ohw-editable][contenteditable]::selection,
22415
- [data-ohw-editable][contenteditable] *::selection { background: ${PRIMARY4}59 !important; }
23063
+ [data-ohw-editable][contenteditable] *::selection { background: ${PRIMARY5}59 !important; }
22416
23064
  [data-ohw-editable-state], [data-ohw-editable-state] * { pointer-events: none !important; }
22417
23065
  [data-ohw-editable-state][data-ohw-active-state] [data-ohw-editable] { pointer-events: auto !important; }
22418
23066
  [data-ohw-editable-state][data-ohw-active-state][data-ohw-editable] { pointer-events: auto !important; }
@@ -25260,7 +25908,7 @@ function OhhwellsBridge() {
25260
25908
  if (imageShowTimerRef.current) clearTimeout(imageShowTimerRef.current);
25261
25909
  };
25262
25910
  }, [isEditMode, refreshStateRules]);
25263
- (0, import_react18.useEffect)(() => {
25911
+ (0, import_react19.useEffect)(() => {
25264
25912
  if (!isEditMode) return;
25265
25913
  const THRESHOLD = 10;
25266
25914
  const resolveWasSelected = (el) => {
@@ -25416,7 +26064,7 @@ function OhhwellsBridge() {
25416
26064
  unlockFooterDragInteraction();
25417
26065
  };
25418
26066
  }, [isEditMode]);
25419
- (0, import_react18.useEffect)(() => {
26067
+ (0, import_react19.useEffect)(() => {
25420
26068
  const handler = (e) => {
25421
26069
  if (e.data?.type !== "ow:request-schedule-config") return;
25422
26070
  const insertAfterVal = e.data.insertAfter;
@@ -25432,7 +26080,7 @@ function OhhwellsBridge() {
25432
26080
  window.addEventListener("message", handler);
25433
26081
  return () => window.removeEventListener("message", handler);
25434
26082
  }, [processConfigRequest]);
25435
- (0, import_react18.useEffect)(() => {
26083
+ (0, import_react19.useEffect)(() => {
25436
26084
  if (!isEditMode) return;
25437
26085
  document.querySelectorAll("[data-ohw-active-state]").forEach((el) => {
25438
26086
  el.removeAttribute("data-ohw-active-state");
@@ -25468,13 +26116,13 @@ function OhhwellsBridge() {
25468
26116
  clearTimeout(timer);
25469
26117
  };
25470
26118
  }, [pathname, isEditMode, refreshStateRules, postToParent2]);
25471
- (0, import_react18.useEffect)(() => {
26119
+ (0, import_react19.useEffect)(() => {
25472
26120
  scrollToHashSectionWhenReady();
25473
26121
  const onHashChange = () => scrollToHashSectionWhenReady();
25474
26122
  window.addEventListener("hashchange", onHashChange);
25475
26123
  return () => window.removeEventListener("hashchange", onHashChange);
25476
26124
  }, [pathname]);
25477
- const handleCommand = (0, import_react18.useCallback)((cmd) => {
26125
+ const handleCommand = (0, import_react19.useCallback)((cmd) => {
25478
26126
  const el = activeElRef.current;
25479
26127
  const selBefore = window.getSelection();
25480
26128
  let savedOffsets = null;
@@ -25510,7 +26158,7 @@ function OhhwellsBridge() {
25510
26158
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
25511
26159
  refreshActiveCommandsRef.current();
25512
26160
  }, []);
25513
- (0, import_react18.useEffect)(() => {
26161
+ (0, import_react19.useEffect)(() => {
25514
26162
  const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
25515
26163
  if (!session || !logoSizeDraft) return;
25516
26164
  const onPanelAction = (e) => {
@@ -25548,7 +26196,7 @@ function OhhwellsBridge() {
25548
26196
  window.addEventListener("message", onPanelAction);
25549
26197
  return () => window.removeEventListener("message", onPanelAction);
25550
26198
  }, [floatingPanel, logoSizeDraft, editorViewport, persistLogoSizeDraft, closeFloatingPanelAndDeselect]);
25551
- const handleStateChange = (0, import_react18.useCallback)((state) => {
26199
+ const handleStateChange = (0, import_react19.useCallback)((state) => {
25552
26200
  if (!activeStateElRef.current) return;
25553
26201
  const el = activeStateElRef.current;
25554
26202
  if (state === "Default") {
@@ -25561,7 +26209,7 @@ function OhhwellsBridge() {
25561
26209
  }
25562
26210
  setToggleState((prev) => prev ? { ...prev, activeState: state } : null);
25563
26211
  }, [deactivate]);
25564
- const reselectAfterLinkPopover = (0, import_react18.useCallback)(
26212
+ const reselectAfterLinkPopover = (0, import_react19.useCallback)(
25565
26213
  (hrefKey) => {
25566
26214
  requestAnimationFrame(() => {
25567
26215
  const el = resolveHrefKeyElement(hrefKey);
@@ -25570,7 +26218,7 @@ function OhhwellsBridge() {
25570
26218
  },
25571
26219
  [resolveHrefKeyElement]
25572
26220
  );
25573
- const closeLinkPopover = (0, import_react18.useCallback)(() => {
26221
+ const closeLinkPopover = (0, import_react19.useCallback)(() => {
25574
26222
  const session = linkPopoverSessionRef.current;
25575
26223
  addNavAfterAnchorRef.current = null;
25576
26224
  setLinkPopover(null);
@@ -25578,9 +26226,9 @@ function OhhwellsBridge() {
25578
26226
  reselectAfterLinkPopover(session.key);
25579
26227
  }
25580
26228
  }, [reselectAfterLinkPopover]);
25581
- const closeLinkPopoverRef = (0, import_react18.useRef)(closeLinkPopover);
26229
+ const closeLinkPopoverRef = (0, import_react19.useRef)(closeLinkPopover);
25582
26230
  closeLinkPopoverRef.current = closeLinkPopover;
25583
- const openLinkPopoverForActive = (0, import_react18.useCallback)(() => {
26231
+ const openLinkPopoverForActive = (0, import_react19.useCallback)(() => {
25584
26232
  const hrefCtx = getHrefKeyFromElement(activeElRef.current);
25585
26233
  if (!hrefCtx) return;
25586
26234
  bumpLinkPopoverGrace();
@@ -25591,7 +26239,7 @@ function OhhwellsBridge() {
25591
26239
  });
25592
26240
  deactivate();
25593
26241
  }, [deactivate]);
25594
- const openLinkPopoverForSelected = (0, import_react18.useCallback)(() => {
26242
+ const openLinkPopoverForSelected = (0, import_react19.useCallback)(() => {
25595
26243
  const anchor = selectedElRef.current;
25596
26244
  if (!anchor) return;
25597
26245
  const key = anchor.getAttribute("data-ohw-href-key");
@@ -25608,7 +26256,7 @@ function OhhwellsBridge() {
25608
26256
  });
25609
26257
  deselect();
25610
26258
  }, [deselect]);
25611
- const handleSelectParent = (0, import_react18.useCallback)(() => {
26259
+ const handleSelectParent = (0, import_react19.useCallback)(() => {
25612
26260
  const selected = selectedElRef.current;
25613
26261
  if (!selected) return;
25614
26262
  if (toolbarVariantRef.current === "select-frame") {
@@ -25635,7 +26283,7 @@ function OhhwellsBridge() {
25635
26283
  }
25636
26284
  deselectRef.current();
25637
26285
  }, []);
25638
- const handleDuplicateSelected = (0, import_react18.useCallback)(() => {
26286
+ const handleDuplicateSelected = (0, import_react19.useCallback)(() => {
25639
26287
  const selected = selectedElRef.current;
25640
26288
  if (!selected || !isNavigationItem2(selected)) return;
25641
26289
  if (isCtaButton(selected)) {
@@ -25798,7 +26446,7 @@ function OhhwellsBridge() {
25798
26446
  });
25799
26447
  }
25800
26448
  }, [postToParent2, tokensForButton]);
25801
- const runPendingDeleteUndo = (0, import_react18.useCallback)(() => {
26449
+ const runPendingDeleteUndo = (0, import_react19.useCallback)(() => {
25802
26450
  const pending = pendingDeleteUndoRef.current;
25803
26451
  if (!pending) return false;
25804
26452
  pendingDeleteUndoRef.current = null;
@@ -25806,7 +26454,7 @@ function OhhwellsBridge() {
25806
26454
  enforceLinkHrefs();
25807
26455
  return true;
25808
26456
  }, []);
25809
- const handleDeleteSelected = (0, import_react18.useCallback)(() => {
26457
+ const handleDeleteSelected = (0, import_react19.useCallback)(() => {
25810
26458
  const selected = selectedElRef.current;
25811
26459
  if (!selected) return false;
25812
26460
  if (isCtaButton(selected)) {
@@ -25859,7 +26507,7 @@ function OhhwellsBridge() {
25859
26507
  }, [postToParent2]);
25860
26508
  handleDeleteSelectedRef.current = handleDeleteSelected;
25861
26509
  runPendingDeleteUndoRef.current = runPendingDeleteUndo;
25862
- const handleLinkPopoverSubmit = (0, import_react18.useCallback)(
26510
+ const handleLinkPopoverSubmit = (0, import_react19.useCallback)(
25863
26511
  (target) => {
25864
26512
  const session = linkPopoverSessionRef.current;
25865
26513
  if (!session) return;
@@ -25925,14 +26573,14 @@ function OhhwellsBridge() {
25925
26573
  const showEditLink = toolbarShowEditLink;
25926
26574
  const currentSections = sectionsByPath[pathname] ?? [];
25927
26575
  linkPopoverOpenRef.current = linkPopover !== null;
25928
- const handleMediaSelect = (0, import_react18.useCallback)((key) => {
26576
+ const handleMediaSelect = (0, import_react19.useCallback)((key) => {
25929
26577
  const el = hoveredImageRef.current?.dataset.ohwKey === key ? hoveredImageRef.current : Array.from(document.querySelectorAll(MEDIA_SELECTOR)).find(
25930
26578
  (m) => (m.dataset.ohwKey ?? "") === key
25931
26579
  ) ?? null;
25932
26580
  if (!el) return;
25933
26581
  selectMediaElementRef.current(el);
25934
26582
  }, []);
25935
- const handleMediaReplace = (0, import_react18.useCallback)(
26583
+ const handleMediaReplace = (0, import_react19.useCallback)(
25936
26584
  (key) => {
25937
26585
  postToParent2({
25938
26586
  type: "ow:image-pick",
@@ -25942,13 +26590,13 @@ function OhhwellsBridge() {
25942
26590
  },
25943
26591
  [postToParent2, mediaHover?.elementType, selectedMedia?.elementType]
25944
26592
  );
25945
- const handleEditCarousel = (0, import_react18.useCallback)(
26593
+ const handleEditCarousel = (0, import_react19.useCallback)(
25946
26594
  (key) => {
25947
26595
  postToParent2({ type: "ow:carousel-open", key, images: readCarouselValue(key) });
25948
26596
  },
25949
26597
  [postToParent2]
25950
26598
  );
25951
- const handleMediaFadeOutComplete = (0, import_react18.useCallback)((key) => {
26599
+ const handleMediaFadeOutComplete = (0, import_react19.useCallback)((key) => {
25952
26600
  setUploadingRects((prev) => {
25953
26601
  if (!(key in prev)) return prev;
25954
26602
  const next = { ...prev };
@@ -25956,7 +26604,7 @@ function OhhwellsBridge() {
25956
26604
  return next;
25957
26605
  });
25958
26606
  }, []);
25959
- const handleVideoSettingsChange = (0, import_react18.useCallback)(
26607
+ const handleVideoSettingsChange = (0, import_react19.useCallback)(
25960
26608
  (key, settings) => {
25961
26609
  document.querySelectorAll(`[data-ohw-key="${key}"]`).forEach((el) => {
25962
26610
  const video = getVideoEl2(el);
@@ -25978,14 +26626,14 @@ function OhhwellsBridge() {
25978
26626
  },
25979
26627
  [postToParent2]
25980
26628
  );
25981
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
25982
- /* @__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, {}) }),
25983
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
25984
- 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, {}),
25985
26633
  bridgeRoot ? (0, import_react_dom5.createPortal)(
25986
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
25987
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
25988
- 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)(
25989
26637
  AiSectionOverlay,
25990
26638
  {
25991
26639
  postToParent: postToParent2,
@@ -25993,7 +26641,7 @@ function OhhwellsBridge() {
25993
26641
  onSelectionChange: handleAiSectionSelectionChange
25994
26642
  }
25995
26643
  ),
25996
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26644
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
25997
26645
  AiPricingCardOverlay,
25998
26646
  {
25999
26647
  postToParent: postToParent2,
@@ -26001,12 +26649,20 @@ function OhhwellsBridge() {
26001
26649
  applyTreeLocalRef
26002
26650
  }
26003
26651
  ),
26004
- 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)(
26005
26661
  "div",
26006
26662
  {
26007
26663
  className: "pointer-events-none fixed z-2147483646",
26008
26664
  style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
26009
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26665
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26010
26666
  DropIndicator,
26011
26667
  {
26012
26668
  direction: "horizontal",
@@ -26017,7 +26673,7 @@ function OhhwellsBridge() {
26017
26673
  },
26018
26674
  `section-drop-${slot.insertIndex}-${i}`
26019
26675
  )),
26020
- 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)(
26021
26677
  MediaOverlay,
26022
26678
  {
26023
26679
  hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
@@ -26028,7 +26684,7 @@ function OhhwellsBridge() {
26028
26684
  },
26029
26685
  `uploading-${key}`
26030
26686
  )),
26031
- 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)(
26032
26688
  MediaOverlay,
26033
26689
  {
26034
26690
  hover: mediaHover,
@@ -26039,7 +26695,7 @@ function OhhwellsBridge() {
26039
26695
  onVideoSettingsChange: handleVideoSettingsChange
26040
26696
  }
26041
26697
  ),
26042
- 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)(
26043
26699
  MediaOverlay,
26044
26700
  {
26045
26701
  hover: selectedMedia,
@@ -26051,7 +26707,7 @@ function OhhwellsBridge() {
26051
26707
  onVideoSettingsChange: handleVideoSettingsChange
26052
26708
  }
26053
26709
  ),
26054
- carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26710
+ carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26055
26711
  CarouselOverlay,
26056
26712
  {
26057
26713
  hover: carouselHover,
@@ -26059,10 +26715,10 @@ function OhhwellsBridge() {
26059
26715
  cueOnly: !!carouselHover.fullBleedSectionId && carouselHover.fullBleedSectionId !== selectedAiSectionId
26060
26716
  }
26061
26717
  ),
26062
- siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
26063
- siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
26064
- isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
26065
- 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)(
26066
26722
  "div",
26067
26723
  {
26068
26724
  className: "pointer-events-none fixed z-2147483646",
@@ -26072,7 +26728,7 @@ function OhhwellsBridge() {
26072
26728
  width: slot.width,
26073
26729
  height: slot.height
26074
26730
  },
26075
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26731
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26076
26732
  DropIndicator,
26077
26733
  {
26078
26734
  direction: slot.direction,
@@ -26083,7 +26739,7 @@ function OhhwellsBridge() {
26083
26739
  },
26084
26740
  `footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
26085
26741
  )),
26086
- isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26742
+ isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26087
26743
  "div",
26088
26744
  {
26089
26745
  className: "pointer-events-none fixed z-2147483646",
@@ -26093,7 +26749,7 @@ function OhhwellsBridge() {
26093
26749
  width: slot.width,
26094
26750
  height: slot.height
26095
26751
  },
26096
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26752
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26097
26753
  DropIndicator,
26098
26754
  {
26099
26755
  direction: slot.direction,
@@ -26104,10 +26760,10 @@ function OhhwellsBridge() {
26104
26760
  },
26105
26761
  `nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
26106
26762
  )),
26107
- hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
26108
- hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
26109
- hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
26110
- 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)(
26111
26767
  ItemInteractionLayer,
26112
26768
  {
26113
26769
  rect: formPickRect,
@@ -26115,13 +26771,13 @@ function OhhwellsBridge() {
26115
26771
  itemDragSurface: false,
26116
26772
  toolbarAlign: "left",
26117
26773
  chromeGap: 24,
26118
- toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
26774
+ toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26119
26775
  "div",
26120
26776
  {
26121
26777
  "data-ohw-form-toolbar": "",
26122
26778
  className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
26123
26779
  children: [
26124
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26780
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26125
26781
  "button",
26126
26782
  {
26127
26783
  type: "button",
@@ -26129,11 +26785,11 @@ function OhhwellsBridge() {
26129
26785
  className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
26130
26786
  onClick: () => setFieldTypePickerOpen((open) => !open),
26131
26787
  "data-ohw-add-field": "",
26132
- 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 })
26133
26789
  }
26134
26790
  ),
26135
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
26136
- /* @__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)(
26137
26793
  "button",
26138
26794
  {
26139
26795
  type: "button",
@@ -26149,11 +26805,11 @@ function OhhwellsBridge() {
26149
26805
  });
26150
26806
  },
26151
26807
  children: [
26152
- /* @__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 }),
26153
26809
  "Form settings",
26154
26810
  formPickCount ? (
26155
26811
  // Counter pill, per the design — not a text suffix.
26156
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26812
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26157
26813
  "span",
26158
26814
  {
26159
26815
  "data-ohw-form-count": "",
@@ -26165,8 +26821,8 @@ function OhhwellsBridge() {
26165
26821
  ]
26166
26822
  }
26167
26823
  ),
26168
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
26169
- /* @__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)(
26170
26826
  "button",
26171
26827
  {
26172
26828
  type: "button",
@@ -26197,7 +26853,7 @@ function OhhwellsBridge() {
26197
26853
  )
26198
26854
  }
26199
26855
  ),
26200
- formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26856
+ formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26201
26857
  ItemInteractionLayer,
26202
26858
  {
26203
26859
  rect: formHoverRect,
@@ -26205,7 +26861,7 @@ function OhhwellsBridge() {
26205
26861
  chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
26206
26862
  }
26207
26863
  ),
26208
- 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)(
26209
26865
  ItemInteractionLayer,
26210
26866
  {
26211
26867
  rect: fieldPickRect,
@@ -26217,7 +26873,7 @@ function OhhwellsBridge() {
26217
26873
  dragHandleLabel: "Reorder field",
26218
26874
  onDragHandleDragStart: handleFieldDragStart,
26219
26875
  onDragHandleDragEnd: handleFieldDragEnd,
26220
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26876
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26221
26877
  FormFieldToolbar,
26222
26878
  {
26223
26879
  type: fieldPickState.type,
@@ -26230,12 +26886,12 @@ function OhhwellsBridge() {
26230
26886
  )
26231
26887
  }
26232
26888
  ),
26233
- fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26889
+ fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26234
26890
  "div",
26235
26891
  {
26236
26892
  className: "pointer-events-none fixed z-[2147483644]",
26237
26893
  style: { top: slot.top, left: slot.left, width: slot.width },
26238
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26894
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26239
26895
  DropIndicator,
26240
26896
  {
26241
26897
  direction: "horizontal",
@@ -26248,7 +26904,7 @@ function OhhwellsBridge() {
26248
26904
  )) : null,
26249
26905
  fieldTypePickerOpen && formPickRect ? (() => {
26250
26906
  const toolbar = document.querySelector("[data-ohw-form-toolbar]")?.getBoundingClientRect();
26251
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26907
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26252
26908
  "div",
26253
26909
  {
26254
26910
  className: "pointer-events-none fixed z-[2147483645]",
@@ -26256,12 +26912,12 @@ function OhhwellsBridge() {
26256
26912
  top: toolbar ? toolbar.bottom + 6 : formPickRect.top + 16,
26257
26913
  left: toolbar ? toolbar.left : formPickRect.left + 24
26258
26914
  },
26259
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FieldTypePicker, { onPick: handleAddField })
26915
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FieldTypePicker, { onPick: handleAddField })
26260
26916
  }
26261
26917
  );
26262
26918
  })() : null,
26263
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
26264
- 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)(
26265
26921
  FooterContainerChrome,
26266
26922
  {
26267
26923
  rect: toolbarRect,
@@ -26269,7 +26925,7 @@ function OhhwellsBridge() {
26269
26925
  addDisabled: !canAddFooterColumn()
26270
26926
  }
26271
26927
  ),
26272
- 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)(
26273
26929
  ItemInteractionLayer,
26274
26930
  {
26275
26931
  rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected) ? draggedItemRect : toolbarRect,
@@ -26285,7 +26941,7 @@ function OhhwellsBridge() {
26285
26941
  onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
26286
26942
  onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
26287
26943
  itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection && !selectedIsSocialsRow,
26288
- 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)(
26289
26945
  ItemActionToolbar,
26290
26946
  {
26291
26947
  onEditLink: openLinkPopoverForSelected,
@@ -26336,8 +26992,8 @@ function OhhwellsBridge() {
26336
26992
  ) : void 0
26337
26993
  }
26338
26994
  ),
26339
- toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
26340
- /* @__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)(
26341
26997
  EditGlowChrome,
26342
26998
  {
26343
26999
  rect: toolbarRect,
@@ -26347,7 +27003,7 @@ function OhhwellsBridge() {
26347
27003
  hideHandle: isItemDragging
26348
27004
  }
26349
27005
  ),
26350
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27006
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26351
27007
  FloatingToolbar,
26352
27008
  {
26353
27009
  rect: toolbarRect,
@@ -26360,7 +27016,7 @@ function OhhwellsBridge() {
26360
27016
  }
26361
27017
  )
26362
27018
  ] }),
26363
- maxBadge && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
27019
+ maxBadge && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26364
27020
  "div",
26365
27021
  {
26366
27022
  "data-ohw-max-badge": "",
@@ -26386,7 +27042,7 @@ function OhhwellsBridge() {
26386
27042
  ]
26387
27043
  }
26388
27044
  ),
26389
- toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27045
+ toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26390
27046
  StateToggle,
26391
27047
  {
26392
27048
  rect: toggleState.rect,
@@ -26395,15 +27051,15 @@ function OhhwellsBridge() {
26395
27051
  onStateChange: handleStateChange
26396
27052
  }
26397
27053
  ),
26398
- sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
27054
+ sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
26399
27055
  "div",
26400
27056
  {
26401
27057
  "data-ohw-section-insert-line": "",
26402
27058
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
26403
27059
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
26404
27060
  children: [
26405
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
26406
- /* @__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)(
26407
27063
  Badge,
26408
27064
  {
26409
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",
@@ -26420,11 +27076,11 @@ function OhhwellsBridge() {
26420
27076
  children: "Add Section"
26421
27077
  }
26422
27078
  ),
26423
- /* @__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 } })
26424
27080
  ]
26425
27081
  }
26426
27082
  ),
26427
- linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27083
+ linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26428
27084
  LinkPopover,
26429
27085
  {
26430
27086
  panelRef: linkPopoverPanelRef,
@@ -26441,7 +27097,7 @@ function OhhwellsBridge() {
26441
27097
  },
26442
27098
  linkPopover.key
26443
27099
  ) : null,
26444
- floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27100
+ floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26445
27101
  FloatingPanel,
26446
27102
  {
26447
27103
  open: true,
@@ -26451,7 +27107,7 @@ function OhhwellsBridge() {
26451
27107
  onPositionChange: setFloatingPanelPos,
26452
27108
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
26453
27109
  onClose: closeFloatingPanelOnly,
26454
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27110
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26455
27111
  SocialsDisplayPanel,
26456
27112
  {
26457
27113
  display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
@@ -26472,19 +27128,19 @@ function OhhwellsBridge() {
26472
27128
  const tokens = tokensFromButton(button);
26473
27129
  const current = assignmentFor(button, editContentRef.current, tokens);
26474
27130
  void buttonStyleTick;
26475
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27131
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26476
27132
  FloatingPanel,
26477
27133
  {
26478
27134
  open: true,
26479
27135
  title: floatingPanel.title,
26480
27136
  context: floatingPanel.context,
26481
- 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 }),
26482
27138
  position: floatingPanelPos,
26483
27139
  onPositionChange: setFloatingPanelPos,
26484
27140
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
26485
27141
  onClose: closeFloatingPanelOnly,
26486
27142
  bodyClassName: "gap-5",
26487
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
27143
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
26488
27144
  ButtonStylePanel,
26489
27145
  {
26490
27146
  variants: tokens.variants,
@@ -26512,10 +27168,10 @@ function OhhwellsBridge() {
26512
27168
 
26513
27169
  // src/ui/EmptySection.tsx
26514
27170
  var import_link = __toESM(require("next/link"), 1);
26515
- var import_jsx_runtime36 = require("react/jsx-runtime");
27171
+ var import_jsx_runtime37 = require("react/jsx-runtime");
26516
27172
  function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
26517
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
26518
- /* @__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)(
26519
27175
  "p",
26520
27176
  {
26521
27177
  style: {
@@ -26527,10 +27183,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
26527
27183
  color: "var(--brand-accent)",
26528
27184
  marginBottom: "1.5rem"
26529
27185
  },
26530
- 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" }) })
26531
27187
  }
26532
27188
  ),
26533
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
27189
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
26534
27190
  "h1",
26535
27191
  {
26536
27192
  style: {
@@ -26545,7 +27201,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
26545
27201
  children: title
26546
27202
  }
26547
27203
  ),
26548
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
27204
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
26549
27205
  "p",
26550
27206
  {
26551
27207
  style: {