@ohhwells/bridge 0.1.67-next.193 → 0.1.67-next.195

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
@@ -7181,6 +7181,7 @@ function applyFieldType(wrapper, type) {
7181
7181
  if (inputType) input.type = inputType;
7182
7182
  shedSize(input);
7183
7183
  applyDefaults(input);
7184
+ requireIfEmail(wrapper, type);
7184
7185
  return;
7185
7186
  }
7186
7187
  const next = document.createElement(tag);
@@ -7193,6 +7194,11 @@ function applyFieldType(wrapper, type) {
7193
7194
  if (type === "long-text") next.setAttribute("rows", "4");
7194
7195
  input.replaceWith(next);
7195
7196
  applyDefaults(next);
7197
+ requireIfEmail(wrapper, type);
7198
+ }
7199
+ function requireIfEmail(wrapper, type) {
7200
+ if (type !== "email") return;
7201
+ setFieldRequired(wrapper, true);
7196
7202
  }
7197
7203
  var REQUIRED_MARK_ATTR = "data-ohw-field-required";
7198
7204
  function fieldLabelText(label) {
@@ -7275,6 +7281,7 @@ function insertField(form, type) {
7275
7281
  const label = ensureFieldLabel(wrapper, key);
7276
7282
  label.textContent = defaults.label;
7277
7283
  label.setAttribute("data-ohw-key", `${key}-label`);
7284
+ requireIfEmail(wrapper, type);
7278
7285
  return wrapper;
7279
7286
  }
7280
7287
  function duplicateField(form, wrapper) {
@@ -7416,7 +7423,7 @@ function FormFieldToolbar({
7416
7423
  "aria-pressed": required,
7417
7424
  onClick: onRequiredToggle,
7418
7425
  className: "flex h-7 items-center gap-1.5 whitespace-nowrap rounded-md px-2 text-[13px] font-medium transition-colors " + (required ? "bg-primary/10 text-primary" : "text-foreground hover:bg-muted/70"),
7419
- "data-ohw-field-required": "",
7426
+ "data-ohw-field-required-toggle": "",
7420
7427
  children: [
7421
7428
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.Asterisk, { size: 14, strokeWidth: 2, "aria-hidden": true }),
7422
7429
  "Required"
@@ -12607,127 +12614,16 @@ function FloatingPanel({
12607
12614
  );
12608
12615
  }
12609
12616
 
12610
- // src/ui/logo-size-panel.tsx
12611
- var import_lucide_react15 = require("lucide-react");
12612
- var import_jsx_runtime28 = require("react/jsx-runtime");
12613
- function SizeSlider({
12614
- value,
12615
- onChange
12616
- }) {
12617
- const pct = (value - LOGO_SIZE_MIN) / (LOGO_SIZE_MAX - LOGO_SIZE_MIN) * 100;
12618
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
12619
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center gap-2 text-sm font-medium leading-5", children: [
12620
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "min-w-0 flex-1 text-foreground", children: "Size" }),
12621
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "shrink-0 whitespace-nowrap text-muted-foreground", children: [
12622
- value,
12623
- " px"
12624
- ] })
12625
- ] }),
12626
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-2 w-full rounded-full bg-primary-50", children: [
12627
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12628
- "div",
12629
- {
12630
- className: "absolute inset-y-0 left-0 rounded-full bg-primary",
12631
- style: { width: `${pct}%` }
12632
- }
12633
- ),
12634
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12635
- "input",
12636
- {
12637
- type: "range",
12638
- min: LOGO_SIZE_MIN,
12639
- max: LOGO_SIZE_MAX,
12640
- step: 1,
12641
- value,
12642
- "aria-label": "Logo size",
12643
- className: cn(
12644
- "absolute inset-0 h-full w-full cursor-pointer appearance-none bg-transparent",
12645
- "[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:size-5",
12646
- "[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2",
12647
- "[&::-webkit-slider-thumb]:border-primary [&::-webkit-slider-thumb]:bg-background",
12648
- "[&::-moz-range-thumb]:size-5 [&::-moz-range-thumb]:rounded-full",
12649
- "[&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary",
12650
- "[&::-moz-range-thumb]:bg-background"
12651
- ),
12652
- onChange: (e) => onChange(Number(e.target.value))
12653
- }
12654
- )
12655
- ] })
12656
- ] });
12657
- }
12658
- function LogoSizePanel({
12659
- viewport,
12660
- sizePx,
12661
- mobileFollowing = true,
12662
- onSizeChange,
12663
- onCustomizeMobile,
12664
- onResetMobile,
12665
- onUpdateEverywhere,
12666
- className
12667
- }) {
12668
- const showFollowing = viewport === "mobile" && mobileFollowing;
12669
- const showMobileSlider = viewport === "mobile" && !mobileFollowing;
12670
- const showDesktopSlider = viewport === "desktop";
12671
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex w-full flex-col gap-4", className), children: [
12672
- showFollowing ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
12673
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-start gap-1", children: [
12674
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.Link, { size: 16, className: "mt-0.5 shrink-0 text-foreground", "aria-hidden": true }),
12675
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm font-semibold leading-5 text-foreground", children: "Following desktop size" })
12676
- ] }),
12677
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm leading-5 text-muted-foreground", children: "Mobile uses the desktop size until you customize it. Change the desktop size and it follows automatically." }),
12678
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12679
- Button,
12680
- {
12681
- type: "button",
12682
- variant: "outline",
12683
- size: "sm",
12684
- className: "h-9 w-full min-w-0 cursor-pointer",
12685
- onClick: onCustomizeMobile,
12686
- children: "Customize for mobile"
12687
- }
12688
- )
12689
- ] }) : null,
12690
- showDesktopSlider || showMobileSlider ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SizeSlider, { value: sizePx, onChange: onSizeChange }) : null,
12691
- showMobileSlider ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12692
- Button,
12693
- {
12694
- type: "button",
12695
- variant: "outline",
12696
- size: "sm",
12697
- className: "h-9 w-full min-w-0 cursor-pointer",
12698
- onClick: onResetMobile,
12699
- children: "Reset to desktop size"
12700
- }
12701
- ) : null,
12702
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-px w-full bg-border", role: "separator" }),
12703
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
12704
- Button,
12705
- {
12706
- type: "button",
12707
- variant: "outline",
12708
- size: "sm",
12709
- className: "h-9 w-full min-w-0 cursor-pointer gap-1",
12710
- onClick: onUpdateEverywhere,
12711
- children: [
12712
- "Update logo everywhere",
12713
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ArrowUpRight, { size: 16, "aria-hidden": true })
12714
- ]
12715
- }
12716
- ),
12717
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm leading-5 text-muted-foreground", children: "Matches the right version to your background." })
12718
- ] });
12719
- }
12720
-
12721
12617
  // src/ui/socials-display-panel.tsx
12722
- var import_jsx_runtime29 = require("react/jsx-runtime");
12618
+ var import_jsx_runtime28 = require("react/jsx-runtime");
12723
12619
  function DisplaySwitch({
12724
12620
  label,
12725
12621
  checked,
12726
12622
  disabled,
12727
12623
  onChange
12728
12624
  }) {
12729
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
12730
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12625
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
12626
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12731
12627
  "span",
12732
12628
  {
12733
12629
  className: cn(
@@ -12737,7 +12633,7 @@ function DisplaySwitch({
12737
12633
  children: label
12738
12634
  }
12739
12635
  ),
12740
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12636
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12741
12637
  "button",
12742
12638
  {
12743
12639
  type: "button",
@@ -12751,7 +12647,7 @@ function DisplaySwitch({
12751
12647
  checked ? "bg-primary" : "bg-primary-50",
12752
12648
  disabled ? "cursor-default opacity-50" : "cursor-pointer"
12753
12649
  ),
12754
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12650
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12755
12651
  "span",
12756
12652
  {
12757
12653
  className: cn(
@@ -12765,8 +12661,8 @@ function DisplaySwitch({
12765
12661
  ] });
12766
12662
  }
12767
12663
  function SocialsDisplayPanel({ display, onChange, className }) {
12768
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
12769
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12664
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
12665
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12770
12666
  DisplaySwitch,
12771
12667
  {
12772
12668
  label: "Text",
@@ -12775,7 +12671,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
12775
12671
  onChange: (text) => onChange({ ...display, text })
12776
12672
  }
12777
12673
  ),
12778
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
12674
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
12779
12675
  DisplaySwitch,
12780
12676
  {
12781
12677
  label: "Icon",
@@ -13662,8 +13558,8 @@ function useSectionDrag({
13662
13558
  }
13663
13559
 
13664
13560
  // src/ui/footer-container-chrome.tsx
13665
- var import_lucide_react16 = require("lucide-react");
13666
- var import_jsx_runtime30 = require("react/jsx-runtime");
13561
+ var import_lucide_react15 = require("lucide-react");
13562
+ var import_jsx_runtime29 = require("react/jsx-runtime");
13667
13563
  function FooterContainerChrome({
13668
13564
  rect,
13669
13565
  onAdd,
@@ -13671,7 +13567,7 @@ function FooterContainerChrome({
13671
13567
  }) {
13672
13568
  const chromeGap = 6;
13673
13569
  const buttonMargin = 7;
13674
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
13570
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
13675
13571
  "div",
13676
13572
  {
13677
13573
  "data-ohw-footer-container-chrome": "",
@@ -13683,8 +13579,8 @@ function FooterContainerChrome({
13683
13579
  width: rect.width + chromeGap * 2,
13684
13580
  height: rect.height + chromeGap * 2
13685
13581
  },
13686
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Tooltip, { children: [
13687
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
13582
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { children: [
13583
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
13688
13584
  "button",
13689
13585
  {
13690
13586
  type: "button",
@@ -13703,10 +13599,10 @@ function FooterContainerChrome({
13703
13599
  if (addDisabled) return;
13704
13600
  onAdd();
13705
13601
  },
13706
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
13602
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
13707
13603
  }
13708
13604
  ) }),
13709
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
13605
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
13710
13606
  ] })
13711
13607
  }
13712
13608
  ) });
@@ -14168,14 +14064,14 @@ function deleteSelectedNavFooterItem(deps) {
14168
14064
  }
14169
14065
 
14170
14066
  // src/ui/navbar-container-chrome.tsx
14171
- var import_lucide_react17 = require("lucide-react");
14172
- var import_jsx_runtime31 = require("react/jsx-runtime");
14067
+ var import_lucide_react16 = require("lucide-react");
14068
+ var import_jsx_runtime30 = require("react/jsx-runtime");
14173
14069
  function NavbarContainerChrome({
14174
14070
  rect,
14175
14071
  onAdd
14176
14072
  }) {
14177
14073
  const chromeGap = 6;
14178
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
14074
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14179
14075
  "div",
14180
14076
  {
14181
14077
  "data-ohw-navbar-container-chrome": "",
@@ -14187,7 +14083,7 @@ function NavbarContainerChrome({
14187
14083
  width: rect.width + chromeGap * 2,
14188
14084
  height: rect.height + chromeGap * 2
14189
14085
  },
14190
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
14086
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
14191
14087
  "button",
14192
14088
  {
14193
14089
  type: "button",
@@ -14204,7 +14100,7 @@ function NavbarContainerChrome({
14204
14100
  e.stopPropagation();
14205
14101
  onAdd();
14206
14102
  },
14207
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
14103
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
14208
14104
  }
14209
14105
  )
14210
14106
  }
@@ -14213,7 +14109,7 @@ function NavbarContainerChrome({
14213
14109
 
14214
14110
  // src/ui/drop-indicator.tsx
14215
14111
  var React10 = __toESM(require("react"), 1);
14216
- var import_jsx_runtime32 = require("react/jsx-runtime");
14112
+ var import_jsx_runtime31 = require("react/jsx-runtime");
14217
14113
  var dropIndicatorVariants = cva(
14218
14114
  "ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
14219
14115
  {
@@ -14237,7 +14133,7 @@ var dropIndicatorVariants = cva(
14237
14133
  );
14238
14134
  var DropIndicator = React10.forwardRef(
14239
14135
  ({ className, direction, state, ...props }, ref) => {
14240
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
14136
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
14241
14137
  "div",
14242
14138
  {
14243
14139
  ref,
@@ -14254,7 +14150,7 @@ var DropIndicator = React10.forwardRef(
14254
14150
  DropIndicator.displayName = "DropIndicator";
14255
14151
 
14256
14152
  // src/ui/badge.tsx
14257
- var import_jsx_runtime33 = require("react/jsx-runtime");
14153
+ var import_jsx_runtime32 = require("react/jsx-runtime");
14258
14154
  var badgeVariants = cva(
14259
14155
  "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",
14260
14156
  {
@@ -14272,12 +14168,12 @@ var badgeVariants = cva(
14272
14168
  }
14273
14169
  );
14274
14170
  function Badge({ className, variant, ...props }) {
14275
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
14171
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
14276
14172
  }
14277
14173
 
14278
14174
  // src/OhhwellsBridge.tsx
14279
- var import_lucide_react18 = require("lucide-react");
14280
- var import_jsx_runtime34 = require("react/jsx-runtime");
14175
+ var import_lucide_react17 = require("lucide-react");
14176
+ var import_jsx_runtime33 = require("react/jsx-runtime");
14281
14177
  var PRIMARY3 = "#0885FE";
14282
14178
  var IMAGE_FADE_MS = 300;
14283
14179
  function runOpacityFade(el, onDone) {
@@ -14446,7 +14342,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
14446
14342
  const root = (0, import_client2.createRoot)(container);
14447
14343
  (0, import_react_dom3.flushSync)(() => {
14448
14344
  root.render(
14449
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
14345
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
14450
14346
  SchedulingWidget,
14451
14347
  {
14452
14348
  notifyOnConnect,
@@ -15127,7 +15023,7 @@ function EditGlowChrome({
15127
15023
  hideHandle = false
15128
15024
  }) {
15129
15025
  const GAP = SELECTION_CHROME_GAP2;
15130
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
15026
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
15131
15027
  "div",
15132
15028
  {
15133
15029
  ref: elRef,
@@ -15142,7 +15038,7 @@ function EditGlowChrome({
15142
15038
  zIndex: 2147483646
15143
15039
  },
15144
15040
  children: [
15145
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15041
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15146
15042
  "div",
15147
15043
  {
15148
15044
  style: {
@@ -15155,7 +15051,7 @@ function EditGlowChrome({
15155
15051
  }
15156
15052
  }
15157
15053
  ),
15158
- reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15054
+ reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15159
15055
  "div",
15160
15056
  {
15161
15057
  "data-ohw-drag-handle-container": "",
@@ -15167,7 +15063,7 @@ function EditGlowChrome({
15167
15063
  transform: "translate(calc(-100% - 7px), -50%)",
15168
15064
  pointerEvents: dragDisabled ? "none" : "auto"
15169
15065
  },
15170
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15066
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15171
15067
  DragHandle,
15172
15068
  {
15173
15069
  "aria-label": `Reorder ${reorderHrefKey}`,
@@ -15377,7 +15273,7 @@ function FloatingToolbar({
15377
15273
  return () => ro.disconnect();
15378
15274
  }, [showEditLink, activeCommands]);
15379
15275
  const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
15380
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15276
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15381
15277
  "div",
15382
15278
  {
15383
15279
  ref: setRefs,
@@ -15389,12 +15285,12 @@ function FloatingToolbar({
15389
15285
  zIndex: 2147483647,
15390
15286
  pointerEvents: "auto"
15391
15287
  },
15392
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(CustomToolbar, { children: [
15393
- TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react17.default.Fragment, { children: [
15394
- gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomToolbarDivider, {}),
15288
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(CustomToolbar, { children: [
15289
+ TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react17.default.Fragment, { children: [
15290
+ gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomToolbarDivider, {}),
15395
15291
  btns.map((btn) => {
15396
15292
  const isActive = activeCommands.has(btn.cmd);
15397
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15293
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15398
15294
  CustomToolbarButton,
15399
15295
  {
15400
15296
  title: btn.title,
@@ -15403,7 +15299,7 @@ function FloatingToolbar({
15403
15299
  e.preventDefault();
15404
15300
  onCommand(btn.cmd);
15405
15301
  },
15406
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15302
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15407
15303
  "svg",
15408
15304
  {
15409
15305
  width: "16",
@@ -15424,7 +15320,7 @@ function FloatingToolbar({
15424
15320
  );
15425
15321
  })
15426
15322
  ] }, gi)),
15427
- showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15323
+ showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15428
15324
  CustomToolbarButton,
15429
15325
  {
15430
15326
  type: "button",
@@ -15438,7 +15334,7 @@ function FloatingToolbar({
15438
15334
  e.preventDefault();
15439
15335
  e.stopPropagation();
15440
15336
  },
15441
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.Link, { className: "size-4 shrink-0", "aria-hidden": true })
15337
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Link, { className: "size-4 shrink-0", "aria-hidden": true })
15442
15338
  }
15443
15339
  ) : null
15444
15340
  ] })
@@ -15455,7 +15351,7 @@ function StateToggle({
15455
15351
  states,
15456
15352
  onStateChange
15457
15353
  }) {
15458
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15354
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15459
15355
  ToggleGroup,
15460
15356
  {
15461
15357
  "data-ohw-state-toggle": "",
@@ -15469,7 +15365,7 @@ function StateToggle({
15469
15365
  left: rect.right - 8,
15470
15366
  transform: "translateX(-100%)"
15471
15367
  },
15472
- children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
15368
+ children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
15473
15369
  }
15474
15370
  );
15475
15371
  }
@@ -15485,9 +15381,9 @@ var OHW_LOADER_STYLE = {
15485
15381
  justifyContent: "center"
15486
15382
  };
15487
15383
  function OhwLoaderSpinner() {
15488
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
15489
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
15490
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15384
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
15385
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
15386
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15491
15387
  "circle",
15492
15388
  {
15493
15389
  cx: "14",
@@ -15497,7 +15393,7 @@ function OhwLoaderSpinner() {
15497
15393
  strokeWidth: "3",
15498
15394
  strokeDasharray: "17 52",
15499
15395
  strokeLinecap: "round",
15500
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15396
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
15501
15397
  "animateTransform",
15502
15398
  {
15503
15399
  attributeName: "transform",
@@ -17053,6 +16949,25 @@ function OhhwellsBridge() {
17053
16949
  setLogoSizeDraft(null);
17054
16950
  deselectRef.current();
17055
16951
  }, []);
16952
+ (0, import_react17.useEffect)(() => {
16953
+ const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
16954
+ if (!session || !logoSizeDraft) {
16955
+ postToParentRef.current({ type: "ow:logo-size-panel", open: false });
16956
+ return;
16957
+ }
16958
+ postToParentRef.current({
16959
+ type: "ow:logo-size-panel",
16960
+ open: true,
16961
+ title: session.title,
16962
+ context: session.context ?? "",
16963
+ placement: session.placement,
16964
+ viewport: editorViewport,
16965
+ mobileFollowing: logoSizeDraft.mobileFollowing,
16966
+ sizePx: editorViewport === "mobile" && !logoSizeDraft.mobileFollowing ? logoSizeDraft.mobilePx : logoSizeDraft.desktopPx,
16967
+ min: LOGO_SIZE_MIN,
16968
+ max: LOGO_SIZE_MAX
16969
+ });
16970
+ }, [floatingPanel, logoSizeDraft, editorViewport]);
17056
16971
  const persistLogoSizeDraft = (0, import_react17.useCallback)(
17057
16972
  (placement, draft) => {
17058
16973
  const desktopKey = LOGO_SIZE_DESKTOP_KEYS[placement];
@@ -20281,6 +20196,44 @@ function OhhwellsBridge() {
20281
20196
  if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
20282
20197
  refreshActiveCommandsRef.current();
20283
20198
  }, []);
20199
+ (0, import_react17.useEffect)(() => {
20200
+ const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
20201
+ if (!session || !logoSizeDraft) return;
20202
+ const onPanelAction = (e) => {
20203
+ const type = e.data?.type;
20204
+ if (type === "ow:logo-size-close") {
20205
+ closeFloatingPanelAndDeselect();
20206
+ return;
20207
+ }
20208
+ if (type === "ow:logo-size-update-everywhere") {
20209
+ postToParentRef.current({ type: "ow:open-logo-settings", ...readLogoIdentityFromDom() });
20210
+ return;
20211
+ }
20212
+ if (type === "ow:logo-size-customize-mobile" || type === "ow:logo-size-reset-mobile") {
20213
+ const following = type === "ow:logo-size-reset-mobile";
20214
+ const next2 = {
20215
+ ...logoSizeDraft,
20216
+ mobileFollowing: following,
20217
+ mobilePx: logoSizeDraft.desktopPx
20218
+ };
20219
+ setLogoSizeDraft(next2);
20220
+ persistLogoSizeDraft(session.placement, next2);
20221
+ return;
20222
+ }
20223
+ if (type !== "ow:logo-size-set") return;
20224
+ const px = Number(e.data.px);
20225
+ if (!Number.isFinite(px)) return;
20226
+ const next = editorViewport === "mobile" ? { ...logoSizeDraft, mobilePx: px, mobileFollowing: false } : {
20227
+ ...logoSizeDraft,
20228
+ desktopPx: px,
20229
+ mobilePx: logoSizeDraft.mobileFollowing ? px : logoSizeDraft.mobilePx
20230
+ };
20231
+ setLogoSizeDraft(next);
20232
+ persistLogoSizeDraft(session.placement, next);
20233
+ };
20234
+ window.addEventListener("message", onPanelAction);
20235
+ return () => window.removeEventListener("message", onPanelAction);
20236
+ }, [floatingPanel, logoSizeDraft, editorViewport, persistLogoSizeDraft, closeFloatingPanelAndDeselect]);
20284
20237
  const handleStateChange = (0, import_react17.useCallback)((state) => {
20285
20238
  if (!activeStateElRef.current) return;
20286
20239
  const el = activeStateElRef.current;
@@ -20632,19 +20585,19 @@ function OhhwellsBridge() {
20632
20585
  },
20633
20586
  [postToParent2]
20634
20587
  );
20635
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
20636
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(OhwLoaderSpinner, {}) }),
20637
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
20588
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
20589
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OhwLoaderSpinner, {}) }),
20590
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
20638
20591
  bridgeRoot ? (0, import_react_dom4.createPortal)(
20639
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
20640
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
20641
- isEditMode && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AiSectionOverlay, { postToParent: postToParent2, apiRef: aiSectionApiRef }),
20642
- isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20592
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
20593
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
20594
+ isEditMode && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AiSectionOverlay, { postToParent: postToParent2, apiRef: aiSectionApiRef }),
20595
+ isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20643
20596
  "div",
20644
20597
  {
20645
20598
  className: "pointer-events-none fixed z-2147483646",
20646
20599
  style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
20647
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20600
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20648
20601
  DropIndicator,
20649
20602
  {
20650
20603
  direction: "horizontal",
@@ -20655,7 +20608,7 @@ function OhhwellsBridge() {
20655
20608
  },
20656
20609
  `section-drop-${slot.insertIndex}-${i}`
20657
20610
  )),
20658
- Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20611
+ Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20659
20612
  MediaOverlay,
20660
20613
  {
20661
20614
  hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
@@ -20666,7 +20619,7 @@ function OhhwellsBridge() {
20666
20619
  },
20667
20620
  `uploading-${key}`
20668
20621
  )),
20669
- mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20622
+ mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20670
20623
  MediaOverlay,
20671
20624
  {
20672
20625
  hover: mediaHover,
@@ -20676,7 +20629,7 @@ function OhhwellsBridge() {
20676
20629
  onVideoSettingsChange: handleVideoSettingsChange
20677
20630
  }
20678
20631
  ),
20679
- selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20632
+ selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20680
20633
  MediaOverlay,
20681
20634
  {
20682
20635
  hover: selectedMedia,
@@ -20688,11 +20641,11 @@ function OhhwellsBridge() {
20688
20641
  onVideoSettingsChange: handleVideoSettingsChange
20689
20642
  }
20690
20643
  ),
20691
- carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CarouselOverlay, { hover: carouselHover, onEdit: handleEditCarousel }),
20692
- siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
20693
- siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
20694
- isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
20695
- isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20644
+ carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CarouselOverlay, { hover: carouselHover, onEdit: handleEditCarousel }),
20645
+ siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
20646
+ siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
20647
+ isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
20648
+ isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20696
20649
  "div",
20697
20650
  {
20698
20651
  className: "pointer-events-none fixed z-2147483646",
@@ -20702,7 +20655,7 @@ function OhhwellsBridge() {
20702
20655
  width: slot.width,
20703
20656
  height: slot.height
20704
20657
  },
20705
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20658
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20706
20659
  DropIndicator,
20707
20660
  {
20708
20661
  direction: slot.direction,
@@ -20713,7 +20666,7 @@ function OhhwellsBridge() {
20713
20666
  },
20714
20667
  `footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
20715
20668
  )),
20716
- isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20669
+ isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20717
20670
  "div",
20718
20671
  {
20719
20672
  className: "pointer-events-none fixed z-2147483646",
@@ -20723,7 +20676,7 @@ function OhhwellsBridge() {
20723
20676
  width: slot.width,
20724
20677
  height: slot.height
20725
20678
  },
20726
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20679
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20727
20680
  DropIndicator,
20728
20681
  {
20729
20682
  direction: slot.direction,
@@ -20734,10 +20687,10 @@ function OhhwellsBridge() {
20734
20687
  },
20735
20688
  `nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
20736
20689
  )),
20737
- hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
20738
- hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
20739
- hoveredTextRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
20740
- formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20690
+ hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
20691
+ hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
20692
+ hoveredTextRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
20693
+ formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20741
20694
  ItemInteractionLayer,
20742
20695
  {
20743
20696
  rect: formPickRect,
@@ -20745,13 +20698,13 @@ function OhhwellsBridge() {
20745
20698
  itemDragSurface: false,
20746
20699
  toolbarAlign: "left",
20747
20700
  chromeGap: 24,
20748
- toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
20701
+ toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
20749
20702
  "div",
20750
20703
  {
20751
20704
  "data-ohw-form-toolbar": "",
20752
20705
  className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
20753
20706
  children: [
20754
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20707
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20755
20708
  "button",
20756
20709
  {
20757
20710
  type: "button",
@@ -20759,11 +20712,11 @@ function OhhwellsBridge() {
20759
20712
  className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
20760
20713
  onClick: () => setFieldTypePickerOpen((open) => !open),
20761
20714
  "data-ohw-add-field": "",
20762
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.Plus, { size: 15, "aria-hidden": true })
20715
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Plus, { size: 15, "aria-hidden": true })
20763
20716
  }
20764
20717
  ),
20765
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
20766
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
20718
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
20719
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
20767
20720
  "button",
20768
20721
  {
20769
20722
  type: "button",
@@ -20778,11 +20731,11 @@ function OhhwellsBridge() {
20778
20731
  });
20779
20732
  },
20780
20733
  children: [
20781
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.Settings, { size: 14, "aria-hidden": true }),
20734
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Settings, { size: 14, "aria-hidden": true }),
20782
20735
  "Form settings",
20783
20736
  formPickCount ? (
20784
20737
  // Counter pill, per the design — not a text suffix.
20785
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20738
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20786
20739
  "span",
20787
20740
  {
20788
20741
  "data-ohw-form-count": "",
@@ -20794,8 +20747,8 @@ function OhhwellsBridge() {
20794
20747
  ]
20795
20748
  }
20796
20749
  ),
20797
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
20798
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20750
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
20751
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20799
20752
  "button",
20800
20753
  {
20801
20754
  type: "button",
@@ -20825,7 +20778,7 @@ function OhhwellsBridge() {
20825
20778
  )
20826
20779
  }
20827
20780
  ),
20828
- formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20781
+ formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20829
20782
  ItemInteractionLayer,
20830
20783
  {
20831
20784
  rect: formHoverRect,
@@ -20833,7 +20786,7 @@ function OhhwellsBridge() {
20833
20786
  chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
20834
20787
  }
20835
20788
  ),
20836
- fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20789
+ fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20837
20790
  ItemInteractionLayer,
20838
20791
  {
20839
20792
  rect: fieldPickRect,
@@ -20845,7 +20798,7 @@ function OhhwellsBridge() {
20845
20798
  dragHandleLabel: "Reorder field",
20846
20799
  onDragHandleDragStart: handleFieldDragStart,
20847
20800
  onDragHandleDragEnd: handleFieldDragEnd,
20848
- toolbar: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20801
+ toolbar: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20849
20802
  FormFieldToolbar,
20850
20803
  {
20851
20804
  type: fieldPickState.type,
@@ -20858,12 +20811,12 @@ function OhhwellsBridge() {
20858
20811
  )
20859
20812
  }
20860
20813
  ),
20861
- fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20814
+ fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20862
20815
  "div",
20863
20816
  {
20864
20817
  className: "pointer-events-none fixed z-[2147483644]",
20865
20818
  style: { top: slot.top, left: slot.left, width: slot.width },
20866
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20819
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20867
20820
  DropIndicator,
20868
20821
  {
20869
20822
  direction: "horizontal",
@@ -20874,16 +20827,22 @@ function OhhwellsBridge() {
20874
20827
  },
20875
20828
  `field-drop-${i}`
20876
20829
  )) : null,
20877
- fieldTypePickerOpen && formPickRect && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20878
- "div",
20879
- {
20880
- className: "pointer-events-none fixed z-[2147483645]",
20881
- style: { top: formPickRect.top + 16, left: formPickRect.left + 24 },
20882
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FieldTypePicker, { onPick: handleAddField })
20883
- }
20884
- ),
20885
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
20886
- toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20830
+ fieldTypePickerOpen && formPickRect ? (() => {
20831
+ const toolbar = document.querySelector("[data-ohw-form-toolbar]")?.getBoundingClientRect();
20832
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20833
+ "div",
20834
+ {
20835
+ className: "pointer-events-none fixed z-[2147483645]",
20836
+ style: {
20837
+ top: toolbar ? toolbar.bottom + 6 : formPickRect.top + 16,
20838
+ left: toolbar ? toolbar.left : formPickRect.left + 24
20839
+ },
20840
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldTypePicker, { onPick: handleAddField })
20841
+ }
20842
+ );
20843
+ })() : null,
20844
+ toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
20845
+ toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20887
20846
  FooterContainerChrome,
20888
20847
  {
20889
20848
  rect: toolbarRect,
@@ -20891,7 +20850,7 @@ function OhhwellsBridge() {
20891
20850
  addDisabled: !canAddFooterColumn()
20892
20851
  }
20893
20852
  ),
20894
- toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20853
+ toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20895
20854
  ItemInteractionLayer,
20896
20855
  {
20897
20856
  rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected) ? draggedItemRect : toolbarRect,
@@ -20906,7 +20865,7 @@ function OhhwellsBridge() {
20906
20865
  onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
20907
20866
  onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
20908
20867
  itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection,
20909
- toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20868
+ toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20910
20869
  ItemActionToolbar,
20911
20870
  {
20912
20871
  onEditLink: openLinkPopoverForSelected,
@@ -20942,8 +20901,8 @@ function OhhwellsBridge() {
20942
20901
  ) : void 0
20943
20902
  }
20944
20903
  ),
20945
- toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
20946
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20904
+ toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
20905
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20947
20906
  EditGlowChrome,
20948
20907
  {
20949
20908
  rect: toolbarRect,
@@ -20953,7 +20912,7 @@ function OhhwellsBridge() {
20953
20912
  hideHandle: isItemDragging
20954
20913
  }
20955
20914
  ),
20956
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20915
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20957
20916
  FloatingToolbar,
20958
20917
  {
20959
20918
  rect: toolbarRect,
@@ -20966,7 +20925,7 @@ function OhhwellsBridge() {
20966
20925
  }
20967
20926
  )
20968
20927
  ] }),
20969
- maxBadge && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
20928
+ maxBadge && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
20970
20929
  "div",
20971
20930
  {
20972
20931
  "data-ohw-max-badge": "",
@@ -20992,7 +20951,7 @@ function OhhwellsBridge() {
20992
20951
  ]
20993
20952
  }
20994
20953
  ),
20995
- toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20954
+ toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
20996
20955
  StateToggle,
20997
20956
  {
20998
20957
  rect: toggleState.rect,
@@ -21001,15 +20960,15 @@ function OhhwellsBridge() {
21001
20960
  onStateChange: handleStateChange
21002
20961
  }
21003
20962
  ),
21004
- sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
20963
+ sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
21005
20964
  "div",
21006
20965
  {
21007
20966
  "data-ohw-section-insert-line": "",
21008
20967
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
21009
20968
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
21010
20969
  children: [
21011
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
21012
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20970
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
20971
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
21013
20972
  Badge,
21014
20973
  {
21015
20974
  className: "px-8 py-1 bg-primary hover:bg-primary text-primary-foreground text-xs font-medium shrink-0 rounded-full cursor-pointer pointer-events-auto",
@@ -21026,11 +20985,11 @@ function OhhwellsBridge() {
21026
20985
  children: "Add Section"
21027
20986
  }
21028
20987
  ),
21029
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
20988
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
21030
20989
  ]
21031
20990
  }
21032
20991
  ),
21033
- linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
20992
+ linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
21034
20993
  LinkPopover,
21035
20994
  {
21036
20995
  panelRef: linkPopoverPanelRef,
@@ -21047,7 +21006,7 @@ function OhhwellsBridge() {
21047
21006
  },
21048
21007
  linkPopover.key
21049
21008
  ) : null,
21050
- floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21009
+ floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
21051
21010
  FloatingPanel,
21052
21011
  {
21053
21012
  open: true,
@@ -21057,7 +21016,7 @@ function OhhwellsBridge() {
21057
21016
  onPositionChange: setFloatingPanelPos,
21058
21017
  parentScroll: parentScrollSnap ?? parentScrollRef.current,
21059
21018
  onClose: closeFloatingPanelOnly,
21060
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21019
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
21061
21020
  SocialsDisplayPanel,
21062
21021
  {
21063
21022
  display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
@@ -21068,57 +21027,6 @@ function OhhwellsBridge() {
21068
21027
  }
21069
21028
  )
21070
21029
  }
21071
- ) : null,
21072
- floatingPanel && floatingPanel.kind === "logo-size" && logoSizeDraft ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21073
- FloatingPanel,
21074
- {
21075
- open: true,
21076
- title: floatingPanel.title,
21077
- context: floatingPanel.context,
21078
- position: floatingPanelPos,
21079
- onPositionChange: setFloatingPanelPos,
21080
- parentScroll: parentScrollSnap ?? parentScrollRef.current,
21081
- onClose: closeFloatingPanelAndDeselect,
21082
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21083
- LogoSizePanel,
21084
- {
21085
- viewport: editorViewport,
21086
- sizePx: editorViewport === "mobile" && !logoSizeDraft.mobileFollowing ? logoSizeDraft.mobilePx : logoSizeDraft.desktopPx,
21087
- mobileFollowing: logoSizeDraft.mobileFollowing,
21088
- onSizeChange: (px) => {
21089
- const next = editorViewport === "mobile" ? { ...logoSizeDraft, mobilePx: px, mobileFollowing: false } : {
21090
- ...logoSizeDraft,
21091
- desktopPx: px,
21092
- mobilePx: logoSizeDraft.mobileFollowing ? px : logoSizeDraft.mobilePx
21093
- };
21094
- setLogoSizeDraft(next);
21095
- persistLogoSizeDraft(floatingPanel.placement, next);
21096
- },
21097
- onCustomizeMobile: () => {
21098
- const next = {
21099
- ...logoSizeDraft,
21100
- mobileFollowing: false,
21101
- mobilePx: logoSizeDraft.desktopPx
21102
- };
21103
- setLogoSizeDraft(next);
21104
- persistLogoSizeDraft(floatingPanel.placement, next);
21105
- },
21106
- onResetMobile: () => {
21107
- const next = {
21108
- ...logoSizeDraft,
21109
- mobileFollowing: true,
21110
- mobilePx: logoSizeDraft.desktopPx
21111
- };
21112
- setLogoSizeDraft(next);
21113
- persistLogoSizeDraft(floatingPanel.placement, next);
21114
- },
21115
- onUpdateEverywhere: () => {
21116
- const identity = readLogoIdentityFromDom();
21117
- postToParent2({ type: "ow:open-logo-settings", ...identity });
21118
- }
21119
- }
21120
- )
21121
- }
21122
21030
  ) : null
21123
21031
  ] }),
21124
21032
  bridgeRoot
@@ -21128,10 +21036,10 @@ function OhhwellsBridge() {
21128
21036
 
21129
21037
  // src/ui/EmptySection.tsx
21130
21038
  var import_link = __toESM(require("next/link"), 1);
21131
- var import_jsx_runtime35 = require("react/jsx-runtime");
21039
+ var import_jsx_runtime34 = require("react/jsx-runtime");
21132
21040
  function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
21133
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
21134
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
21041
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
21042
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21135
21043
  "p",
21136
21044
  {
21137
21045
  style: {
@@ -21143,10 +21051,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
21143
21051
  color: "var(--brand-accent)",
21144
21052
  marginBottom: "1.5rem"
21145
21053
  },
21146
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
21054
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
21147
21055
  }
21148
21056
  ),
21149
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
21057
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21150
21058
  "h1",
21151
21059
  {
21152
21060
  style: {
@@ -21161,7 +21069,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
21161
21069
  children: title
21162
21070
  }
21163
21071
  ),
21164
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
21072
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
21165
21073
  "p",
21166
21074
  {
21167
21075
  style: {