@ohhwells/bridge 0.1.33-next.38 → 0.1.33

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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // src/OhhwellsBridge.tsx
4
- import React7, { useCallback as useCallback2, useEffect as useEffect3, useLayoutEffect as useLayoutEffect2, useRef as useRef3, useState as useState5 } from "react";
4
+ import React6, { useCallback as useCallback2, useEffect as useEffect3, useLayoutEffect as useLayoutEffect2, useRef as useRef3, useState as useState5 } from "react";
5
5
  import { createRoot } from "react-dom/client";
6
6
  import { flushSync } from "react-dom";
7
7
 
@@ -712,10 +712,15 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
712
712
  };
713
713
  const handleReplaceSchedule = () => {
714
714
  setIsHovered(false);
715
- window.parent.postMessage(
716
- { type: "ow:scheduling-not-connected", insertAfter, currentScheduleId: schedule?.id },
717
- "*"
718
- );
715
+ if (schedule) {
716
+ window.parent.postMessage({
717
+ type: "ow:schedule-connected",
718
+ schedule: { id: schedule.id, name: schedule.name },
719
+ insertAfter
720
+ }, "*");
721
+ } else {
722
+ window.parent.postMessage({ type: "ow:scheduling-not-connected", insertAfter }, "*");
723
+ }
719
724
  };
720
725
  if (!inEditor && !loading && !schedule) return null;
721
726
  const sectionId = `scheduling-${insertAfter}`;
@@ -758,19 +763,7 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
758
763
  ),
759
764
  /* @__PURE__ */ jsxs2("div", { className: "max-w-[1280px] mx-auto flex flex-col items-center gap-16", children: [
760
765
  /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center gap-4", children: [
761
- /* @__PURE__ */ jsx2(
762
- "h2",
763
- {
764
- className: "font-display text-center m-0 text-(--color-dark,#200C02)",
765
- style: {
766
- fontSize: "var(--fs-section-h2, clamp(40px, 4.4vw, 64px))",
767
- fontWeight: "var(--font-weight-heading, 400)",
768
- lineHeight: 1.05,
769
- letterSpacing: "-0.02em"
770
- },
771
- children: schedule?.name ?? "Book an appointment"
772
- }
773
- ),
766
+ /* @__PURE__ */ jsx2("h2", { className: "font-display text-4xl sm:text-5xl font-bold text-center m-0 text-(--color-dark,#200C02)", children: schedule?.name ?? "Book an appointment" }),
774
767
  schedule?.description && /* @__PURE__ */ jsx2("p", { className: "font-body text-body text-center m-0 text-(--color-accent,#A89B83)", children: schedule.description })
775
768
  ] }),
776
769
  /* @__PURE__ */ jsxs2("div", { className: "w-full flex flex-col items-end gap-3", children: [
@@ -4209,34 +4202,6 @@ function ToggleGroupItem({
4209
4202
  );
4210
4203
  }
4211
4204
 
4212
- // src/ui/drag-handle.tsx
4213
- import * as React3 from "react";
4214
- import { GripVertical } from "lucide-react";
4215
- import { jsx as jsx5 } from "react/jsx-runtime";
4216
- var DragHandle = React3.forwardRef(
4217
- ({ className, type = "button", ...props }, ref) => {
4218
- return /* @__PURE__ */ jsx5(
4219
- "button",
4220
- {
4221
- ref,
4222
- type,
4223
- "data-slot": "drag-handle",
4224
- className: cn(
4225
- "inline-flex h-7 w-4 shrink-0 items-center justify-center rounded-md transition-all duration-200 max-h-[30px]",
4226
- "bg-white border border-transparent text-stone-500 shadow-md cursor-grab",
4227
- "enabled:hover:border enabled:hover:border-stone-200 enabled:hover:text-stone-950",
4228
- "enabled:active:border enabled:active:border-primary enabled:active:bg-primary-50 enabled:active:text-stone-950 enabled:active:shadow enabled:active:cursor-grabbing",
4229
- "disabled:cursor-not-allowed disabled:opacity-40 disabled:text-stone-950 disabled:pointer-events-none",
4230
- className
4231
- ),
4232
- ...props,
4233
- children: /* @__PURE__ */ jsx5(GripVertical, { className: "size-4 shrink-0", "aria-hidden": "true" })
4234
- }
4235
- );
4236
- }
4237
- );
4238
- DragHandle.displayName = "DragHandle";
4239
-
4240
4205
  // src/OhhwellsBridge.tsx
4241
4206
  import { createPortal } from "react-dom";
4242
4207
  import { usePathname, useRouter, useSearchParams } from "next/navigation";
@@ -4516,60 +4481,60 @@ function scrollToHashSectionWhenReady(behavior = "smooth") {
4516
4481
  }
4517
4482
 
4518
4483
  // src/ui/dialog.tsx
4519
- import * as React4 from "react";
4484
+ import * as React3 from "react";
4520
4485
  import { Dialog as DialogPrimitive } from "radix-ui";
4521
4486
 
4522
4487
  // src/ui/icons.tsx
4523
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
4488
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
4524
4489
  function IconX({ className, ...props }) {
4525
4490
  return /* @__PURE__ */ jsxs3("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4526
- /* @__PURE__ */ jsx6("path", { d: "M18 6 6 18" }),
4527
- /* @__PURE__ */ jsx6("path", { d: "m6 6 12 12" })
4491
+ /* @__PURE__ */ jsx5("path", { d: "M18 6 6 18" }),
4492
+ /* @__PURE__ */ jsx5("path", { d: "m6 6 12 12" })
4528
4493
  ] });
4529
4494
  }
4530
4495
  function IconChevronDown({ className, ...props }) {
4531
- return /* @__PURE__ */ jsx6("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: /* @__PURE__ */ jsx6("path", { d: "m6 9 6 6 6-6" }) });
4496
+ return /* @__PURE__ */ jsx5("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: /* @__PURE__ */ jsx5("path", { d: "m6 9 6 6 6-6" }) });
4532
4497
  }
4533
4498
  function IconFile({ className, ...props }) {
4534
4499
  return /* @__PURE__ */ jsxs3("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4535
- /* @__PURE__ */ jsx6("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
4536
- /* @__PURE__ */ jsx6("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
4500
+ /* @__PURE__ */ jsx5("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
4501
+ /* @__PURE__ */ jsx5("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
4537
4502
  ] });
4538
4503
  }
4539
4504
  function IconInfo({ className, ...props }) {
4540
4505
  return /* @__PURE__ */ jsxs3("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4541
- /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "10" }),
4542
- /* @__PURE__ */ jsx6("path", { d: "M12 16v-4" }),
4543
- /* @__PURE__ */ jsx6("path", { d: "M12 8h.01" })
4506
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "10" }),
4507
+ /* @__PURE__ */ jsx5("path", { d: "M12 16v-4" }),
4508
+ /* @__PURE__ */ jsx5("path", { d: "M12 8h.01" })
4544
4509
  ] });
4545
4510
  }
4546
4511
  function IconArrowRight({ className, ...props }) {
4547
4512
  return /* @__PURE__ */ jsxs3("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4548
- /* @__PURE__ */ jsx6("path", { d: "M5 12h14" }),
4549
- /* @__PURE__ */ jsx6("path", { d: "m12 5 7 7-7 7" })
4513
+ /* @__PURE__ */ jsx5("path", { d: "M5 12h14" }),
4514
+ /* @__PURE__ */ jsx5("path", { d: "m12 5 7 7-7 7" })
4550
4515
  ] });
4551
4516
  }
4552
4517
  function IconSection({ className, ...props }) {
4553
4518
  return /* @__PURE__ */ jsxs3("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4554
- /* @__PURE__ */ jsx6("rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }),
4555
- /* @__PURE__ */ jsx6("rect", { width: "9", height: "7", x: "3", y: "14", rx: "1" }),
4556
- /* @__PURE__ */ jsx6("rect", { width: "5", height: "7", x: "16", y: "14", rx: "1" })
4519
+ /* @__PURE__ */ jsx5("rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }),
4520
+ /* @__PURE__ */ jsx5("rect", { width: "9", height: "7", x: "3", y: "14", rx: "1" }),
4521
+ /* @__PURE__ */ jsx5("rect", { width: "5", height: "7", x: "16", y: "14", rx: "1" })
4557
4522
  ] });
4558
4523
  }
4559
4524
 
4560
4525
  // src/ui/dialog.tsx
4561
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
4526
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
4562
4527
  function Dialog2({ ...props }) {
4563
- return /* @__PURE__ */ jsx7(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
4528
+ return /* @__PURE__ */ jsx6(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
4564
4529
  }
4565
4530
  function DialogPortal({ ...props }) {
4566
- return /* @__PURE__ */ jsx7(DialogPrimitive.Portal, { ...props });
4531
+ return /* @__PURE__ */ jsx6(DialogPrimitive.Portal, { ...props });
4567
4532
  }
4568
4533
  function DialogOverlay({
4569
4534
  className,
4570
4535
  ...props
4571
4536
  }) {
4572
- return /* @__PURE__ */ jsx7(
4537
+ return /* @__PURE__ */ jsx6(
4573
4538
  DialogPrimitive.Overlay,
4574
4539
  {
4575
4540
  "data-slot": "dialog-overlay",
@@ -4579,10 +4544,10 @@ function DialogOverlay({
4579
4544
  }
4580
4545
  );
4581
4546
  }
4582
- var DialogContent = React4.forwardRef(({ className, children, showCloseButton = true, container, ...props }, ref) => {
4547
+ var DialogContent = React3.forwardRef(({ className, children, showCloseButton = true, container, ...props }, ref) => {
4583
4548
  const positionMode = container ? "absolute" : "fixed";
4584
4549
  return /* @__PURE__ */ jsxs4(DialogPortal, { container: container ?? void 0, children: [
4585
- /* @__PURE__ */ jsx7(DialogOverlay, { className: cn(positionMode, "inset-0") }),
4550
+ /* @__PURE__ */ jsx6(DialogOverlay, { className: cn(positionMode, "inset-0") }),
4586
4551
  /* @__PURE__ */ jsxs4(
4587
4552
  DialogPrimitive.Content,
4588
4553
  {
@@ -4599,13 +4564,13 @@ var DialogContent = React4.forwardRef(({ className, children, showCloseButton =
4599
4564
  ...props,
4600
4565
  children: [
4601
4566
  children,
4602
- showCloseButton ? /* @__PURE__ */ jsx7(
4567
+ showCloseButton ? /* @__PURE__ */ jsx6(
4603
4568
  DialogPrimitive.Close,
4604
4569
  {
4605
4570
  type: "button",
4606
4571
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
4607
4572
  "aria-label": "Close",
4608
- children: /* @__PURE__ */ jsx7(IconX, { "aria-hidden": true })
4573
+ children: /* @__PURE__ */ jsx6(IconX, { "aria-hidden": true })
4609
4574
  }
4610
4575
  ) : null
4611
4576
  ]
@@ -4615,12 +4580,12 @@ var DialogContent = React4.forwardRef(({ className, children, showCloseButton =
4615
4580
  });
4616
4581
  DialogContent.displayName = DialogPrimitive.Content.displayName;
4617
4582
  function DialogHeader({ className, ...props }) {
4618
- return /* @__PURE__ */ jsx7("div", { className: cn("flex flex-col gap-1.5", className), ...props });
4583
+ return /* @__PURE__ */ jsx6("div", { className: cn("flex flex-col gap-1.5", className), ...props });
4619
4584
  }
4620
4585
  function DialogFooter({ className, ...props }) {
4621
- return /* @__PURE__ */ jsx7("div", { className: cn("flex items-center justify-end gap-2", className), ...props });
4586
+ return /* @__PURE__ */ jsx6("div", { className: cn("flex items-center justify-end gap-2", className), ...props });
4622
4587
  }
4623
- var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
4588
+ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
4624
4589
  DialogPrimitive.Title,
4625
4590
  {
4626
4591
  ref,
@@ -4629,7 +4594,7 @@ var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
4629
4594
  }
4630
4595
  ));
4631
4596
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
4632
- var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
4597
+ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
4633
4598
  DialogPrimitive.Description,
4634
4599
  {
4635
4600
  ref,
@@ -4641,9 +4606,9 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
4641
4606
  var DialogClose = DialogPrimitive.Close;
4642
4607
 
4643
4608
  // src/ui/button.tsx
4644
- import * as React5 from "react";
4609
+ import * as React4 from "react";
4645
4610
  import { Slot } from "radix-ui";
4646
- import { jsx as jsx8 } from "react/jsx-runtime";
4611
+ import { jsx as jsx7 } from "react/jsx-runtime";
4647
4612
  var buttonVariants = cva(
4648
4613
  "inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium transition-colors outline-none disabled:pointer-events-none disabled:opacity-50 min-w-[80px] px-3 py-2",
4649
4614
  {
@@ -4664,10 +4629,10 @@ var buttonVariants = cva(
4664
4629
  }
4665
4630
  }
4666
4631
  );
4667
- var Button = React5.forwardRef(
4632
+ var Button = React4.forwardRef(
4668
4633
  ({ className, variant, size, asChild = false, ...props }, ref) => {
4669
4634
  const Comp = asChild ? Slot.Root : "button";
4670
- return /* @__PURE__ */ jsx8(
4635
+ return /* @__PURE__ */ jsx7(
4671
4636
  Comp,
4672
4637
  {
4673
4638
  ref,
@@ -4681,30 +4646,30 @@ var Button = React5.forwardRef(
4681
4646
  Button.displayName = "Button";
4682
4647
 
4683
4648
  // src/ui/link-modal/DestinationBreadcrumb.tsx
4684
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
4649
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
4685
4650
  function DestinationBreadcrumb({ pageTitle, sectionLabel }) {
4686
4651
  return /* @__PURE__ */ jsxs5("div", { className: "flex w-full flex-col gap-2", children: [
4687
- /* @__PURE__ */ jsx9("p", { className: "text-sm font-medium text-foreground", children: "Destination" }),
4652
+ /* @__PURE__ */ jsx8("p", { className: "text-sm font-medium text-foreground", children: "Destination" }),
4688
4653
  /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3", children: [
4689
4654
  /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
4690
- /* @__PURE__ */ jsx9(IconFile, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4691
- /* @__PURE__ */ jsx9("span", { className: "text-sm font-medium leading-none text-foreground", children: pageTitle })
4655
+ /* @__PURE__ */ jsx8(IconFile, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4656
+ /* @__PURE__ */ jsx8("span", { className: "text-sm font-medium leading-none text-foreground", children: pageTitle })
4692
4657
  ] }),
4693
- /* @__PURE__ */ jsx9(IconArrowRight, { className: "shrink-0 text-muted-foreground", "aria-hidden": true }),
4658
+ /* @__PURE__ */ jsx8(IconArrowRight, { className: "shrink-0 text-muted-foreground", "aria-hidden": true }),
4694
4659
  /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
4695
- /* @__PURE__ */ jsx9(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4696
- /* @__PURE__ */ jsx9("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
4660
+ /* @__PURE__ */ jsx8(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4661
+ /* @__PURE__ */ jsx8("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
4697
4662
  ] })
4698
4663
  ] })
4699
4664
  ] });
4700
4665
  }
4701
4666
 
4702
4667
  // src/ui/link-modal/SectionTreeItem.tsx
4703
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
4668
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4704
4669
  function SectionTreeItem({ section, onSelect, selected }) {
4705
4670
  const interactive = Boolean(onSelect);
4706
4671
  return /* @__PURE__ */ jsxs6("div", { className: "flex h-9 w-full items-end pl-3", children: [
4707
- /* @__PURE__ */ jsx10(
4672
+ /* @__PURE__ */ jsx9(
4708
4673
  "div",
4709
4674
  {
4710
4675
  className: "mr-[-1px] h-9 w-2 shrink-0 rounded-bl-sm border-b border-l border-border mb-4",
@@ -4729,8 +4694,8 @@ function SectionTreeItem({ section, onSelect, selected }) {
4729
4694
  interactive && selected && "border-primary"
4730
4695
  ),
4731
4696
  children: [
4732
- /* @__PURE__ */ jsx10(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4733
- /* @__PURE__ */ jsx10("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
4697
+ /* @__PURE__ */ jsx9(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4698
+ /* @__PURE__ */ jsx9("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
4734
4699
  ]
4735
4700
  }
4736
4701
  )
@@ -4738,11 +4703,11 @@ function SectionTreeItem({ section, onSelect, selected }) {
4738
4703
  }
4739
4704
  function SectionPickerList({ sections, onSelect }) {
4740
4705
  if (sections.length === 0) {
4741
- return /* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." });
4706
+ return /* @__PURE__ */ jsx9("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." });
4742
4707
  }
4743
4708
  return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1", children: [
4744
- /* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground", children: "Pick a section this link should scroll to." }),
4745
- sections.map((section) => /* @__PURE__ */ jsx10(SectionTreeItem, { section, onSelect }, section.id))
4709
+ /* @__PURE__ */ jsx9("p", { className: "text-sm text-muted-foreground", children: "Pick a section this link should scroll to." }),
4710
+ sections.map((section) => /* @__PURE__ */ jsx9(SectionTreeItem, { section, onSelect }, section.id))
4746
4711
  ] });
4747
4712
  }
4748
4713
 
@@ -4750,11 +4715,11 @@ function SectionPickerList({ sections, onSelect }) {
4750
4715
  import { useId as useId2, useRef as useRef2, useState as useState3 } from "react";
4751
4716
 
4752
4717
  // src/ui/input.tsx
4753
- import * as React6 from "react";
4754
- import { jsx as jsx11 } from "react/jsx-runtime";
4755
- var Input = React6.forwardRef(
4718
+ import * as React5 from "react";
4719
+ import { jsx as jsx10 } from "react/jsx-runtime";
4720
+ var Input = React5.forwardRef(
4756
4721
  ({ className, type, ...props }, ref) => {
4757
- return /* @__PURE__ */ jsx11(
4722
+ return /* @__PURE__ */ jsx10(
4758
4723
  "input",
4759
4724
  {
4760
4725
  type,
@@ -4773,9 +4738,9 @@ Input.displayName = "Input";
4773
4738
 
4774
4739
  // src/ui/label.tsx
4775
4740
  import { Label as LabelPrimitive } from "radix-ui";
4776
- import { jsx as jsx12 } from "react/jsx-runtime";
4741
+ import { jsx as jsx11 } from "react/jsx-runtime";
4777
4742
  function Label({ className, ...props }) {
4778
- return /* @__PURE__ */ jsx12(
4743
+ return /* @__PURE__ */ jsx11(
4779
4744
  LabelPrimitive.Root,
4780
4745
  {
4781
4746
  "data-slot": "label",
@@ -4786,9 +4751,9 @@ function Label({ className, ...props }) {
4786
4751
  }
4787
4752
 
4788
4753
  // src/ui/link-modal/UrlOrPageInput.tsx
4789
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
4754
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
4790
4755
  function FieldChevron({ onClick }) {
4791
- return /* @__PURE__ */ jsx13(
4756
+ return /* @__PURE__ */ jsx12(
4792
4757
  "button",
4793
4758
  {
4794
4759
  type: "button",
@@ -4796,7 +4761,7 @@ function FieldChevron({ onClick }) {
4796
4761
  onClick,
4797
4762
  "aria-label": "Open page list",
4798
4763
  tabIndex: -1,
4799
- children: /* @__PURE__ */ jsx13(IconChevronDown, {})
4764
+ children: /* @__PURE__ */ jsx12(IconChevronDown, {})
4800
4765
  }
4801
4766
  );
4802
4767
  }
@@ -4836,11 +4801,11 @@ function UrlOrPageInput({
4836
4801
  urlError ? "border-destructive shadow-[0_0_0_1px_var(--ohw-destructive)]" : isFocused ? "border-primary shadow-[0_0_0_1px_var(--ohw-primary)]" : "border-input"
4837
4802
  );
4838
4803
  return /* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col gap-2 p-0", children: [
4839
- /* @__PURE__ */ jsx13(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
4804
+ /* @__PURE__ */ jsx12(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
4840
4805
  /* @__PURE__ */ jsxs7("div", { className: "relative w-full", children: [
4841
4806
  /* @__PURE__ */ jsxs7("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
4842
- selectedPage ? /* @__PURE__ */ jsx13("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ jsx13(IconFile, { className: "text-foreground", "aria-hidden": true }) }) : null,
4843
- readOnly ? /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ jsx13(
4807
+ selectedPage ? /* @__PURE__ */ jsx12("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ jsx12(IconFile, { className: "text-foreground", "aria-hidden": true }) }) : null,
4808
+ readOnly ? /* @__PURE__ */ jsx12("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ jsx12(
4844
4809
  Input,
4845
4810
  {
4846
4811
  ref: inputRef,
@@ -4859,7 +4824,7 @@ function UrlOrPageInput({
4859
4824
  )
4860
4825
  }
4861
4826
  ),
4862
- selectedPage && !readOnly ? /* @__PURE__ */ jsx13(
4827
+ selectedPage && !readOnly ? /* @__PURE__ */ jsx12(
4863
4828
  "button",
4864
4829
  {
4865
4830
  type: "button",
@@ -4867,12 +4832,12 @@ function UrlOrPageInput({
4867
4832
  onMouseDown: clearSelection,
4868
4833
  "aria-label": "Clear selected page",
4869
4834
  tabIndex: -1,
4870
- children: /* @__PURE__ */ jsx13(IconX, { "aria-hidden": true })
4835
+ children: /* @__PURE__ */ jsx12(IconX, { "aria-hidden": true })
4871
4836
  }
4872
4837
  ) : null,
4873
- !readOnly ? /* @__PURE__ */ jsx13(FieldChevron, { onClick: toggleDropdown }) : null
4838
+ !readOnly ? /* @__PURE__ */ jsx12(FieldChevron, { onClick: toggleDropdown }) : null
4874
4839
  ] }),
4875
- dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ jsx13(
4840
+ dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ jsx12(
4876
4841
  "div",
4877
4842
  {
4878
4843
  "data-ohw-link-page-dropdown": "",
@@ -4885,8 +4850,8 @@ function UrlOrPageInput({
4885
4850
  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",
4886
4851
  onClick: () => onPageSelect(page),
4887
4852
  children: [
4888
- /* @__PURE__ */ jsx13(IconFile, { className: "shrink-0", "aria-hidden": true }),
4889
- /* @__PURE__ */ jsx13("span", { className: "truncate", children: page.title })
4853
+ /* @__PURE__ */ jsx12(IconFile, { className: "shrink-0", "aria-hidden": true }),
4854
+ /* @__PURE__ */ jsx12("span", { className: "truncate", children: page.title })
4890
4855
  ]
4891
4856
  },
4892
4857
  page.path
@@ -4894,7 +4859,7 @@ function UrlOrPageInput({
4894
4859
  }
4895
4860
  ) : null
4896
4861
  ] }),
4897
- urlError ? /* @__PURE__ */ jsx13("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
4862
+ urlError ? /* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
4898
4863
  ] });
4899
4864
  }
4900
4865
 
@@ -5062,7 +5027,7 @@ function useLinkModalState({
5062
5027
  }
5063
5028
 
5064
5029
  // src/ui/link-modal/LinkEditorPanel.tsx
5065
- import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
5030
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
5066
5031
  function LinkEditorPanel({
5067
5032
  open = true,
5068
5033
  mode = "create",
@@ -5087,24 +5052,24 @@ function LinkEditorPanel({
5087
5052
  });
5088
5053
  const isCancel = state.secondaryLabel === "Cancel";
5089
5054
  return /* @__PURE__ */ jsxs8(Fragment2, { children: [
5090
- /* @__PURE__ */ jsx14(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx14(
5055
+ /* @__PURE__ */ jsx13(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx13(
5091
5056
  "button",
5092
5057
  {
5093
5058
  type: "button",
5094
5059
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
5095
5060
  "aria-label": "Close",
5096
- children: /* @__PURE__ */ jsx14(IconX, { "aria-hidden": true })
5061
+ children: /* @__PURE__ */ jsx13(IconX, { "aria-hidden": true })
5097
5062
  }
5098
5063
  ) }),
5099
- /* @__PURE__ */ jsx14(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ jsx14(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
5064
+ /* @__PURE__ */ jsx13(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ jsx13(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
5100
5065
  /* @__PURE__ */ jsxs8("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
5101
- state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ jsx14(
5066
+ state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ jsx13(
5102
5067
  DestinationBreadcrumb,
5103
5068
  {
5104
5069
  pageTitle: state.selectedPage.title,
5105
5070
  sectionLabel: state.selectedSection.label
5106
5071
  }
5107
- ) : /* @__PURE__ */ jsx14(
5072
+ ) : /* @__PURE__ */ jsx13(
5108
5073
  UrlOrPageInput,
5109
5074
  {
5110
5075
  value: state.searchValue,
@@ -5118,17 +5083,17 @@ function LinkEditorPanel({
5118
5083
  }
5119
5084
  ),
5120
5085
  state.showChooseSection ? /* @__PURE__ */ jsxs8("div", { className: "flex flex-col justify-center gap-2", children: [
5121
- /* @__PURE__ */ jsx14(Button, { type: "button", variant: "outline", className: "w-fit cursor-pointer", size: "sm", onClick: state.handleChooseSection, children: "Choose a section" }),
5086
+ /* @__PURE__ */ jsx13(Button, { type: "button", variant: "outline", className: "w-fit cursor-pointer", size: "sm", onClick: state.handleChooseSection, children: "Choose a section" }),
5122
5087
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
5123
- /* @__PURE__ */ jsx14(IconInfo, { className: "shrink-0", "aria-hidden": true }),
5124
- /* @__PURE__ */ jsx14("span", { children: "Pick a section this link should scroll to." })
5088
+ /* @__PURE__ */ jsx13(IconInfo, { className: "shrink-0", "aria-hidden": true }),
5089
+ /* @__PURE__ */ jsx13("span", { children: "Pick a section this link should scroll to." })
5125
5090
  ] })
5126
5091
  ] }) : null,
5127
- state.showSectionPicker ? /* @__PURE__ */ jsx14(SectionPickerList, { sections: state.activeSections, onSelect: state.handleSectionSelect }) : null,
5128
- state.showSectionRow && state.selectedSection ? /* @__PURE__ */ jsx14(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
5092
+ state.showSectionPicker ? /* @__PURE__ */ jsx13(SectionPickerList, { sections: state.activeSections, onSelect: state.handleSectionSelect }) : null,
5093
+ state.showSectionRow && state.selectedSection ? /* @__PURE__ */ jsx13(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
5129
5094
  ] }),
5130
5095
  /* @__PURE__ */ jsxs8(DialogFooter, { className: "w-full px-6 pb-6", children: [
5131
- /* @__PURE__ */ jsx14(
5096
+ /* @__PURE__ */ jsx13(
5132
5097
  Button,
5133
5098
  {
5134
5099
  type: "button",
@@ -5143,7 +5108,7 @@ function LinkEditorPanel({
5143
5108
  children: state.secondaryLabel
5144
5109
  }
5145
5110
  ),
5146
- /* @__PURE__ */ jsx14(
5111
+ /* @__PURE__ */ jsx13(
5147
5112
  Button,
5148
5113
  {
5149
5114
  type: "button",
@@ -5162,7 +5127,7 @@ function LinkEditorPanel({
5162
5127
  }
5163
5128
 
5164
5129
  // src/ui/link-modal/LinkPopover.tsx
5165
- import { jsx as jsx15 } from "react/jsx-runtime";
5130
+ import { jsx as jsx14 } from "react/jsx-runtime";
5166
5131
  function LinkPopover({
5167
5132
  open = true,
5168
5133
  panelRef,
@@ -5170,14 +5135,14 @@ function LinkPopover({
5170
5135
  onClose,
5171
5136
  ...editorProps
5172
5137
  }) {
5173
- return /* @__PURE__ */ jsx15(
5138
+ return /* @__PURE__ */ jsx14(
5174
5139
  Dialog2,
5175
5140
  {
5176
5141
  open,
5177
5142
  onOpenChange: (next) => {
5178
5143
  if (!next) onClose?.();
5179
5144
  },
5180
- children: /* @__PURE__ */ jsx15(
5145
+ children: /* @__PURE__ */ jsx14(
5181
5146
  DialogContent,
5182
5147
  {
5183
5148
  ref: panelRef,
@@ -5187,7 +5152,7 @@ function LinkPopover({
5187
5152
  "data-ohw-bridge": "",
5188
5153
  showCloseButton: false,
5189
5154
  className: "gap-0 p-0 w-full md:w-md pointer-events-auto",
5190
- children: /* @__PURE__ */ jsx15(LinkEditorPanel, { ...editorProps, open, onClose })
5155
+ children: /* @__PURE__ */ jsx14(LinkEditorPanel, { ...editorProps, open, onClose })
5191
5156
  }
5192
5157
  )
5193
5158
  }
@@ -5253,7 +5218,7 @@ function shouldUseDevFixtures() {
5253
5218
  }
5254
5219
 
5255
5220
  // src/ui/badge.tsx
5256
- import { jsx as jsx16 } from "react/jsx-runtime";
5221
+ import { jsx as jsx15 } from "react/jsx-runtime";
5257
5222
  var badgeVariants = cva(
5258
5223
  "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",
5259
5224
  {
@@ -5271,11 +5236,11 @@ var badgeVariants = cva(
5271
5236
  }
5272
5237
  );
5273
5238
  function Badge({ className, variant, ...props }) {
5274
- return /* @__PURE__ */ jsx16("div", { className: cn(badgeVariants({ variant }), className), ...props });
5239
+ return /* @__PURE__ */ jsx15("div", { className: cn(badgeVariants({ variant }), className), ...props });
5275
5240
  }
5276
5241
 
5277
5242
  // src/OhhwellsBridge.tsx
5278
- import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
5243
+ import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
5279
5244
  var PRIMARY = "#0885FE";
5280
5245
  var IMAGE_FADE_MS = 300;
5281
5246
  function runOpacityFade(el, onDone) {
@@ -5449,7 +5414,7 @@ function mountSchedulingWidget(insertAfter, notifyOnConnect = false, scheduleId,
5449
5414
  const root = createRoot(container);
5450
5415
  flushSync(() => {
5451
5416
  root.render(
5452
- /* @__PURE__ */ jsx17(
5417
+ /* @__PURE__ */ jsx16(
5453
5418
  SchedulingWidget,
5454
5419
  {
5455
5420
  notifyOnConnect,
@@ -5497,20 +5462,6 @@ function applyLinkHref(el, val) {
5497
5462
  const anchor = el instanceof HTMLAnchorElement ? el : el.querySelector("a");
5498
5463
  if (anchor) anchor.setAttribute("href", val);
5499
5464
  }
5500
- function getEditMeasureEl(editable) {
5501
- return editable.closest("[data-ohw-href-key]") ?? editable;
5502
- }
5503
- function isDragHandleDisabled(el) {
5504
- const carriers = [
5505
- el.closest("[data-ohw-href-key]"),
5506
- el.closest("[data-ohw-editable]")
5507
- ];
5508
- return carriers.some((carrier) => {
5509
- if (!carrier) return false;
5510
- const raw = carrier.getAttribute("data-ohw-drag-disabled");
5511
- return raw === "true" || raw === "";
5512
- });
5513
- }
5514
5465
  function collectEditableNodes() {
5515
5466
  const nodes = Array.from(document.querySelectorAll("[data-ohw-editable]")).map((el) => {
5516
5467
  if (el.dataset.ohwEditable === "image") {
@@ -5564,14 +5515,6 @@ function getHrefKeyFromElement(el) {
5564
5515
  function isNavbarButton(el) {
5565
5516
  return Boolean(el.closest('[data-ohw-role="navbar-button"]'));
5566
5517
  }
5567
- function getReorderHandleState(el) {
5568
- const linkEl = el.closest("[data-ohw-href-key]");
5569
- if (!linkEl || isNavbarButton(el)) return { key: null, disabled: false };
5570
- return {
5571
- key: linkEl.dataset.ohwHrefKey ?? null,
5572
- disabled: isDragHandleDisabled(el)
5573
- };
5574
- }
5575
5518
  function clearHrefKeyHover(anchor) {
5576
5519
  anchor.removeAttribute("data-ohw-hovered");
5577
5520
  anchor.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
@@ -5701,8 +5644,6 @@ var ICONS = {
5701
5644
  insertUnorderedList: '<line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/>',
5702
5645
  insertOrderedList: '<line x1="10" y1="6" x2="21" y2="6"/><line x1="10" y1="12" x2="21" y2="12"/><line x1="10" y1="18" x2="21" y2="18"/><path d="M4 6h1v4"/><path d="M4 10h2"/><path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"/>'
5703
5646
  };
5704
- var TOOLBAR_PILL_PADDING = 2;
5705
- var TOOLBAR_TOGGLE_GAP = 4;
5706
5647
  var TOOLBAR_GROUPS = [
5707
5648
  [
5708
5649
  { cmd: "bold", title: "Bold" },
@@ -5720,64 +5661,24 @@ var TOOLBAR_GROUPS = [
5720
5661
  { cmd: "insertOrderedList", title: "Numbered List" }
5721
5662
  ]
5722
5663
  ];
5723
- function EditGlowChrome({
5724
- rect,
5725
- elRef,
5726
- reorderHrefKey,
5727
- dragDisabled = false
5728
- }) {
5664
+ function GlowFrame({ rect, elRef }) {
5729
5665
  const GAP = 6;
5730
- return /* @__PURE__ */ jsxs9(
5666
+ return /* @__PURE__ */ jsx16(
5731
5667
  "div",
5732
5668
  {
5733
5669
  ref: elRef,
5734
- "data-ohw-edit-chrome": "",
5735
5670
  style: {
5736
5671
  position: "fixed",
5737
5672
  top: rect.top - GAP,
5738
5673
  left: rect.left - GAP,
5739
5674
  width: rect.width + GAP * 2,
5740
5675
  height: rect.height + GAP * 2,
5676
+ border: "2px solid #0885FE",
5677
+ borderRadius: 8,
5678
+ boxShadow: "0 0 0 4px rgba(8, 133, 254, 0.12)",
5741
5679
  pointerEvents: "none",
5742
5680
  zIndex: 2147483646
5743
- },
5744
- children: [
5745
- /* @__PURE__ */ jsx17(
5746
- "div",
5747
- {
5748
- style: {
5749
- position: "absolute",
5750
- inset: 0,
5751
- border: "2px solid #0885FE",
5752
- borderRadius: 8,
5753
- boxShadow: "0 0 0 4px rgba(8, 133, 254, 0.12)",
5754
- pointerEvents: "none"
5755
- }
5756
- }
5757
- ),
5758
- reorderHrefKey && /* @__PURE__ */ jsx17(
5759
- "div",
5760
- {
5761
- "data-ohw-drag-handle-container": "",
5762
- "data-ohw-drag-disabled": dragDisabled ? "" : void 0,
5763
- style: {
5764
- position: "absolute",
5765
- left: 0,
5766
- top: "50%",
5767
- transform: "translate(calc(-100% - 7px), -50%)",
5768
- pointerEvents: dragDisabled ? "none" : "auto"
5769
- },
5770
- children: /* @__PURE__ */ jsx17(
5771
- DragHandle,
5772
- {
5773
- "aria-label": `Reorder ${reorderHrefKey}`,
5774
- disabled: dragDisabled,
5775
- "aria-disabled": dragDisabled
5776
- }
5777
- )
5778
- }
5779
- )
5780
- ]
5681
+ }
5781
5682
  }
5782
5683
  );
5783
5684
  }
@@ -5821,9 +5722,9 @@ function clampToolbarToClip(top, transform, rect, clip, approxH, gap) {
5821
5722
  const pinnedTop = Math.min(maxBottom - approxH, Math.max(minTop, clip.top + gap));
5822
5723
  return { top: pinnedTop + approxH, transform: "translateX(-50%) translateY(-100%)" };
5823
5724
  }
5824
- function calcToolbarPos(rect, parentScroll, approxW = 306) {
5725
+ function calcToolbarPos(rect, parentScroll, approxW = 330) {
5825
5726
  const GAP = 8;
5826
- const APPROX_H = 32;
5727
+ const APPROX_H = 36;
5827
5728
  const APPROX_W = approxW;
5828
5729
  const clip = getIframeVisibleClip(parentScroll);
5829
5730
  const clipTop = clip?.top ?? 0;
@@ -5858,8 +5759,8 @@ function calcToolbarPos(rect, parentScroll, approxW = 306) {
5858
5759
  return { top, left, transform };
5859
5760
  }
5860
5761
  var EDIT_LINK_ICON = /* @__PURE__ */ jsxs9("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
5861
- /* @__PURE__ */ jsx17("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
5862
- /* @__PURE__ */ jsx17("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
5762
+ /* @__PURE__ */ jsx16("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
5763
+ /* @__PURE__ */ jsx16("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
5863
5764
  ] });
5864
5765
  function FloatingToolbar({
5865
5766
  rect,
@@ -5871,7 +5772,7 @@ function FloatingToolbar({
5871
5772
  showEditLink,
5872
5773
  onEditLink
5873
5774
  }) {
5874
- const approxW = variant === "link-action" ? 112 : 306;
5775
+ const approxW = variant === "link-action" ? 120 : 330;
5875
5776
  const { top, left, transform } = calcToolbarPos(rect, parentScroll, approxW);
5876
5777
  if (variant === "link-action") {
5877
5778
  return /* @__PURE__ */ jsxs9(
@@ -5891,15 +5792,15 @@ function FloatingToolbar({
5891
5792
  boxShadow: "0px 2px 4px -2px rgba(0,0,0,.1),0px 4px 6px -1px rgba(0,0,0,.1)",
5892
5793
  display: "flex",
5893
5794
  alignItems: "center",
5894
- padding: TOOLBAR_PILL_PADDING,
5895
- gap: TOOLBAR_TOGGLE_GAP,
5795
+ padding: 4,
5796
+ gap: 6,
5896
5797
  fontFamily: "sans-serif",
5897
5798
  pointerEvents: "auto",
5898
5799
  whiteSpace: "nowrap"
5899
5800
  },
5900
5801
  onMouseDown: (e) => e.stopPropagation(),
5901
5802
  children: [
5902
- /* @__PURE__ */ jsx17(
5803
+ /* @__PURE__ */ jsx16(
5903
5804
  "button",
5904
5805
  {
5905
5806
  type: "button",
@@ -5934,8 +5835,8 @@ function FloatingToolbar({
5934
5835
  children: EDIT_LINK_ICON
5935
5836
  }
5936
5837
  ),
5937
- /* @__PURE__ */ jsx17("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5938
- /* @__PURE__ */ jsx17(
5838
+ /* @__PURE__ */ jsx16("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5839
+ /* @__PURE__ */ jsx16(
5939
5840
  "button",
5940
5841
  {
5941
5842
  type: "button",
@@ -5955,9 +5856,9 @@ function FloatingToolbar({
5955
5856
  opacity: 0.6
5956
5857
  },
5957
5858
  children: /* @__PURE__ */ jsxs9("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: [
5958
- /* @__PURE__ */ jsx17("circle", { cx: "5", cy: "12", r: "1.5" }),
5959
- /* @__PURE__ */ jsx17("circle", { cx: "12", cy: "12", r: "1.5" }),
5960
- /* @__PURE__ */ jsx17("circle", { cx: "19", cy: "12", r: "1.5" })
5859
+ /* @__PURE__ */ jsx16("circle", { cx: "5", cy: "12", r: "1.5" }),
5860
+ /* @__PURE__ */ jsx16("circle", { cx: "12", cy: "12", r: "1.5" }),
5861
+ /* @__PURE__ */ jsx16("circle", { cx: "19", cy: "12", r: "1.5" })
5961
5862
  ] })
5962
5863
  }
5963
5864
  )
@@ -5982,19 +5883,19 @@ function FloatingToolbar({
5982
5883
  boxShadow: "0px 2px 4px -2px rgba(0,0,0,.1),0px 4px 6px -1px rgba(0,0,0,.1)",
5983
5884
  display: "flex",
5984
5885
  alignItems: "center",
5985
- padding: TOOLBAR_PILL_PADDING,
5986
- gap: TOOLBAR_TOGGLE_GAP,
5886
+ padding: 4,
5887
+ gap: 6,
5987
5888
  fontFamily: "sans-serif",
5988
5889
  pointerEvents: "auto",
5989
5890
  whiteSpace: "nowrap"
5990
5891
  },
5991
5892
  onMouseDown: (e) => e.stopPropagation(),
5992
5893
  children: [
5993
- TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ jsxs9(React7.Fragment, { children: [
5994
- gi > 0 && /* @__PURE__ */ jsx17("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5894
+ TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ jsxs9(React6.Fragment, { children: [
5895
+ gi > 0 && /* @__PURE__ */ jsx16("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5995
5896
  btns.map((btn) => {
5996
5897
  const isActive = activeCommands.has(btn.cmd);
5997
- return /* @__PURE__ */ jsx17(
5898
+ return /* @__PURE__ */ jsx16(
5998
5899
  "button",
5999
5900
  {
6000
5901
  title: btn.title,
@@ -6020,7 +5921,7 @@ function FloatingToolbar({
6020
5921
  flexShrink: 0,
6021
5922
  padding: 6
6022
5923
  },
6023
- children: /* @__PURE__ */ jsx17(
5924
+ children: /* @__PURE__ */ jsx16(
6024
5925
  "svg",
6025
5926
  {
6026
5927
  width: "16",
@@ -6040,7 +5941,7 @@ function FloatingToolbar({
6040
5941
  );
6041
5942
  })
6042
5943
  ] }, gi)),
6043
- showEditLink ? /* @__PURE__ */ jsx17(
5944
+ showEditLink ? /* @__PURE__ */ jsx16(
6044
5945
  "button",
6045
5946
  {
6046
5947
  type: "button",
@@ -6089,7 +5990,7 @@ function StateToggle({
6089
5990
  states,
6090
5991
  onStateChange
6091
5992
  }) {
6092
- return /* @__PURE__ */ jsx17(
5993
+ return /* @__PURE__ */ jsx16(
6093
5994
  ToggleGroup,
6094
5995
  {
6095
5996
  "data-ohw-state-toggle": "",
@@ -6103,7 +6004,7 @@ function StateToggle({
6103
6004
  left: rect.right - 8,
6104
6005
  transform: "translateX(-100%)"
6105
6006
  },
6106
- children: states.map((state) => /* @__PURE__ */ jsx17(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
6007
+ children: states.map((state) => /* @__PURE__ */ jsx16(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
6107
6008
  }
6108
6009
  );
6109
6010
  }
@@ -6201,8 +6102,6 @@ function OhhwellsBridge() {
6201
6102
  const [toolbarVariant, setToolbarVariant] = useState5("none");
6202
6103
  const toolbarVariantRef = useRef3("none");
6203
6104
  toolbarVariantRef.current = toolbarVariant;
6204
- const [reorderHrefKey, setReorderHrefKey] = useState5(null);
6205
- const [reorderDragDisabled, setReorderDragDisabled] = useState5(false);
6206
6105
  const [toggleState, setToggleState] = useState5(null);
6207
6106
  const [maxBadge, setMaxBadge] = useState5(null);
6208
6107
  const [activeCommands, setActiveCommands] = useState5(/* @__PURE__ */ new Set());
@@ -6309,7 +6208,7 @@ function OhhwellsBridge() {
6309
6208
  useEffect3(() => {
6310
6209
  const update = () => {
6311
6210
  const el = activeElRef.current ?? selectedElRef.current;
6312
- if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
6211
+ if (el) setToolbarRect(el.getBoundingClientRect());
6313
6212
  setToggleState((prev) => {
6314
6213
  if (!prev || !activeStateElRef.current) return prev;
6315
6214
  return { ...prev, rect: activeStateElRef.current.getBoundingClientRect() };
@@ -6376,8 +6275,6 @@ function OhhwellsBridge() {
6376
6275
  }
6377
6276
  el.removeAttribute("contenteditable");
6378
6277
  activeElRef.current = null;
6379
- setReorderHrefKey(null);
6380
- setReorderDragDisabled(false);
6381
6278
  if (!selectedElRef.current) {
6382
6279
  setToolbarRect(null);
6383
6280
  setToolbarVariant("none");
@@ -6415,15 +6312,11 @@ function OhhwellsBridge() {
6415
6312
  setToolbarVariant("rich-text");
6416
6313
  el.setAttribute("contenteditable", "true");
6417
6314
  el.removeAttribute("data-ohw-hovered");
6418
- el.closest("[data-ohw-href-key]")?.removeAttribute("data-ohw-hovered");
6419
6315
  activeElRef.current = el;
6420
6316
  originalContentRef.current = el.innerHTML;
6421
6317
  el.focus();
6318
+ setToolbarRect(el.getBoundingClientRect());
6422
6319
  setToolbarShowEditLink(Boolean(getHrefKeyFromElement(el)));
6423
- const { key: reorderKey, disabled: reorderDisabled } = getReorderHandleState(el);
6424
- setReorderHrefKey(reorderKey);
6425
- setReorderDragDisabled(reorderDisabled);
6426
- setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
6427
6320
  postToParent({ type: "ow:enter-edit", key: el.dataset.ohwKey });
6428
6321
  requestAnimationFrame(() => refreshActiveCommandsRef.current());
6429
6322
  }, [deactivate, postToParent]);
@@ -6488,7 +6381,7 @@ function OhhwellsBridge() {
6488
6381
  return () => {
6489
6382
  cancelled = true;
6490
6383
  };
6491
- }, [subdomain, isEditMode]);
6384
+ }, [subdomain, isEditMode, pathname]);
6492
6385
  useEffect3(() => {
6493
6386
  if (!subdomain || isEditMode) return;
6494
6387
  let debounceTimer = null;
@@ -6525,7 +6418,7 @@ function OhhwellsBridge() {
6525
6418
  if (debounceTimer) clearTimeout(debounceTimer);
6526
6419
  debounceTimer = setTimeout(applyFromCache, 150);
6527
6420
  };
6528
- applyFromCache();
6421
+ scheduleApply();
6529
6422
  observer = new MutationObserver(scheduleApply);
6530
6423
  observer.observe(document.body, { childList: true, subtree: true });
6531
6424
  return () => {
@@ -6653,11 +6546,6 @@ function OhhwellsBridge() {
6653
6546
  if (target.closest("[data-ohw-state-toggle]")) return;
6654
6547
  if (target.closest("[data-ohw-max-badge]")) return;
6655
6548
  if (isInsideLinkEditor(target)) return;
6656
- if (target.closest('[data-ohw-edit-chrome], [data-ohw-drag-handle-container], [data-slot="drag-handle"]')) {
6657
- e.preventDefault();
6658
- e.stopPropagation();
6659
- return;
6660
- }
6661
6549
  const editable = target.closest("[data-ohw-editable]");
6662
6550
  if (editable) {
6663
6551
  if (editable.dataset.ohwEditable === "link") {
@@ -6734,18 +6622,14 @@ function OhhwellsBridge() {
6734
6622
  const selected = selectedElRef.current;
6735
6623
  if (selected && (selected === editable || selected.contains(editable))) return;
6736
6624
  if (editable.dataset.ohwEditable !== "image" && editable.dataset.ohwEditable !== "bg-image" && !editable.hasAttribute("contenteditable")) {
6737
- const hoverTarget = editable.closest("[data-ohw-href-key]") ?? editable;
6738
- hoverTarget.setAttribute("data-ohw-hovered", "");
6625
+ editable.setAttribute("data-ohw-hovered", "");
6739
6626
  }
6740
6627
  };
6741
6628
  const handleMouseOut = (e) => {
6742
6629
  const editable = e.target.closest("[data-ohw-editable]");
6743
6630
  if (!editable) return;
6744
- const related = e.relatedTarget instanceof Element ? e.relatedTarget : null;
6745
- if (related?.closest("[data-ohw-drag-handle-container]")) return;
6746
6631
  if (editable.dataset.ohwEditable !== "image" && editable.dataset.ohwEditable !== "bg-image") {
6747
- const hoverTarget = editable.closest("[data-ohw-href-key]") ?? editable;
6748
- hoverTarget.removeAttribute("data-ohw-hovered");
6632
+ editable.removeAttribute("data-ohw-hovered");
6749
6633
  }
6750
6634
  };
6751
6635
  const toProbeCoords = (clientX, clientY, fromParentViewport) => {
@@ -6860,20 +6744,11 @@ function OhhwellsBridge() {
6860
6744
  return;
6861
6745
  }
6862
6746
  }
6863
- if (activeElRef.current) {
6864
- if (hoveredImageRef.current) {
6865
- hoveredImageRef.current = null;
6866
- hoveredImageHasTextOverlapRef.current = false;
6867
- resumeAnimTracks();
6868
- postToParentRef.current({ type: "ow:image-unhover" });
6869
- }
6870
- return;
6871
- }
6872
6747
  const imgEl = findImageAtPoint(clientX, clientY, fromParentViewport);
6873
6748
  if (imgEl) {
6874
6749
  const { x, y } = toProbeCoords(clientX, clientY, fromParentViewport);
6875
6750
  const topEl = document.elementFromPoint(x, y);
6876
- if (topEl?.closest('[data-ohw-toolbar], [data-ohw-edit-chrome], [data-ohw-drag-handle-container], [data-slot="drag-handle"]')) {
6751
+ if (topEl?.closest("[data-ohw-toolbar]")) {
6877
6752
  if (hoveredImageRef.current) {
6878
6753
  hoveredImageRef.current = null;
6879
6754
  resumeAnimTracks();
@@ -7166,7 +7041,7 @@ function OhhwellsBridge() {
7166
7041
  const el = e.target;
7167
7042
  const key = el.dataset.ohwKey;
7168
7043
  if (!key) return;
7169
- if (el === activeElRef.current) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
7044
+ if (el === activeElRef.current) setToolbarRect(el.getBoundingClientRect());
7170
7045
  const maxLen = el.dataset.ohwMaxLength ? parseInt(el.dataset.ohwMaxLength, 10) : null;
7171
7046
  if (maxLen) {
7172
7047
  const current = el.innerText.replace(/\n$/, "").length;
@@ -7396,7 +7271,7 @@ function OhhwellsBridge() {
7396
7271
  };
7397
7272
  const applyToolbarPos = (rect) => {
7398
7273
  const ps = parentScrollRef.current;
7399
- const approxW = toolbarVariantRef.current === "link-action" ? 112 : 306;
7274
+ const approxW = toolbarVariantRef.current === "link-action" ? 120 : 330;
7400
7275
  if (toolbarElRef.current) {
7401
7276
  const { top, left, transform } = calcToolbarPos(rect, ps, approxW);
7402
7277
  toolbarElRef.current.style.top = `${top}px`;
@@ -7575,7 +7450,7 @@ function OhhwellsBridge() {
7575
7450
  const handleCommand = useCallback2((cmd) => {
7576
7451
  document.execCommand(cmd, false);
7577
7452
  activeElRef.current?.focus();
7578
- if (activeElRef.current) setToolbarRect(getEditMeasureEl(activeElRef.current).getBoundingClientRect());
7453
+ if (activeElRef.current) setToolbarRect(activeElRef.current.getBoundingClientRect());
7579
7454
  refreshActiveCommandsRef.current();
7580
7455
  }, []);
7581
7456
  const handleStateChange = useCallback2((state) => {
@@ -7629,18 +7504,10 @@ function OhhwellsBridge() {
7629
7504
  linkPopoverOpenRef.current = linkPopover !== null;
7630
7505
  return bridgeRoot ? createPortal(
7631
7506
  /* @__PURE__ */ jsxs9(Fragment3, { children: [
7632
- /* @__PURE__ */ jsx17("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
7507
+ /* @__PURE__ */ jsx16("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
7633
7508
  toolbarRect && /* @__PURE__ */ jsxs9(Fragment3, { children: [
7634
- /* @__PURE__ */ jsx17(
7635
- EditGlowChrome,
7636
- {
7637
- rect: toolbarRect,
7638
- elRef: glowElRef,
7639
- reorderHrefKey,
7640
- dragDisabled: reorderDragDisabled
7641
- }
7642
- ),
7643
- toolbarVariant === "rich-text" && /* @__PURE__ */ jsx17(
7509
+ /* @__PURE__ */ jsx16(GlowFrame, { rect: toolbarRect, elRef: glowElRef }),
7510
+ toolbarVariant === "rich-text" && /* @__PURE__ */ jsx16(
7644
7511
  FloatingToolbar,
7645
7512
  {
7646
7513
  variant: "rich-text",
@@ -7653,7 +7520,7 @@ function OhhwellsBridge() {
7653
7520
  onEditLink: openLinkPopoverForActive
7654
7521
  }
7655
7522
  ),
7656
- toolbarVariant === "link-action" && /* @__PURE__ */ jsx17(
7523
+ toolbarVariant === "link-action" && /* @__PURE__ */ jsx16(
7657
7524
  FloatingToolbar,
7658
7525
  {
7659
7526
  variant: "link-action",
@@ -7692,7 +7559,7 @@ function OhhwellsBridge() {
7692
7559
  ]
7693
7560
  }
7694
7561
  ),
7695
- toggleState && /* @__PURE__ */ jsx17(
7562
+ toggleState && /* @__PURE__ */ jsx16(
7696
7563
  StateToggle,
7697
7564
  {
7698
7565
  rect: toggleState.rect,
@@ -7708,8 +7575,8 @@ function OhhwellsBridge() {
7708
7575
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
7709
7576
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
7710
7577
  children: [
7711
- /* @__PURE__ */ jsx17("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7712
- /* @__PURE__ */ jsx17(
7578
+ /* @__PURE__ */ jsx16("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7579
+ /* @__PURE__ */ jsx16(
7713
7580
  Badge,
7714
7581
  {
7715
7582
  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",
@@ -7722,11 +7589,11 @@ function OhhwellsBridge() {
7722
7589
  children: "Add Section"
7723
7590
  }
7724
7591
  ),
7725
- /* @__PURE__ */ jsx17("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7592
+ /* @__PURE__ */ jsx16("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7726
7593
  ]
7727
7594
  }
7728
7595
  ),
7729
- linkPopover && dialogPortalContainer ? /* @__PURE__ */ jsx17(
7596
+ linkPopover && dialogPortalContainer ? /* @__PURE__ */ jsx16(
7730
7597
  LinkPopover,
7731
7598
  {
7732
7599
  panelRef: linkPopoverPanelRef,
@@ -7741,38 +7608,12 @@ function OhhwellsBridge() {
7741
7608
  onSubmit: handleLinkPopoverSubmit
7742
7609
  },
7743
7610
  `${linkPopover.key}-${pathname}`
7744
- ) : null,
7745
- sectionGap && /* @__PURE__ */ jsxs9(
7746
- "div",
7747
- {
7748
- "data-ohw-section-insert-line": "",
7749
- className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
7750
- style: { top: sectionGap.y, transform: "translateY(-50%)" },
7751
- children: [
7752
- /* @__PURE__ */ jsx17("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7753
- /* @__PURE__ */ jsx17(
7754
- Badge,
7755
- {
7756
- 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",
7757
- onClick: () => {
7758
- window.parent.postMessage(
7759
- { type: "ow:add-section", insertAfter: sectionGap.insertAfter, insertBefore: sectionGap.insertBefore },
7760
- "*"
7761
- );
7762
- },
7763
- children: "Add Section"
7764
- }
7765
- ),
7766
- /* @__PURE__ */ jsx17("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7767
- ]
7768
- }
7769
- )
7611
+ ) : null
7770
7612
  ] }),
7771
7613
  bridgeRoot
7772
7614
  ) : null;
7773
7615
  }
7774
7616
  export {
7775
- DragHandle,
7776
7617
  LinkEditorPanel,
7777
7618
  LinkPopover,
7778
7619
  OhhwellsBridge,
@@ -7783,7 +7624,6 @@ export {
7783
7624
  buildTarget,
7784
7625
  filterAvailablePages,
7785
7626
  getEditModeInitialState,
7786
- isEditSessionActive,
7787
7627
  isValidUrl,
7788
7628
  parseTarget,
7789
7629
  toggleVariants,