@ohhwells/bridge 0.1.122-next.342 → 0.1.123-next.343

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_react19 = __toESM(require("react"), 1);
78
+ var import_react20 = __toESM(require("react"), 1);
79
79
  var import_client2 = require("react-dom/client");
80
80
  var import_react_dom4 = require("react-dom");
81
81
 
@@ -1878,6 +1878,112 @@ function MediaBox({
1878
1878
  }
1879
1879
  );
1880
1880
  }
1881
+ function VideoEmbed({ slots, ctx, path }) {
1882
+ const [playing, setPlaying] = import_react.default.useState(false);
1883
+ const videoId = str(slots.videoId);
1884
+ const caption = str(slots.caption);
1885
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: AI_TREE_TOKENS.spacing3 }, children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1887
+ "div",
1888
+ {
1889
+ "data-ohw-video-block": "",
1890
+ "data-ohw-video-path": path,
1891
+ style: {
1892
+ position: "relative",
1893
+ width: "100%",
1894
+ aspectRatio: "16 / 9",
1895
+ borderRadius: AI_TREE_TOKENS.radiusCard,
1896
+ overflow: "hidden",
1897
+ background: "#DBEAFE"
1898
+ },
1899
+ children: !videoId ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1900
+ "div",
1901
+ {
1902
+ style: {
1903
+ position: "absolute",
1904
+ inset: 0,
1905
+ display: "flex",
1906
+ alignItems: "center",
1907
+ justifyContent: "center",
1908
+ color: "#93C5FD",
1909
+ fontSize: 13
1910
+ },
1911
+ children: "video"
1912
+ }
1913
+ ) : playing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1914
+ "iframe",
1915
+ {
1916
+ src: `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=1&mute=1`,
1917
+ title: caption || "YouTube video",
1918
+ style: { position: "absolute", inset: 0, width: "100%", height: "100%", border: 0 },
1919
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
1920
+ sandbox: "allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox",
1921
+ loading: "lazy"
1922
+ }
1923
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1924
+ "button",
1925
+ {
1926
+ type: "button",
1927
+ onClick: () => setPlaying(true),
1928
+ "aria-label": "Play video",
1929
+ style: {
1930
+ position: "absolute",
1931
+ inset: 0,
1932
+ width: "100%",
1933
+ height: "100%",
1934
+ border: 0,
1935
+ padding: 0,
1936
+ margin: 0,
1937
+ cursor: "pointer",
1938
+ background: "none"
1939
+ },
1940
+ children: [
1941
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1942
+ "img",
1943
+ {
1944
+ src: `https://i.ytimg.com/vi/${videoId}/hqdefault.jpg`,
1945
+ alt: "",
1946
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
1947
+ }
1948
+ ),
1949
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1950
+ "span",
1951
+ {
1952
+ style: {
1953
+ position: "absolute",
1954
+ top: "50%",
1955
+ left: "50%",
1956
+ transform: "translate(-50%, -50%)",
1957
+ width: 64,
1958
+ height: 64,
1959
+ borderRadius: "50%",
1960
+ background: "rgba(0,0,0,0.65)",
1961
+ display: "flex",
1962
+ alignItems: "center",
1963
+ justifyContent: "center"
1964
+ },
1965
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Play, { size: 28, color: "#fff", fill: "#fff" })
1966
+ }
1967
+ )
1968
+ ]
1969
+ }
1970
+ )
1971
+ }
1972
+ ),
1973
+ caption && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1974
+ "div",
1975
+ {
1976
+ ...textAttrs(ctx, `${path}.caption`),
1977
+ style: {
1978
+ ...typeStyle(AI_TREE_TOKENS.type.bodyM, ctx.brand.fonts.body),
1979
+ color: ctx.brand.palette.dark,
1980
+ textAlign: "center"
1981
+ },
1982
+ children: caption
1983
+ }
1984
+ )
1985
+ ] });
1986
+ }
1881
1987
  function ButtonEl({
1882
1988
  slots,
1883
1989
  ctx,
@@ -2958,6 +3064,8 @@ function renderNode(node, ctx, path) {
2958
3064
  editPath: `${path}.source`
2959
3065
  }
2960
3066
  );
3067
+ case "video":
3068
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VideoEmbed, { slots, ctx, path });
2961
3069
  case "media-list": {
2962
3070
  const stacked = slots.layout === "stack";
2963
3071
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex", gap: stacked ? 0 : AI_TREE_TOKENS.spacing3 }, children: (node.children ?? []).map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -11316,49 +11424,539 @@ function PricingCardToolbar({
11316
11424
  }
11317
11425
  );
11318
11426
  }
11319
- function findPricingCardNode(tree, index) {
11320
- const stack = tree.rows.flatMap((row) => row.blocks);
11321
- while (stack.length) {
11322
- const node = stack.shift();
11323
- if (node.type === "collection" && Array.isArray(node.children) && node.children[0]?.type === "card" && node.children[0].slots?.preset === "pricing") {
11324
- return node.children[index] ?? null;
11325
- }
11326
- if (node.children) stack.push(...node.children);
11327
- }
11328
- return null;
11329
- }
11330
- function AiPricingCardOverlay({
11427
+ function findPricingCardNode(tree, index) {
11428
+ const stack = tree.rows.flatMap((row) => row.blocks);
11429
+ while (stack.length) {
11430
+ const node = stack.shift();
11431
+ if (node.type === "collection" && Array.isArray(node.children) && node.children[0]?.type === "card" && node.children[0].slots?.preset === "pricing") {
11432
+ return node.children[index] ?? null;
11433
+ }
11434
+ if (node.children) stack.push(...node.children);
11435
+ }
11436
+ return null;
11437
+ }
11438
+ function AiPricingCardOverlay({
11439
+ postToParent: postToParent2,
11440
+ aiSectionsRef,
11441
+ applyTreeLocalRef
11442
+ }) {
11443
+ const [hover, setHover] = (0, import_react10.useState)(null);
11444
+ const [active, setActive] = (0, import_react10.useState)(null);
11445
+ const [pending, setPending] = (0, import_react10.useState)(false);
11446
+ const [error, setError] = (0, import_react10.useState)(null);
11447
+ const activeRef = (0, import_react10.useRef)(null);
11448
+ activeRef.current = active;
11449
+ (0, import_react10.useEffect)(() => {
11450
+ const onMove = (e) => {
11451
+ const t = e.target;
11452
+ if (!(t instanceof HTMLElement)) return;
11453
+ 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]")) {
11454
+ return;
11455
+ }
11456
+ const cardEl = t.closest("[data-ohw-pricing-card]");
11457
+ if (!cardEl) {
11458
+ setHover(null);
11459
+ return;
11460
+ }
11461
+ const sectionEl = cardEl.closest("[data-ohw-section]");
11462
+ const unit = sectionEl ? movableUnit(sectionEl) : null;
11463
+ const sectionId = unit ? instanceIdOf(unit) || null : null;
11464
+ const index = Number(cardEl.dataset.ohwPricingIndex);
11465
+ if (!sectionId || Number.isNaN(index)) {
11466
+ setHover(null);
11467
+ return;
11468
+ }
11469
+ setHover({ sectionId, index });
11470
+ };
11471
+ const onLeave = () => setHover(null);
11472
+ document.addEventListener("mousemove", onMove, { passive: true });
11473
+ document.documentElement.addEventListener("mouseleave", onLeave);
11474
+ return () => {
11475
+ document.removeEventListener("mousemove", onMove);
11476
+ document.documentElement.removeEventListener("mouseleave", onLeave);
11477
+ };
11478
+ }, []);
11479
+ (0, import_react10.useEffect)(() => {
11480
+ const onClick = (e) => {
11481
+ const current = activeRef.current;
11482
+ if (!current) return;
11483
+ const t = e.target;
11484
+ if (!(t instanceof HTMLElement)) return;
11485
+ if (t.closest("[data-ohw-item-interaction]")) return;
11486
+ const cardEl = findPricingCardElement(current.sectionId, current.index);
11487
+ if (cardEl && cardEl.contains(t)) return;
11488
+ setActive(null);
11489
+ setError(null);
11490
+ };
11491
+ document.addEventListener("click", onClick, true);
11492
+ return () => document.removeEventListener("click", onClick, true);
11493
+ }, []);
11494
+ (0, import_react10.useEffect)(() => {
11495
+ const onBlur = () => {
11496
+ if (!activeRef.current) return;
11497
+ setActive(null);
11498
+ setError(null);
11499
+ };
11500
+ window.addEventListener("blur", onBlur);
11501
+ return () => window.removeEventListener("blur", onBlur);
11502
+ }, []);
11503
+ (0, import_react10.useEffect)(() => {
11504
+ const onKeyDown = (e) => {
11505
+ if (e.key !== "Escape") return;
11506
+ if (!activeRef.current) return;
11507
+ setActive(null);
11508
+ setError(null);
11509
+ };
11510
+ document.addEventListener("keydown", onKeyDown);
11511
+ return () => document.removeEventListener("keydown", onKeyDown);
11512
+ }, []);
11513
+ const findEntry = (0, import_react10.useCallback)(
11514
+ (sectionId) => {
11515
+ const state = parseAiSectionsState(aiSectionsRef.current);
11516
+ return state.sections.find((s) => s.id === sectionId) ?? null;
11517
+ },
11518
+ [aiSectionsRef]
11519
+ );
11520
+ const runMutation = (0, import_react10.useCallback)(
11521
+ async (sectionId, mutate) => {
11522
+ const entry = findEntry(sectionId);
11523
+ if (!entry) return false;
11524
+ const nextTree = mutate(entry.tree);
11525
+ if (!nextTree) return false;
11526
+ setPending(true);
11527
+ setError(null);
11528
+ const { ok, reasons } = await requestValidateTree2(postToParent2, nextTree);
11529
+ setPending(false);
11530
+ if (!ok) {
11531
+ setError(reasons[0] ?? "That change is not allowed.");
11532
+ return false;
11533
+ }
11534
+ applyTreeLocalRef.current?.({
11535
+ id: sectionId,
11536
+ mode: "replace",
11537
+ targetSectionId: sectionId,
11538
+ tree: nextTree,
11539
+ label: entry.label,
11540
+ media: entry.media,
11541
+ ...entry.brand ? { brand: entry.brand } : {},
11542
+ // The user is already looking at the card they just edited — recentering the
11543
+ // viewport on every tier add/remove/toggle reads as the section jumping around.
11544
+ skipScrollIntoView: true
11545
+ });
11546
+ return true;
11547
+ },
11548
+ [findEntry, postToParent2, applyTreeLocalRef]
11549
+ );
11550
+ const activeEntry = active ? findEntry(active.sectionId) : null;
11551
+ const activeCardRect = useLiveCardRect(active);
11552
+ const hoverHandleRect = useLiveCardRect(!active && hover ? hover : null);
11553
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
11554
+ hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11555
+ "button",
11556
+ {
11557
+ type: "button",
11558
+ "data-ohw-toolbar": "",
11559
+ onClick: () => setActive(hover),
11560
+ "aria-label": "Configure pricing tier",
11561
+ style: {
11562
+ position: "fixed",
11563
+ top: hoverHandleRect.top + 8,
11564
+ left: hoverHandleRect.left + hoverHandleRect.width - 36,
11565
+ width: 28,
11566
+ height: 28,
11567
+ borderRadius: 8,
11568
+ border: `1.5px dashed ${PRIMARY4}`,
11569
+ background: "#ffffff",
11570
+ color: PRIMARY4,
11571
+ display: "flex",
11572
+ alignItems: "center",
11573
+ justifyContent: "center",
11574
+ cursor: "pointer",
11575
+ zIndex: 2147483643,
11576
+ fontSize: 14,
11577
+ fontWeight: 700
11578
+ },
11579
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Star, { size: 14, style: { pointerEvents: "none" } })
11580
+ }
11581
+ ),
11582
+ activeCardRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11583
+ ItemInteractionLayer,
11584
+ {
11585
+ rect: activeCardRect,
11586
+ state: "active-top",
11587
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11588
+ PricingCardToolbar,
11589
+ {
11590
+ entry: activeEntry,
11591
+ index: active.index,
11592
+ pending,
11593
+ error,
11594
+ onAddTier: () => runMutation(active.sectionId, addPricingTier),
11595
+ onRemoveTier: () => {
11596
+ void runMutation(active.sectionId, (tree) => removePricingTier(tree, active.index)).then(
11597
+ (applied) => {
11598
+ if (applied) setActive(null);
11599
+ }
11600
+ );
11601
+ },
11602
+ onToggleFeatured: (enabled) => runMutation(
11603
+ active.sectionId,
11604
+ (tree) => setPricingCardFeatured(tree, active.index, { enabled })
11605
+ ),
11606
+ onSetTreatment: (treatment) => runMutation(
11607
+ active.sectionId,
11608
+ (tree) => setPricingCardFeatured(tree, active.index, { enabled: true, treatment })
11609
+ ),
11610
+ onAddButton: () => runMutation(active.sectionId, (tree) => addPricingCardButton(tree, active.index, "Learn more")),
11611
+ onRemoveButton: () => runMutation(active.sectionId, (tree) => removePricingCardButton(tree, active.index)),
11612
+ onAddFeature: () => runMutation(active.sectionId, (tree) => addPricingCardFeature(tree, active.index, "New feature")),
11613
+ onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
11614
+ }
11615
+ )
11616
+ }
11617
+ )
11618
+ ] });
11619
+ }
11620
+
11621
+ // src/ui/ai-section/AiVideoOverlay.tsx
11622
+ var import_react11 = require("react");
11623
+ var import_lucide_react10 = require("lucide-react");
11624
+
11625
+ // src/lib/ai-video-tree.ts
11626
+ function resolveVideoBlock(tree, path) {
11627
+ const segments = path.split(".");
11628
+ const rowSeg = segments[0];
11629
+ const blockSeg = segments[1];
11630
+ if (!rowSeg?.startsWith("r") || !blockSeg?.startsWith("b")) return null;
11631
+ let node = tree.rows[Number(rowSeg.slice(1))]?.blocks[Number(blockSeg.slice(1))];
11632
+ for (const seg of segments.slice(2)) {
11633
+ if (!node || !seg.startsWith("c")) return null;
11634
+ node = node.children?.[Number(seg.slice(1))];
11635
+ }
11636
+ return node && node.type === "video" ? node : null;
11637
+ }
11638
+ function withVideo(tree, path, mutate) {
11639
+ const next = JSON.parse(JSON.stringify(tree));
11640
+ const block = resolveVideoBlock(next, path);
11641
+ if (!block) return null;
11642
+ block.slots = block.slots ?? {};
11643
+ return mutate(block) ? next : null;
11644
+ }
11645
+ function videoIdAt(tree, path) {
11646
+ const block = resolveVideoBlock(tree, path);
11647
+ const id = block?.slots?.videoId;
11648
+ return typeof id === "string" ? id : "";
11649
+ }
11650
+ function setVideoId(tree, path, videoId) {
11651
+ return withVideo(tree, path, (block) => {
11652
+ block.slots = { ...block.slots, videoId };
11653
+ return true;
11654
+ });
11655
+ }
11656
+ function clearVideo(tree, path) {
11657
+ return withVideo(tree, path, (block) => {
11658
+ const slots = { ...block.slots };
11659
+ delete slots.videoId;
11660
+ block.slots = slots;
11661
+ return true;
11662
+ });
11663
+ }
11664
+
11665
+ // src/lib/youtube.ts
11666
+ var YOUTUBE_ID_PATTERN = /^[A-Za-z0-9_-]{11}$/;
11667
+ function extractYouTubeId(input) {
11668
+ const trimmed = input.trim();
11669
+ if (!trimmed) return null;
11670
+ if (YOUTUBE_ID_PATTERN.test(trimmed)) return trimmed;
11671
+ let url;
11672
+ try {
11673
+ url = new URL(trimmed);
11674
+ } catch {
11675
+ return null;
11676
+ }
11677
+ const host = url.hostname.replace(/^www\./, "");
11678
+ if (host !== "youtube.com" && host !== "m.youtube.com" && host !== "youtu.be" && host !== "youtube-nocookie.com") {
11679
+ return null;
11680
+ }
11681
+ let candidate = null;
11682
+ if (host === "youtu.be") {
11683
+ candidate = url.pathname.slice(1).split("/")[0] ?? null;
11684
+ } else if (url.pathname === "/watch") {
11685
+ candidate = url.searchParams.get("v");
11686
+ } else {
11687
+ const match = url.pathname.match(/^\/(?:embed|shorts)\/([^/]+)/);
11688
+ candidate = match ? match[1] : null;
11689
+ }
11690
+ return candidate && YOUTUBE_ID_PATTERN.test(candidate) ? candidate : null;
11691
+ }
11692
+
11693
+ // src/ui/ai-section/AiVideoOverlay.tsx
11694
+ var import_jsx_runtime20 = require("react/jsx-runtime");
11695
+ var PRIMARY5 = "#0885FE";
11696
+ var OHW_BLUE3 = `var(--ohw-primary, ${PRIMARY5})`;
11697
+ var OHW_BLUE_DARK3 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY5}) 60%, #000000)`;
11698
+ function findVideoBlockElement(sectionId, path) {
11699
+ const sectionEl = findByInstanceId(sectionId);
11700
+ if (!sectionEl) return null;
11701
+ const items = sectionEl.querySelectorAll("[data-ohw-video-block]");
11702
+ for (const el of Array.from(items)) {
11703
+ if (el.dataset.ohwVideoPath === path) return el;
11704
+ }
11705
+ return null;
11706
+ }
11707
+ function readRect4(ref) {
11708
+ const el = ref && findVideoBlockElement(ref.sectionId, ref.path);
11709
+ if (!el) return null;
11710
+ const r2 = el.getBoundingClientRect();
11711
+ if (r2.width <= 0 || r2.height <= 0) return null;
11712
+ return { top: r2.top, left: r2.left, width: r2.width, height: r2.height };
11713
+ }
11714
+ function useLiveBlockRect(ref) {
11715
+ const [rect, setRect] = (0, import_react11.useState)(null);
11716
+ (0, import_react11.useEffect)(() => {
11717
+ if (!ref) {
11718
+ setRect(null);
11719
+ return;
11720
+ }
11721
+ const update = () => {
11722
+ const next = readRect4(ref);
11723
+ setRect(
11724
+ (prev) => prev && next && prev.top === next.top && prev.left === next.left && prev.width === next.width && prev.height === next.height ? prev : next
11725
+ );
11726
+ };
11727
+ update();
11728
+ const opts = { capture: true, passive: true };
11729
+ window.addEventListener("scroll", update, opts);
11730
+ window.addEventListener("resize", update);
11731
+ const interval = setInterval(update, 500);
11732
+ return () => {
11733
+ window.removeEventListener("scroll", update, opts);
11734
+ window.removeEventListener("resize", update);
11735
+ clearInterval(interval);
11736
+ };
11737
+ }, [ref?.sectionId, ref?.path]);
11738
+ return rect;
11739
+ }
11740
+ function requestValidateTree3(postToParent2, tree) {
11741
+ return new Promise((resolve) => {
11742
+ const id = `ai-validate-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
11743
+ const timeout = window.setTimeout(() => {
11744
+ window.removeEventListener("message", onMessage);
11745
+ resolve({ ok: false, reasons: ["Validation request timed out."] });
11746
+ }, 8e3);
11747
+ function onMessage(e) {
11748
+ if (e.data?.type !== "ow:ai-validate-tree-result" || e.data.id !== id) return;
11749
+ window.clearTimeout(timeout);
11750
+ window.removeEventListener("message", onMessage);
11751
+ resolve({ ok: e.data.ok === true, reasons: Array.isArray(e.data.reasons) ? e.data.reasons : [] });
11752
+ }
11753
+ window.addEventListener("message", onMessage);
11754
+ postToParent2({ type: "ow:ai-validate-tree-request", id, tree });
11755
+ });
11756
+ }
11757
+ function Pill3({
11758
+ label,
11759
+ onClick,
11760
+ disabled
11761
+ }) {
11762
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
11763
+ "button",
11764
+ {
11765
+ type: "button",
11766
+ onClick,
11767
+ disabled,
11768
+ style: {
11769
+ height: 28,
11770
+ padding: "0 10px",
11771
+ display: "inline-flex",
11772
+ alignItems: "center",
11773
+ gap: 4,
11774
+ borderRadius: 999,
11775
+ border: "none",
11776
+ cursor: disabled ? "default" : "pointer",
11777
+ background: "#ffffff",
11778
+ color: OHW_BLUE_DARK3,
11779
+ opacity: disabled ? 0.4 : 1,
11780
+ fontSize: 12,
11781
+ lineHeight: "16px",
11782
+ fontFamily: "Figtree, ui-sans-serif, system-ui, sans-serif",
11783
+ whiteSpace: "nowrap",
11784
+ flex: "0 0 auto"
11785
+ },
11786
+ children: label
11787
+ }
11788
+ );
11789
+ }
11790
+ function watchUrl(id) {
11791
+ return `https://www.youtube.com/watch?v=${id}`;
11792
+ }
11793
+ function VideoUrlInput({ value, onCommit }) {
11794
+ const [draft, setDraft] = (0, import_react11.useState)(value ? watchUrl(value) : "");
11795
+ const [invalid, setInvalid] = (0, import_react11.useState)(false);
11796
+ (0, import_react11.useEffect)(() => {
11797
+ setDraft(value ? watchUrl(value) : "");
11798
+ setInvalid(false);
11799
+ }, [value]);
11800
+ const commit = () => {
11801
+ const next = draft.trim();
11802
+ if (!next) {
11803
+ setInvalid(false);
11804
+ if (value) onCommit(null);
11805
+ return;
11806
+ }
11807
+ const id = extractYouTubeId(next);
11808
+ if (!id) return setInvalid(true);
11809
+ setInvalid(false);
11810
+ setDraft(watchUrl(id));
11811
+ if (id !== value) onCommit(id);
11812
+ };
11813
+ const handleChange = (next) => {
11814
+ setDraft(next);
11815
+ const id = extractYouTubeId(next.trim());
11816
+ if (id && id !== value) {
11817
+ setInvalid(false);
11818
+ onCommit(id);
11819
+ }
11820
+ };
11821
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%", maxWidth: 280 }, children: [
11822
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
11823
+ "div",
11824
+ {
11825
+ style: {
11826
+ display: "flex",
11827
+ alignItems: "center",
11828
+ gap: 6,
11829
+ height: 28,
11830
+ padding: "0 12px",
11831
+ borderRadius: 999,
11832
+ background: "#ffffff",
11833
+ width: "100%",
11834
+ boxSizing: "border-box",
11835
+ boxShadow: invalid ? "inset 0 0 0 1.5px #EF4444" : "none"
11836
+ },
11837
+ children: [
11838
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
11839
+ "span",
11840
+ {
11841
+ style: {
11842
+ flex: "0 0 auto",
11843
+ color: OHW_BLUE_DARK3,
11844
+ fontSize: 10,
11845
+ lineHeight: "16px",
11846
+ fontWeight: 700,
11847
+ textTransform: "uppercase",
11848
+ letterSpacing: 0.4
11849
+ },
11850
+ children: "Video"
11851
+ }
11852
+ ),
11853
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
11854
+ "input",
11855
+ {
11856
+ type: "text",
11857
+ inputMode: "url",
11858
+ value: draft,
11859
+ onChange: (e) => handleChange(e.target.value),
11860
+ onBlur: commit,
11861
+ onKeyDown: (e) => {
11862
+ if (e.key === "Enter") e.currentTarget.blur();
11863
+ if (e.key === "Escape") {
11864
+ setDraft(value ? watchUrl(value) : "");
11865
+ setInvalid(false);
11866
+ e.currentTarget.blur();
11867
+ }
11868
+ },
11869
+ placeholder: "Paste a YouTube URL",
11870
+ "aria-label": "YouTube video URL",
11871
+ "aria-invalid": invalid,
11872
+ style: {
11873
+ flex: 1,
11874
+ minWidth: 0,
11875
+ border: "none",
11876
+ outline: "none",
11877
+ background: "transparent",
11878
+ padding: 0,
11879
+ margin: 0,
11880
+ fontSize: 12,
11881
+ lineHeight: "16px",
11882
+ fontFamily: "Figtree, ui-sans-serif, system-ui, sans-serif",
11883
+ color: "#1f2937"
11884
+ }
11885
+ }
11886
+ )
11887
+ ]
11888
+ }
11889
+ ),
11890
+ invalid && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, textAlign: "center" }, children: "That doesn't look like a YouTube link \u2014 try pasting the video URL again." })
11891
+ ] });
11892
+ }
11893
+ function VideoToolbar({
11894
+ videoId,
11895
+ pending,
11896
+ error,
11897
+ onSetVideoId,
11898
+ onRemove
11899
+ }) {
11900
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
11901
+ "div",
11902
+ {
11903
+ "data-ohw-bridge": "",
11904
+ "data-ohw-toolbar": "",
11905
+ onMouseDown: (e) => e.stopPropagation(),
11906
+ style: {
11907
+ display: "flex",
11908
+ flexDirection: "column",
11909
+ gap: 6,
11910
+ alignItems: "center",
11911
+ width: 280,
11912
+ background: OHW_BLUE3,
11913
+ padding: 8,
11914
+ borderRadius: 12,
11915
+ boxShadow: "0 8px 24px rgba(0,0,0,0.25)",
11916
+ pointerEvents: pending ? "none" : "auto",
11917
+ opacity: pending ? 0.6 : 1
11918
+ },
11919
+ children: [
11920
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(VideoUrlInput, { value: videoId, onCommit: onSetVideoId }),
11921
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill3, { label: "Remove video", onClick: onRemove, disabled: !videoId }),
11922
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
11923
+ ]
11924
+ }
11925
+ );
11926
+ }
11927
+ function AiVideoOverlay({
11331
11928
  postToParent: postToParent2,
11332
11929
  aiSectionsRef,
11333
- applyTreeLocalRef
11930
+ applyTreeLocalRef,
11931
+ clearInteractionChromeRef
11334
11932
  }) {
11335
- const [hover, setHover] = (0, import_react10.useState)(null);
11336
- const [active, setActive] = (0, import_react10.useState)(null);
11337
- const [pending, setPending] = (0, import_react10.useState)(false);
11338
- const [error, setError] = (0, import_react10.useState)(null);
11339
- const activeRef = (0, import_react10.useRef)(null);
11933
+ const [hover, setHover] = (0, import_react11.useState)(null);
11934
+ const [active, setActive] = (0, import_react11.useState)(null);
11935
+ const [pending, setPending] = (0, import_react11.useState)(false);
11936
+ const [error, setError] = (0, import_react11.useState)(null);
11937
+ const activeRef = (0, import_react11.useRef)(null);
11340
11938
  activeRef.current = active;
11341
- (0, import_react10.useEffect)(() => {
11939
+ (0, import_react11.useEffect)(() => {
11342
11940
  const onMove = (e) => {
11343
11941
  const t = e.target;
11344
11942
  if (!(t instanceof HTMLElement)) return;
11345
11943
  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]")) {
11346
11944
  return;
11347
11945
  }
11348
- const cardEl = t.closest("[data-ohw-pricing-card]");
11349
- if (!cardEl) {
11946
+ const blockEl = t.closest("[data-ohw-video-block]");
11947
+ if (!blockEl) {
11350
11948
  setHover(null);
11351
11949
  return;
11352
11950
  }
11353
- const sectionEl = cardEl.closest("[data-ohw-section]");
11951
+ const sectionEl = blockEl.closest("[data-ohw-section]");
11354
11952
  const unit = sectionEl ? movableUnit(sectionEl) : null;
11355
11953
  const sectionId = unit ? instanceIdOf(unit) || null : null;
11356
- const index = Number(cardEl.dataset.ohwPricingIndex);
11357
- if (!sectionId || Number.isNaN(index)) {
11954
+ const path = blockEl.dataset.ohwVideoPath;
11955
+ if (!sectionId || !path) {
11358
11956
  setHover(null);
11359
11957
  return;
11360
11958
  }
11361
- setHover({ sectionId, index });
11959
+ setHover({ sectionId, path });
11362
11960
  };
11363
11961
  const onLeave = () => setHover(null);
11364
11962
  document.addEventListener("mousemove", onMove, { passive: true });
@@ -11368,22 +11966,22 @@ function AiPricingCardOverlay({
11368
11966
  document.documentElement.removeEventListener("mouseleave", onLeave);
11369
11967
  };
11370
11968
  }, []);
11371
- (0, import_react10.useEffect)(() => {
11969
+ (0, import_react11.useEffect)(() => {
11372
11970
  const onClick = (e) => {
11373
11971
  const current = activeRef.current;
11374
11972
  if (!current) return;
11375
11973
  const t = e.target;
11376
11974
  if (!(t instanceof HTMLElement)) return;
11377
11975
  if (t.closest("[data-ohw-item-interaction]")) return;
11378
- const cardEl = findPricingCardElement(current.sectionId, current.index);
11379
- if (cardEl && cardEl.contains(t)) return;
11976
+ const blockEl = findVideoBlockElement(current.sectionId, current.path);
11977
+ if (blockEl && blockEl.contains(t)) return;
11380
11978
  setActive(null);
11381
11979
  setError(null);
11382
11980
  };
11383
11981
  document.addEventListener("click", onClick, true);
11384
11982
  return () => document.removeEventListener("click", onClick, true);
11385
11983
  }, []);
11386
- (0, import_react10.useEffect)(() => {
11984
+ (0, import_react11.useEffect)(() => {
11387
11985
  const onBlur = () => {
11388
11986
  if (!activeRef.current) return;
11389
11987
  setActive(null);
@@ -11392,7 +11990,7 @@ function AiPricingCardOverlay({
11392
11990
  window.addEventListener("blur", onBlur);
11393
11991
  return () => window.removeEventListener("blur", onBlur);
11394
11992
  }, []);
11395
- (0, import_react10.useEffect)(() => {
11993
+ (0, import_react11.useEffect)(() => {
11396
11994
  const onKeyDown = (e) => {
11397
11995
  if (e.key !== "Escape") return;
11398
11996
  if (!activeRef.current) return;
@@ -11402,14 +12000,14 @@ function AiPricingCardOverlay({
11402
12000
  document.addEventListener("keydown", onKeyDown);
11403
12001
  return () => document.removeEventListener("keydown", onKeyDown);
11404
12002
  }, []);
11405
- const findEntry = (0, import_react10.useCallback)(
12003
+ const findEntry = (0, import_react11.useCallback)(
11406
12004
  (sectionId) => {
11407
12005
  const state = parseAiSectionsState(aiSectionsRef.current);
11408
12006
  return state.sections.find((s) => s.id === sectionId) ?? null;
11409
12007
  },
11410
12008
  [aiSectionsRef]
11411
12009
  );
11412
- const runMutation = (0, import_react10.useCallback)(
12010
+ const runMutation = (0, import_react11.useCallback)(
11413
12011
  async (sectionId, mutate) => {
11414
12012
  const entry = findEntry(sectionId);
11415
12013
  if (!entry) return false;
@@ -11417,7 +12015,7 @@ function AiPricingCardOverlay({
11417
12015
  if (!nextTree) return false;
11418
12016
  setPending(true);
11419
12017
  setError(null);
11420
- const { ok, reasons } = await requestValidateTree2(postToParent2, nextTree);
12018
+ const { ok, reasons } = await requestValidateTree3(postToParent2, nextTree);
11421
12019
  setPending(false);
11422
12020
  if (!ok) {
11423
12021
  setError(reasons[0] ?? "That change is not allowed.");
@@ -11430,26 +12028,28 @@ function AiPricingCardOverlay({
11430
12028
  tree: nextTree,
11431
12029
  label: entry.label,
11432
12030
  media: entry.media,
11433
- ...entry.brand ? { brand: entry.brand } : {},
11434
- // The user is already looking at the card they just edited — recentering the
11435
- // viewport on every tier add/remove/toggle reads as the section jumping around.
11436
- skipScrollIntoView: true
12031
+ ...entry.brand ? { brand: entry.brand } : {}
11437
12032
  });
11438
12033
  return true;
11439
12034
  },
11440
12035
  [findEntry, postToParent2, applyTreeLocalRef]
11441
12036
  );
11442
12037
  const activeEntry = active ? findEntry(active.sectionId) : null;
11443
- const activeCardRect = useLiveCardRect(active);
11444
- const hoverHandleRect = useLiveCardRect(!active && hover ? hover : null);
11445
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
11446
- hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
12038
+ const hoverHandleRect = useLiveBlockRect(!active && hover ? hover : null);
12039
+ const activeBlockRect = useLiveBlockRect(active);
12040
+ const TOOLBAR_APPROX_H = 90;
12041
+ const toolbarState = activeBlockRect && activeBlockRect.top < TOOLBAR_APPROX_H ? "active-bottom" : "active-top";
12042
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
12043
+ hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
11447
12044
  "button",
11448
12045
  {
11449
12046
  type: "button",
11450
12047
  "data-ohw-toolbar": "",
11451
- onClick: () => setActive(hover),
11452
- "aria-label": "Configure pricing tier",
12048
+ onClick: () => {
12049
+ clearInteractionChromeRef.current();
12050
+ setActive(hover);
12051
+ },
12052
+ "aria-label": "Configure video",
11453
12053
  style: {
11454
12054
  position: "fixed",
11455
12055
  top: hoverHandleRect.top + 8,
@@ -11457,9 +12057,9 @@ function AiPricingCardOverlay({
11457
12057
  width: 28,
11458
12058
  height: 28,
11459
12059
  borderRadius: 8,
11460
- border: `1.5px dashed ${PRIMARY4}`,
12060
+ border: `1.5px dashed ${PRIMARY5}`,
11461
12061
  background: "#ffffff",
11462
- color: PRIMARY4,
12062
+ color: PRIMARY5,
11463
12063
  display: "flex",
11464
12064
  alignItems: "center",
11465
12065
  justifyContent: "center",
@@ -11468,41 +12068,29 @@ function AiPricingCardOverlay({
11468
12068
  fontSize: 14,
11469
12069
  fontWeight: 700
11470
12070
  },
11471
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react9.Star, { size: 14, style: { pointerEvents: "none" } })
12071
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.Star, { size: 14, style: { pointerEvents: "none" } })
11472
12072
  }
11473
12073
  ),
11474
- activeCardRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
12074
+ activeBlockRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
11475
12075
  ItemInteractionLayer,
11476
12076
  {
11477
- rect: activeCardRect,
11478
- state: "active-top",
11479
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
11480
- PricingCardToolbar,
12077
+ rect: activeBlockRect,
12078
+ state: toolbarState,
12079
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12080
+ VideoToolbar,
11481
12081
  {
11482
- entry: activeEntry,
11483
- index: active.index,
12082
+ videoId: videoIdAt(activeEntry.tree, active.path),
11484
12083
  pending,
11485
12084
  error,
11486
- onAddTier: () => runMutation(active.sectionId, addPricingTier),
11487
- onRemoveTier: () => {
11488
- void runMutation(active.sectionId, (tree) => removePricingTier(tree, active.index)).then(
11489
- (applied) => {
11490
- if (applied) setActive(null);
11491
- }
12085
+ onSetVideoId: (videoId) => {
12086
+ void runMutation(
12087
+ active.sectionId,
12088
+ (tree) => videoId ? setVideoId(tree, active.path, videoId) : clearVideo(tree, active.path)
11492
12089
  );
11493
12090
  },
11494
- onToggleFeatured: (enabled) => runMutation(
11495
- active.sectionId,
11496
- (tree) => setPricingCardFeatured(tree, active.index, { enabled })
11497
- ),
11498
- onSetTreatment: (treatment) => runMutation(
11499
- active.sectionId,
11500
- (tree) => setPricingCardFeatured(tree, active.index, { enabled: true, treatment })
11501
- ),
11502
- onAddButton: () => runMutation(active.sectionId, (tree) => addPricingCardButton(tree, active.index, "Learn more")),
11503
- onRemoveButton: () => runMutation(active.sectionId, (tree) => removePricingCardButton(tree, active.index)),
11504
- onAddFeature: () => runMutation(active.sectionId, (tree) => addPricingCardFeature(tree, active.index, "New feature")),
11505
- onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
12091
+ onRemove: () => {
12092
+ void runMutation(active.sectionId, (tree) => clearVideo(tree, active.path));
12093
+ }
11506
12094
  }
11507
12095
  )
11508
12096
  }
@@ -11821,28 +12409,28 @@ function scrollToHashSectionWhenReady(behavior = "smooth") {
11821
12409
  }
11822
12410
 
11823
12411
  // src/ui/link-modal/LinkPopover.tsx
11824
- var import_react14 = require("react");
12412
+ var import_react15 = require("react");
11825
12413
 
11826
12414
  // src/ui/dialog.tsx
11827
12415
  var React9 = __toESM(require("react"), 1);
11828
12416
  var import_radix_ui6 = require("radix-ui");
11829
- var import_lucide_react10 = require("lucide-react");
11830
- var import_jsx_runtime20 = require("react/jsx-runtime");
12417
+ var import_lucide_react11 = require("lucide-react");
12418
+ var import_jsx_runtime21 = require("react/jsx-runtime");
11831
12419
  function Dialog2({
11832
12420
  ...props
11833
12421
  }) {
11834
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui6.Dialog.Root, { "data-slot": "dialog", ...props });
12422
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_radix_ui6.Dialog.Root, { "data-slot": "dialog", ...props });
11835
12423
  }
11836
12424
  function DialogPortal({
11837
12425
  ...props
11838
12426
  }) {
11839
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_radix_ui6.Dialog.Portal, { ...props });
12427
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_radix_ui6.Dialog.Portal, { ...props });
11840
12428
  }
11841
12429
  function DialogOverlay({
11842
12430
  className,
11843
12431
  ...props
11844
12432
  }) {
11845
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12433
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11846
12434
  import_radix_ui6.Dialog.Overlay,
11847
12435
  {
11848
12436
  "data-slot": "dialog-overlay",
@@ -11855,9 +12443,9 @@ function DialogOverlay({
11855
12443
  var DialogContent = React9.forwardRef(
11856
12444
  ({ className, children, showCloseButton = true, container, ...props }, ref) => {
11857
12445
  const positionMode = container ? "absolute" : "fixed";
11858
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DialogPortal, { container: container ?? void 0, children: [
11859
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
11860
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
12446
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogPortal, { container: container ?? void 0, children: [
12447
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
12448
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
11861
12449
  import_radix_ui6.Dialog.Content,
11862
12450
  {
11863
12451
  ref,
@@ -11873,13 +12461,13 @@ var DialogContent = React9.forwardRef(
11873
12461
  ...props,
11874
12462
  children: [
11875
12463
  children,
11876
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12464
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11877
12465
  import_radix_ui6.Dialog.Close,
11878
12466
  {
11879
12467
  type: "button",
11880
12468
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
11881
12469
  "aria-label": "Close",
11882
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.X, { size: 16, "aria-hidden": true })
12470
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react11.X, { size: 16, "aria-hidden": true })
11883
12471
  }
11884
12472
  ) : null
11885
12473
  ]
@@ -11893,13 +12481,13 @@ function DialogHeader({
11893
12481
  className,
11894
12482
  ...props
11895
12483
  }) {
11896
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
12484
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
11897
12485
  }
11898
12486
  function DialogFooter({
11899
12487
  className,
11900
12488
  ...props
11901
12489
  }) {
11902
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12490
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11903
12491
  "div",
11904
12492
  {
11905
12493
  className: cn("flex items-center justify-end gap-2", className),
@@ -11907,7 +12495,7 @@ function DialogFooter({
11907
12495
  }
11908
12496
  );
11909
12497
  }
11910
- var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12498
+ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11911
12499
  import_radix_ui6.Dialog.Title,
11912
12500
  {
11913
12501
  ref,
@@ -11919,7 +12507,7 @@ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
11919
12507
  }
11920
12508
  ));
11921
12509
  DialogTitle.displayName = import_radix_ui6.Dialog.Title.displayName;
11922
- var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12510
+ var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11923
12511
  import_radix_ui6.Dialog.Description,
11924
12512
  {
11925
12513
  ref,
@@ -11931,63 +12519,63 @@ DialogDescription.displayName = import_radix_ui6.Dialog.Description.displayName;
11931
12519
  var DialogClose = import_radix_ui6.Dialog.Close;
11932
12520
 
11933
12521
  // src/ui/link-modal/LinkEditorPanel.tsx
11934
- var import_lucide_react14 = require("lucide-react");
12522
+ var import_lucide_react15 = require("lucide-react");
11935
12523
 
11936
12524
  // src/ui/link-modal/DestinationBreadcrumb.tsx
11937
- var import_lucide_react11 = require("lucide-react");
11938
- var import_jsx_runtime21 = require("react/jsx-runtime");
12525
+ var import_lucide_react12 = require("lucide-react");
12526
+ var import_jsx_runtime22 = require("react/jsx-runtime");
11939
12527
  function DestinationBreadcrumb({
11940
12528
  pageTitle,
11941
12529
  sectionLabel
11942
12530
  }) {
11943
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
11944
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm font-medium! text-foreground m-0", children: "Destination" }),
11945
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-3", children: [
11946
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
11947
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react11.File, { size: 16, className: "shrink-0 text-foreground", "aria-hidden": true }),
11948
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm font-medium leading-none text-foreground!", children: pageTitle })
12531
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
12532
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm font-medium! text-foreground m-0", children: "Destination" }),
12533
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-3", children: [
12534
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
12535
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.File, { size: 16, className: "shrink-0 text-foreground", "aria-hidden": true }),
12536
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium leading-none text-foreground!", children: pageTitle })
11949
12537
  ] }),
11950
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11951
- import_lucide_react11.ArrowRight,
12538
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12539
+ import_lucide_react12.ArrowRight,
11952
12540
  {
11953
12541
  size: 16,
11954
12542
  className: "shrink-0 text-muted-foreground",
11955
12543
  "aria-hidden": true
11956
12544
  }
11957
12545
  ),
11958
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
11959
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11960
- import_lucide_react11.GalleryVertical,
12546
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
12547
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12548
+ import_lucide_react12.GalleryVertical,
11961
12549
  {
11962
12550
  size: 16,
11963
12551
  className: "shrink-0 text-foreground",
11964
12552
  "aria-hidden": true
11965
12553
  }
11966
12554
  ),
11967
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
12555
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
11968
12556
  ] })
11969
12557
  ] })
11970
12558
  ] });
11971
12559
  }
11972
12560
 
11973
12561
  // src/ui/link-modal/SectionTreeItem.tsx
11974
- var import_lucide_react12 = require("lucide-react");
11975
- var import_jsx_runtime22 = require("react/jsx-runtime");
12562
+ var import_lucide_react13 = require("lucide-react");
12563
+ var import_jsx_runtime23 = require("react/jsx-runtime");
11976
12564
  function SectionTreeItem({
11977
12565
  section,
11978
12566
  onSelect,
11979
12567
  selected
11980
12568
  }) {
11981
12569
  const interactive = Boolean(onSelect);
11982
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
11983
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12570
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
12571
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11984
12572
  "div",
11985
12573
  {
11986
12574
  className: "-mr-px h-9 w-2 shrink-0 rounded-bl-sm border-b border-l border-border mb-4",
11987
12575
  "aria-hidden": true
11988
12576
  }
11989
12577
  ),
11990
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
12578
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
11991
12579
  "div",
11992
12580
  {
11993
12581
  role: interactive ? "button" : void 0,
@@ -12005,15 +12593,15 @@ function SectionTreeItem({
12005
12593
  interactive && selected && "border-bridge-primary"
12006
12594
  ),
12007
12595
  children: [
12008
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
12009
- import_lucide_react12.GalleryVertical,
12596
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12597
+ import_lucide_react13.GalleryVertical,
12010
12598
  {
12011
12599
  size: 16,
12012
12600
  className: "shrink-0 text-foreground",
12013
12601
  "aria-hidden": true
12014
12602
  }
12015
12603
  ),
12016
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
12604
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
12017
12605
  ]
12018
12606
  }
12019
12607
  )
@@ -12021,14 +12609,14 @@ function SectionTreeItem({
12021
12609
  }
12022
12610
 
12023
12611
  // src/ui/link-modal/UrlOrPageInput.tsx
12024
- var import_react11 = require("react");
12612
+ var import_react12 = require("react");
12025
12613
 
12026
12614
  // src/ui/input.tsx
12027
12615
  var React10 = __toESM(require("react"), 1);
12028
- var import_jsx_runtime23 = require("react/jsx-runtime");
12616
+ var import_jsx_runtime24 = require("react/jsx-runtime");
12029
12617
  var Input = React10.forwardRef(
12030
12618
  ({ className, type, ...props }, ref) => {
12031
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
12619
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12032
12620
  "input",
12033
12621
  {
12034
12622
  type,
@@ -12047,9 +12635,9 @@ Input.displayName = "Input";
12047
12635
 
12048
12636
  // src/ui/label.tsx
12049
12637
  var import_radix_ui7 = require("radix-ui");
12050
- var import_jsx_runtime24 = require("react/jsx-runtime");
12638
+ var import_jsx_runtime25 = require("react/jsx-runtime");
12051
12639
  function Label({ className, ...props }) {
12052
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12640
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12053
12641
  import_radix_ui7.Label.Root,
12054
12642
  {
12055
12643
  "data-slot": "label",
@@ -12060,12 +12648,12 @@ function Label({ className, ...props }) {
12060
12648
  }
12061
12649
 
12062
12650
  // src/ui/link-modal/UrlOrPageInput.tsx
12063
- var import_lucide_react13 = require("lucide-react");
12064
- var import_jsx_runtime25 = require("react/jsx-runtime");
12651
+ var import_lucide_react14 = require("lucide-react");
12652
+ var import_jsx_runtime26 = require("react/jsx-runtime");
12065
12653
  function FieldChevron({
12066
12654
  onClick
12067
12655
  }) {
12068
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12656
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12069
12657
  "button",
12070
12658
  {
12071
12659
  type: "button",
@@ -12073,7 +12661,7 @@ function FieldChevron({
12073
12661
  onClick,
12074
12662
  "aria-label": "Open page list",
12075
12663
  tabIndex: -1,
12076
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.ChevronDown, { size: 16 })
12664
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.ChevronDown, { size: 16 })
12077
12665
  }
12078
12666
  );
12079
12667
  }
@@ -12089,11 +12677,11 @@ function UrlOrPageInput({
12089
12677
  readOnly = false,
12090
12678
  urlError
12091
12679
  }) {
12092
- const inputId = (0, import_react11.useId)();
12093
- const inputRef = (0, import_react11.useRef)(null);
12094
- const rootRef = (0, import_react11.useRef)(null);
12095
- const [isFocused, setIsFocused] = (0, import_react11.useState)(false);
12096
- (0, import_react11.useEffect)(() => {
12680
+ const inputId = (0, import_react12.useId)();
12681
+ const inputRef = (0, import_react12.useRef)(null);
12682
+ const rootRef = (0, import_react12.useRef)(null);
12683
+ const [isFocused, setIsFocused] = (0, import_react12.useState)(false);
12684
+ (0, import_react12.useEffect)(() => {
12097
12685
  if (!dropdownOpen) return;
12098
12686
  const isOutside = (e) => {
12099
12687
  const root = rootRef.current;
@@ -12134,19 +12722,19 @@ function UrlOrPageInput({
12134
12722
  "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]",
12135
12723
  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"
12136
12724
  );
12137
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
12138
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
12139
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
12140
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
12141
- selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12142
- import_lucide_react13.File,
12725
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
12726
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
12727
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
12728
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
12729
+ selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12730
+ import_lucide_react14.File,
12143
12731
  {
12144
12732
  size: 16,
12145
12733
  className: "shrink-0 text-foreground",
12146
12734
  "aria-hidden": true
12147
12735
  }
12148
12736
  ) }) : null,
12149
- 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)(
12737
+ readOnly ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12150
12738
  Input,
12151
12739
  {
12152
12740
  ref: inputRef,
@@ -12172,7 +12760,7 @@ function UrlOrPageInput({
12172
12760
  )
12173
12761
  }
12174
12762
  ),
12175
- selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12763
+ selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12176
12764
  "button",
12177
12765
  {
12178
12766
  type: "button",
@@ -12180,26 +12768,26 @@ function UrlOrPageInput({
12180
12768
  onMouseDown: clearSelection,
12181
12769
  "aria-label": "Clear selected page",
12182
12770
  tabIndex: -1,
12183
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.X, { size: 16, "aria-hidden": true })
12771
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.X, { size: 16, "aria-hidden": true })
12184
12772
  }
12185
12773
  ) : null,
12186
- !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
12774
+ !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
12187
12775
  ] }),
12188
- dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
12776
+ dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12189
12777
  "div",
12190
12778
  {
12191
12779
  "data-ohw-link-page-dropdown": "",
12192
12780
  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",
12193
12781
  onMouseDown: (e) => e.preventDefault(),
12194
- children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
12782
+ children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
12195
12783
  "button",
12196
12784
  {
12197
12785
  type: "button",
12198
12786
  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",
12199
12787
  onClick: () => onPageSelect(page),
12200
12788
  children: [
12201
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.File, { size: 16, className: "shrink-0", "aria-hidden": true }),
12202
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: page.title })
12789
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.File, { size: 16, className: "shrink-0", "aria-hidden": true }),
12790
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "truncate", children: page.title })
12203
12791
  ]
12204
12792
  },
12205
12793
  page.path
@@ -12207,34 +12795,34 @@ function UrlOrPageInput({
12207
12795
  }
12208
12796
  ) : null
12209
12797
  ] }),
12210
- urlError ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
12798
+ urlError ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
12211
12799
  ] });
12212
12800
  }
12213
12801
 
12214
12802
  // src/ui/link-modal/LinkEditorPanel.tsx
12215
- var import_jsx_runtime26 = require("react/jsx-runtime");
12803
+ var import_jsx_runtime27 = require("react/jsx-runtime");
12216
12804
  function LinkEditorPanel({ state, onClose }) {
12217
12805
  const isCancel = state.secondaryLabel === "Cancel" || state.secondaryLabel === "Back to sections";
12218
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
12219
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12806
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
12807
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12220
12808
  "button",
12221
12809
  {
12222
12810
  type: "button",
12223
12811
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50 h-7",
12224
12812
  "aria-label": "Close",
12225
12813
  onClick: onClose,
12226
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.X, { size: 16, "aria-hidden": true })
12814
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.X, { size: 16, "aria-hidden": true })
12227
12815
  }
12228
12816
  ) }),
12229
- /* @__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 }) }),
12230
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
12231
- state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12817
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
12818
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
12819
+ state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12232
12820
  DestinationBreadcrumb,
12233
12821
  {
12234
12822
  pageTitle: state.selectedPage.title,
12235
12823
  sectionLabel: state.selectedSection.label
12236
12824
  }
12237
- ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12825
+ ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12238
12826
  UrlOrPageInput,
12239
12827
  {
12240
12828
  value: state.searchValue,
@@ -12247,8 +12835,8 @@ function LinkEditorPanel({ state, onClose }) {
12247
12835
  urlError: state.urlError
12248
12836
  }
12249
12837
  ),
12250
- state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
12251
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12838
+ state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
12839
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12252
12840
  Button,
12253
12841
  {
12254
12842
  type: "button",
@@ -12259,15 +12847,15 @@ function LinkEditorPanel({ state, onClose }) {
12259
12847
  children: "Choose a section"
12260
12848
  }
12261
12849
  ),
12262
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
12263
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react14.Info, { size: 16, className: "shrink-0", "aria-hidden": true }),
12264
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Pick a section this link should scroll to." })
12850
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
12851
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Info, { size: 16, className: "shrink-0", "aria-hidden": true }),
12852
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Pick a section this link should scroll to." })
12265
12853
  ] })
12266
12854
  ] }) : null,
12267
- state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
12855
+ state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
12268
12856
  ] }),
12269
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
12270
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12857
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
12858
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12271
12859
  Button,
12272
12860
  {
12273
12861
  type: "button",
@@ -12282,7 +12870,7 @@ function LinkEditorPanel({ state, onClose }) {
12282
12870
  children: state.secondaryLabel
12283
12871
  }
12284
12872
  ),
12285
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
12873
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
12286
12874
  Button,
12287
12875
  {
12288
12876
  type: "button",
@@ -12301,9 +12889,9 @@ function LinkEditorPanel({ state, onClose }) {
12301
12889
  }
12302
12890
 
12303
12891
  // src/ui/link-modal/SectionPickerOverlay.tsx
12304
- var import_react12 = require("react");
12892
+ var import_react13 = require("react");
12305
12893
  var import_react_dom3 = require("react-dom");
12306
- var import_lucide_react15 = require("lucide-react");
12894
+ var import_lucide_react16 = require("lucide-react");
12307
12895
  var import_navigation2 = require("next/navigation");
12308
12896
 
12309
12897
  // src/lib/parent-scroll.ts
@@ -12325,7 +12913,7 @@ function getIframeChromeClip(parentScroll) {
12325
12913
  }
12326
12914
 
12327
12915
  // src/ui/link-modal/SectionPickerOverlay.tsx
12328
- var import_jsx_runtime27 = require("react/jsx-runtime");
12916
+ var import_jsx_runtime28 = require("react/jsx-runtime");
12329
12917
  var DIM_OVERLAY = "rgba(0, 0, 0, 0.45)";
12330
12918
  function rectsEqual(a, b) {
12331
12919
  if (a.size !== b.size) return false;
@@ -12358,12 +12946,12 @@ function hitTestSectionId(x, y, sectionIds, rects) {
12358
12946
  return null;
12359
12947
  }
12360
12948
  function useSectionRects(sectionIdsKey, enabled) {
12361
- const [rects, setRects] = (0, import_react12.useState)(/* @__PURE__ */ new Map());
12362
- const sectionIds = (0, import_react12.useMemo)(
12949
+ const [rects, setRects] = (0, import_react13.useState)(/* @__PURE__ */ new Map());
12950
+ const sectionIds = (0, import_react13.useMemo)(
12363
12951
  () => sectionIdsKey ? sectionIdsKey.split("\0") : [],
12364
12952
  [sectionIdsKey]
12365
12953
  );
12366
- (0, import_react12.useEffect)(() => {
12954
+ (0, import_react13.useEffect)(() => {
12367
12955
  if (!enabled || sectionIds.length === 0) {
12368
12956
  setRects((prev) => prev.size === 0 ? prev : /* @__PURE__ */ new Map());
12369
12957
  return;
@@ -12404,13 +12992,13 @@ function SectionPickerOverlay({
12404
12992
  }) {
12405
12993
  const router = (0, import_navigation2.useRouter)();
12406
12994
  const pathname = (0, import_navigation2.usePathname)();
12407
- const [selectedId, setSelectedId] = (0, import_react12.useState)(null);
12408
- const [hoveredId, setHoveredId] = (0, import_react12.useState)(null);
12409
- const pointerRef = (0, import_react12.useRef)(null);
12410
- const pointerScreenRef = (0, import_react12.useRef)(null);
12411
- const iframeOffsetTopRef = (0, import_react12.useRef)(null);
12412
- const sectionIdsRef = (0, import_react12.useRef)([]);
12413
- const [chromeClip, setChromeClip] = (0, import_react12.useState)(
12995
+ const [selectedId, setSelectedId] = (0, import_react13.useState)(null);
12996
+ const [hoveredId, setHoveredId] = (0, import_react13.useState)(null);
12997
+ const pointerRef = (0, import_react13.useRef)(null);
12998
+ const pointerScreenRef = (0, import_react13.useRef)(null);
12999
+ const iframeOffsetTopRef = (0, import_react13.useRef)(null);
13000
+ const sectionIdsRef = (0, import_react13.useRef)([]);
13001
+ const [chromeClip, setChromeClip] = (0, import_react13.useState)(
12414
13002
  () => ({
12415
13003
  top: 0,
12416
13004
  bottom: typeof window !== "undefined" ? window.innerHeight : 0
@@ -12418,12 +13006,12 @@ function SectionPickerOverlay({
12418
13006
  );
12419
13007
  const normalizedTarget = normalizePath(pagePath);
12420
13008
  const isOnTargetPage = normalizePath(pathname) === normalizedTarget;
12421
- (0, import_react12.useEffect)(() => {
13009
+ (0, import_react13.useEffect)(() => {
12422
13010
  if (isOnTargetPage) return;
12423
13011
  const search = readPreservedSearch();
12424
13012
  router.push(`${normalizedTarget}${search}`);
12425
13013
  }, [isOnTargetPage, normalizedTarget, router]);
12426
- (0, import_react12.useEffect)(() => {
13014
+ (0, import_react13.useEffect)(() => {
12427
13015
  document.documentElement.setAttribute("data-ohw-section-picking", "");
12428
13016
  document.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
12429
13017
  el.removeAttribute("data-ohw-hovered");
@@ -12435,24 +13023,24 @@ function SectionPickerOverlay({
12435
13023
  document.documentElement.removeAttribute("data-ohw-section-picking");
12436
13024
  };
12437
13025
  }, []);
12438
- const liveSections = (0, import_react12.useMemo)(() => {
13026
+ const liveSections = (0, import_react13.useMemo)(() => {
12439
13027
  if (!isOnTargetPage) return sections;
12440
13028
  const live = collectSectionsFromDom();
12441
13029
  if (live.length === 0) return sections;
12442
13030
  const labels = new Map(sections.map((s) => [s.id, s.label]));
12443
13031
  return live.map((s) => ({ id: s.id, label: labels.get(s.id) ?? s.label }));
12444
13032
  }, [isOnTargetPage, sections, pathname]);
12445
- const sectionIdsKey = (0, import_react12.useMemo)(
13033
+ const sectionIdsKey = (0, import_react13.useMemo)(
12446
13034
  () => liveSections.map((s) => s.id).join("\0"),
12447
13035
  [liveSections]
12448
13036
  );
12449
- const sectionIds = (0, import_react12.useMemo)(
13037
+ const sectionIds = (0, import_react13.useMemo)(
12450
13038
  () => liveSections.map((s) => s.id),
12451
13039
  [liveSections]
12452
13040
  );
12453
13041
  sectionIdsRef.current = sectionIds;
12454
13042
  const rects = useSectionRects(sectionIdsKey, isOnTargetPage);
12455
- const applyHoverAt = (0, import_react12.useCallback)(
13043
+ const applyHoverAt = (0, import_react13.useCallback)(
12456
13044
  (x, y, liveRects) => {
12457
13045
  const ids = sectionIdsRef.current;
12458
13046
  const map = liveRects ?? readSectionRects(ids);
@@ -12461,7 +13049,7 @@ function SectionPickerOverlay({
12461
13049
  },
12462
13050
  []
12463
13051
  );
12464
- (0, import_react12.useEffect)(() => {
13052
+ (0, import_react13.useEffect)(() => {
12465
13053
  const applyClip = (iframeOffsetTop, visibleCanvasTop, canvasH, promptBarH = 0) => {
12466
13054
  const next = getIframeVisibleClip({
12467
13055
  iframeOffsetTop,
@@ -12505,12 +13093,12 @@ function SectionPickerOverlay({
12505
13093
  window.removeEventListener("resize", onResize);
12506
13094
  };
12507
13095
  }, [applyHoverAt]);
12508
- (0, import_react12.useEffect)(() => {
13096
+ (0, import_react13.useEffect)(() => {
12509
13097
  const ptr = pointerRef.current;
12510
13098
  if (!ptr) return;
12511
13099
  applyHoverAt(ptr.x, ptr.y, rects);
12512
13100
  }, [rects, applyHoverAt]);
12513
- (0, import_react12.useEffect)(() => {
13101
+ (0, import_react13.useEffect)(() => {
12514
13102
  const rememberPointer = (clientX, clientY) => {
12515
13103
  pointerRef.current = { x: clientX, y: clientY };
12516
13104
  const top = iframeOffsetTopRef.current;
@@ -12534,7 +13122,7 @@ function SectionPickerOverlay({
12534
13122
  window.removeEventListener("message", onPointerSync);
12535
13123
  };
12536
13124
  }, [rects, applyHoverAt]);
12537
- const handleSelect = (0, import_react12.useCallback)(
13125
+ const handleSelect = (0, import_react13.useCallback)(
12538
13126
  (section) => {
12539
13127
  if (selectedId) return;
12540
13128
  setSelectedId(section.id);
@@ -12542,7 +13130,7 @@ function SectionPickerOverlay({
12542
13130
  },
12543
13131
  [selectedId, onSelect]
12544
13132
  );
12545
- (0, import_react12.useEffect)(() => {
13133
+ (0, import_react13.useEffect)(() => {
12546
13134
  const onKeyDown = (e) => {
12547
13135
  if (e.key === "Escape") {
12548
13136
  e.preventDefault();
@@ -12556,7 +13144,7 @@ function SectionPickerOverlay({
12556
13144
  const portalRoot = typeof document !== "undefined" ? document.querySelector("[data-ohw-bridge-root]") ?? document.body : null;
12557
13145
  if (!portalRoot) return null;
12558
13146
  return (0, import_react_dom3.createPortal)(
12559
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
13147
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
12560
13148
  "div",
12561
13149
  {
12562
13150
  "data-ohw-section-picker": "",
@@ -12566,12 +13154,12 @@ function SectionPickerOverlay({
12566
13154
  role: "dialog",
12567
13155
  "aria-label": "Choose a section",
12568
13156
  children: [
12569
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13157
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12570
13158
  "div",
12571
13159
  {
12572
13160
  className: "pointer-events-auto fixed left-5 z-[2]",
12573
13161
  style: { top: chromeClip.top + 20 },
12574
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
13162
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
12575
13163
  Button,
12576
13164
  {
12577
13165
  type: "button",
@@ -12580,14 +13168,14 @@ function SectionPickerOverlay({
12580
13168
  className: "h-8 min-w-0 gap-1 border-border bg-background px-2 py-1.5 shadow-sm hover:bg-muted cursor-pointer",
12581
13169
  onClick: onBack,
12582
13170
  children: [
12583
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.ArrowLeft, { className: "size-4 shrink-0", "aria-hidden": true }),
13171
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react16.ArrowLeft, { className: "size-4 shrink-0", "aria-hidden": true }),
12584
13172
  "Back"
12585
13173
  ]
12586
13174
  }
12587
13175
  )
12588
13176
  }
12589
13177
  ),
12590
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13178
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12591
13179
  "div",
12592
13180
  {
12593
13181
  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",
@@ -12600,7 +13188,7 @@ function SectionPickerOverlay({
12600
13188
  children: "Click on section to select"
12601
13189
  }
12602
13190
  ),
12603
- !isOnTargetPage ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13191
+ !isOnTargetPage ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12604
13192
  "div",
12605
13193
  {
12606
13194
  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",
@@ -12608,14 +13196,14 @@ function SectionPickerOverlay({
12608
13196
  children: "Loading page preview\u2026"
12609
13197
  }
12610
13198
  ) : null,
12611
- 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,
13199
+ isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pointer-events-auto fixed inset-0 z-[1] flex items-center justify-center bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." }) }) : null,
12612
13200
  isOnTargetPage ? liveSections.map((section) => {
12613
13201
  const rect = rects.get(section.id);
12614
13202
  if (!rect || rect.width <= 0 || rect.height <= 0) return null;
12615
13203
  const isSelected = selectedId === section.id;
12616
13204
  const isHovered = hoveredId === section.id;
12617
13205
  const isLit = isSelected || isHovered;
12618
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
13206
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
12619
13207
  "button",
12620
13208
  {
12621
13209
  type: "button",
@@ -12630,7 +13218,7 @@ function SectionPickerOverlay({
12630
13218
  "aria-label": `Select section ${section.label}`,
12631
13219
  onClick: () => handleSelect(section),
12632
13220
  children: [
12633
- isLit ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13221
+ isLit ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12634
13222
  "span",
12635
13223
  {
12636
13224
  className: "pointer-events-none absolute",
@@ -12643,13 +13231,13 @@ function SectionPickerOverlay({
12643
13231
  "aria-hidden": true
12644
13232
  }
12645
13233
  ) : null,
12646
- isSelected ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13234
+ isSelected ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12647
13235
  "span",
12648
13236
  {
12649
13237
  className: "absolute right-3 top-3 flex size-8 items-center justify-center rounded-full text-white",
12650
13238
  style: { backgroundColor: "var(--ohw-primary, #0885fe)" },
12651
13239
  "aria-hidden": true,
12652
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Check, { className: "size-5" })
13240
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react16.Check, { className: "size-5" })
12653
13241
  }
12654
13242
  ) : null
12655
13243
  ]
@@ -12665,7 +13253,7 @@ function SectionPickerOverlay({
12665
13253
  }
12666
13254
 
12667
13255
  // src/ui/link-modal/useLinkModalState.ts
12668
- var import_react13 = require("react");
13256
+ var import_react14 = require("react");
12669
13257
  function useLinkModalState({
12670
13258
  open,
12671
13259
  mode,
@@ -12677,14 +13265,14 @@ function useLinkModalState({
12677
13265
  onClose,
12678
13266
  onSubmit
12679
13267
  }) {
12680
- const availablePages = (0, import_react13.useMemo)(() => pages, [pages]);
12681
- const [searchValue, setSearchValue] = (0, import_react13.useState)("");
12682
- const [selectedPage, setSelectedPage] = (0, import_react13.useState)(null);
12683
- const [selectedSection, setSelectedSection] = (0, import_react13.useState)(null);
12684
- const [step, setStep] = (0, import_react13.useState)("input");
12685
- const [dropdownOpen, setDropdownOpen] = (0, import_react13.useState)(false);
12686
- const [urlError, setUrlError] = (0, import_react13.useState)("");
12687
- const reset = (0, import_react13.useCallback)(() => {
13268
+ const availablePages = (0, import_react14.useMemo)(() => pages, [pages]);
13269
+ const [searchValue, setSearchValue] = (0, import_react14.useState)("");
13270
+ const [selectedPage, setSelectedPage] = (0, import_react14.useState)(null);
13271
+ const [selectedSection, setSelectedSection] = (0, import_react14.useState)(null);
13272
+ const [step, setStep] = (0, import_react14.useState)("input");
13273
+ const [dropdownOpen, setDropdownOpen] = (0, import_react14.useState)(false);
13274
+ const [urlError, setUrlError] = (0, import_react14.useState)("");
13275
+ const reset = (0, import_react14.useCallback)(() => {
12688
13276
  setSearchValue("");
12689
13277
  setSelectedPage(null);
12690
13278
  setSelectedSection(null);
@@ -12692,7 +13280,7 @@ function useLinkModalState({
12692
13280
  setDropdownOpen(false);
12693
13281
  setUrlError("");
12694
13282
  }, []);
12695
- (0, import_react13.useEffect)(() => {
13283
+ (0, import_react14.useEffect)(() => {
12696
13284
  if (!open) return;
12697
13285
  if (mode === "edit" && initialTarget) {
12698
13286
  const { pageRoute } = parseTarget(initialTarget);
@@ -12708,11 +13296,11 @@ function useLinkModalState({
12708
13296
  setDropdownOpen(false);
12709
13297
  setUrlError("");
12710
13298
  }, [open, mode, initialTarget, reset]);
12711
- const filteredPages = (0, import_react13.useMemo)(() => {
13299
+ const filteredPages = (0, import_react14.useMemo)(() => {
12712
13300
  if (!searchValue.trim()) return availablePages;
12713
13301
  return availablePages.filter((p) => p.title.toLowerCase().startsWith(searchValue.toLowerCase()));
12714
13302
  }, [availablePages, searchValue]);
12715
- const activeSections = (0, import_react13.useMemo)(() => {
13303
+ const activeSections = (0, import_react14.useMemo)(() => {
12716
13304
  if (!selectedPage) return [];
12717
13305
  return getSectionsForPath(sectionsByPath, selectedPage.path);
12718
13306
  }, [selectedPage, sectionsByPath]);
@@ -12761,7 +13349,7 @@ function useLinkModalState({
12761
13349
  reset();
12762
13350
  onClose();
12763
13351
  };
12764
- const isValid = (0, import_react13.useMemo)(() => {
13352
+ const isValid = (0, import_react14.useMemo)(() => {
12765
13353
  if (urlError) return false;
12766
13354
  if (showBreadcrumb) return true;
12767
13355
  if (selectedPage) return true;
@@ -12829,7 +13417,7 @@ function useLinkModalState({
12829
13417
  }
12830
13418
 
12831
13419
  // src/ui/link-modal/LinkPopover.tsx
12832
- var import_jsx_runtime28 = require("react/jsx-runtime");
13420
+ var import_jsx_runtime29 = require("react/jsx-runtime");
12833
13421
  function postToParent(data) {
12834
13422
  window.parent?.postMessage(data, "*");
12835
13423
  }
@@ -12858,7 +13446,7 @@ function LinkPopover({
12858
13446
  onSubmit
12859
13447
  });
12860
13448
  const sectionPickerActive = state.showSectionPicker && Boolean(state.selectedPage);
12861
- (0, import_react14.useEffect)(() => {
13449
+ (0, import_react15.useEffect)(() => {
12862
13450
  if (!open) return;
12863
13451
  if (sectionPickerActive) {
12864
13452
  postToParent({ type: "ui:unlock" });
@@ -12925,15 +13513,15 @@ function LinkPopover({
12925
13513
  );
12926
13514
  };
12927
13515
  }, [open, sectionPickerActive]);
12928
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
12929
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
13516
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
13517
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12930
13518
  Dialog2,
12931
13519
  {
12932
13520
  open: open && !sectionPickerActive,
12933
13521
  onOpenChange: (next) => {
12934
13522
  if (!next) onClose?.();
12935
13523
  },
12936
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
13524
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12937
13525
  DialogContent,
12938
13526
  {
12939
13527
  ref: panelRef,
@@ -12943,12 +13531,12 @@ function LinkPopover({
12943
13531
  "data-ohw-bridge": "",
12944
13532
  showCloseButton: false,
12945
13533
  className: "gap-0 p-0 w-full max-w-[448px] pointer-events-auto z-[2147483646] overflow-visible",
12946
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LinkEditorPanel, { state, onClose })
13534
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LinkEditorPanel, { state, onClose })
12947
13535
  }
12948
13536
  )
12949
13537
  }
12950
13538
  ),
12951
- sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
13539
+ sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12952
13540
  SectionPickerOverlay,
12953
13541
  {
12954
13542
  pagePath: state.selectedPage.path,
@@ -16137,9 +16725,9 @@ function addFooterColumnWithPersist({
16137
16725
  }
16138
16726
 
16139
16727
  // src/ui/FloatingPanel.tsx
16140
- var import_react15 = require("react");
16141
- var import_lucide_react16 = require("lucide-react");
16142
- var import_jsx_runtime29 = require("react/jsx-runtime");
16728
+ var import_react16 = require("react");
16729
+ var import_lucide_react17 = require("lucide-react");
16730
+ var import_jsx_runtime30 = require("react/jsx-runtime");
16143
16731
  var PANEL_WIDTH = 256;
16144
16732
  var EDGE_MARGIN = 16;
16145
16733
  var HEADER_MIN = 56;
@@ -16199,10 +16787,10 @@ function FloatingPanel({
16199
16787
  className,
16200
16788
  bodyClassName
16201
16789
  }) {
16202
- const panelRef = (0, import_react15.useRef)(null);
16203
- const [measured, setMeasured] = (0, import_react15.useState)({ w: PANEL_WIDTH, h: 280 });
16204
- const dragRef = (0, import_react15.useRef)(null);
16205
- const homeRef = (0, import_react15.useRef)(null);
16790
+ const panelRef = (0, import_react16.useRef)(null);
16791
+ const [measured, setMeasured] = (0, import_react16.useState)({ w: PANEL_WIDTH, h: 280 });
16792
+ const dragRef = (0, import_react16.useRef)(null);
16793
+ const homeRef = (0, import_react16.useRef)(null);
16206
16794
  if (!open) {
16207
16795
  homeRef.current = null;
16208
16796
  } else if (position) {
@@ -16210,17 +16798,17 @@ function FloatingPanel({
16210
16798
  } else if (homeRef.current == null) {
16211
16799
  homeRef.current = defaultFloatingPanelPosition(parentScroll);
16212
16800
  }
16213
- const [liveScroll, setLiveScroll] = (0, import_react15.useState)(parentScroll);
16801
+ const [liveScroll, setLiveScroll] = (0, import_react16.useState)(parentScroll);
16214
16802
  const home = position ?? homeRef.current ?? defaultFloatingPanelPosition(parentScroll);
16215
16803
  const { y: fittedY, maxHeight } = fitPanelInClip(home.y, liveScroll, measured.h);
16216
16804
  const clamped = {
16217
16805
  x: clampX(home.x, measured.w),
16218
16806
  y: fittedY
16219
16807
  };
16220
- (0, import_react15.useEffect)(() => {
16808
+ (0, import_react16.useEffect)(() => {
16221
16809
  setLiveScroll(parentScroll);
16222
16810
  }, [parentScroll]);
16223
- (0, import_react15.useEffect)(() => {
16811
+ (0, import_react16.useEffect)(() => {
16224
16812
  if (!open) return;
16225
16813
  const onParentScroll = (e) => {
16226
16814
  if (e.data?.type !== "ow:parent-scroll") return;
@@ -16230,8 +16818,8 @@ function FloatingPanel({
16230
16818
  window.addEventListener("message", onParentScroll);
16231
16819
  return () => window.removeEventListener("message", onParentScroll);
16232
16820
  }, [open]);
16233
- const positionRef = (0, import_react15.useRef)(position);
16234
- (0, import_react15.useLayoutEffect)(() => {
16821
+ const positionRef = (0, import_react16.useRef)(position);
16822
+ (0, import_react16.useLayoutEffect)(() => {
16235
16823
  if (!open) {
16236
16824
  positionRef.current = position;
16237
16825
  return;
@@ -16241,7 +16829,7 @@ function FloatingPanel({
16241
16829
  }
16242
16830
  positionRef.current = position;
16243
16831
  }, [open, position, liveScroll, parentScroll]);
16244
- (0, import_react15.useLayoutEffect)(() => {
16832
+ (0, import_react16.useLayoutEffect)(() => {
16245
16833
  if (!open || !panelRef.current) return;
16246
16834
  const el = panelRef.current;
16247
16835
  const header = el.querySelector("[data-ohw-floating-panel-header]");
@@ -16250,7 +16838,7 @@ function FloatingPanel({
16250
16838
  const next = { w: el.offsetWidth || PANEL_WIDTH, h: contentH };
16251
16839
  setMeasured((prev) => prev.w === next.w && prev.h === next.h ? prev : next);
16252
16840
  }, [open, children, title, context]);
16253
- const onHeaderPointerDown = (0, import_react15.useCallback)(
16841
+ const onHeaderPointerDown = (0, import_react16.useCallback)(
16254
16842
  (e) => {
16255
16843
  if (e.button !== 0) return;
16256
16844
  if (e.target.closest("[data-ohw-floating-panel-close]")) return;
@@ -16269,7 +16857,7 @@ function FloatingPanel({
16269
16857
  },
16270
16858
  [clamped.x, clamped.y]
16271
16859
  );
16272
- const onHeaderPointerMove = (0, import_react15.useCallback)(
16860
+ const onHeaderPointerMove = (0, import_react16.useCallback)(
16273
16861
  (e) => {
16274
16862
  const drag = dragRef.current;
16275
16863
  if (!drag || drag.pointerId !== e.pointerId) return;
@@ -16295,7 +16883,7 @@ function FloatingPanel({
16295
16883
  },
16296
16884
  [measured.w, onPositionChange, liveScroll]
16297
16885
  );
16298
- const endDrag = (0, import_react15.useCallback)((e) => {
16886
+ const endDrag = (0, import_react16.useCallback)((e) => {
16299
16887
  const drag = dragRef.current;
16300
16888
  if (!drag || drag.pointerId !== e.pointerId) return;
16301
16889
  dragRef.current = null;
@@ -16305,13 +16893,13 @@ function FloatingPanel({
16305
16893
  } catch {
16306
16894
  }
16307
16895
  }, []);
16308
- (0, import_react15.useEffect)(() => {
16896
+ (0, import_react16.useEffect)(() => {
16309
16897
  if (open) return;
16310
16898
  document.documentElement.removeAttribute("data-ohw-panel-dragging");
16311
16899
  }, [open]);
16312
- (0, import_react15.useEffect)(() => () => document.documentElement.removeAttribute("data-ohw-panel-dragging"), []);
16900
+ (0, import_react16.useEffect)(() => () => document.documentElement.removeAttribute("data-ohw-panel-dragging"), []);
16313
16901
  if (!open) return null;
16314
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
16902
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16315
16903
  "div",
16316
16904
  {
16317
16905
  ref: panelRef,
@@ -16328,7 +16916,7 @@ function FloatingPanel({
16328
16916
  onPointerDown: (e) => e.stopPropagation(),
16329
16917
  onClick: (e) => e.stopPropagation(),
16330
16918
  children: [
16331
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
16919
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
16332
16920
  "div",
16333
16921
  {
16334
16922
  "data-ohw-floating-panel-header": "",
@@ -16338,14 +16926,14 @@ function FloatingPanel({
16338
16926
  onPointerUp: endDrag,
16339
16927
  onPointerCancel: endDrag,
16340
16928
  children: [
16341
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
16342
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
16343
- icon ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "shrink-0 text-foreground", children: icon }) : null,
16344
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "min-w-0 flex-1 text-lg font-semibold leading-7 text-foreground", children: title })
16929
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
16930
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2", children: [
16931
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 text-foreground", children: icon }) : null,
16932
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "min-w-0 flex-1 text-lg font-semibold leading-7 text-foreground", children: title })
16345
16933
  ] }),
16346
- context ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "w-full text-sm leading-5 text-muted-foreground", children: context }) : null
16934
+ context ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "w-full text-sm leading-5 text-muted-foreground", children: context }) : null
16347
16935
  ] }),
16348
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16936
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16349
16937
  "button",
16350
16938
  {
16351
16939
  type: "button",
@@ -16357,13 +16945,13 @@ function FloatingPanel({
16357
16945
  onClose();
16358
16946
  },
16359
16947
  onPointerDown: (e) => e.stopPropagation(),
16360
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.X, { size: 16, "aria-hidden": true })
16948
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react17.X, { size: 16, "aria-hidden": true })
16361
16949
  }
16362
16950
  )
16363
16951
  ]
16364
16952
  }
16365
16953
  ),
16366
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
16954
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16367
16955
  "div",
16368
16956
  {
16369
16957
  "data-ohw-floating-panel-body": "",
@@ -16381,15 +16969,15 @@ function FloatingPanel({
16381
16969
  }
16382
16970
 
16383
16971
  // src/ui/socials-display-panel.tsx
16384
- var import_jsx_runtime30 = require("react/jsx-runtime");
16972
+ var import_jsx_runtime31 = require("react/jsx-runtime");
16385
16973
  function DisplaySwitch({
16386
16974
  label,
16387
16975
  checked,
16388
16976
  disabled,
16389
16977
  onChange
16390
16978
  }) {
16391
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
16392
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16979
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
16980
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16393
16981
  "span",
16394
16982
  {
16395
16983
  className: cn(
@@ -16399,7 +16987,7 @@ function DisplaySwitch({
16399
16987
  children: label
16400
16988
  }
16401
16989
  ),
16402
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
16990
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16403
16991
  "button",
16404
16992
  {
16405
16993
  type: "button",
@@ -16413,7 +17001,7 @@ function DisplaySwitch({
16413
17001
  checked ? "bg-bridge-primary" : "bg-primary-50",
16414
17002
  disabled ? "cursor-default opacity-50" : "cursor-pointer"
16415
17003
  ),
16416
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
17004
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16417
17005
  "span",
16418
17006
  {
16419
17007
  className: cn(
@@ -16427,8 +17015,8 @@ function DisplaySwitch({
16427
17015
  ] });
16428
17016
  }
16429
17017
  function SocialsDisplayPanel({ display, onChange, className }) {
16430
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
16431
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
17018
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
17019
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16432
17020
  DisplaySwitch,
16433
17021
  {
16434
17022
  label: "Text",
@@ -16437,7 +17025,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
16437
17025
  onChange: (text) => onChange({ ...display, text })
16438
17026
  }
16439
17027
  ),
16440
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
17028
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16441
17029
  DisplaySwitch,
16442
17030
  {
16443
17031
  label: "Icon",
@@ -16450,7 +17038,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
16450
17038
  }
16451
17039
 
16452
17040
  // src/ui/button-style-panel.tsx
16453
- var import_lucide_react17 = require("lucide-react");
17041
+ var import_lucide_react18 = require("lucide-react");
16454
17042
 
16455
17043
  // src/lib/button-styles.ts
16456
17044
  var BUTTON_VARIANTS_KEY = "__ohw_button_variants";
@@ -17153,7 +17741,7 @@ function withAssignment(content, id, assignment) {
17153
17741
  }
17154
17742
 
17155
17743
  // src/ui/button-style-panel.tsx
17156
- var import_jsx_runtime31 = require("react/jsx-runtime");
17744
+ var import_jsx_runtime32 = require("react/jsx-runtime");
17157
17745
  var SIZE_LABEL = { s: "S", m: "M", l: "L" };
17158
17746
  function ButtonStylePanel({
17159
17747
  variants,
@@ -17167,15 +17755,15 @@ function ButtonStylePanel({
17167
17755
  }) {
17168
17756
  const preview = scaleGeometry(sizes.m, 0.75);
17169
17757
  const label = previewLabel.trim() || "Book Now";
17170
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
17171
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
17172
- /* @__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" }),
17173
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex w-full flex-col gap-2.5", children: BUTTON_VARIANT_IDS.map((id) => {
17758
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
17759
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
17760
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500 font-sans", children: "Variants" }),
17761
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex w-full flex-col gap-2.5", children: BUTTON_VARIANT_IDS.map((id) => {
17174
17762
  const chrome = variants[id];
17175
17763
  const selected = id === variant;
17176
17764
  const hasBorder = parseFloat(chrome.borderWidth) > 0;
17177
17765
  const cardSlot = previewSlotForChrome(chrome, slotBackground);
17178
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
17766
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
17179
17767
  "button",
17180
17768
  {
17181
17769
  type: "button",
@@ -17191,12 +17779,12 @@ function ButtonStylePanel({
17191
17779
  selected ? "border-2 border-primary" : "border border-border"
17192
17780
  ),
17193
17781
  children: [
17194
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
17782
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17195
17783
  "div",
17196
17784
  {
17197
17785
  className: "flex w-full items-center justify-center py-4",
17198
17786
  style: { background: cardSlot },
17199
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
17787
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17200
17788
  "span",
17201
17789
  {
17202
17790
  className: "inline-flex items-center justify-center whitespace-nowrap font-semibold uppercase leading-none",
@@ -17218,12 +17806,12 @@ function ButtonStylePanel({
17218
17806
  )
17219
17807
  }
17220
17808
  ),
17221
- selected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
17809
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17222
17810
  "span",
17223
17811
  {
17224
17812
  className: "absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground",
17225
17813
  "aria-hidden": true,
17226
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.Check, { className: "size-3", strokeWidth: 3 })
17814
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react18.Check, { className: "size-3", strokeWidth: 3 })
17227
17815
  }
17228
17816
  ) : null
17229
17817
  ]
@@ -17232,9 +17820,9 @@ function ButtonStylePanel({
17232
17820
  );
17233
17821
  }) })
17234
17822
  ] }),
17235
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
17236
- /* @__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" }),
17237
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
17823
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
17824
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500 font-sans", children: "Size" }),
17825
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17238
17826
  "div",
17239
17827
  {
17240
17828
  className: "flex w-full items-start rounded-lg bg-stone-100 p-1",
@@ -17242,7 +17830,7 @@ function ButtonStylePanel({
17242
17830
  "aria-label": "Size",
17243
17831
  children: BUTTON_SIZE_IDS.map((id) => {
17244
17832
  const selected = id === size;
17245
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
17833
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
17246
17834
  "button",
17247
17835
  {
17248
17836
  type: "button",
@@ -18146,7 +18734,7 @@ function hitTestNavDropSlot(clientX, clientY, draggedHrefKey, draggedEl) {
18146
18734
  }
18147
18735
 
18148
18736
  // src/useNavItemDrag.ts
18149
- var import_react16 = require("react");
18737
+ var import_react17 = require("react");
18150
18738
  function useNavItemDrag({
18151
18739
  isEditMode,
18152
18740
  editContentRef,
@@ -18170,11 +18758,11 @@ function useNavItemDrag({
18170
18758
  getNavigationItemAnchor: getNavigationItemAnchor2,
18171
18759
  isDragHandleDisabled: isDragHandleDisabled2
18172
18760
  }) {
18173
- const navDragRef = (0, import_react16.useRef)(null);
18174
- const [navDropSlots, setNavDropSlots] = (0, import_react16.useState)([]);
18175
- const [activeNavDropIndex, setActiveNavDropIndex] = (0, import_react16.useState)(null);
18176
- const navPointerDragRef = (0, import_react16.useRef)(null);
18177
- const clearNavDragVisuals = (0, import_react16.useCallback)(() => {
18761
+ const navDragRef = (0, import_react17.useRef)(null);
18762
+ const [navDropSlots, setNavDropSlots] = (0, import_react17.useState)([]);
18763
+ const [activeNavDropIndex, setActiveNavDropIndex] = (0, import_react17.useState)(null);
18764
+ const navPointerDragRef = (0, import_react17.useRef)(null);
18765
+ const clearNavDragVisuals = (0, import_react17.useCallback)(() => {
18178
18766
  const session = navDragRef.current;
18179
18767
  const nestedHrefKey = session?.draggedEl?.closest("[data-ohw-nav-children]") != null ? session.hrefKey : null;
18180
18768
  navDragRef.current = null;
@@ -18207,7 +18795,7 @@ function useNavItemDrag({
18207
18795
  document.documentElement.removeAttribute("data-ohw-nav-dragging-root");
18208
18796
  unlockItemDragInteraction();
18209
18797
  }, [setDraggedItemRect, setIsItemDragging, setSiblingHintRects]);
18210
- const refreshNavDragVisuals = (0, import_react16.useCallback)(
18798
+ const refreshNavDragVisuals = (0, import_react17.useCallback)(
18211
18799
  (session, activeSlot, clientX, clientY) => {
18212
18800
  setDraggedItemRect(session.draggedEl.getBoundingClientRect());
18213
18801
  if (typeof clientX === "number" && typeof clientY === "number") {
@@ -18225,13 +18813,13 @@ function useNavItemDrag({
18225
18813
  },
18226
18814
  [setDraggedItemRect, setSiblingHintRects]
18227
18815
  );
18228
- const refreshNavDragVisualsRef = (0, import_react16.useRef)(refreshNavDragVisuals);
18816
+ const refreshNavDragVisualsRef = (0, import_react17.useRef)(refreshNavDragVisuals);
18229
18817
  refreshNavDragVisualsRef.current = refreshNavDragVisuals;
18230
- const commitNavDragRef = (0, import_react16.useRef)(() => {
18818
+ const commitNavDragRef = (0, import_react17.useRef)(() => {
18231
18819
  });
18232
- const beginNavDragRef = (0, import_react16.useRef)(() => {
18820
+ const beginNavDragRef = (0, import_react17.useRef)(() => {
18233
18821
  });
18234
- const beginNavDrag = (0, import_react16.useCallback)(
18822
+ const beginNavDrag = (0, import_react17.useCallback)(
18235
18823
  (session) => {
18236
18824
  const rect = session.draggedEl.getBoundingClientRect();
18237
18825
  session.lastClientX = session.lastClientX || rect.left + rect.width / 2;
@@ -18270,7 +18858,7 @@ function useNavItemDrag({
18270
18858
  ]
18271
18859
  );
18272
18860
  beginNavDragRef.current = beginNavDrag;
18273
- const commitNavDrag = (0, import_react16.useCallback)(
18861
+ const commitNavDrag = (0, import_react17.useCallback)(
18274
18862
  (clientX, clientY) => {
18275
18863
  const session = navDragRef.current;
18276
18864
  if (!session) {
@@ -18349,7 +18937,7 @@ function useNavItemDrag({
18349
18937
  [clearNavDragVisuals, deselectRef, editContentRef, postToParentRef, selectRef]
18350
18938
  );
18351
18939
  commitNavDragRef.current = commitNavDrag;
18352
- const startNavLinkDrag = (0, import_react16.useCallback)(
18940
+ const startNavLinkDrag = (0, import_react17.useCallback)(
18353
18941
  (anchor, clientX, clientY, wasSelected) => {
18354
18942
  if (footerDragRef.current) return false;
18355
18943
  const hrefKey = anchor.getAttribute("data-ohw-href-key");
@@ -18367,7 +18955,7 @@ function useNavItemDrag({
18367
18955
  },
18368
18956
  [beginNavDrag, footerDragRef, isDragHandleDisabled2, isCtaButton]
18369
18957
  );
18370
- const onNavDragOver = (0, import_react16.useCallback)(
18958
+ const onNavDragOver = (0, import_react17.useCallback)(
18371
18959
  (e) => {
18372
18960
  const session = navDragRef.current;
18373
18961
  if (!session) return false;
@@ -18379,7 +18967,7 @@ function useNavItemDrag({
18379
18967
  },
18380
18968
  []
18381
18969
  );
18382
- (0, import_react16.useEffect)(() => {
18970
+ (0, import_react17.useEffect)(() => {
18383
18971
  if (!isEditMode) return;
18384
18972
  const THRESHOLD = 10;
18385
18973
  const resolveWasSelected = (el) => {
@@ -18506,7 +19094,7 @@ function useNavItemDrag({
18506
19094
  setLinkPopover,
18507
19095
  suppressNextClickRef
18508
19096
  ]);
18509
- const armNavPressFromChrome = (0, import_react16.useCallback)(
19097
+ const armNavPressFromChrome = (0, import_react17.useCallback)(
18510
19098
  (selected, clientX, clientY, pointerId) => {
18511
19099
  const hrefKey = selected.getAttribute("data-ohw-href-key");
18512
19100
  if (!hrefKey || !isNavbarHrefKey(hrefKey)) return false;
@@ -18538,7 +19126,7 @@ function useNavItemDrag({
18538
19126
  }
18539
19127
 
18540
19128
  // src/useSectionDrag.ts
18541
- var import_react17 = require("react");
19129
+ var import_react18 = require("react");
18542
19130
 
18543
19131
  // src/lib/section-dnd.ts
18544
19132
  function isFooterSection(el) {
@@ -18631,21 +19219,21 @@ function useSectionDrag({
18631
19219
  suppressNextClickRef,
18632
19220
  suppressClickUntilRef
18633
19221
  }) {
18634
- const sectionDragRef = (0, import_react17.useRef)(null);
18635
- const [sectionDropSlots, setSectionDropSlots] = (0, import_react17.useState)([]);
18636
- const [activeSectionDropIndex, setActiveSectionDropIndex] = (0, import_react17.useState)(null);
18637
- const [isSectionDragging, setIsSectionDragging] = (0, import_react17.useState)(false);
18638
- const sectionPointerDragRef = (0, import_react17.useRef)(null);
18639
- const autoScrollRafRef = (0, import_react17.useRef)(null);
18640
- const autoScrollDeltaRef = (0, import_react17.useRef)(0);
18641
- const stopAutoScroll = (0, import_react17.useCallback)(() => {
19222
+ const sectionDragRef = (0, import_react18.useRef)(null);
19223
+ const [sectionDropSlots, setSectionDropSlots] = (0, import_react18.useState)([]);
19224
+ const [activeSectionDropIndex, setActiveSectionDropIndex] = (0, import_react18.useState)(null);
19225
+ const [isSectionDragging, setIsSectionDragging] = (0, import_react18.useState)(false);
19226
+ const sectionPointerDragRef = (0, import_react18.useRef)(null);
19227
+ const autoScrollRafRef = (0, import_react18.useRef)(null);
19228
+ const autoScrollDeltaRef = (0, import_react18.useRef)(0);
19229
+ const stopAutoScroll = (0, import_react18.useCallback)(() => {
18642
19230
  if (autoScrollRafRef.current != null) {
18643
19231
  cancelAnimationFrame(autoScrollRafRef.current);
18644
19232
  autoScrollRafRef.current = null;
18645
19233
  }
18646
19234
  autoScrollDeltaRef.current = 0;
18647
19235
  }, []);
18648
- const tickAutoScroll = (0, import_react17.useCallback)(() => {
19236
+ const tickAutoScroll = (0, import_react18.useCallback)(() => {
18649
19237
  if (!sectionDragRef.current) {
18650
19238
  stopAutoScroll();
18651
19239
  return;
@@ -18655,7 +19243,7 @@ function useSectionDrag({
18655
19243
  }
18656
19244
  autoScrollRafRef.current = requestAnimationFrame(tickAutoScroll);
18657
19245
  }, [postToParentRef, stopAutoScroll]);
18658
- const updateAutoScroll = (0, import_react17.useCallback)(
19246
+ const updateAutoScroll = (0, import_react18.useCallback)(
18659
19247
  (clientY) => {
18660
19248
  const clip = getIframeChromeClip(parentScrollRef.current);
18661
19249
  let delta = 0;
@@ -18677,7 +19265,7 @@ function useSectionDrag({
18677
19265
  },
18678
19266
  [parentScrollRef, stopAutoScroll, tickAutoScroll]
18679
19267
  );
18680
- const clearSectionDragVisuals = (0, import_react17.useCallback)(() => {
19268
+ const clearSectionDragVisuals = (0, import_react18.useCallback)(() => {
18681
19269
  sectionDragRef.current?.draggedEl.removeAttribute("data-ohw-section-dragging");
18682
19270
  sectionDragRef.current = null;
18683
19271
  setSectionDropSlots([]);
@@ -18687,7 +19275,7 @@ function useSectionDrag({
18687
19275
  document.documentElement.removeAttribute("data-ohw-section-dragging-root");
18688
19276
  unlockItemDragInteraction();
18689
19277
  }, [stopAutoScroll]);
18690
- const refreshSectionDragVisuals = (0, import_react17.useCallback)(
19278
+ const refreshSectionDragVisuals = (0, import_react18.useCallback)(
18691
19279
  (session, clientX, clientY) => {
18692
19280
  session.lastClientX = clientX;
18693
19281
  session.lastClientY = clientY;
@@ -18701,7 +19289,7 @@ function useSectionDrag({
18701
19289
  },
18702
19290
  [updateAutoScroll]
18703
19291
  );
18704
- const beginSectionDrag = (0, import_react17.useCallback)(
19292
+ const beginSectionDrag = (0, import_react18.useCallback)(
18705
19293
  (session) => {
18706
19294
  sectionDragRef.current = session;
18707
19295
  setIsSectionDragging(true);
@@ -18712,7 +19300,7 @@ function useSectionDrag({
18712
19300
  },
18713
19301
  [refreshSectionDragVisuals]
18714
19302
  );
18715
- const commitSectionDrag = (0, import_react17.useCallback)(() => {
19303
+ const commitSectionDrag = (0, import_react18.useCallback)(() => {
18716
19304
  const session = sectionDragRef.current;
18717
19305
  if (!session) {
18718
19306
  clearSectionDragVisuals();
@@ -18741,7 +19329,7 @@ function useSectionDrag({
18741
19329
  });
18742
19330
  });
18743
19331
  }, [clearSectionDragVisuals, editContentRef, postToParentRef]);
18744
- const startSectionPressDrag = (0, import_react17.useCallback)(
19332
+ const startSectionPressDrag = (0, import_react18.useCallback)(
18745
19333
  (el, clientX, clientY, pointerId) => {
18746
19334
  if (navDragRef.current || footerDragRef.current || sectionDragRef.current) return false;
18747
19335
  const instanceId = instanceIdOf(el);
@@ -18758,7 +19346,7 @@ function useSectionDrag({
18758
19346
  },
18759
19347
  [footerDragRef, navDragRef]
18760
19348
  );
18761
- (0, import_react17.useEffect)(() => {
19349
+ (0, import_react18.useEffect)(() => {
18762
19350
  if (!isEditMode) return;
18763
19351
  const onPointerDown = (e) => {
18764
19352
  if (e.button !== 0) return;
@@ -18863,8 +19451,8 @@ function useSectionDrag({
18863
19451
  }
18864
19452
 
18865
19453
  // src/ui/footer-container-chrome.tsx
18866
- var import_lucide_react18 = require("lucide-react");
18867
- var import_jsx_runtime32 = require("react/jsx-runtime");
19454
+ var import_lucide_react19 = require("lucide-react");
19455
+ var import_jsx_runtime33 = require("react/jsx-runtime");
18868
19456
  function FooterContainerChrome({
18869
19457
  rect,
18870
19458
  onAdd,
@@ -18872,7 +19460,7 @@ function FooterContainerChrome({
18872
19460
  }) {
18873
19461
  const chromeGap = 6;
18874
19462
  const buttonMargin = 7;
18875
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19463
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18876
19464
  "div",
18877
19465
  {
18878
19466
  "data-ohw-footer-container-chrome": "",
@@ -18884,8 +19472,8 @@ function FooterContainerChrome({
18884
19472
  width: rect.width + chromeGap * 2,
18885
19473
  height: rect.height + chromeGap * 2
18886
19474
  },
18887
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Tooltip, { children: [
18888
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
19475
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Tooltip, { children: [
19476
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
18889
19477
  "button",
18890
19478
  {
18891
19479
  type: "button",
@@ -18904,17 +19492,17 @@ function FooterContainerChrome({
18904
19492
  if (addDisabled) return;
18905
19493
  onAdd();
18906
19494
  },
18907
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react18.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
19495
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react19.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
18908
19496
  }
18909
19497
  ) }),
18910
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
19498
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
18911
19499
  ] })
18912
19500
  }
18913
19501
  ) });
18914
19502
  }
18915
19503
 
18916
19504
  // src/lib/carousel.ts
18917
- var import_react18 = require("react");
19505
+ var import_react19 = require("react");
18918
19506
  var CAROUSEL_ATTR = "data-ohw-carousel";
18919
19507
  var CAROUSEL_VALUE_ATTR = "data-ohw-carousel-value";
18920
19508
  var CAROUSEL_SLIDE_ATTR = "data-ohw-carousel-slide";
@@ -18976,8 +19564,8 @@ function applyCarouselNode(key, val) {
18976
19564
  return true;
18977
19565
  }
18978
19566
  function useOhwCarousel(key, initial) {
18979
- const [images, setImages] = (0, import_react18.useState)(initial);
18980
- (0, import_react18.useEffect)(() => {
19567
+ const [images, setImages] = (0, import_react19.useState)(initial);
19568
+ (0, import_react19.useEffect)(() => {
18981
19569
  const el = document.querySelector(
18982
19570
  `[${CAROUSEL_ATTR}][data-ohw-key="${CSS.escape(key)}"]`
18983
19571
  );
@@ -19396,14 +19984,14 @@ function deleteSelectedNavFooterItem(deps) {
19396
19984
  }
19397
19985
 
19398
19986
  // src/ui/navbar-container-chrome.tsx
19399
- var import_lucide_react19 = require("lucide-react");
19400
- var import_jsx_runtime33 = require("react/jsx-runtime");
19987
+ var import_lucide_react20 = require("lucide-react");
19988
+ var import_jsx_runtime34 = require("react/jsx-runtime");
19401
19989
  function NavbarContainerChrome({
19402
19990
  rect,
19403
19991
  onAdd
19404
19992
  }) {
19405
19993
  const chromeGap = 6;
19406
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
19994
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19407
19995
  "div",
19408
19996
  {
19409
19997
  "data-ohw-navbar-container-chrome": "",
@@ -19415,7 +20003,7 @@ function NavbarContainerChrome({
19415
20003
  width: rect.width + chromeGap * 2,
19416
20004
  height: rect.height + chromeGap * 2
19417
20005
  },
19418
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20006
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
19419
20007
  "button",
19420
20008
  {
19421
20009
  type: "button",
@@ -19432,7 +20020,7 @@ function NavbarContainerChrome({
19432
20020
  e.stopPropagation();
19433
20021
  onAdd();
19434
20022
  },
19435
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react19.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
20023
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react20.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
19436
20024
  }
19437
20025
  )
19438
20026
  }
@@ -19441,7 +20029,7 @@ function NavbarContainerChrome({
19441
20029
 
19442
20030
  // src/ui/drop-indicator.tsx
19443
20031
  var React11 = __toESM(require("react"), 1);
19444
- var import_jsx_runtime34 = require("react/jsx-runtime");
20032
+ var import_jsx_runtime35 = require("react/jsx-runtime");
19445
20033
  var dropIndicatorVariants = cva(
19446
20034
  "ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
19447
20035
  {
@@ -19465,7 +20053,7 @@ var dropIndicatorVariants = cva(
19465
20053
  );
19466
20054
  var DropIndicator = React11.forwardRef(
19467
20055
  ({ className, direction, state, ...props }, ref) => {
19468
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20056
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
19469
20057
  "div",
19470
20058
  {
19471
20059
  ref,
@@ -19482,7 +20070,7 @@ var DropIndicator = React11.forwardRef(
19482
20070
  DropIndicator.displayName = "DropIndicator";
19483
20071
 
19484
20072
  // src/ui/badge.tsx
19485
- var import_jsx_runtime35 = require("react/jsx-runtime");
20073
+ var import_jsx_runtime36 = require("react/jsx-runtime");
19486
20074
  var badgeVariants = cva(
19487
20075
  "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",
19488
20076
  {
@@ -19500,13 +20088,13 @@ var badgeVariants = cva(
19500
20088
  }
19501
20089
  );
19502
20090
  function Badge({ className, variant, ...props }) {
19503
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
20091
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
19504
20092
  }
19505
20093
 
19506
20094
  // src/OhhwellsBridge.tsx
19507
- var import_lucide_react20 = require("lucide-react");
19508
- var import_jsx_runtime36 = require("react/jsx-runtime");
19509
- var PRIMARY5 = "#0885FE";
20095
+ var import_lucide_react21 = require("lucide-react");
20096
+ var import_jsx_runtime37 = require("react/jsx-runtime");
20097
+ var PRIMARY6 = "#0885FE";
19510
20098
  var IMAGE_FADE_MS = 300;
19511
20099
  var MEDIA_SETTLE_TIMEOUT_MS = 2500;
19512
20100
  function runOpacityFade(el, onDone) {
@@ -19627,7 +20215,7 @@ function duplicateSchedulingWidget(instanceId, scheduleId) {
19627
20215
  schedulingRoots.set(container, root);
19628
20216
  (0, import_react_dom4.flushSync)(() => {
19629
20217
  root.render(
19630
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
20218
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
19631
20219
  SchedulingWidget,
19632
20220
  {
19633
20221
  notifyOnConnect: false,
@@ -19755,7 +20343,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
19755
20343
  schedulingRoots.set(container, root);
19756
20344
  (0, import_react_dom4.flushSync)(() => {
19757
20345
  root.render(
19758
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
20346
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
19759
20347
  SchedulingWidget,
19760
20348
  {
19761
20349
  notifyOnConnect,
@@ -20491,7 +21079,7 @@ var TOOLBAR_STROKE_GAP2 = 4;
20491
21079
  var TOOLBAR_OFFSET_FROM_ELEMENT = SELECTION_CHROME_GAP2 + TOOLBAR_STROKE_GAP2;
20492
21080
  var HOVER_STROKE_WIDTH = 1.5;
20493
21081
  var TEXT_HOVER_SIDE_PAD = 4;
20494
- var CHROME_PRIMARY = `var(--ohw-primary, ${PRIMARY5})`;
21082
+ var CHROME_PRIMARY = `var(--ohw-primary, ${PRIMARY6})`;
20495
21083
  var TOOLBAR_GROUPS = [
20496
21084
  [
20497
21085
  { cmd: "bold", title: "Bold" },
@@ -20517,7 +21105,7 @@ function EditGlowChrome({
20517
21105
  hideHandle = false
20518
21106
  }) {
20519
21107
  const GAP = SELECTION_CHROME_GAP2;
20520
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
21108
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20521
21109
  "div",
20522
21110
  {
20523
21111
  ref: elRef,
@@ -20532,7 +21120,7 @@ function EditGlowChrome({
20532
21120
  zIndex: 2147483646
20533
21121
  },
20534
21122
  children: [
20535
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21123
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20536
21124
  "div",
20537
21125
  {
20538
21126
  style: {
@@ -20546,7 +21134,7 @@ function EditGlowChrome({
20546
21134
  }
20547
21135
  }
20548
21136
  ),
20549
- reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21137
+ reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20550
21138
  "div",
20551
21139
  {
20552
21140
  "data-ohw-drag-handle-container": "",
@@ -20558,7 +21146,7 @@ function EditGlowChrome({
20558
21146
  transform: "translate(calc(-100% - 7px), -50%)",
20559
21147
  pointerEvents: dragDisabled ? "none" : "auto"
20560
21148
  },
20561
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21149
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20562
21150
  DragHandle,
20563
21151
  {
20564
21152
  "aria-label": `Reorder ${reorderHrefKey}`,
@@ -20735,9 +21323,9 @@ function FloatingToolbar({
20735
21323
  showEditLink,
20736
21324
  onEditLink
20737
21325
  }) {
20738
- const localRef = import_react19.default.useRef(null);
20739
- const [measuredW, setMeasuredW] = import_react19.default.useState(330);
20740
- const setRefs = import_react19.default.useCallback(
21326
+ const localRef = import_react20.default.useRef(null);
21327
+ const [measuredW, setMeasuredW] = import_react20.default.useState(330);
21328
+ const setRefs = import_react20.default.useCallback(
20741
21329
  (node) => {
20742
21330
  localRef.current = node;
20743
21331
  if (typeof elRef === "function") elRef(node);
@@ -20749,7 +21337,7 @@ function FloatingToolbar({
20749
21337
  },
20750
21338
  [elRef]
20751
21339
  );
20752
- import_react19.default.useLayoutEffect(() => {
21340
+ import_react20.default.useLayoutEffect(() => {
20753
21341
  const node = localRef.current;
20754
21342
  if (!node) return;
20755
21343
  const update = () => {
@@ -20762,7 +21350,7 @@ function FloatingToolbar({
20762
21350
  return () => ro.disconnect();
20763
21351
  }, [showEditLink, activeCommands]);
20764
21352
  const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
20765
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21353
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20766
21354
  "div",
20767
21355
  {
20768
21356
  ref: setRefs,
@@ -20774,12 +21362,12 @@ function FloatingToolbar({
20774
21362
  zIndex: 2147483647,
20775
21363
  pointerEvents: "auto"
20776
21364
  },
20777
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(CustomToolbar, { children: [
20778
- TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react19.default.Fragment, { children: [
20779
- gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomToolbarDivider, {}),
21365
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CustomToolbar, { children: [
21366
+ TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react20.default.Fragment, { children: [
21367
+ gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CustomToolbarDivider, {}),
20780
21368
  btns.map((btn) => {
20781
21369
  const isActive = activeCommands.has(btn.cmd);
20782
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21370
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20783
21371
  CustomToolbarButton,
20784
21372
  {
20785
21373
  title: btn.title,
@@ -20788,7 +21376,7 @@ function FloatingToolbar({
20788
21376
  e.preventDefault();
20789
21377
  onCommand(btn.cmd);
20790
21378
  },
20791
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21379
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20792
21380
  "svg",
20793
21381
  {
20794
21382
  width: "16",
@@ -20809,7 +21397,7 @@ function FloatingToolbar({
20809
21397
  );
20810
21398
  })
20811
21399
  ] }, gi)),
20812
- showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21400
+ showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20813
21401
  CustomToolbarButton,
20814
21402
  {
20815
21403
  type: "button",
@@ -20823,7 +21411,7 @@ function FloatingToolbar({
20823
21411
  e.preventDefault();
20824
21412
  e.stopPropagation();
20825
21413
  },
20826
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Link, { className: "size-4 shrink-0", "aria-hidden": true })
21414
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react21.Link, { className: "size-4 shrink-0", "aria-hidden": true })
20827
21415
  }
20828
21416
  ) : null
20829
21417
  ] })
@@ -20840,7 +21428,7 @@ function StateToggle({
20840
21428
  states,
20841
21429
  onStateChange
20842
21430
  }) {
20843
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21431
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20844
21432
  ToggleGroup,
20845
21433
  {
20846
21434
  "data-ohw-state-toggle": "",
@@ -20854,7 +21442,7 @@ function StateToggle({
20854
21442
  left: rect.right - 8,
20855
21443
  transform: "translateX(-100%)"
20856
21444
  },
20857
- children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
21445
+ children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
20858
21446
  }
20859
21447
  );
20860
21448
  }
@@ -20871,9 +21459,9 @@ var OHW_LOADER_STYLE = {
20871
21459
  justifyContent: "center"
20872
21460
  };
20873
21461
  function OhwLoaderSpinner() {
20874
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
20875
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
20876
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21462
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
21463
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
21464
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20877
21465
  "circle",
20878
21466
  {
20879
21467
  cx: "14",
@@ -20883,7 +21471,7 @@ function OhwLoaderSpinner() {
20883
21471
  strokeWidth: "3",
20884
21472
  strokeDasharray: "17 52",
20885
21473
  strokeLinecap: "round",
20886
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21474
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20887
21475
  "animateTransform",
20888
21476
  {
20889
21477
  attributeName: "transform",
@@ -20899,7 +21487,7 @@ function OhwLoaderSpinner() {
20899
21487
  ] });
20900
21488
  }
20901
21489
  function OhwBrandMark() {
20902
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
21490
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20903
21491
  "svg",
20904
21492
  {
20905
21493
  width: "16",
@@ -20910,7 +21498,7 @@ function OhwBrandMark() {
20910
21498
  style: { display: "block", flexShrink: 0 },
20911
21499
  xmlns: "http://www.w3.org/2000/svg",
20912
21500
  children: [
20913
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
21501
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
20914
21502
  "mask",
20915
21503
  {
20916
21504
  id: "ohw-badge-mark",
@@ -20920,15 +21508,15 @@ function OhwBrandMark() {
20920
21508
  y: "0",
20921
21509
  width: "48",
20922
21510
  height: "48",
20923
- 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" })
21511
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.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" })
20924
21512
  }
20925
21513
  ),
20926
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
20927
- /* @__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" }),
20928
- /* @__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" }),
20929
- /* @__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" }),
20930
- /* @__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" }),
20931
- /* @__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" })
21514
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
21515
+ /* @__PURE__ */ (0, import_jsx_runtime37.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" }),
21516
+ /* @__PURE__ */ (0, import_jsx_runtime37.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" }),
21517
+ /* @__PURE__ */ (0, import_jsx_runtime37.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" }),
21518
+ /* @__PURE__ */ (0, import_jsx_runtime37.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" }),
21519
+ /* @__PURE__ */ (0, import_jsx_runtime37.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" })
20932
21520
  ] })
20933
21521
  ]
20934
21522
  }
@@ -20965,7 +21553,7 @@ var OHW_BADGE_LABEL_STYLE = {
20965
21553
  whiteSpace: "nowrap"
20966
21554
  };
20967
21555
  function MadeWithOhhWells() {
20968
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
21556
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
20969
21557
  "a",
20970
21558
  {
20971
21559
  href: "https://ohhwells.com",
@@ -20975,8 +21563,8 @@ function MadeWithOhhWells() {
20975
21563
  "data-ohw-badge": "",
20976
21564
  style: OHW_BADGE_STYLE,
20977
21565
  children: [
20978
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OhwBrandMark, {}),
20979
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: OHW_BADGE_LABEL_STYLE, children: "Made with OhhWells" })
21566
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(OhwBrandMark, {}),
21567
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { style: OHW_BADGE_LABEL_STYLE, children: "Made with OhhWells" })
20980
21568
  ]
20981
21569
  }
20982
21570
  );
@@ -21022,8 +21610,8 @@ function OhhwellsBridge() {
21022
21610
  const router = (0, import_navigation3.useRouter)();
21023
21611
  const searchParams = (0, import_navigation3.useSearchParams)();
21024
21612
  const isEditMode = isEditSessionActive();
21025
- const [bridgeRoot, setBridgeRoot] = (0, import_react19.useState)(null);
21026
- (0, import_react19.useEffect)(() => {
21613
+ const [bridgeRoot, setBridgeRoot] = (0, import_react20.useState)(null);
21614
+ (0, import_react20.useEffect)(() => {
21027
21615
  const figtreeFontId = "ohw-figtree-font";
21028
21616
  if (!document.getElementById(figtreeFontId)) {
21029
21617
  const preconnect1 = Object.assign(document.createElement("link"), { rel: "preconnect", href: "https://fonts.googleapis.com" });
@@ -21049,8 +21637,8 @@ function OhhwellsBridge() {
21049
21637
  };
21050
21638
  }, []);
21051
21639
  const subdomainFromQuery = searchParams.get("subdomain");
21052
- const [subdomain, setSubdomain] = (0, import_react19.useState)(() => resolveSubdomain(subdomainFromQuery));
21053
- (0, import_react19.useLayoutEffect)(() => {
21640
+ const [subdomain, setSubdomain] = (0, import_react20.useState)(() => resolveSubdomain(subdomainFromQuery));
21641
+ (0, import_react20.useLayoutEffect)(() => {
21054
21642
  const next = resolveSubdomain(subdomainFromQuery);
21055
21643
  if (next !== subdomain) setSubdomain(next);
21056
21644
  if (next) return;
@@ -21062,7 +21650,7 @@ function OhhwellsBridge() {
21062
21650
  }, 0);
21063
21651
  return () => window.clearTimeout(t);
21064
21652
  }, [subdomainFromQuery, subdomain]);
21065
- (0, import_react19.useEffect)(() => {
21653
+ (0, import_react20.useEffect)(() => {
21066
21654
  if (!subdomainFromQuery || typeof window === "undefined") return;
21067
21655
  const url = new URL(window.location.href);
21068
21656
  if (!url.searchParams.has("subdomain")) return;
@@ -21071,45 +21659,45 @@ function OhhwellsBridge() {
21071
21659
  }, [subdomainFromQuery]);
21072
21660
  useLinkHrefGuardian(pathname, subdomain, isEditMode);
21073
21661
  useSavedLinkNavigation(isEditMode);
21074
- const postToParent2 = (0, import_react19.useCallback)((data) => {
21662
+ const postToParent2 = (0, import_react20.useCallback)((data) => {
21075
21663
  if (typeof window !== "undefined" && window.parent !== window) {
21076
21664
  window.parent.postMessage(data, "*");
21077
21665
  }
21078
21666
  }, []);
21079
- const [fetchState, setFetchState] = (0, import_react19.useState)("idle");
21080
- const [showBranding, setShowBranding] = (0, import_react19.useState)(false);
21081
- const autoSaveTimers = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
21082
- const activeElRef = (0, import_react19.useRef)(null);
21083
- const pointerHeldRef = (0, import_react19.useRef)(false);
21084
- const selectedElRef = (0, import_react19.useRef)(null);
21085
- const selectedHrefKeyRef = (0, import_react19.useRef)(null);
21086
- const selectedFooterColAttrRef = (0, import_react19.useRef)(null);
21087
- const originalContentRef = (0, import_react19.useRef)(null);
21088
- const activeStateElRef = (0, import_react19.useRef)(null);
21089
- const parentScrollRef = (0, import_react19.useRef)(null);
21090
- const visibleViewportRef = (0, import_react19.useRef)(null);
21091
- const [dialogPortalContainer, setDialogPortalContainer] = (0, import_react19.useState)(null);
21092
- const attachVisibleViewport = (0, import_react19.useCallback)((node) => {
21667
+ const [fetchState, setFetchState] = (0, import_react20.useState)("idle");
21668
+ const [showBranding, setShowBranding] = (0, import_react20.useState)(false);
21669
+ const autoSaveTimers = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
21670
+ const activeElRef = (0, import_react20.useRef)(null);
21671
+ const pointerHeldRef = (0, import_react20.useRef)(false);
21672
+ const selectedElRef = (0, import_react20.useRef)(null);
21673
+ const selectedHrefKeyRef = (0, import_react20.useRef)(null);
21674
+ const selectedFooterColAttrRef = (0, import_react20.useRef)(null);
21675
+ const originalContentRef = (0, import_react20.useRef)(null);
21676
+ const activeStateElRef = (0, import_react20.useRef)(null);
21677
+ const parentScrollRef = (0, import_react20.useRef)(null);
21678
+ const visibleViewportRef = (0, import_react20.useRef)(null);
21679
+ const [dialogPortalContainer, setDialogPortalContainer] = (0, import_react20.useState)(null);
21680
+ const attachVisibleViewport = (0, import_react20.useCallback)((node) => {
21093
21681
  visibleViewportRef.current = node;
21094
21682
  setDialogPortalContainer(node);
21095
21683
  if (node) applyVisibleViewport(node, parentScrollRef.current);
21096
21684
  }, []);
21097
- const toolbarElRef = (0, import_react19.useRef)(null);
21098
- const glowElRef = (0, import_react19.useRef)(null);
21099
- const hoveredImageRef = (0, import_react19.useRef)(null);
21100
- const hoveredImageHasTextOverlapRef = (0, import_react19.useRef)(false);
21101
- const dragOverElRef = (0, import_react19.useRef)(null);
21102
- const [mediaHover, setMediaHover] = (0, import_react19.useState)(null);
21103
- const [selectedAiSectionId, setSelectedAiSectionId] = (0, import_react19.useState)(null);
21104
- const selectedAiSectionIdRef = (0, import_react19.useRef)(null);
21105
- const handleAiSectionSelectionChange = (0, import_react19.useCallback)((id) => {
21685
+ const toolbarElRef = (0, import_react20.useRef)(null);
21686
+ const glowElRef = (0, import_react20.useRef)(null);
21687
+ const hoveredImageRef = (0, import_react20.useRef)(null);
21688
+ const hoveredImageHasTextOverlapRef = (0, import_react20.useRef)(false);
21689
+ const dragOverElRef = (0, import_react20.useRef)(null);
21690
+ const [mediaHover, setMediaHover] = (0, import_react20.useState)(null);
21691
+ const [selectedAiSectionId, setSelectedAiSectionId] = (0, import_react20.useState)(null);
21692
+ const selectedAiSectionIdRef = (0, import_react20.useRef)(null);
21693
+ const handleAiSectionSelectionChange = (0, import_react20.useCallback)((id) => {
21106
21694
  selectedAiSectionIdRef.current = id;
21107
21695
  setSelectedAiSectionId(id);
21108
21696
  }, []);
21109
- const [selectedMedia, setSelectedMedia] = (0, import_react19.useState)(null);
21110
- const selectedMediaElRef = (0, import_react19.useRef)(null);
21111
- const mediaKeyDropTokenRef = (0, import_react19.useRef)(0);
21112
- const clearMediaSelection = (0, import_react19.useCallback)(() => {
21697
+ const [selectedMedia, setSelectedMedia] = (0, import_react20.useState)(null);
21698
+ const selectedMediaElRef = (0, import_react20.useRef)(null);
21699
+ const mediaKeyDropTokenRef = (0, import_react20.useRef)(0);
21700
+ const clearMediaSelection = (0, import_react20.useCallback)(() => {
21113
21701
  const prev = selectedMediaElRef.current;
21114
21702
  selectedMediaElRef.current = null;
21115
21703
  setSelectedMedia(null);
@@ -21134,9 +21722,9 @@ function OhhwellsBridge() {
21134
21722
  window.postMessage({ type: "ow:media-key-drop", token }, "*");
21135
21723
  }
21136
21724
  }, []);
21137
- const clearMediaSelectionRef = (0, import_react19.useRef)(clearMediaSelection);
21725
+ const clearMediaSelectionRef = (0, import_react20.useRef)(clearMediaSelection);
21138
21726
  clearMediaSelectionRef.current = clearMediaSelection;
21139
- const selectMediaElement = (0, import_react19.useCallback)((el) => {
21727
+ const selectMediaElement = (0, import_react20.useCallback)((el) => {
21140
21728
  const r2 = el.getBoundingClientRect();
21141
21729
  const video = el.dataset.ohwEditable === "video" ? el.querySelector("video") : null;
21142
21730
  selectedMediaElRef.current = el;
@@ -21160,9 +21748,9 @@ function OhhwellsBridge() {
21160
21748
  keyLabel: el.dataset.ohwEditable === "video" ? "Video" : el.dataset.ohwEditable === "bg-image" ? "Background" : "Image"
21161
21749
  });
21162
21750
  }, []);
21163
- const selectMediaElementRef = (0, import_react19.useRef)(selectMediaElement);
21751
+ const selectMediaElementRef = (0, import_react20.useRef)(selectMediaElement);
21164
21752
  selectMediaElementRef.current = selectMediaElement;
21165
- (0, import_react19.useEffect)(() => {
21753
+ (0, import_react20.useEffect)(() => {
21166
21754
  if (!selectedMedia) return;
21167
21755
  const update = () => {
21168
21756
  const el = selectedMediaElRef.current;
@@ -21182,54 +21770,54 @@ function OhhwellsBridge() {
21182
21770
  window.removeEventListener("resize", update);
21183
21771
  };
21184
21772
  }, [selectedMedia !== null]);
21185
- const [carouselHover, setCarouselHover] = (0, import_react19.useState)(null);
21186
- const [uploadingRects, setUploadingRects] = (0, import_react19.useState)({});
21187
- const hoveredGapRef = (0, import_react19.useRef)(null);
21188
- const imageUnhoverTimerRef = (0, import_react19.useRef)(null);
21189
- const imageShowTimerRef = (0, import_react19.useRef)(null);
21190
- const editStylesRef = (0, import_react19.useRef)(null);
21191
- const activateRef = (0, import_react19.useRef)(() => {
21773
+ const [carouselHover, setCarouselHover] = (0, import_react20.useState)(null);
21774
+ const [uploadingRects, setUploadingRects] = (0, import_react20.useState)({});
21775
+ const hoveredGapRef = (0, import_react20.useRef)(null);
21776
+ const imageUnhoverTimerRef = (0, import_react20.useRef)(null);
21777
+ const imageShowTimerRef = (0, import_react20.useRef)(null);
21778
+ const editStylesRef = (0, import_react20.useRef)(null);
21779
+ const activateRef = (0, import_react20.useRef)(() => {
21192
21780
  });
21193
- const deactivateRef = (0, import_react19.useRef)(() => {
21781
+ const deactivateRef = (0, import_react20.useRef)(() => {
21194
21782
  });
21195
- const selectRef = (0, import_react19.useRef)(() => {
21783
+ const selectRef = (0, import_react20.useRef)(() => {
21196
21784
  });
21197
- const selectFrameRef = (0, import_react19.useRef)(() => {
21785
+ const selectFrameRef = (0, import_react20.useRef)(() => {
21198
21786
  });
21199
- const selectLogoRef = (0, import_react19.useRef)(() => {
21787
+ const selectLogoRef = (0, import_react20.useRef)(() => {
21200
21788
  });
21201
- const openLogoSizePanelRef = (0, import_react19.useRef)(() => {
21789
+ const openLogoSizePanelRef = (0, import_react20.useRef)(() => {
21202
21790
  });
21203
- const deselectRef = (0, import_react19.useRef)(() => {
21791
+ const deselectRef = (0, import_react20.useRef)(() => {
21204
21792
  });
21205
- const closeFloatingPanelOnlyRef = (0, import_react19.useRef)(() => {
21793
+ const closeFloatingPanelOnlyRef = (0, import_react20.useRef)(() => {
21206
21794
  });
21207
- const reselectNavigationItemRef = (0, import_react19.useRef)(() => {
21795
+ const reselectNavigationItemRef = (0, import_react20.useRef)(() => {
21208
21796
  });
21209
- const commitNavigationTextEditRef = (0, import_react19.useRef)(() => {
21797
+ const commitNavigationTextEditRef = (0, import_react20.useRef)(() => {
21210
21798
  });
21211
- const handleDeleteSelectedRef = (0, import_react19.useRef)(() => false);
21212
- const runPendingDeleteUndoRef = (0, import_react19.useRef)(() => false);
21213
- const isFooterFrameSelectionRef = (0, import_react19.useRef)(false);
21214
- const refreshActiveCommandsRef = (0, import_react19.useRef)(() => {
21799
+ const handleDeleteSelectedRef = (0, import_react20.useRef)(() => false);
21800
+ const runPendingDeleteUndoRef = (0, import_react20.useRef)(() => false);
21801
+ const isFooterFrameSelectionRef = (0, import_react20.useRef)(false);
21802
+ const refreshActiveCommandsRef = (0, import_react20.useRef)(() => {
21215
21803
  });
21216
- const postToParentRef = (0, import_react19.useRef)(postToParent2);
21804
+ const postToParentRef = (0, import_react20.useRef)(postToParent2);
21217
21805
  postToParentRef.current = postToParent2;
21218
- const aiSectionApiRef = (0, import_react19.useRef)(null);
21219
- const sectionsLoadedRef = (0, import_react19.useRef)(false);
21220
- const pendingScheduleConfigRequests = (0, import_react19.useRef)([]);
21221
- const [toolbarRect, setToolbarRect] = (0, import_react19.useState)(null);
21222
- const [formPickRect, setFormPickRect] = (0, import_react19.useState)(null);
21223
- const formPickElRef = (0, import_react19.useRef)(null);
21224
- const [formViewState, setFormViewStateUi] = (0, import_react19.useState)("default");
21225
- const [formPickCount, setFormPickCount] = (0, import_react19.useState)(null);
21226
- const [formHoverRect, setFormHoverRect] = (0, import_react19.useState)(null);
21227
- const formHoverElRef = (0, import_react19.useRef)(null);
21228
- const [fieldPickRect, setFieldPickRect] = (0, import_react19.useState)(null);
21229
- const fieldPickElRef = (0, import_react19.useRef)(null);
21230
- const [fieldPickState, setFieldPickState] = (0, import_react19.useState)(null);
21231
- const [fieldTypePickerOpen, setFieldTypePickerOpen] = (0, import_react19.useState)(false);
21232
- const clearFormPick = (0, import_react19.useCallback)(() => {
21806
+ const aiSectionApiRef = (0, import_react20.useRef)(null);
21807
+ const sectionsLoadedRef = (0, import_react20.useRef)(false);
21808
+ const pendingScheduleConfigRequests = (0, import_react20.useRef)([]);
21809
+ const [toolbarRect, setToolbarRect] = (0, import_react20.useState)(null);
21810
+ const [formPickRect, setFormPickRect] = (0, import_react20.useState)(null);
21811
+ const formPickElRef = (0, import_react20.useRef)(null);
21812
+ const [formViewState, setFormViewStateUi] = (0, import_react20.useState)("default");
21813
+ const [formPickCount, setFormPickCount] = (0, import_react20.useState)(null);
21814
+ const [formHoverRect, setFormHoverRect] = (0, import_react20.useState)(null);
21815
+ const formHoverElRef = (0, import_react20.useRef)(null);
21816
+ const [fieldPickRect, setFieldPickRect] = (0, import_react20.useState)(null);
21817
+ const fieldPickElRef = (0, import_react20.useRef)(null);
21818
+ const [fieldPickState, setFieldPickState] = (0, import_react20.useState)(null);
21819
+ const [fieldTypePickerOpen, setFieldTypePickerOpen] = (0, import_react20.useState)(false);
21820
+ const clearFormPick = (0, import_react20.useCallback)(() => {
21233
21821
  const form = formPickElRef.current;
21234
21822
  const editing = fieldPickElRef.current;
21235
21823
  if (commitPlaceholderEdit(editing) && editing) {
@@ -21249,7 +21837,7 @@ function OhhwellsBridge() {
21249
21837
  formPickElRef.current = null;
21250
21838
  setFormPickRect(null);
21251
21839
  }, []);
21252
- const clearFieldPick = (0, import_react19.useCallback)(() => {
21840
+ const clearFieldPick = (0, import_react20.useCallback)(() => {
21253
21841
  const wrapper = fieldPickElRef.current;
21254
21842
  if (commitPlaceholderEdit(wrapper) && wrapper) {
21255
21843
  const form = wrapper.closest('[data-ohw-editable="form"]');
@@ -21259,9 +21847,9 @@ function OhhwellsBridge() {
21259
21847
  setFieldPickRect(null);
21260
21848
  setFieldPickState(null);
21261
21849
  }, []);
21262
- const persistFieldsRef = (0, import_react19.useRef)(() => {
21850
+ const persistFieldsRef = (0, import_react20.useRef)(() => {
21263
21851
  });
21264
- const persistFields = (0, import_react19.useCallback)(
21852
+ const persistFields = (0, import_react20.useCallback)(
21265
21853
  (form) => {
21266
21854
  const key = formKeyOf(form);
21267
21855
  if (!key) return;
@@ -21272,7 +21860,7 @@ function OhhwellsBridge() {
21272
21860
  []
21273
21861
  );
21274
21862
  persistFieldsRef.current = persistFields;
21275
- const selectField = (0, import_react19.useCallback)((wrapper) => {
21863
+ const selectField = (0, import_react20.useCallback)((wrapper) => {
21276
21864
  if (fieldPickElRef.current && fieldPickElRef.current !== wrapper) {
21277
21865
  commitPlaceholderEdit(fieldPickElRef.current);
21278
21866
  }
@@ -21285,7 +21873,7 @@ function OhhwellsBridge() {
21285
21873
  setFieldPickState({ type: fieldTypeOf(wrapper), required: isFieldRequired(wrapper) });
21286
21874
  setFieldTypePickerOpen(false);
21287
21875
  }, []);
21288
- const withSelectedField = (0, import_react19.useCallback)(
21876
+ const withSelectedField = (0, import_react20.useCallback)(
21289
21877
  (run) => {
21290
21878
  const wrapper = fieldPickElRef.current;
21291
21879
  const form = formPickElRef.current;
@@ -21298,28 +21886,28 @@ function OhhwellsBridge() {
21298
21886
  },
21299
21887
  [persistFields]
21300
21888
  );
21301
- const handleFieldTypeChange = (0, import_react19.useCallback)(
21889
+ const handleFieldTypeChange = (0, import_react20.useCallback)(
21302
21890
  (type) => withSelectedField((_form, wrapper) => {
21303
21891
  applyFieldType(wrapper, type);
21304
21892
  selectField(wrapper);
21305
21893
  }),
21306
21894
  [selectField, withSelectedField]
21307
21895
  );
21308
- const handleFieldRequiredToggle = (0, import_react19.useCallback)(
21896
+ const handleFieldRequiredToggle = (0, import_react20.useCallback)(
21309
21897
  () => withSelectedField((_form, wrapper) => {
21310
21898
  setFieldRequired(wrapper, !isFieldRequired(wrapper));
21311
21899
  selectField(wrapper);
21312
21900
  }),
21313
21901
  [selectField, withSelectedField]
21314
21902
  );
21315
- const handleFieldDuplicate = (0, import_react19.useCallback)(
21903
+ const handleFieldDuplicate = (0, import_react20.useCallback)(
21316
21904
  () => withSelectedField((form, wrapper) => {
21317
21905
  const copy = duplicateField(form, wrapper);
21318
21906
  selectField(copy);
21319
21907
  }),
21320
21908
  [selectField, withSelectedField]
21321
21909
  );
21322
- const handleFieldDelete = (0, import_react19.useCallback)(
21910
+ const handleFieldDelete = (0, import_react20.useCallback)(
21323
21911
  () => withSelectedField((_form, wrapper) => {
21324
21912
  removeField(wrapper);
21325
21913
  clearFieldPick();
@@ -21327,7 +21915,7 @@ function OhhwellsBridge() {
21327
21915
  }),
21328
21916
  [clearFieldPick, withSelectedField]
21329
21917
  );
21330
- const handleAddField = (0, import_react19.useCallback)(
21918
+ const handleAddField = (0, import_react20.useCallback)(
21331
21919
  (type) => {
21332
21920
  const form = formPickElRef.current;
21333
21921
  if (!form) return;
@@ -21343,8 +21931,8 @@ function OhhwellsBridge() {
21343
21931
  },
21344
21932
  [persistFields, selectField]
21345
21933
  );
21346
- const fieldDragRef = (0, import_react19.useRef)(null);
21347
- const buildFieldDropSlots = (0, import_react19.useCallback)((form, draggedKey) => {
21934
+ const fieldDragRef = (0, import_react20.useRef)(null);
21935
+ const buildFieldDropSlots = (0, import_react20.useCallback)((form, draggedKey) => {
21348
21936
  const others = listFieldWrappers(form).filter((el) => fieldKeyOf(el) !== draggedKey);
21349
21937
  const slots = others.map((el) => {
21350
21938
  const rect = el.getBoundingClientRect();
@@ -21357,7 +21945,7 @@ function OhhwellsBridge() {
21357
21945
  }
21358
21946
  return slots;
21359
21947
  }, []);
21360
- const handleFieldDragStart = (0, import_react19.useCallback)(() => {
21948
+ const handleFieldDragStart = (0, import_react20.useCallback)(() => {
21361
21949
  const wrapper = fieldPickElRef.current;
21362
21950
  const form = formPickElRef.current;
21363
21951
  if (!wrapper || !form) return;
@@ -21366,18 +21954,18 @@ function OhhwellsBridge() {
21366
21954
  setFieldDragging(true);
21367
21955
  setFieldDropSlots(buildFieldDropSlots(form, key));
21368
21956
  }, [buildFieldDropSlots]);
21369
- const handleFieldDragEnd = (0, import_react19.useCallback)(() => {
21957
+ const handleFieldDragEnd = (0, import_react20.useCallback)(() => {
21370
21958
  fieldDragRef.current = null;
21371
21959
  setFieldDropIndex(null);
21372
21960
  setFieldDropSlots([]);
21373
21961
  setFieldDragging(false);
21374
21962
  }, []);
21375
- const [fieldDropIndex, setFieldDropIndex] = (0, import_react19.useState)(null);
21376
- const [fieldDropSlots, setFieldDropSlots] = (0, import_react19.useState)([]);
21377
- const [fieldDragging, setFieldDragging] = (0, import_react19.useState)(false);
21378
- const clearFormPickRef = (0, import_react19.useRef)(clearFormPick);
21963
+ const [fieldDropIndex, setFieldDropIndex] = (0, import_react20.useState)(null);
21964
+ const [fieldDropSlots, setFieldDropSlots] = (0, import_react20.useState)([]);
21965
+ const [fieldDragging, setFieldDragging] = (0, import_react20.useState)(false);
21966
+ const clearFormPickRef = (0, import_react20.useRef)(clearFormPick);
21379
21967
  clearFormPickRef.current = clearFormPick;
21380
- (0, import_react19.useEffect)(() => {
21968
+ (0, import_react20.useEffect)(() => {
21381
21969
  const el = fieldPickElRef.current;
21382
21970
  if (!el || fieldPickRect === null) return;
21383
21971
  const observer = new ResizeObserver(() => {
@@ -21386,7 +21974,7 @@ function OhhwellsBridge() {
21386
21974
  observer.observe(el);
21387
21975
  return () => observer.disconnect();
21388
21976
  }, [fieldPickRect !== null, fieldPickState]);
21389
- (0, import_react19.useEffect)(() => {
21977
+ (0, import_react20.useEffect)(() => {
21390
21978
  const el = formPickElRef.current;
21391
21979
  if (!el || formPickRect === null) return;
21392
21980
  const observer = new ResizeObserver(() => {
@@ -21395,25 +21983,25 @@ function OhhwellsBridge() {
21395
21983
  observer.observe(el);
21396
21984
  return () => observer.disconnect();
21397
21985
  }, [formPickRect !== null, formViewState]);
21398
- const [toolbarVariant, setToolbarVariant] = (0, import_react19.useState)("none");
21399
- const toolbarVariantRef = (0, import_react19.useRef)("none");
21986
+ const [toolbarVariant, setToolbarVariant] = (0, import_react20.useState)("none");
21987
+ const toolbarVariantRef = (0, import_react20.useRef)("none");
21400
21988
  toolbarVariantRef.current = toolbarVariant;
21401
- const [selectedIsCta, setSelectedIsCta] = (0, import_react19.useState)(false);
21402
- const [selectedIsSocial, setSelectedIsSocial] = (0, import_react19.useState)(false);
21403
- const [selectedIsSocialsRow, setSelectedIsSocialsRow] = (0, import_react19.useState)(false);
21404
- const [reorderHrefKey, setReorderHrefKey] = (0, import_react19.useState)(null);
21405
- const [reorderDragDisabled, setReorderDragDisabled] = (0, import_react19.useState)(false);
21406
- const [toggleState, setToggleState] = (0, import_react19.useState)(null);
21407
- const [maxBadge, setMaxBadge] = (0, import_react19.useState)(null);
21408
- const [activeCommands, setActiveCommands] = (0, import_react19.useState)(/* @__PURE__ */ new Set());
21409
- const [sectionGap, setSectionGap] = (0, import_react19.useState)(null);
21410
- const [toolbarShowEditLink, setToolbarShowEditLink] = (0, import_react19.useState)(false);
21411
- const hoveredNavContainerRef = (0, import_react19.useRef)(null);
21412
- const [hoveredNavContainerRect, setHoveredNavContainerRect] = (0, import_react19.useState)(null);
21413
- const hoveredItemElRef = (0, import_react19.useRef)(null);
21414
- const [hoveredItemRect, setHoveredItemRect] = (0, import_react19.useState)(null);
21415
- const [hoveredTextRect, setHoveredTextRect] = (0, import_react19.useState)(null);
21416
- (0, import_react19.useEffect)(() => {
21989
+ const [selectedIsCta, setSelectedIsCta] = (0, import_react20.useState)(false);
21990
+ const [selectedIsSocial, setSelectedIsSocial] = (0, import_react20.useState)(false);
21991
+ const [selectedIsSocialsRow, setSelectedIsSocialsRow] = (0, import_react20.useState)(false);
21992
+ const [reorderHrefKey, setReorderHrefKey] = (0, import_react20.useState)(null);
21993
+ const [reorderDragDisabled, setReorderDragDisabled] = (0, import_react20.useState)(false);
21994
+ const [toggleState, setToggleState] = (0, import_react20.useState)(null);
21995
+ const [maxBadge, setMaxBadge] = (0, import_react20.useState)(null);
21996
+ const [activeCommands, setActiveCommands] = (0, import_react20.useState)(/* @__PURE__ */ new Set());
21997
+ const [sectionGap, setSectionGap] = (0, import_react20.useState)(null);
21998
+ const [toolbarShowEditLink, setToolbarShowEditLink] = (0, import_react20.useState)(false);
21999
+ const hoveredNavContainerRef = (0, import_react20.useRef)(null);
22000
+ const [hoveredNavContainerRect, setHoveredNavContainerRect] = (0, import_react20.useState)(null);
22001
+ const hoveredItemElRef = (0, import_react20.useRef)(null);
22002
+ const [hoveredItemRect, setHoveredItemRect] = (0, import_react20.useState)(null);
22003
+ const [hoveredTextRect, setHoveredTextRect] = (0, import_react20.useState)(null);
22004
+ (0, import_react20.useEffect)(() => {
21417
22005
  const sync = () => {
21418
22006
  const el = document.querySelector(
21419
22007
  '[data-ohw-hovered]:not([contenteditable]):not([data-ohw-href-key]):not([data-ohw-editable="form"] *)'
@@ -21457,62 +22045,62 @@ function OhhwellsBridge() {
21457
22045
  });
21458
22046
  return () => observer.disconnect();
21459
22047
  }, []);
21460
- const siblingHintElRef = (0, import_react19.useRef)(null);
21461
- const [siblingHintRect, setSiblingHintRect] = (0, import_react19.useState)(null);
21462
- const [siblingHintRects, setSiblingHintRects] = (0, import_react19.useState)([]);
21463
- const [isItemDragging, setIsItemDragging] = (0, import_react19.useState)(false);
21464
- const [isFooterFrameSelection, setIsFooterFrameSelection] = (0, import_react19.useState)(false);
22048
+ const siblingHintElRef = (0, import_react20.useRef)(null);
22049
+ const [siblingHintRect, setSiblingHintRect] = (0, import_react20.useState)(null);
22050
+ const [siblingHintRects, setSiblingHintRects] = (0, import_react20.useState)([]);
22051
+ const [isItemDragging, setIsItemDragging] = (0, import_react20.useState)(false);
22052
+ const [isFooterFrameSelection, setIsFooterFrameSelection] = (0, import_react20.useState)(false);
21465
22053
  isFooterFrameSelectionRef.current = isFooterFrameSelection;
21466
- const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = (0, import_react19.useState)(null);
21467
- const [footerHeadingVisible, setFooterHeadingVisible] = (0, import_react19.useState)(null);
21468
- const footerDragRef = (0, import_react19.useRef)(null);
21469
- const [footerDropSlots, setFooterDropSlots] = (0, import_react19.useState)([]);
21470
- const [activeFooterDropIndex, setActiveFooterDropIndex] = (0, import_react19.useState)(null);
21471
- const [draggedItemRect, setDraggedItemRect] = (0, import_react19.useState)(null);
21472
- const footerPointerDragRef = (0, import_react19.useRef)(null);
21473
- const suppressNextClickRef = (0, import_react19.useRef)(false);
21474
- const suppressClickUntilRef = (0, import_react19.useRef)(0);
21475
- const [linkPopover, setLinkPopover] = (0, import_react19.useState)(null);
21476
- const linkPopoverSessionRef = (0, import_react19.useRef)(null);
21477
- const addNavAfterAnchorRef = (0, import_react19.useRef)(null);
21478
- const editContentRef = (0, import_react19.useRef)({});
21479
- const aiSectionsRef = (0, import_react19.useRef)("");
21480
- const applyTreeLocalRef = (0, import_react19.useRef)(
22054
+ const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = (0, import_react20.useState)(null);
22055
+ const [footerHeadingVisible, setFooterHeadingVisible] = (0, import_react20.useState)(null);
22056
+ const footerDragRef = (0, import_react20.useRef)(null);
22057
+ const [footerDropSlots, setFooterDropSlots] = (0, import_react20.useState)([]);
22058
+ const [activeFooterDropIndex, setActiveFooterDropIndex] = (0, import_react20.useState)(null);
22059
+ const [draggedItemRect, setDraggedItemRect] = (0, import_react20.useState)(null);
22060
+ const footerPointerDragRef = (0, import_react20.useRef)(null);
22061
+ const suppressNextClickRef = (0, import_react20.useRef)(false);
22062
+ const suppressClickUntilRef = (0, import_react20.useRef)(0);
22063
+ const [linkPopover, setLinkPopover] = (0, import_react20.useState)(null);
22064
+ const linkPopoverSessionRef = (0, import_react20.useRef)(null);
22065
+ const addNavAfterAnchorRef = (0, import_react20.useRef)(null);
22066
+ const editContentRef = (0, import_react20.useRef)({});
22067
+ const aiSectionsRef = (0, import_react20.useRef)("");
22068
+ const applyTreeLocalRef = (0, import_react20.useRef)(
21481
22069
  null
21482
22070
  );
21483
- const clearInteractionChromeRef = (0, import_react19.useRef)(() => {
22071
+ const clearInteractionChromeRef = (0, import_react20.useRef)(() => {
21484
22072
  });
21485
- const brandKitRef = (0, import_react19.useRef)("");
21486
- const stylesRef = (0, import_react19.useRef)("");
21487
- const appliedDrawerRef = (0, import_react19.useRef)(null);
21488
- const pendingDeleteUndoRef = (0, import_react19.useRef)(null);
21489
- const [floatingPanel, setFloatingPanel] = (0, import_react19.useState)(null);
21490
- const floatingPanelOpenRef = (0, import_react19.useRef)(false);
21491
- const floatingPanelRef = (0, import_react19.useRef)(null);
22073
+ const brandKitRef = (0, import_react20.useRef)("");
22074
+ const stylesRef = (0, import_react20.useRef)("");
22075
+ const appliedDrawerRef = (0, import_react20.useRef)(null);
22076
+ const pendingDeleteUndoRef = (0, import_react20.useRef)(null);
22077
+ const [floatingPanel, setFloatingPanel] = (0, import_react20.useState)(null);
22078
+ const floatingPanelOpenRef = (0, import_react20.useRef)(false);
22079
+ const floatingPanelRef = (0, import_react20.useRef)(null);
21492
22080
  floatingPanelRef.current = floatingPanel;
21493
- const setFloatingPanelRef = (0, import_react19.useRef)(setFloatingPanel);
21494
- const [floatingPanelPos, setFloatingPanelPos] = (0, import_react19.useState)(null);
21495
- const buttonCollectionDragRef = (0, import_react19.useRef)(null);
21496
- const buttonDropInsertIndexRef = (0, import_react19.useRef)(null);
21497
- const [buttonDropSlots, setButtonDropSlots] = (0, import_react19.useState)([]);
21498
- const [activeButtonDropIndex, setActiveButtonDropIndex] = (0, import_react19.useState)(null);
21499
- const buttonPointerDragRef = (0, import_react19.useRef)(null);
21500
- const [buttonStyleTick, setButtonStyleTick] = (0, import_react19.useState)(0);
21501
- const [logoSizeDraft, setLogoSizeDraft] = (0, import_react19.useState)(null);
21502
- const [editorViewport, setEditorViewport] = (0, import_react19.useState)("desktop");
21503
- const [parentScrollSnap, setParentScrollSnap] = (0, import_react19.useState)(null);
21504
- const [sitePages, setSitePages] = (0, import_react19.useState)([]);
21505
- const [sectionsByPath, setSectionsByPath] = (0, import_react19.useState)({});
21506
- const sectionsPrefetchGenRef = (0, import_react19.useRef)(0);
21507
- const setLinkPopoverRef = (0, import_react19.useRef)(setLinkPopover);
21508
- const linkPopoverPanelRef = (0, import_react19.useRef)(null);
21509
- const linkPopoverOpenRef = (0, import_react19.useRef)(false);
21510
- const linkPopoverGraceUntilRef = (0, import_react19.useRef)(0);
22081
+ const setFloatingPanelRef = (0, import_react20.useRef)(setFloatingPanel);
22082
+ const [floatingPanelPos, setFloatingPanelPos] = (0, import_react20.useState)(null);
22083
+ const buttonCollectionDragRef = (0, import_react20.useRef)(null);
22084
+ const buttonDropInsertIndexRef = (0, import_react20.useRef)(null);
22085
+ const [buttonDropSlots, setButtonDropSlots] = (0, import_react20.useState)([]);
22086
+ const [activeButtonDropIndex, setActiveButtonDropIndex] = (0, import_react20.useState)(null);
22087
+ const buttonPointerDragRef = (0, import_react20.useRef)(null);
22088
+ const [buttonStyleTick, setButtonStyleTick] = (0, import_react20.useState)(0);
22089
+ const [logoSizeDraft, setLogoSizeDraft] = (0, import_react20.useState)(null);
22090
+ const [editorViewport, setEditorViewport] = (0, import_react20.useState)("desktop");
22091
+ const [parentScrollSnap, setParentScrollSnap] = (0, import_react20.useState)(null);
22092
+ const [sitePages, setSitePages] = (0, import_react20.useState)([]);
22093
+ const [sectionsByPath, setSectionsByPath] = (0, import_react20.useState)({});
22094
+ const sectionsPrefetchGenRef = (0, import_react20.useRef)(0);
22095
+ const setLinkPopoverRef = (0, import_react20.useRef)(setLinkPopover);
22096
+ const linkPopoverPanelRef = (0, import_react20.useRef)(null);
22097
+ const linkPopoverOpenRef = (0, import_react20.useRef)(false);
22098
+ const linkPopoverGraceUntilRef = (0, import_react20.useRef)(0);
21511
22099
  setLinkPopoverRef.current = setLinkPopover;
21512
22100
  setFloatingPanelRef.current = setFloatingPanel;
21513
22101
  linkPopoverSessionRef.current = linkPopover;
21514
22102
  floatingPanelOpenRef.current = Boolean(floatingPanel);
21515
- (0, import_react19.useEffect)(() => {
22103
+ (0, import_react20.useEffect)(() => {
21516
22104
  const syncViewport = () => {
21517
22105
  const next = window.innerWidth <= 480 ? "mobile" : "desktop";
21518
22106
  setEditorViewport((prev) => prev === next ? prev : next);
@@ -21521,7 +22109,7 @@ function OhhwellsBridge() {
21521
22109
  window.addEventListener("resize", syncViewport);
21522
22110
  return () => window.removeEventListener("resize", syncViewport);
21523
22111
  }, []);
21524
- (0, import_react19.useEffect)(() => {
22112
+ (0, import_react20.useEffect)(() => {
21525
22113
  setSectionOrderPersistHandler((entries) => {
21526
22114
  const currentPath = window.location.pathname;
21527
22115
  const merged = mergePageSectionOrder(editContentRef.current[SECTION_ORDER_KEY], currentPath, entries);
@@ -21577,7 +22165,7 @@ function OhhwellsBridge() {
21577
22165
  const bumpLinkPopoverGrace = () => {
21578
22166
  linkPopoverGraceUntilRef.current = Date.now() + 350;
21579
22167
  };
21580
- const runSectionsPrefetch = (0, import_react19.useCallback)((pages) => {
22168
+ const runSectionsPrefetch = (0, import_react20.useCallback)((pages) => {
21581
22169
  if (!isEditMode || shouldUseDevFixtures() || pages.length === 0) return;
21582
22170
  const gen = ++sectionsPrefetchGenRef.current;
21583
22171
  const paths = pages.map((p) => p.path);
@@ -21596,9 +22184,9 @@ function OhhwellsBridge() {
21596
22184
  );
21597
22185
  });
21598
22186
  }, [isEditMode, pathname]);
21599
- const runSectionsPrefetchRef = (0, import_react19.useRef)(runSectionsPrefetch);
22187
+ const runSectionsPrefetchRef = (0, import_react20.useRef)(runSectionsPrefetch);
21600
22188
  runSectionsPrefetchRef.current = runSectionsPrefetch;
21601
- (0, import_react19.useEffect)(() => {
22189
+ (0, import_react20.useEffect)(() => {
21602
22190
  if (!linkPopover) {
21603
22191
  document.documentElement.removeAttribute("data-ohw-link-popover-open");
21604
22192
  return;
@@ -21626,7 +22214,7 @@ function OhhwellsBridge() {
21626
22214
  document.documentElement.removeAttribute("data-ohw-link-popover-open");
21627
22215
  };
21628
22216
  }, [linkPopover, postToParent2]);
21629
- (0, import_react19.useEffect)(() => {
22217
+ (0, import_react20.useEffect)(() => {
21630
22218
  if (!isEditMode) return;
21631
22219
  const useFixtures = shouldUseDevFixtures();
21632
22220
  if (useFixtures) {
@@ -21650,14 +22238,14 @@ function OhhwellsBridge() {
21650
22238
  if (!useFixtures) postToParent2({ type: "ow:request-site-pages" });
21651
22239
  return () => window.removeEventListener("message", onSitePages);
21652
22240
  }, [isEditMode, postToParent2]);
21653
- (0, import_react19.useEffect)(() => {
22241
+ (0, import_react20.useEffect)(() => {
21654
22242
  if (!isEditMode || shouldUseDevFixtures()) return;
21655
22243
  void loadAllSectionsManifest().then((manifest) => {
21656
22244
  if (Object.keys(manifest).length === 0) return;
21657
22245
  setSectionsByPath((prev) => ({ ...manifest, ...prev }));
21658
22246
  });
21659
22247
  }, [isEditMode]);
21660
- (0, import_react19.useEffect)(() => {
22248
+ (0, import_react20.useEffect)(() => {
21661
22249
  const update = () => {
21662
22250
  const el = activeElRef.current ?? selectedElRef.current;
21663
22251
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
@@ -21681,10 +22269,10 @@ function OhhwellsBridge() {
21681
22269
  vvp.removeEventListener("resize", update);
21682
22270
  };
21683
22271
  }, []);
21684
- const refreshStateRules = (0, import_react19.useCallback)(() => {
22272
+ const refreshStateRules = (0, import_react20.useCallback)(() => {
21685
22273
  editStylesRef.current?.forceHover && (editStylesRef.current.forceHover.textContent = collectStateRules());
21686
22274
  }, []);
21687
- const processConfigRequest = (0, import_react19.useCallback)((insertAfterVal) => {
22275
+ const processConfigRequest = (0, import_react20.useCallback)((insertAfterVal) => {
21688
22276
  const tracker = getSectionsTracker();
21689
22277
  let entries = [];
21690
22278
  try {
@@ -21707,7 +22295,7 @@ function OhhwellsBridge() {
21707
22295
  }
21708
22296
  window.postMessage({ type: "ow:schedule-config", insertAfter: insertAfterVal, scheduleId: null }, "*");
21709
22297
  }, [isEditMode]);
21710
- const deactivate = (0, import_react19.useCallback)(() => {
22298
+ const deactivate = (0, import_react20.useCallback)(() => {
21711
22299
  const el = activeElRef.current;
21712
22300
  if (!el) return;
21713
22301
  const isFormBlock = el.dataset.ohwEditable === "form";
@@ -21758,12 +22346,12 @@ function OhhwellsBridge() {
21758
22346
  setToolbarShowEditLink(false);
21759
22347
  postToParent2({ type: "ow:exit-edit" });
21760
22348
  }, [postToParent2]);
21761
- const clearSelectedAttr = (0, import_react19.useCallback)(() => {
22349
+ const clearSelectedAttr = (0, import_react20.useCallback)(() => {
21762
22350
  document.querySelectorAll("[data-ohw-selected]").forEach((el) => {
21763
22351
  el.removeAttribute("data-ohw-selected");
21764
22352
  });
21765
22353
  }, []);
21766
- const deselect = (0, import_react19.useCallback)(() => {
22354
+ const deselect = (0, import_react20.useCallback)(() => {
21767
22355
  const nestedGroup = selectedElRef.current?.closest("[data-ohw-nav-children]") != null ? selectedElRef.current.closest("[data-ohw-nav-group]") : null;
21768
22356
  clearSelectedAttr();
21769
22357
  selectedElRef.current = null;
@@ -21798,20 +22386,20 @@ function OhhwellsBridge() {
21798
22386
  setToolbarVariant("none");
21799
22387
  }
21800
22388
  }, [clearSelectedAttr]);
21801
- const markSelected = (0, import_react19.useCallback)((el) => {
22389
+ const markSelected = (0, import_react20.useCallback)((el) => {
21802
22390
  clearSelectedAttr();
21803
22391
  el.removeAttribute("data-ohw-hovered");
21804
22392
  el.setAttribute("data-ohw-selected", "");
21805
22393
  }, [clearSelectedAttr]);
21806
- const isSelectedForHover = (0, import_react19.useCallback)((el) => {
22394
+ const isSelectedForHover = (0, import_react20.useCallback)((el) => {
21807
22395
  if (!el) return false;
21808
22396
  return [selectedElRef.current, activeElRef.current].some(
21809
22397
  (busy) => busy && (el === busy || busy.contains(el) || el.contains(busy))
21810
22398
  );
21811
22399
  }, []);
21812
- const isSelectedForHoverRef = (0, import_react19.useRef)(isSelectedForHover);
22400
+ const isSelectedForHoverRef = (0, import_react20.useRef)(isSelectedForHover);
21813
22401
  isSelectedForHoverRef.current = isSelectedForHover;
21814
- const resolveHrefKeyElement = (0, import_react19.useCallback)((hrefKey) => {
22402
+ const resolveHrefKeyElement = (0, import_react20.useCallback)((hrefKey) => {
21815
22403
  if (isFooterHrefKey(hrefKey)) {
21816
22404
  return document.querySelector(
21817
22405
  `footer [data-ohw-href-key="${CSS.escape(hrefKey)}"]`
@@ -21826,7 +22414,7 @@ function OhhwellsBridge() {
21826
22414
  `[data-ohw-href-key="${CSS.escape(hrefKey)}"]`
21827
22415
  );
21828
22416
  }, []);
21829
- const resyncSelectedNavigationItem = (0, import_react19.useCallback)(() => {
22417
+ const resyncSelectedNavigationItem = (0, import_react20.useCallback)(() => {
21830
22418
  const hrefKey = selectedHrefKeyRef.current;
21831
22419
  if (hrefKey) {
21832
22420
  const link = resolveHrefKeyElement(hrefKey);
@@ -21864,7 +22452,7 @@ function OhhwellsBridge() {
21864
22452
  );
21865
22453
  }
21866
22454
  }, [resolveHrefKeyElement]);
21867
- const reselectNavigationItem = (0, import_react19.useCallback)((navAnchor) => {
22455
+ const reselectNavigationItem = (0, import_react20.useCallback)((navAnchor) => {
21868
22456
  selectedElRef.current = navAnchor;
21869
22457
  selectedHrefKeyRef.current = navAnchor.getAttribute("data-ohw-href-key");
21870
22458
  selectedFooterColAttrRef.current = null;
@@ -21895,7 +22483,7 @@ function OhhwellsBridge() {
21895
22483
  setToolbarShowEditLink(false);
21896
22484
  setActiveCommands(/* @__PURE__ */ new Set());
21897
22485
  }, [markSelected]);
21898
- const commitNavigationTextEdit = (0, import_react19.useCallback)((navAnchor) => {
22486
+ const commitNavigationTextEdit = (0, import_react20.useCallback)((navAnchor) => {
21899
22487
  const el = activeElRef.current;
21900
22488
  if (!el) return;
21901
22489
  const key = el.dataset.ohwKey;
@@ -21928,7 +22516,7 @@ function OhhwellsBridge() {
21928
22516
  postToParent2({ type: "ow:exit-edit" });
21929
22517
  reselectNavigationItem(navAnchor);
21930
22518
  }, [postToParent2, reselectNavigationItem]);
21931
- const handleAddTopLevelNavItem = (0, import_react19.useCallback)(() => {
22519
+ const handleAddTopLevelNavItem = (0, import_react20.useCallback)(() => {
21932
22520
  const items = listNavbarRootItems();
21933
22521
  addNavAfterAnchorRef.current = items[items.length - 1] ?? null;
21934
22522
  deselectRef.current();
@@ -21940,7 +22528,7 @@ function OhhwellsBridge() {
21940
22528
  intent: "add-nav"
21941
22529
  });
21942
22530
  }, []);
21943
- const maybeWarnNavLinkDropdownConflict = (0, import_react19.useCallback)(
22531
+ const maybeWarnNavLinkDropdownConflict = (0, import_react20.useCallback)(
21944
22532
  (anchor) => {
21945
22533
  if (!isNavbarHrefKey(anchor.getAttribute("data-ohw-href-key"))) return;
21946
22534
  if (!navDropdownsOpenOnClick()) return;
@@ -21953,7 +22541,7 @@ function OhhwellsBridge() {
21953
22541
  },
21954
22542
  [postToParent2]
21955
22543
  );
21956
- const handleNavDropdownOpenChange = (0, import_react19.useCallback)((open) => {
22544
+ const handleNavDropdownOpenChange = (0, import_react20.useCallback)((open) => {
21957
22545
  const selected = selectedElRef.current;
21958
22546
  if (!selected || !isNavigationItem2(selected)) return;
21959
22547
  if (isNestedNavChild(selected)) return;
@@ -21969,7 +22557,7 @@ function OhhwellsBridge() {
21969
22557
  }
21970
22558
  });
21971
22559
  }, []);
21972
- const handleFooterHeadingVisibleChange = (0, import_react19.useCallback)(
22560
+ const handleFooterHeadingVisibleChange = (0, import_react20.useCallback)(
21973
22561
  (visible) => {
21974
22562
  const selected = selectedElRef.current;
21975
22563
  if (!selected || !isFooterFrameSelectionRef.current) return;
@@ -21993,7 +22581,7 @@ function OhhwellsBridge() {
21993
22581
  },
21994
22582
  [postToParent2]
21995
22583
  );
21996
- const enterEditOnNewItem = (0, import_react19.useCallback)((anchor) => {
22584
+ const enterEditOnNewItem = (0, import_react20.useCallback)((anchor) => {
21997
22585
  const label = anchor.querySelector('[data-ohw-editable="text"]');
21998
22586
  if (!label) {
21999
22587
  selectRef.current(anchor);
@@ -22002,8 +22590,8 @@ function OhhwellsBridge() {
22002
22590
  setNavGroupForceOpen(anchor, true);
22003
22591
  activateRef.current(label);
22004
22592
  }, []);
22005
- const pendingSocialAddRef = (0, import_react19.useRef)(null);
22006
- const handleAddChildItem = (0, import_react19.useCallback)(() => {
22593
+ const pendingSocialAddRef = (0, import_react20.useRef)(null);
22594
+ const handleAddChildItem = (0, import_react20.useCallback)(() => {
22007
22595
  const selected = selectedElRef.current;
22008
22596
  if (!selected) return;
22009
22597
  const socialsRow = isSocialsRow(selected) ? selected : findSocialsRow(selected);
@@ -22114,7 +22702,7 @@ function OhhwellsBridge() {
22114
22702
  });
22115
22703
  });
22116
22704
  }, [enterEditOnNewItem, isFooterFrameSelection, maybeWarnNavLinkDropdownConflict, postToParent2]);
22117
- const handleAddFooterColumn = (0, import_react19.useCallback)(() => {
22705
+ const handleAddFooterColumn = (0, import_react20.useCallback)(() => {
22118
22706
  if (!canAddFooterColumn()) {
22119
22707
  postToParent2({
22120
22708
  type: "ow:toast",
@@ -22135,7 +22723,7 @@ function OhhwellsBridge() {
22135
22723
  selectRef.current(result.firstLink);
22136
22724
  });
22137
22725
  }, [postToParent2]);
22138
- const clearFooterDragVisuals = (0, import_react19.useCallback)(() => {
22726
+ const clearFooterDragVisuals = (0, import_react20.useCallback)(() => {
22139
22727
  footerDragRef.current = null;
22140
22728
  setSiblingHintRects([]);
22141
22729
  setFooterDropSlots([]);
@@ -22144,7 +22732,7 @@ function OhhwellsBridge() {
22144
22732
  setIsItemDragging(false);
22145
22733
  unlockFooterDragInteraction();
22146
22734
  }, []);
22147
- const refreshFooterDragVisuals = (0, import_react19.useCallback)((session, activeSlot, clientX, clientY) => {
22735
+ const refreshFooterDragVisuals = (0, import_react20.useCallback)((session, activeSlot, clientX, clientY) => {
22148
22736
  const dragged = session.draggedEl;
22149
22737
  setDraggedItemRect(dragged.getBoundingClientRect());
22150
22738
  if (typeof clientX === "number" && typeof clientY === "number") {
@@ -22176,13 +22764,13 @@ function OhhwellsBridge() {
22176
22764
  const activeIdx = activeSlot ? slots.findIndex((s) => s.insertIndex === activeSlot.insertIndex) : -1;
22177
22765
  setActiveFooterDropIndex(activeIdx >= 0 ? activeIdx : null);
22178
22766
  }, []);
22179
- const refreshFooterDragVisualsRef = (0, import_react19.useRef)(refreshFooterDragVisuals);
22767
+ const refreshFooterDragVisualsRef = (0, import_react20.useRef)(refreshFooterDragVisuals);
22180
22768
  refreshFooterDragVisualsRef.current = refreshFooterDragVisuals;
22181
- const commitFooterDragRef = (0, import_react19.useRef)(() => {
22769
+ const commitFooterDragRef = (0, import_react20.useRef)(() => {
22182
22770
  });
22183
- const beginFooterDragRef = (0, import_react19.useRef)(() => {
22771
+ const beginFooterDragRef = (0, import_react20.useRef)(() => {
22184
22772
  });
22185
- const beginFooterDrag = (0, import_react19.useCallback)(
22773
+ const beginFooterDrag = (0, import_react20.useCallback)(
22186
22774
  (session) => {
22187
22775
  const rect = session.draggedEl.getBoundingClientRect();
22188
22776
  session.lastClientX = session.lastClientX || rect.left + rect.width / 2;
@@ -22202,7 +22790,7 @@ function OhhwellsBridge() {
22202
22790
  [refreshFooterDragVisuals]
22203
22791
  );
22204
22792
  beginFooterDragRef.current = beginFooterDrag;
22205
- const commitFooterDrag = (0, import_react19.useCallback)(
22793
+ const commitFooterDrag = (0, import_react20.useCallback)(
22206
22794
  (clientX, clientY) => {
22207
22795
  const session = footerDragRef.current;
22208
22796
  if (!session) {
@@ -22331,7 +22919,7 @@ function OhhwellsBridge() {
22331
22919
  [clearFooterDragVisuals, resolveHrefKeyElement, resyncSelectedNavigationItem]
22332
22920
  );
22333
22921
  commitFooterDragRef.current = commitFooterDrag;
22334
- const startFooterLinkDrag = (0, import_react19.useCallback)(
22922
+ const startFooterLinkDrag = (0, import_react20.useCallback)(
22335
22923
  (anchor, clientX, clientY, wasSelected) => {
22336
22924
  const hrefKey = anchor.getAttribute("data-ohw-href-key");
22337
22925
  if (!hrefKey) return false;
@@ -22367,7 +22955,7 @@ function OhhwellsBridge() {
22367
22955
  },
22368
22956
  [beginFooterDrag]
22369
22957
  );
22370
- const startFooterColumnDrag = (0, import_react19.useCallback)(
22958
+ const startFooterColumnDrag = (0, import_react20.useCallback)(
22371
22959
  (columnEl, clientX, clientY, wasSelected) => {
22372
22960
  const columns = listFooterColumns();
22373
22961
  const idx = columns.indexOf(columnEl);
@@ -22387,7 +22975,7 @@ function OhhwellsBridge() {
22387
22975
  },
22388
22976
  [beginFooterDrag]
22389
22977
  );
22390
- const persistButtonCollectionDrag = (0, import_react19.useCallback)(
22978
+ const persistButtonCollectionDrag = (0, import_react20.useCallback)(
22391
22979
  (button, clientX) => {
22392
22980
  const insertIndex = buttonDropInsertIndexRef.current;
22393
22981
  if (insertIndex != null) insertButtonAtCollectionIndex(button, insertIndex);
@@ -22411,7 +22999,7 @@ function OhhwellsBridge() {
22411
22999
  },
22412
23000
  [postToParent2]
22413
23001
  );
22414
- const refreshButtonDragVisuals = (0, import_react19.useCallback)((button, clientX, clientY) => {
23002
+ const refreshButtonDragVisuals = (0, import_react20.useCallback)((button, clientX, clientY) => {
22415
23003
  const collection = buttonCollectionOf(button);
22416
23004
  if (!collection) {
22417
23005
  setButtonDropSlots([]);
@@ -22428,7 +23016,7 @@ function OhhwellsBridge() {
22428
23016
  setDraggedItemRect(button.getBoundingClientRect());
22429
23017
  if (selectedElRef.current === button) setToolbarRect(button.getBoundingClientRect());
22430
23018
  }, []);
22431
- const handleItemDragStart = (0, import_react19.useCallback)(
23019
+ const handleItemDragStart = (0, import_react20.useCallback)(
22432
23020
  (e) => {
22433
23021
  const selected = selectedElRef.current;
22434
23022
  if (!selected) {
@@ -22459,7 +23047,7 @@ function OhhwellsBridge() {
22459
23047
  },
22460
23048
  [startFooterColumnDrag, startFooterLinkDrag, startNavLinkDrag, refreshButtonDragVisuals]
22461
23049
  );
22462
- const handleItemDragEnd = (0, import_react19.useCallback)(
23050
+ const handleItemDragEnd = (0, import_react20.useCallback)(
22463
23051
  (e) => {
22464
23052
  const collectionButton = buttonCollectionDragRef.current;
22465
23053
  if (collectionButton) {
@@ -22490,7 +23078,7 @@ function OhhwellsBridge() {
22490
23078
  },
22491
23079
  [commitFooterDrag, commitNavDrag, navDragRef, persistButtonCollectionDrag]
22492
23080
  );
22493
- const handleItemChromePointerDown = (0, import_react19.useCallback)((e) => {
23081
+ const handleItemChromePointerDown = (0, import_react20.useCallback)((e) => {
22494
23082
  if (e.button !== 0) return;
22495
23083
  const selected = selectedElRef.current;
22496
23084
  if (!selected) return;
@@ -22531,7 +23119,7 @@ function OhhwellsBridge() {
22531
23119
  }
22532
23120
  if (armNavPressFromChrome(selected, e.clientX, e.clientY, e.pointerId)) return;
22533
23121
  }, [armNavPressFromChrome]);
22534
- const handleItemChromeClick = (0, import_react19.useCallback)((clientX, clientY) => {
23122
+ const handleItemChromeClick = (0, import_react20.useCallback)((clientX, clientY) => {
22535
23123
  if (suppressNextClickRef.current || Date.now() < suppressClickUntilRef.current) {
22536
23124
  suppressNextClickRef.current = false;
22537
23125
  return;
@@ -22544,7 +23132,7 @@ function OhhwellsBridge() {
22544
23132
  }, []);
22545
23133
  reselectNavigationItemRef.current = reselectNavigationItem;
22546
23134
  commitNavigationTextEditRef.current = commitNavigationTextEdit;
22547
- const select = (0, import_react19.useCallback)((anchor) => {
23135
+ const select = (0, import_react20.useCallback)((anchor) => {
22548
23136
  if (!isNavigationItem2(anchor)) return;
22549
23137
  if (activeElRef.current) deactivate();
22550
23138
  aiSectionApiRef.current?.selectFromElement(anchor);
@@ -22606,7 +23194,7 @@ function OhhwellsBridge() {
22606
23194
  setLogoSizeDraft(null);
22607
23195
  }
22608
23196
  }, [deactivate, markSelected]);
22609
- const selectFrame = (0, import_react19.useCallback)((el) => {
23197
+ const selectFrame = (0, import_react20.useCallback)((el) => {
22610
23198
  if (!isNavigationContainer(el)) return;
22611
23199
  if (activeElRef.current) deactivate();
22612
23200
  aiSectionApiRef.current?.selectFromElement(el);
@@ -22647,7 +23235,7 @@ function OhhwellsBridge() {
22647
23235
  setFloatingPanelPos(null);
22648
23236
  setLogoSizeDraft(null);
22649
23237
  }, [deactivate, markSelected, postToParent2]);
22650
- const selectLogo = (0, import_react19.useCallback)(
23238
+ const selectLogo = (0, import_react20.useCallback)(
22651
23239
  (logoEl) => {
22652
23240
  if (activeElRef.current) deactivate();
22653
23241
  selectedElRef.current = logoEl;
@@ -22676,7 +23264,7 @@ function OhhwellsBridge() {
22676
23264
  },
22677
23265
  [deactivate, markSelected]
22678
23266
  );
22679
- const openLogoSizePanel = (0, import_react19.useCallback)((logoEl) => {
23267
+ const openLogoSizePanel = (0, import_react20.useCallback)((logoEl) => {
22680
23268
  const placement = getLogoPlacement(logoEl);
22681
23269
  const draft = readLogoSizeState(editContentRef.current, placement);
22682
23270
  setLogoSizeDraft(draft);
@@ -22689,7 +23277,7 @@ function OhhwellsBridge() {
22689
23277
  placement
22690
23278
  });
22691
23279
  }, []);
22692
- const openSocialsDisplayPanel = (0, import_react19.useCallback)((row) => {
23280
+ const openSocialsDisplayPanel = (0, import_react20.useCallback)((row) => {
22693
23281
  setFloatingPanelPos(null);
22694
23282
  setParentScrollSnap(parentScrollRef.current);
22695
23283
  setFloatingPanel({
@@ -22700,7 +23288,7 @@ function OhhwellsBridge() {
22700
23288
  row
22701
23289
  });
22702
23290
  }, []);
22703
- const rememberButtonTokens = (0, import_react19.useCallback)(
23291
+ const rememberButtonTokens = (0, import_react20.useCallback)(
22704
23292
  (content, tokens, nodes) => {
22705
23293
  if (nodes.length === 0) return content;
22706
23294
  const next = { ...content };
@@ -22711,7 +23299,7 @@ function OhhwellsBridge() {
22711
23299
  },
22712
23300
  [postToParent2]
22713
23301
  );
22714
- const tokensForButton = (0, import_react19.useCallback)(
23302
+ const tokensForButton = (0, import_react20.useCallback)(
22715
23303
  (el, persistFallback = false) => {
22716
23304
  const stored = readStoredStyleTokens(editContentRef.current);
22717
23305
  if (stored) return stored;
@@ -22726,7 +23314,7 @@ function OhhwellsBridge() {
22726
23314
  },
22727
23315
  [rememberButtonTokens]
22728
23316
  );
22729
- const openButtonStylePanel = (0, import_react19.useCallback)(
23317
+ const openButtonStylePanel = (0, import_react20.useCallback)(
22730
23318
  (anchor) => {
22731
23319
  const id = buttonId(anchor);
22732
23320
  if (!id) return;
@@ -22744,7 +23332,7 @@ function OhhwellsBridge() {
22744
23332
  },
22745
23333
  [tokensForButton]
22746
23334
  );
22747
- const applySelectedButtonStyle = (0, import_react19.useCallback)(
23335
+ const applySelectedButtonStyle = (0, import_react20.useCallback)(
22748
23336
  (patch) => {
22749
23337
  const panel = floatingPanelRef.current;
22750
23338
  const id = panel?.kind === "button-style" ? panel.buttonId : null;
@@ -22762,7 +23350,7 @@ function OhhwellsBridge() {
22762
23350
  },
22763
23351
  [postToParent2]
22764
23352
  );
22765
- (0, import_react19.useEffect)(() => {
23353
+ (0, import_react20.useEffect)(() => {
22766
23354
  const onDragOver = (e) => {
22767
23355
  const dragged = buttonCollectionDragRef.current;
22768
23356
  if (!dragged) return;
@@ -22781,11 +23369,11 @@ function OhhwellsBridge() {
22781
23369
  document.removeEventListener("drop", onDrop);
22782
23370
  };
22783
23371
  }, [refreshButtonDragVisuals]);
22784
- const isEditModeRef = (0, import_react19.useRef)(false);
22785
- const requestMissingSocialIconsRef = (0, import_react19.useRef)(() => {
23372
+ const isEditModeRef = (0, import_react20.useRef)(false);
23373
+ const requestMissingSocialIconsRef = (0, import_react20.useRef)(() => {
22786
23374
  });
22787
- const askedSocialIconsRef = (0, import_react19.useRef)(/* @__PURE__ */ new Set());
22788
- const requestMissingSocialIcons = (0, import_react19.useCallback)(() => {
23375
+ const askedSocialIconsRef = (0, import_react20.useRef)(/* @__PURE__ */ new Set());
23376
+ const requestMissingSocialIcons = (0, import_react20.useCallback)(() => {
22789
23377
  const items = Array.from(document.querySelectorAll(`[${SOCIALS_ROW_ATTR}]`)).filter((row) => socialsDisplayFor(row, editContentRef.current).icon).flatMap((row) => {
22790
23378
  const missing = socialsMissingIcons(row);
22791
23379
  listSocialItems(row).forEach((item) => ensureIconSlot(item));
@@ -22797,7 +23385,7 @@ function OhhwellsBridge() {
22797
23385
  }, []);
22798
23386
  requestMissingSocialIconsRef.current = requestMissingSocialIcons;
22799
23387
  isEditModeRef.current = isEditMode;
22800
- const changeSocialsDisplay = (0, import_react19.useCallback)(
23388
+ const changeSocialsDisplay = (0, import_react20.useCallback)(
22801
23389
  (row, next) => {
22802
23390
  if (next.icon) {
22803
23391
  const missing = socialsMissingIcons(row);
@@ -22821,19 +23409,19 @@ function OhhwellsBridge() {
22821
23409
  },
22822
23410
  []
22823
23411
  );
22824
- const closeFloatingPanelOnly = (0, import_react19.useCallback)(() => {
23412
+ const closeFloatingPanelOnly = (0, import_react20.useCallback)(() => {
22825
23413
  setFloatingPanel(null);
22826
23414
  setFloatingPanelPos(null);
22827
23415
  setLogoSizeDraft(null);
22828
23416
  }, []);
22829
23417
  closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
22830
- const closeFloatingPanelAndDeselect = (0, import_react19.useCallback)(() => {
23418
+ const closeFloatingPanelAndDeselect = (0, import_react20.useCallback)(() => {
22831
23419
  setFloatingPanel(null);
22832
23420
  setFloatingPanelPos(null);
22833
23421
  setLogoSizeDraft(null);
22834
23422
  deselectRef.current();
22835
23423
  }, []);
22836
- (0, import_react19.useEffect)(() => {
23424
+ (0, import_react20.useEffect)(() => {
22837
23425
  const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
22838
23426
  if (!session || !logoSizeDraft) {
22839
23427
  postToParentRef.current({ type: "ow:logo-size-panel", open: false });
@@ -22852,7 +23440,7 @@ function OhhwellsBridge() {
22852
23440
  max: LOGO_SIZE_MAX
22853
23441
  });
22854
23442
  }, [floatingPanel, logoSizeDraft, editorViewport]);
22855
- const persistLogoSizeDraft = (0, import_react19.useCallback)(
23443
+ const persistLogoSizeDraft = (0, import_react20.useCallback)(
22856
23444
  (placement, draft) => {
22857
23445
  const desktopKey = LOGO_SIZE_DESKTOP_KEYS[placement];
22858
23446
  const mobileKey = LOGO_SIZE_MOBILE_KEYS[placement];
@@ -22892,7 +23480,7 @@ function OhhwellsBridge() {
22892
23480
  },
22893
23481
  [postToParent2]
22894
23482
  );
22895
- const activate = (0, import_react19.useCallback)((el, options) => {
23483
+ const activate = (0, import_react20.useCallback)((el, options) => {
22896
23484
  if (activeElRef.current === el) return;
22897
23485
  document.querySelectorAll("[data-ohw-hovered]").forEach((hovered) => {
22898
23486
  hovered.removeAttribute("data-ohw-hovered");
@@ -22990,8 +23578,8 @@ function OhhwellsBridge() {
22990
23578
  openLogoSizePanelRef.current = openLogoSizePanel;
22991
23579
  deselectRef.current = deselect;
22992
23580
  closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
22993
- const lastSiteWideScopeRef = (0, import_react19.useRef)(null);
22994
- (0, import_react19.useEffect)(() => {
23581
+ const lastSiteWideScopeRef = (0, import_react20.useRef)(null);
23582
+ (0, import_react20.useEffect)(() => {
22995
23583
  if (!isEditMode) {
22996
23584
  if (lastSiteWideScopeRef.current !== false) {
22997
23585
  lastSiteWideScopeRef.current = false;
@@ -23017,7 +23605,7 @@ function OhhwellsBridge() {
23017
23605
  isFooterFrameSelection,
23018
23606
  postToParent2
23019
23607
  ]);
23020
- (0, import_react19.useLayoutEffect)(() => {
23608
+ (0, import_react20.useLayoutEffect)(() => {
23021
23609
  if (!subdomain || isEditMode) {
23022
23610
  setFetchState("done");
23023
23611
  return;
@@ -23142,7 +23730,7 @@ function OhhwellsBridge() {
23142
23730
  cancelled = true;
23143
23731
  };
23144
23732
  }, [subdomain, isEditMode]);
23145
- (0, import_react19.useEffect)(() => {
23733
+ (0, import_react20.useEffect)(() => {
23146
23734
  if (!isEditMode) return;
23147
23735
  const resolveIndex = (form, clientY) => {
23148
23736
  const wrappers = listFieldWrappers(form).filter((el) => fieldKeyOf(el) !== fieldDragRef.current?.key);
@@ -23183,7 +23771,7 @@ function OhhwellsBridge() {
23183
23771
  window.removeEventListener("drop", onDrop, true);
23184
23772
  };
23185
23773
  }, [buildFieldDropSlots, isEditMode, persistFields, selectField]);
23186
- (0, import_react19.useEffect)(() => {
23774
+ (0, import_react20.useEffect)(() => {
23187
23775
  if (!isEditMode) return;
23188
23776
  const mark = () => document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
23189
23777
  markFormFields(form);
@@ -23195,7 +23783,7 @@ function OhhwellsBridge() {
23195
23783
  });
23196
23784
  return () => observer.disconnect();
23197
23785
  }, [isEditMode, fetchState, pathname]);
23198
- (0, import_react19.useEffect)(() => {
23786
+ (0, import_react20.useEffect)(() => {
23199
23787
  if (!isEditMode) return;
23200
23788
  let saveTimer = null;
23201
23789
  const onInput = (e) => {
@@ -23217,14 +23805,14 @@ function OhhwellsBridge() {
23217
23805
  document.addEventListener("input", onInput, true);
23218
23806
  return () => document.removeEventListener("input", onInput, true);
23219
23807
  }, [isEditMode, persistFields]);
23220
- (0, import_react19.useEffect)(() => {
23808
+ (0, import_react20.useEffect)(() => {
23221
23809
  if (isEditMode || fetchState !== "done") return;
23222
23810
  const content = contentCache.get(subdomain) ?? {};
23223
23811
  document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
23224
23812
  reconcileFieldsFromContent(form, content);
23225
23813
  });
23226
23814
  }, [isEditMode, fetchState, subdomain]);
23227
- (0, import_react19.useEffect)(() => {
23815
+ (0, import_react20.useEffect)(() => {
23228
23816
  if (!isEditMode) return;
23229
23817
  const swallow = (e) => {
23230
23818
  const target = e.target;
@@ -23233,14 +23821,14 @@ function OhhwellsBridge() {
23233
23821
  document.addEventListener("submit", swallow, true);
23234
23822
  return () => document.removeEventListener("submit", swallow, true);
23235
23823
  }, [isEditMode]);
23236
- (0, import_react19.useEffect)(() => {
23824
+ (0, import_react20.useEffect)(() => {
23237
23825
  if (isEditMode || fetchState !== "done") return;
23238
23826
  console.log("env", process.env.NEXT_PUBLIC_FLOWOPS_API_URL);
23239
23827
  const apiUrl = process.env.NEXT_PUBLIC_FLOWOPS_API_URL ?? "https://flowops-backend-staging-2yfdh7pwpq-as.a.run.app";
23240
23828
  console.log({ apiUrl, subdomain });
23241
23829
  bindPublishedForms(apiUrl, subdomain, contentCache.get(subdomain) ?? {});
23242
23830
  }, [isEditMode, fetchState, subdomain]);
23243
- (0, import_react19.useEffect)(() => {
23831
+ (0, import_react20.useEffect)(() => {
23244
23832
  if (!subdomain || isEditMode) return;
23245
23833
  let debounceTimer = null;
23246
23834
  let observer = null;
@@ -23342,16 +23930,16 @@ function OhhwellsBridge() {
23342
23930
  if (debounceTimer) clearTimeout(debounceTimer);
23343
23931
  };
23344
23932
  }, [subdomain, isEditMode, pathname]);
23345
- (0, import_react19.useLayoutEffect)(() => {
23933
+ (0, import_react20.useLayoutEffect)(() => {
23346
23934
  const el = document.getElementById("ohw-loader");
23347
23935
  if (!el) return;
23348
23936
  const visible = Boolean(subdomain) && fetchState !== "done";
23349
23937
  el.style.display = visible ? "flex" : "none";
23350
23938
  }, [subdomain, fetchState]);
23351
- (0, import_react19.useEffect)(() => {
23939
+ (0, import_react20.useEffect)(() => {
23352
23940
  postToParent2({ type: "ow:navigation", path: pathname });
23353
23941
  }, [pathname, postToParent2]);
23354
- (0, import_react19.useEffect)(() => {
23942
+ (0, import_react20.useEffect)(() => {
23355
23943
  if (!subdomain || isEditMode) return;
23356
23944
  const content = contentCache.get(subdomain);
23357
23945
  if (!content) return;
@@ -23367,7 +23955,7 @@ function OhhwellsBridge() {
23367
23955
  applyAiSectionsToDom(parseAiSectionsState(content[AI_SECTIONS_KEY]));
23368
23956
  }
23369
23957
  }, [pathname, subdomain, isEditMode]);
23370
- (0, import_react19.useEffect)(() => {
23958
+ (0, import_react20.useEffect)(() => {
23371
23959
  if (!isEditMode) return;
23372
23960
  if (linkPopoverSessionRef.current?.intent === "add-nav") return;
23373
23961
  if (document.querySelector("[data-ohw-section-picker]")) return;
@@ -23375,11 +23963,11 @@ function OhhwellsBridge() {
23375
23963
  deselectRef.current();
23376
23964
  deactivateRef.current();
23377
23965
  }, [pathname, isEditMode]);
23378
- (0, import_react19.useEffect)(() => {
23966
+ (0, import_react20.useEffect)(() => {
23379
23967
  if (!isEditMode) return;
23380
23968
  initSectionInstancesFromContent(editContentRef.current, pathname);
23381
23969
  }, [pathname, isEditMode]);
23382
- (0, import_react19.useEffect)(() => {
23970
+ (0, import_react20.useEffect)(() => {
23383
23971
  if (!isEditMode) return;
23384
23972
  const observer = new MutationObserver(() => {
23385
23973
  const drawer = document.querySelector("[data-ohw-nav-drawer]");
@@ -23390,7 +23978,7 @@ function OhhwellsBridge() {
23390
23978
  observer.observe(document.body, { childList: true, subtree: true });
23391
23979
  return () => observer.disconnect();
23392
23980
  }, [isEditMode, pathname]);
23393
- (0, import_react19.useEffect)(() => {
23981
+ (0, import_react20.useEffect)(() => {
23394
23982
  const contentForNav = () => {
23395
23983
  if (isEditMode) return editContentRef.current;
23396
23984
  if (!subdomain) return {};
@@ -23463,7 +24051,7 @@ function OhhwellsBridge() {
23463
24051
  observer?.disconnect();
23464
24052
  };
23465
24053
  }, [isEditMode, pathname, subdomain, fetchState, resyncSelectedNavigationItem]);
23466
- (0, import_react19.useEffect)(() => {
24054
+ (0, import_react20.useEffect)(() => {
23467
24055
  if (!isEditMode) return;
23468
24056
  let applying = false;
23469
24057
  let rafId = null;
@@ -23501,7 +24089,7 @@ function OhhwellsBridge() {
23501
24089
  observer.disconnect();
23502
24090
  };
23503
24091
  }, [isEditMode, pathname]);
23504
- (0, import_react19.useEffect)(() => {
24092
+ (0, import_react20.useEffect)(() => {
23505
24093
  if (!isEditMode) return;
23506
24094
  let lastPosted = 0;
23507
24095
  const measure = () => {
@@ -23530,7 +24118,7 @@ function OhhwellsBridge() {
23530
24118
  ro.disconnect();
23531
24119
  };
23532
24120
  }, [pathname, isEditMode, postToParent2]);
23533
- (0, import_react19.useEffect)(() => {
24121
+ (0, import_react20.useEffect)(() => {
23534
24122
  if (!subdomainFromQuery || isEditMode) return;
23535
24123
  const handleClick = (e) => {
23536
24124
  const anchor = e.target.closest("a");
@@ -23546,7 +24134,7 @@ function OhhwellsBridge() {
23546
24134
  document.addEventListener("click", handleClick, true);
23547
24135
  return () => document.removeEventListener("click", handleClick, true);
23548
24136
  }, [subdomainFromQuery, isEditMode, router]);
23549
- (0, import_react19.useEffect)(() => {
24137
+ (0, import_react20.useEffect)(() => {
23550
24138
  if (!isEditMode) {
23551
24139
  editStylesRef.current?.base.remove();
23552
24140
  editStylesRef.current?.forceHover.remove();
@@ -23772,11 +24360,11 @@ function OhhwellsBridge() {
23772
24360
  footer [data-ohw-href-key] [data-ohw-editable][contenteditable],
23773
24361
  footer [data-ohw-href-key] [data-ohw-editable][contenteditable] * {
23774
24362
  outline: none !important;
23775
- caret-color: ${PRIMARY5} !important;
24363
+ caret-color: ${PRIMARY6} !important;
23776
24364
  cursor: text !important;
23777
24365
  }
23778
24366
  [data-ohw-editable][contenteditable]::selection,
23779
- [data-ohw-editable][contenteditable] *::selection { background: ${PRIMARY5}59 !important; }
24367
+ [data-ohw-editable][contenteditable] *::selection { background: ${PRIMARY6}59 !important; }
23780
24368
  [data-ohw-editable-state], [data-ohw-editable-state] * { pointer-events: none !important; }
23781
24369
  [data-ohw-editable-state][data-ohw-active-state] [data-ohw-editable] { pointer-events: auto !important; }
23782
24370
  [data-ohw-editable-state][data-ohw-active-state][data-ohw-editable] { pointer-events: auto !important; }
@@ -26687,7 +27275,7 @@ function OhhwellsBridge() {
26687
27275
  if (imageShowTimerRef.current) clearTimeout(imageShowTimerRef.current);
26688
27276
  };
26689
27277
  }, [isEditMode, refreshStateRules]);
26690
- (0, import_react19.useEffect)(() => {
27278
+ (0, import_react20.useEffect)(() => {
26691
27279
  if (!isEditMode) return;
26692
27280
  const THRESHOLD = 10;
26693
27281
  const resolveWasSelected = (el) => {
@@ -26843,7 +27431,7 @@ function OhhwellsBridge() {
26843
27431
  unlockFooterDragInteraction();
26844
27432
  };
26845
27433
  }, [isEditMode]);
26846
- (0, import_react19.useEffect)(() => {
27434
+ (0, import_react20.useEffect)(() => {
26847
27435
  if (!isEditMode) return;
26848
27436
  const THRESHOLD = 10;
26849
27437
  const onPointerDown = (e) => {
@@ -26934,7 +27522,7 @@ function OhhwellsBridge() {
26934
27522
  document.removeEventListener("selectstart", blockSelectStart, true);
26935
27523
  };
26936
27524
  }, [isEditMode, persistButtonCollectionDrag, refreshButtonDragVisuals]);
26937
- (0, import_react19.useEffect)(() => {
27525
+ (0, import_react20.useEffect)(() => {
26938
27526
  const handler = (e) => {
26939
27527
  if (e.data?.type !== "ow:request-schedule-config") return;
26940
27528
  const insertAfterVal = e.data.insertAfter;
@@ -26950,7 +27538,7 @@ function OhhwellsBridge() {
26950
27538
  window.addEventListener("message", handler);
26951
27539
  return () => window.removeEventListener("message", handler);
26952
27540
  }, [processConfigRequest]);
26953
- (0, import_react19.useEffect)(() => {
27541
+ (0, import_react20.useEffect)(() => {
26954
27542
  if (!isEditMode) return;
26955
27543
  document.querySelectorAll("[data-ohw-active-state]").forEach((el) => {
26956
27544
  el.removeAttribute("data-ohw-active-state");
@@ -26974,7 +27562,7 @@ function OhhwellsBridge() {
26974
27562
  postToParent2({
26975
27563
  type: "ow:ready",
26976
27564
  version: "1",
26977
- bridgeVersion: "0.1.122",
27565
+ bridgeVersion: "0.1.123",
26978
27566
  path: pathname,
26979
27567
  nodes: collectEditableNodes(editContentRef.current),
26980
27568
  sections
@@ -26986,13 +27574,13 @@ function OhhwellsBridge() {
26986
27574
  clearTimeout(timer);
26987
27575
  };
26988
27576
  }, [pathname, isEditMode, refreshStateRules, postToParent2]);
26989
- (0, import_react19.useEffect)(() => {
27577
+ (0, import_react20.useEffect)(() => {
26990
27578
  scrollToHashSectionWhenReady();
26991
27579
  const onHashChange = () => scrollToHashSectionWhenReady();
26992
27580
  window.addEventListener("hashchange", onHashChange);
26993
27581
  return () => window.removeEventListener("hashchange", onHashChange);
26994
27582
  }, [pathname]);
26995
- const handleCommand = (0, import_react19.useCallback)((cmd) => {
27583
+ const handleCommand = (0, import_react20.useCallback)((cmd) => {
26996
27584
  const el = activeElRef.current;
26997
27585
  const selBefore = window.getSelection();
26998
27586
  let savedOffsets = null;
@@ -27028,7 +27616,7 @@ function OhhwellsBridge() {
27028
27616
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
27029
27617
  refreshActiveCommandsRef.current();
27030
27618
  }, []);
27031
- (0, import_react19.useEffect)(() => {
27619
+ (0, import_react20.useEffect)(() => {
27032
27620
  const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
27033
27621
  if (!session || !logoSizeDraft) return;
27034
27622
  const onPanelAction = (e) => {
@@ -27066,7 +27654,7 @@ function OhhwellsBridge() {
27066
27654
  window.addEventListener("message", onPanelAction);
27067
27655
  return () => window.removeEventListener("message", onPanelAction);
27068
27656
  }, [floatingPanel, logoSizeDraft, editorViewport, persistLogoSizeDraft, closeFloatingPanelAndDeselect]);
27069
- const handleStateChange = (0, import_react19.useCallback)((state) => {
27657
+ const handleStateChange = (0, import_react20.useCallback)((state) => {
27070
27658
  if (!activeStateElRef.current) return;
27071
27659
  const el = activeStateElRef.current;
27072
27660
  if (state === "Default") {
@@ -27079,7 +27667,7 @@ function OhhwellsBridge() {
27079
27667
  }
27080
27668
  setToggleState((prev) => prev ? { ...prev, activeState: state } : null);
27081
27669
  }, [deactivate]);
27082
- const reselectAfterLinkPopover = (0, import_react19.useCallback)(
27670
+ const reselectAfterLinkPopover = (0, import_react20.useCallback)(
27083
27671
  (hrefKey) => {
27084
27672
  requestAnimationFrame(() => {
27085
27673
  const el = resolveHrefKeyElement(hrefKey);
@@ -27088,7 +27676,7 @@ function OhhwellsBridge() {
27088
27676
  },
27089
27677
  [resolveHrefKeyElement]
27090
27678
  );
27091
- const closeLinkPopover = (0, import_react19.useCallback)(() => {
27679
+ const closeLinkPopover = (0, import_react20.useCallback)(() => {
27092
27680
  const session = linkPopoverSessionRef.current;
27093
27681
  addNavAfterAnchorRef.current = null;
27094
27682
  setLinkPopover(null);
@@ -27096,9 +27684,9 @@ function OhhwellsBridge() {
27096
27684
  reselectAfterLinkPopover(session.key);
27097
27685
  }
27098
27686
  }, [reselectAfterLinkPopover]);
27099
- const closeLinkPopoverRef = (0, import_react19.useRef)(closeLinkPopover);
27687
+ const closeLinkPopoverRef = (0, import_react20.useRef)(closeLinkPopover);
27100
27688
  closeLinkPopoverRef.current = closeLinkPopover;
27101
- const openLinkPopoverForActive = (0, import_react19.useCallback)(() => {
27689
+ const openLinkPopoverForActive = (0, import_react20.useCallback)(() => {
27102
27690
  const hrefCtx = getHrefKeyFromElement(activeElRef.current);
27103
27691
  if (!hrefCtx) return;
27104
27692
  bumpLinkPopoverGrace();
@@ -27109,7 +27697,7 @@ function OhhwellsBridge() {
27109
27697
  });
27110
27698
  deactivate();
27111
27699
  }, [deactivate]);
27112
- const openLinkPopoverForSelected = (0, import_react19.useCallback)(() => {
27700
+ const openLinkPopoverForSelected = (0, import_react20.useCallback)(() => {
27113
27701
  const anchor = selectedElRef.current;
27114
27702
  if (!anchor) return;
27115
27703
  const key = anchor.getAttribute("data-ohw-href-key");
@@ -27126,7 +27714,7 @@ function OhhwellsBridge() {
27126
27714
  });
27127
27715
  deselect();
27128
27716
  }, [deselect]);
27129
- const handleSelectParent = (0, import_react19.useCallback)(() => {
27717
+ const handleSelectParent = (0, import_react20.useCallback)(() => {
27130
27718
  const selected = selectedElRef.current;
27131
27719
  if (!selected) return;
27132
27720
  if (toolbarVariantRef.current === "select-frame") {
@@ -27153,7 +27741,7 @@ function OhhwellsBridge() {
27153
27741
  }
27154
27742
  deselectRef.current();
27155
27743
  }, []);
27156
- const handleDuplicateSelected = (0, import_react19.useCallback)(() => {
27744
+ const handleDuplicateSelected = (0, import_react20.useCallback)(() => {
27157
27745
  const selected = selectedElRef.current;
27158
27746
  if (!selected || !isNavigationItem2(selected)) return;
27159
27747
  if (isCtaButton(selected)) {
@@ -27316,7 +27904,7 @@ function OhhwellsBridge() {
27316
27904
  });
27317
27905
  }
27318
27906
  }, [postToParent2, tokensForButton]);
27319
- const runPendingDeleteUndo = (0, import_react19.useCallback)(() => {
27907
+ const runPendingDeleteUndo = (0, import_react20.useCallback)(() => {
27320
27908
  const pending = pendingDeleteUndoRef.current;
27321
27909
  if (!pending) return false;
27322
27910
  pendingDeleteUndoRef.current = null;
@@ -27324,7 +27912,7 @@ function OhhwellsBridge() {
27324
27912
  enforceLinkHrefs();
27325
27913
  return true;
27326
27914
  }, []);
27327
- const handleDeleteSelected = (0, import_react19.useCallback)(() => {
27915
+ const handleDeleteSelected = (0, import_react20.useCallback)(() => {
27328
27916
  const selected = selectedElRef.current;
27329
27917
  if (!selected) return false;
27330
27918
  if (isCtaButton(selected)) {
@@ -27377,7 +27965,7 @@ function OhhwellsBridge() {
27377
27965
  }, [postToParent2]);
27378
27966
  handleDeleteSelectedRef.current = handleDeleteSelected;
27379
27967
  runPendingDeleteUndoRef.current = runPendingDeleteUndo;
27380
- const handleLinkPopoverSubmit = (0, import_react19.useCallback)(
27968
+ const handleLinkPopoverSubmit = (0, import_react20.useCallback)(
27381
27969
  (target) => {
27382
27970
  const session = linkPopoverSessionRef.current;
27383
27971
  if (!session) return;
@@ -27443,14 +28031,14 @@ function OhhwellsBridge() {
27443
28031
  const showEditLink = toolbarShowEditLink;
27444
28032
  const currentSections = sectionsByPath[pathname] ?? [];
27445
28033
  linkPopoverOpenRef.current = linkPopover !== null;
27446
- const handleMediaSelect = (0, import_react19.useCallback)((key) => {
28034
+ const handleMediaSelect = (0, import_react20.useCallback)((key) => {
27447
28035
  const el = hoveredImageRef.current?.dataset.ohwKey === key ? hoveredImageRef.current : Array.from(document.querySelectorAll(MEDIA_SELECTOR)).find(
27448
28036
  (m) => (m.dataset.ohwKey ?? "") === key
27449
28037
  ) ?? null;
27450
28038
  if (!el) return;
27451
28039
  selectMediaElementRef.current(el);
27452
28040
  }, []);
27453
- const handleMediaReplace = (0, import_react19.useCallback)(
28041
+ const handleMediaReplace = (0, import_react20.useCallback)(
27454
28042
  (key) => {
27455
28043
  postToParent2({
27456
28044
  type: "ow:image-pick",
@@ -27460,13 +28048,13 @@ function OhhwellsBridge() {
27460
28048
  },
27461
28049
  [postToParent2, mediaHover?.elementType, selectedMedia?.elementType]
27462
28050
  );
27463
- const handleEditCarousel = (0, import_react19.useCallback)(
28051
+ const handleEditCarousel = (0, import_react20.useCallback)(
27464
28052
  (key) => {
27465
28053
  postToParent2({ type: "ow:carousel-open", key, images: readCarouselValue(key) });
27466
28054
  },
27467
28055
  [postToParent2]
27468
28056
  );
27469
- const handleMediaFadeOutComplete = (0, import_react19.useCallback)((key) => {
28057
+ const handleMediaFadeOutComplete = (0, import_react20.useCallback)((key) => {
27470
28058
  setUploadingRects((prev) => {
27471
28059
  if (!(key in prev)) return prev;
27472
28060
  const next = { ...prev };
@@ -27474,7 +28062,7 @@ function OhhwellsBridge() {
27474
28062
  return next;
27475
28063
  });
27476
28064
  }, []);
27477
- const handleVideoSettingsChange = (0, import_react19.useCallback)(
28065
+ const handleVideoSettingsChange = (0, import_react20.useCallback)(
27478
28066
  (key, settings) => {
27479
28067
  document.querySelectorAll(`[data-ohw-key="${key}"]`).forEach((el) => {
27480
28068
  const video = getVideoEl2(el);
@@ -27496,14 +28084,14 @@ function OhhwellsBridge() {
27496
28084
  },
27497
28085
  [postToParent2]
27498
28086
  );
27499
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
27500
- /* @__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, {}) }),
27501
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
27502
- subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MadeWithOhhWells, {}),
28087
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
28088
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(OhwLoaderSpinner, {}) }),
28089
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
28090
+ subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MadeWithOhhWells, {}),
27503
28091
  bridgeRoot ? (0, import_react_dom5.createPortal)(
27504
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
27505
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
27506
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28092
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
28093
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
28094
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27507
28095
  AiSectionOverlay,
27508
28096
  {
27509
28097
  postToParent: postToParent2,
@@ -27511,7 +28099,7 @@ function OhhwellsBridge() {
27511
28099
  onSelectionChange: handleAiSectionSelectionChange
27512
28100
  }
27513
28101
  ),
27514
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28102
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27515
28103
  AiMediaStripOverlay,
27516
28104
  {
27517
28105
  postToParent: postToParent2,
@@ -27520,7 +28108,7 @@ function OhhwellsBridge() {
27520
28108
  clearInteractionChromeRef
27521
28109
  }
27522
28110
  ),
27523
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28111
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27524
28112
  AiPricingCardOverlay,
27525
28113
  {
27526
28114
  postToParent: postToParent2,
@@ -27528,12 +28116,21 @@ function OhhwellsBridge() {
27528
28116
  applyTreeLocalRef
27529
28117
  }
27530
28118
  ),
27531
- isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28119
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28120
+ AiVideoOverlay,
28121
+ {
28122
+ postToParent: postToParent2,
28123
+ aiSectionsRef,
28124
+ applyTreeLocalRef,
28125
+ clearInteractionChromeRef
28126
+ }
28127
+ ),
28128
+ isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27532
28129
  "div",
27533
28130
  {
27534
28131
  className: "pointer-events-none fixed z-2147483646",
27535
28132
  style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
27536
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28133
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27537
28134
  DropIndicator,
27538
28135
  {
27539
28136
  direction: "horizontal",
@@ -27544,7 +28141,7 @@ function OhhwellsBridge() {
27544
28141
  },
27545
28142
  `section-drop-${slot.insertIndex}-${i}`
27546
28143
  )),
27547
- Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28144
+ Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27548
28145
  MediaOverlay,
27549
28146
  {
27550
28147
  hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
@@ -27555,7 +28152,7 @@ function OhhwellsBridge() {
27555
28152
  },
27556
28153
  `uploading-${key}`
27557
28154
  )),
27558
- mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28155
+ mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27559
28156
  MediaOverlay,
27560
28157
  {
27561
28158
  hover: mediaHover,
@@ -27566,7 +28163,7 @@ function OhhwellsBridge() {
27566
28163
  onVideoSettingsChange: handleVideoSettingsChange
27567
28164
  }
27568
28165
  ),
27569
- selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28166
+ selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27570
28167
  MediaOverlay,
27571
28168
  {
27572
28169
  hover: selectedMedia,
@@ -27578,7 +28175,7 @@ function OhhwellsBridge() {
27578
28175
  onVideoSettingsChange: handleVideoSettingsChange
27579
28176
  }
27580
28177
  ),
27581
- carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28178
+ carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27582
28179
  CarouselOverlay,
27583
28180
  {
27584
28181
  hover: carouselHover,
@@ -27586,10 +28183,10 @@ function OhhwellsBridge() {
27586
28183
  cueOnly: !!carouselHover.fullBleedSectionId && carouselHover.fullBleedSectionId !== selectedAiSectionId
27587
28184
  }
27588
28185
  ),
27589
- siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
27590
- siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
27591
- isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && selectedElRef.current !== buttonCollectionDragRef.current && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
27592
- isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28186
+ siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
28187
+ siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
28188
+ isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && selectedElRef.current !== buttonCollectionDragRef.current && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
28189
+ isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27593
28190
  "div",
27594
28191
  {
27595
28192
  className: "pointer-events-none fixed z-2147483646",
@@ -27599,7 +28196,7 @@ function OhhwellsBridge() {
27599
28196
  width: slot.width,
27600
28197
  height: slot.height
27601
28198
  },
27602
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28199
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27603
28200
  DropIndicator,
27604
28201
  {
27605
28202
  direction: slot.direction,
@@ -27610,7 +28207,7 @@ function OhhwellsBridge() {
27610
28207
  },
27611
28208
  `footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
27612
28209
  )),
27613
- isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28210
+ isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27614
28211
  "div",
27615
28212
  {
27616
28213
  className: "pointer-events-none fixed z-2147483646",
@@ -27620,7 +28217,7 @@ function OhhwellsBridge() {
27620
28217
  width: slot.width,
27621
28218
  height: slot.height
27622
28219
  },
27623
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28220
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27624
28221
  DropIndicator,
27625
28222
  {
27626
28223
  direction: slot.direction,
@@ -27631,7 +28228,7 @@ function OhhwellsBridge() {
27631
28228
  },
27632
28229
  `nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
27633
28230
  )),
27634
- isItemDragging && buttonDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28231
+ isItemDragging && buttonDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27635
28232
  "div",
27636
28233
  {
27637
28234
  className: "pointer-events-none fixed z-2147483646",
@@ -27641,7 +28238,7 @@ function OhhwellsBridge() {
27641
28238
  width: slot.width,
27642
28239
  height: slot.height
27643
28240
  },
27644
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28241
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27645
28242
  DropIndicator,
27646
28243
  {
27647
28244
  direction: slot.direction,
@@ -27652,10 +28249,10 @@ function OhhwellsBridge() {
27652
28249
  },
27653
28250
  `button-drop-${slot.direction}-${slot.insertIndex}-${i}`
27654
28251
  )),
27655
- hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
27656
- hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
27657
- hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
27658
- formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28252
+ hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
28253
+ hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
28254
+ hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
28255
+ formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27659
28256
  ItemInteractionLayer,
27660
28257
  {
27661
28258
  rect: formPickRect,
@@ -27663,13 +28260,13 @@ function OhhwellsBridge() {
27663
28260
  itemDragSurface: false,
27664
28261
  toolbarAlign: "left",
27665
28262
  chromeGap: 24,
27666
- toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
28263
+ toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
27667
28264
  "div",
27668
28265
  {
27669
28266
  "data-ohw-form-toolbar": "",
27670
28267
  className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
27671
28268
  children: [
27672
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28269
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27673
28270
  "button",
27674
28271
  {
27675
28272
  type: "button",
@@ -27677,11 +28274,11 @@ function OhhwellsBridge() {
27677
28274
  className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
27678
28275
  onClick: () => setFieldTypePickerOpen((open) => !open),
27679
28276
  "data-ohw-add-field": "",
27680
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Plus, { size: 15, "aria-hidden": true })
28277
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react21.Plus, { size: 15, "aria-hidden": true })
27681
28278
  }
27682
28279
  ),
27683
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
27684
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
28280
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
28281
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
27685
28282
  "button",
27686
28283
  {
27687
28284
  type: "button",
@@ -27697,11 +28294,11 @@ function OhhwellsBridge() {
27697
28294
  });
27698
28295
  },
27699
28296
  children: [
27700
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Settings, { size: 14, "aria-hidden": true }),
28297
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react21.Settings, { size: 14, "aria-hidden": true }),
27701
28298
  "Form settings",
27702
28299
  formPickCount ? (
27703
28300
  // Counter pill, per the design — not a text suffix.
27704
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28301
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27705
28302
  "span",
27706
28303
  {
27707
28304
  "data-ohw-form-count": "",
@@ -27713,8 +28310,8 @@ function OhhwellsBridge() {
27713
28310
  ]
27714
28311
  }
27715
28312
  ),
27716
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
27717
- /* @__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)(
28313
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
28314
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27718
28315
  "button",
27719
28316
  {
27720
28317
  type: "button",
@@ -27745,7 +28342,7 @@ function OhhwellsBridge() {
27745
28342
  )
27746
28343
  }
27747
28344
  ),
27748
- formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28345
+ formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27749
28346
  ItemInteractionLayer,
27750
28347
  {
27751
28348
  rect: formHoverRect,
@@ -27753,7 +28350,7 @@ function OhhwellsBridge() {
27753
28350
  chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
27754
28351
  }
27755
28352
  ),
27756
- fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28353
+ fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27757
28354
  ItemInteractionLayer,
27758
28355
  {
27759
28356
  rect: fieldPickRect,
@@ -27765,7 +28362,7 @@ function OhhwellsBridge() {
27765
28362
  dragHandleLabel: "Reorder field",
27766
28363
  onDragHandleDragStart: handleFieldDragStart,
27767
28364
  onDragHandleDragEnd: handleFieldDragEnd,
27768
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28365
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27769
28366
  FormFieldToolbar,
27770
28367
  {
27771
28368
  type: fieldPickState.type,
@@ -27778,12 +28375,12 @@ function OhhwellsBridge() {
27778
28375
  )
27779
28376
  }
27780
28377
  ),
27781
- fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28378
+ fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27782
28379
  "div",
27783
28380
  {
27784
28381
  className: "pointer-events-none fixed z-[2147483644]",
27785
28382
  style: { top: slot.top, left: slot.left, width: slot.width },
27786
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28383
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27787
28384
  DropIndicator,
27788
28385
  {
27789
28386
  direction: "horizontal",
@@ -27796,7 +28393,7 @@ function OhhwellsBridge() {
27796
28393
  )) : null,
27797
28394
  fieldTypePickerOpen && formPickRect ? (() => {
27798
28395
  const toolbar = document.querySelector("[data-ohw-form-toolbar]")?.getBoundingClientRect();
27799
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28396
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27800
28397
  "div",
27801
28398
  {
27802
28399
  className: "pointer-events-none fixed z-[2147483645]",
@@ -27804,12 +28401,12 @@ function OhhwellsBridge() {
27804
28401
  top: toolbar ? toolbar.bottom + 6 : formPickRect.top + 16,
27805
28402
  left: toolbar ? toolbar.left : formPickRect.left + 24
27806
28403
  },
27807
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FieldTypePicker, { onPick: handleAddField })
28404
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FieldTypePicker, { onPick: handleAddField })
27808
28405
  }
27809
28406
  );
27810
28407
  })() : null,
27811
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
27812
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28408
+ toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
28409
+ toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27813
28410
  FooterContainerChrome,
27814
28411
  {
27815
28412
  rect: toolbarRect,
@@ -27817,7 +28414,7 @@ function OhhwellsBridge() {
27817
28414
  addDisabled: !canAddFooterColumn()
27818
28415
  }
27819
28416
  ),
27820
- toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28417
+ toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27821
28418
  ItemInteractionLayer,
27822
28419
  {
27823
28420
  rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected || selectedElRef.current === buttonCollectionDragRef.current) ? draggedItemRect : toolbarRect,
@@ -27837,7 +28434,7 @@ function OhhwellsBridge() {
27837
28434
  onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
27838
28435
  onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
27839
28436
  itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection && !selectedIsSocialsRow,
27840
- toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28437
+ toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27841
28438
  ItemActionToolbar,
27842
28439
  {
27843
28440
  onEditLink: openLinkPopoverForSelected,
@@ -27888,8 +28485,8 @@ function OhhwellsBridge() {
27888
28485
  ) : void 0
27889
28486
  }
27890
28487
  ),
27891
- toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
27892
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28488
+ toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
28489
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27893
28490
  EditGlowChrome,
27894
28491
  {
27895
28492
  rect: toolbarRect,
@@ -27899,7 +28496,7 @@ function OhhwellsBridge() {
27899
28496
  hideHandle: isItemDragging
27900
28497
  }
27901
28498
  ),
27902
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28499
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27903
28500
  FloatingToolbar,
27904
28501
  {
27905
28502
  rect: toolbarRect,
@@ -27912,7 +28509,7 @@ function OhhwellsBridge() {
27912
28509
  }
27913
28510
  )
27914
28511
  ] }),
27915
- maxBadge && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
28512
+ maxBadge && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
27916
28513
  "div",
27917
28514
  {
27918
28515
  "data-ohw-max-badge": "",
@@ -27938,7 +28535,7 @@ function OhhwellsBridge() {
27938
28535
  ]
27939
28536
  }
27940
28537
  ),
27941
- toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28538
+ toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27942
28539
  StateToggle,
27943
28540
  {
27944
28541
  rect: toggleState.rect,
@@ -27947,15 +28544,15 @@ function OhhwellsBridge() {
27947
28544
  onStateChange: handleStateChange
27948
28545
  }
27949
28546
  ),
27950
- sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
28547
+ sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
27951
28548
  "div",
27952
28549
  {
27953
28550
  "data-ohw-section-insert-line": "",
27954
28551
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
27955
28552
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
27956
28553
  children: [
27957
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
27958
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28554
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
28555
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27959
28556
  Badge,
27960
28557
  {
27961
28558
  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",
@@ -27972,11 +28569,11 @@ function OhhwellsBridge() {
27972
28569
  children: "Add Section"
27973
28570
  }
27974
28571
  ),
27975
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } })
28572
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } })
27976
28573
  ]
27977
28574
  }
27978
28575
  ),
27979
- linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28576
+ linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27980
28577
  LinkPopover,
27981
28578
  {
27982
28579
  panelRef: linkPopoverPanelRef,
@@ -27993,7 +28590,7 @@ function OhhwellsBridge() {
27993
28590
  },
27994
28591
  linkPopover.key
27995
28592
  ) : null,
27996
- floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28593
+ floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
27997
28594
  FloatingPanel,
27998
28595
  {
27999
28596
  open: true,
@@ -28003,7 +28600,7 @@ function OhhwellsBridge() {
28003
28600
  onPositionChange: setFloatingPanelPos,
28004
28601
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
28005
28602
  onClose: closeFloatingPanelOnly,
28006
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28603
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28007
28604
  SocialsDisplayPanel,
28008
28605
  {
28009
28606
  display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
@@ -28024,19 +28621,19 @@ function OhhwellsBridge() {
28024
28621
  const tokens = tokensFromButton(button);
28025
28622
  const current = assignmentFor(button, editContentRef.current, tokens);
28026
28623
  void buttonStyleTick;
28027
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28624
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28028
28625
  FloatingPanel,
28029
28626
  {
28030
28627
  open: true,
28031
28628
  title: floatingPanel.title,
28032
28629
  context: floatingPanel.context,
28033
- icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Brush, { className: "size-4 shrink-0", "aria-hidden": true }),
28630
+ icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react21.Brush, { className: "size-4 shrink-0", "aria-hidden": true }),
28034
28631
  position: floatingPanelPos,
28035
28632
  onPositionChange: setFloatingPanelPos,
28036
28633
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
28037
28634
  onClose: closeFloatingPanelOnly,
28038
28635
  bodyClassName: "gap-5",
28039
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
28636
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28040
28637
  ButtonStylePanel,
28041
28638
  {
28042
28639
  variants: tokens.variants,
@@ -28064,10 +28661,10 @@ function OhhwellsBridge() {
28064
28661
 
28065
28662
  // src/ui/EmptySection.tsx
28066
28663
  var import_link = __toESM(require("next/link"), 1);
28067
- var import_jsx_runtime37 = require("react/jsx-runtime");
28664
+ var import_jsx_runtime38 = require("react/jsx-runtime");
28068
28665
  function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
28069
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
28070
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28666
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
28667
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
28071
28668
  "p",
28072
28669
  {
28073
28670
  style: {
@@ -28079,10 +28676,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
28079
28676
  color: "var(--brand-accent)",
28080
28677
  marginBottom: "1.5rem"
28081
28678
  },
28082
- 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" }) })
28679
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
28083
28680
  }
28084
28681
  ),
28085
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28682
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
28086
28683
  "h1",
28087
28684
  {
28088
28685
  style: {
@@ -28097,7 +28694,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
28097
28694
  children: title
28098
28695
  }
28099
28696
  ),
28100
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
28697
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
28101
28698
  "p",
28102
28699
  {
28103
28700
  style: {