@ohhwells/bridge 0.1.31-next.29 → 0.1.31-next.30

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
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/index.ts
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
+ DragHandle: () => DragHandle,
34
35
  LinkEditorPanel: () => LinkEditorPanel,
35
36
  LinkPopover: () => LinkPopover,
36
37
  OhhwellsBridge: () => OhhwellsBridge,
@@ -41,6 +42,7 @@ __export(index_exports, {
41
42
  buildTarget: () => buildTarget,
42
43
  filterAvailablePages: () => filterAvailablePages,
43
44
  getEditModeInitialState: () => getEditModeInitialState,
45
+ isEditSessionActive: () => isEditSessionActive,
44
46
  isValidUrl: () => isValidUrl,
45
47
  parseTarget: () => parseTarget,
46
48
  toggleVariants: () => toggleVariants,
@@ -4211,6 +4213,34 @@ function ToggleGroupItem({
4211
4213
  );
4212
4214
  }
4213
4215
 
4216
+ // src/ui/drag-handle.tsx
4217
+ var React3 = __toESM(require("react"), 1);
4218
+ var import_lucide_react = require("lucide-react");
4219
+ var import_jsx_runtime5 = require("react/jsx-runtime");
4220
+ var DragHandle = React3.forwardRef(
4221
+ ({ className, type = "button", ...props }, ref) => {
4222
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4223
+ "button",
4224
+ {
4225
+ ref,
4226
+ type,
4227
+ "data-slot": "drag-handle",
4228
+ className: cn(
4229
+ "inline-flex h-7 w-4 shrink-0 items-center justify-center rounded-md transition-all duration-200",
4230
+ "bg-white border border-transparent text-stone-500 shadow-md cursor-grab",
4231
+ "enabled:hover:border enabled:hover:border-stone-200 enabled:hover:text-stone-950",
4232
+ "enabled:active:border enabled:active:border-primary enabled:active:bg-primary-50 enabled:active:text-stone-950 enabled:active:shadow enabled:active:cursor-grabbing",
4233
+ "disabled:cursor-not-allowed disabled:opacity-40 disabled:text-stone-950 disabled:pointer-events-none",
4234
+ className
4235
+ ),
4236
+ ...props,
4237
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.GripVertical, { className: "size-4 shrink-0", "aria-hidden": "true" })
4238
+ }
4239
+ );
4240
+ }
4241
+ );
4242
+ DragHandle.displayName = "DragHandle";
4243
+
4214
4244
  // src/OhhwellsBridge.tsx
4215
4245
  var import_react_dom2 = require("react-dom");
4216
4246
  var import_navigation = require("next/navigation");
@@ -4490,60 +4520,60 @@ function scrollToHashSectionWhenReady(behavior = "smooth") {
4490
4520
  }
4491
4521
 
4492
4522
  // src/ui/dialog.tsx
4493
- var React3 = __toESM(require("react"), 1);
4523
+ var React4 = __toESM(require("react"), 1);
4494
4524
  var import_radix_ui3 = require("radix-ui");
4495
4525
 
4496
4526
  // src/ui/icons.tsx
4497
- var import_jsx_runtime5 = require("react/jsx-runtime");
4527
+ var import_jsx_runtime6 = require("react/jsx-runtime");
4498
4528
  function IconX({ className, ...props }) {
4499
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4500
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M18 6 6 18" }),
4501
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m6 6 12 12" })
4529
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4530
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M18 6 6 18" }),
4531
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m6 6 12 12" })
4502
4532
  ] });
4503
4533
  }
4504
4534
  function IconChevronDown({ className, ...props }) {
4505
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m6 9 6 6 6-6" }) });
4535
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m6 9 6 6 6-6" }) });
4506
4536
  }
4507
4537
  function IconFile({ className, ...props }) {
4508
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4509
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
4510
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
4538
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4539
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
4540
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
4511
4541
  ] });
4512
4542
  }
4513
4543
  function IconInfo({ className, ...props }) {
4514
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4515
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
4516
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 16v-4" }),
4517
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 8h.01" })
4544
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4545
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
4546
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 16v-4" }),
4547
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 8h.01" })
4518
4548
  ] });
4519
4549
  }
4520
4550
  function IconArrowRight({ className, ...props }) {
4521
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4522
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M5 12h14" }),
4523
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m12 5 7 7-7 7" })
4551
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4552
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M5 12h14" }),
4553
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m12 5 7 7-7 7" })
4524
4554
  ] });
4525
4555
  }
4526
4556
  function IconSection({ className, ...props }) {
4527
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4528
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }),
4529
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { width: "9", height: "7", x: "3", y: "14", rx: "1" }),
4530
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { width: "5", height: "7", x: "16", y: "14", rx: "1" })
4557
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, ...props, children: [
4558
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { width: "18", height: "7", x: "3", y: "3", rx: "1" }),
4559
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { width: "9", height: "7", x: "3", y: "14", rx: "1" }),
4560
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { width: "5", height: "7", x: "16", y: "14", rx: "1" })
4531
4561
  ] });
4532
4562
  }
4533
4563
 
4534
4564
  // src/ui/dialog.tsx
4535
- var import_jsx_runtime6 = require("react/jsx-runtime");
4565
+ var import_jsx_runtime7 = require("react/jsx-runtime");
4536
4566
  function Dialog2({ ...props }) {
4537
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_radix_ui3.Dialog.Root, { "data-slot": "dialog", ...props });
4567
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui3.Dialog.Root, { "data-slot": "dialog", ...props });
4538
4568
  }
4539
4569
  function DialogPortal({ ...props }) {
4540
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_radix_ui3.Dialog.Portal, { ...props });
4570
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_radix_ui3.Dialog.Portal, { ...props });
4541
4571
  }
4542
4572
  function DialogOverlay({
4543
4573
  className,
4544
4574
  ...props
4545
4575
  }) {
4546
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4576
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4547
4577
  import_radix_ui3.Dialog.Overlay,
4548
4578
  {
4549
4579
  "data-slot": "dialog-overlay",
@@ -4553,11 +4583,11 @@ function DialogOverlay({
4553
4583
  }
4554
4584
  );
4555
4585
  }
4556
- var DialogContent = React3.forwardRef(({ className, children, showCloseButton = true, container, ...props }, ref) => {
4586
+ var DialogContent = React4.forwardRef(({ className, children, showCloseButton = true, container, ...props }, ref) => {
4557
4587
  const positionMode = container ? "absolute" : "fixed";
4558
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DialogPortal, { container: container ?? void 0, children: [
4559
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
4560
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
4588
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(DialogPortal, { container: container ?? void 0, children: [
4589
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
4590
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
4561
4591
  import_radix_ui3.Dialog.Content,
4562
4592
  {
4563
4593
  ref,
@@ -4573,13 +4603,13 @@ var DialogContent = React3.forwardRef(({ className, children, showCloseButton =
4573
4603
  ...props,
4574
4604
  children: [
4575
4605
  children,
4576
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4606
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4577
4607
  import_radix_ui3.Dialog.Close,
4578
4608
  {
4579
4609
  type: "button",
4580
4610
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
4581
4611
  "aria-label": "Close",
4582
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconX, { "aria-hidden": true })
4612
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconX, { "aria-hidden": true })
4583
4613
  }
4584
4614
  ) : null
4585
4615
  ]
@@ -4589,12 +4619,12 @@ var DialogContent = React3.forwardRef(({ className, children, showCloseButton =
4589
4619
  });
4590
4620
  DialogContent.displayName = import_radix_ui3.Dialog.Content.displayName;
4591
4621
  function DialogHeader({ className, ...props }) {
4592
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
4622
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
4593
4623
  }
4594
4624
  function DialogFooter({ className, ...props }) {
4595
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("flex items-center justify-end gap-2", className), ...props });
4625
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("flex items-center justify-end gap-2", className), ...props });
4596
4626
  }
4597
- var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4627
+ var DialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4598
4628
  import_radix_ui3.Dialog.Title,
4599
4629
  {
4600
4630
  ref,
@@ -4603,7 +4633,7 @@ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
4603
4633
  }
4604
4634
  ));
4605
4635
  DialogTitle.displayName = import_radix_ui3.Dialog.Title.displayName;
4606
- var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4636
+ var DialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4607
4637
  import_radix_ui3.Dialog.Description,
4608
4638
  {
4609
4639
  ref,
@@ -4615,9 +4645,9 @@ DialogDescription.displayName = import_radix_ui3.Dialog.Description.displayName;
4615
4645
  var DialogClose = import_radix_ui3.Dialog.Close;
4616
4646
 
4617
4647
  // src/ui/button.tsx
4618
- var React4 = __toESM(require("react"), 1);
4648
+ var React5 = __toESM(require("react"), 1);
4619
4649
  var import_radix_ui4 = require("radix-ui");
4620
- var import_jsx_runtime7 = require("react/jsx-runtime");
4650
+ var import_jsx_runtime8 = require("react/jsx-runtime");
4621
4651
  var buttonVariants = cva(
4622
4652
  "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",
4623
4653
  {
@@ -4638,10 +4668,10 @@ var buttonVariants = cva(
4638
4668
  }
4639
4669
  }
4640
4670
  );
4641
- var Button = React4.forwardRef(
4671
+ var Button = React5.forwardRef(
4642
4672
  ({ className, variant, size, asChild = false, ...props }, ref) => {
4643
4673
  const Comp = asChild ? import_radix_ui4.Slot.Root : "button";
4644
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4674
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4645
4675
  Comp,
4646
4676
  {
4647
4677
  ref,
@@ -4655,37 +4685,37 @@ var Button = React4.forwardRef(
4655
4685
  Button.displayName = "Button";
4656
4686
 
4657
4687
  // src/ui/link-modal/DestinationBreadcrumb.tsx
4658
- var import_jsx_runtime8 = require("react/jsx-runtime");
4688
+ var import_jsx_runtime9 = require("react/jsx-runtime");
4659
4689
  function DestinationBreadcrumb({ pageTitle, sectionLabel }) {
4660
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
4661
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm font-medium text-foreground", children: "Destination" }),
4662
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3", children: [
4663
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2", children: [
4664
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconFile, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4665
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm font-medium leading-none text-foreground", children: pageTitle })
4690
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
4691
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm font-medium text-foreground", children: "Destination" }),
4692
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
4693
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
4694
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconFile, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4695
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-medium leading-none text-foreground", children: pageTitle })
4666
4696
  ] }),
4667
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconArrowRight, { className: "shrink-0 text-muted-foreground", "aria-hidden": true }),
4668
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
4669
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4670
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
4697
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconArrowRight, { className: "shrink-0 text-muted-foreground", "aria-hidden": true }),
4698
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
4699
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4700
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
4671
4701
  ] })
4672
4702
  ] })
4673
4703
  ] });
4674
4704
  }
4675
4705
 
4676
4706
  // src/ui/link-modal/SectionTreeItem.tsx
4677
- var import_jsx_runtime9 = require("react/jsx-runtime");
4707
+ var import_jsx_runtime10 = require("react/jsx-runtime");
4678
4708
  function SectionTreeItem({ section, onSelect, selected }) {
4679
4709
  const interactive = Boolean(onSelect);
4680
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
4681
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4710
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
4711
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4682
4712
  "div",
4683
4713
  {
4684
4714
  className: "mr-[-1px] h-9 w-2 shrink-0 rounded-bl-sm border-b border-l border-border mb-4",
4685
4715
  "aria-hidden": true
4686
4716
  }
4687
4717
  ),
4688
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4718
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
4689
4719
  "div",
4690
4720
  {
4691
4721
  role: interactive ? "button" : void 0,
@@ -4703,8 +4733,8 @@ function SectionTreeItem({ section, onSelect, selected }) {
4703
4733
  interactive && selected && "border-primary"
4704
4734
  ),
4705
4735
  children: [
4706
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4707
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
4736
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconSection, { className: "shrink-0 text-foreground", "aria-hidden": true }),
4737
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
4708
4738
  ]
4709
4739
  }
4710
4740
  )
@@ -4712,11 +4742,11 @@ function SectionTreeItem({ section, onSelect, selected }) {
4712
4742
  }
4713
4743
  function SectionPickerList({ sections, onSelect }) {
4714
4744
  if (sections.length === 0) {
4715
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." });
4745
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." });
4716
4746
  }
4717
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-1", children: [
4718
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-muted-foreground", children: "Pick a section this link should scroll to." }),
4719
- sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SectionTreeItem, { section, onSelect }, section.id))
4747
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-1", children: [
4748
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-muted-foreground", children: "Pick a section this link should scroll to." }),
4749
+ sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SectionTreeItem, { section, onSelect }, section.id))
4720
4750
  ] });
4721
4751
  }
4722
4752
 
@@ -4724,11 +4754,11 @@ function SectionPickerList({ sections, onSelect }) {
4724
4754
  var import_react3 = require("react");
4725
4755
 
4726
4756
  // src/ui/input.tsx
4727
- var React5 = __toESM(require("react"), 1);
4728
- var import_jsx_runtime10 = require("react/jsx-runtime");
4729
- var Input = React5.forwardRef(
4757
+ var React6 = __toESM(require("react"), 1);
4758
+ var import_jsx_runtime11 = require("react/jsx-runtime");
4759
+ var Input = React6.forwardRef(
4730
4760
  ({ className, type, ...props }, ref) => {
4731
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4761
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4732
4762
  "input",
4733
4763
  {
4734
4764
  type,
@@ -4747,9 +4777,9 @@ Input.displayName = "Input";
4747
4777
 
4748
4778
  // src/ui/label.tsx
4749
4779
  var import_radix_ui5 = require("radix-ui");
4750
- var import_jsx_runtime11 = require("react/jsx-runtime");
4780
+ var import_jsx_runtime12 = require("react/jsx-runtime");
4751
4781
  function Label({ className, ...props }) {
4752
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4782
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4753
4783
  import_radix_ui5.Label.Root,
4754
4784
  {
4755
4785
  "data-slot": "label",
@@ -4760,9 +4790,9 @@ function Label({ className, ...props }) {
4760
4790
  }
4761
4791
 
4762
4792
  // src/ui/link-modal/UrlOrPageInput.tsx
4763
- var import_jsx_runtime12 = require("react/jsx-runtime");
4793
+ var import_jsx_runtime13 = require("react/jsx-runtime");
4764
4794
  function FieldChevron({ onClick }) {
4765
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4795
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4766
4796
  "button",
4767
4797
  {
4768
4798
  type: "button",
@@ -4770,7 +4800,7 @@ function FieldChevron({ onClick }) {
4770
4800
  onClick,
4771
4801
  "aria-label": "Open page list",
4772
4802
  tabIndex: -1,
4773
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconChevronDown, {})
4803
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconChevronDown, {})
4774
4804
  }
4775
4805
  );
4776
4806
  }
@@ -4809,12 +4839,12 @@ function UrlOrPageInput({
4809
4839
  "data-ohw-link-field flex h-10 w-full items-center overflow-hidden rounded-md border bg-background pl-3 pr-3 py-2 outline-none transition-[border-color,box-shadow]",
4810
4840
  urlError ? "border-destructive shadow-[0_0_0_1px_var(--ohw-destructive)]" : isFocused ? "border-primary shadow-[0_0_0_1px_var(--ohw-primary)]" : "border-input"
4811
4841
  );
4812
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
4813
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
4814
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative w-full", children: [
4815
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
4816
- selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconFile, { className: "text-foreground", "aria-hidden": true }) }) : null,
4817
- readOnly ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4842
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
4843
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
4844
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative w-full", children: [
4845
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
4846
+ selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconFile, { className: "text-foreground", "aria-hidden": true }) }) : null,
4847
+ readOnly ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4818
4848
  Input,
4819
4849
  {
4820
4850
  ref: inputRef,
@@ -4833,7 +4863,7 @@ function UrlOrPageInput({
4833
4863
  )
4834
4864
  }
4835
4865
  ),
4836
- selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4866
+ selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4837
4867
  "button",
4838
4868
  {
4839
4869
  type: "button",
@@ -4841,26 +4871,26 @@ function UrlOrPageInput({
4841
4871
  onMouseDown: clearSelection,
4842
4872
  "aria-label": "Clear selected page",
4843
4873
  tabIndex: -1,
4844
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconX, { "aria-hidden": true })
4874
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconX, { "aria-hidden": true })
4845
4875
  }
4846
4876
  ) : null,
4847
- !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
4877
+ !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
4848
4878
  ] }),
4849
- dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4879
+ dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4850
4880
  "div",
4851
4881
  {
4852
4882
  "data-ohw-link-page-dropdown": "",
4853
4883
  className: "absolute left-0 right-0 h-20 top-[calc(100%+4px)] z-10 max-h-48 overflow-auto rounded-lg border border-border bg-popover py-1 shadow-lg",
4854
4884
  onMouseDown: (e) => e.preventDefault(),
4855
- children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
4885
+ children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
4856
4886
  "button",
4857
4887
  {
4858
4888
  type: "button",
4859
4889
  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",
4860
4890
  onClick: () => onPageSelect(page),
4861
4891
  children: [
4862
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconFile, { className: "shrink-0", "aria-hidden": true }),
4863
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate", children: page.title })
4892
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconFile, { className: "shrink-0", "aria-hidden": true }),
4893
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate", children: page.title })
4864
4894
  ]
4865
4895
  },
4866
4896
  page.path
@@ -4868,7 +4898,7 @@ function UrlOrPageInput({
4868
4898
  }
4869
4899
  ) : null
4870
4900
  ] }),
4871
- urlError ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
4901
+ urlError ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
4872
4902
  ] });
4873
4903
  }
4874
4904
 
@@ -5036,7 +5066,7 @@ function useLinkModalState({
5036
5066
  }
5037
5067
 
5038
5068
  // src/ui/link-modal/LinkEditorPanel.tsx
5039
- var import_jsx_runtime13 = require("react/jsx-runtime");
5069
+ var import_jsx_runtime14 = require("react/jsx-runtime");
5040
5070
  function LinkEditorPanel({
5041
5071
  open = true,
5042
5072
  mode = "create",
@@ -5060,25 +5090,25 @@ function LinkEditorPanel({
5060
5090
  onSubmit
5061
5091
  });
5062
5092
  const isCancel = state.secondaryLabel === "Cancel";
5063
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
5064
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5093
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
5094
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5065
5095
  "button",
5066
5096
  {
5067
5097
  type: "button",
5068
5098
  className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
5069
5099
  "aria-label": "Close",
5070
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconX, { "aria-hidden": true })
5100
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconX, { "aria-hidden": true })
5071
5101
  }
5072
5102
  ) }),
5073
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
5074
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
5075
- state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5103
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
5104
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
5105
+ state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5076
5106
  DestinationBreadcrumb,
5077
5107
  {
5078
5108
  pageTitle: state.selectedPage.title,
5079
5109
  sectionLabel: state.selectedSection.label
5080
5110
  }
5081
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5111
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5082
5112
  UrlOrPageInput,
5083
5113
  {
5084
5114
  value: state.searchValue,
@@ -5091,18 +5121,18 @@ function LinkEditorPanel({
5091
5121
  urlError: state.urlError
5092
5122
  }
5093
5123
  ),
5094
- state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
5095
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { type: "button", variant: "outline", className: "w-fit cursor-pointer", size: "sm", onClick: state.handleChooseSection, children: "Choose a section" }),
5096
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
5097
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconInfo, { className: "shrink-0", "aria-hidden": true }),
5098
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Pick a section this link should scroll to." })
5124
+ state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
5125
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { type: "button", variant: "outline", className: "w-fit cursor-pointer", size: "sm", onClick: state.handleChooseSection, children: "Choose a section" }),
5126
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
5127
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconInfo, { className: "shrink-0", "aria-hidden": true }),
5128
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Pick a section this link should scroll to." })
5099
5129
  ] })
5100
5130
  ] }) : null,
5101
- state.showSectionPicker ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionPickerList, { sections: state.activeSections, onSelect: state.handleSectionSelect }) : null,
5102
- state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
5131
+ state.showSectionPicker ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SectionPickerList, { sections: state.activeSections, onSelect: state.handleSectionSelect }) : null,
5132
+ state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
5103
5133
  ] }),
5104
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
5105
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5134
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
5135
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5106
5136
  Button,
5107
5137
  {
5108
5138
  type: "button",
@@ -5117,7 +5147,7 @@ function LinkEditorPanel({
5117
5147
  children: state.secondaryLabel
5118
5148
  }
5119
5149
  ),
5120
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
5150
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5121
5151
  Button,
5122
5152
  {
5123
5153
  type: "button",
@@ -5136,7 +5166,7 @@ function LinkEditorPanel({
5136
5166
  }
5137
5167
 
5138
5168
  // src/ui/link-modal/LinkPopover.tsx
5139
- var import_jsx_runtime14 = require("react/jsx-runtime");
5169
+ var import_jsx_runtime15 = require("react/jsx-runtime");
5140
5170
  function LinkPopover({
5141
5171
  open = true,
5142
5172
  panelRef,
@@ -5144,14 +5174,14 @@ function LinkPopover({
5144
5174
  onClose,
5145
5175
  ...editorProps
5146
5176
  }) {
5147
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5177
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5148
5178
  Dialog2,
5149
5179
  {
5150
5180
  open,
5151
5181
  onOpenChange: (next) => {
5152
5182
  if (!next) onClose?.();
5153
5183
  },
5154
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
5184
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5155
5185
  DialogContent,
5156
5186
  {
5157
5187
  ref: panelRef,
@@ -5161,7 +5191,7 @@ function LinkPopover({
5161
5191
  "data-ohw-bridge": "",
5162
5192
  showCloseButton: false,
5163
5193
  className: "gap-0 p-0 w-full md:w-md pointer-events-auto",
5164
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LinkEditorPanel, { ...editorProps, open, onClose })
5194
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(LinkEditorPanel, { ...editorProps, open, onClose })
5165
5195
  }
5166
5196
  )
5167
5197
  }
@@ -5227,7 +5257,7 @@ function shouldUseDevFixtures() {
5227
5257
  }
5228
5258
 
5229
5259
  // src/ui/badge.tsx
5230
- var import_jsx_runtime15 = require("react/jsx-runtime");
5260
+ var import_jsx_runtime16 = require("react/jsx-runtime");
5231
5261
  var badgeVariants = cva(
5232
5262
  "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",
5233
5263
  {
@@ -5245,11 +5275,11 @@ var badgeVariants = cva(
5245
5275
  }
5246
5276
  );
5247
5277
  function Badge({ className, variant, ...props }) {
5248
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
5278
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
5249
5279
  }
5250
5280
 
5251
5281
  // src/OhhwellsBridge.tsx
5252
- var import_jsx_runtime16 = require("react/jsx-runtime");
5282
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5253
5283
  var PRIMARY = "#0885FE";
5254
5284
  var IMAGE_FADE_MS = 300;
5255
5285
  function runOpacityFade(el, onDone) {
@@ -5423,7 +5453,7 @@ function mountSchedulingWidget(insertAfter, notifyOnConnect = false, scheduleId,
5423
5453
  const root = (0, import_client.createRoot)(container);
5424
5454
  (0, import_react_dom.flushSync)(() => {
5425
5455
  root.render(
5426
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5456
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5427
5457
  SchedulingWidget,
5428
5458
  {
5429
5459
  notifyOnConnect,
@@ -5471,6 +5501,20 @@ function applyLinkHref(el, val) {
5471
5501
  const anchor = el instanceof HTMLAnchorElement ? el : el.querySelector("a");
5472
5502
  if (anchor) anchor.setAttribute("href", val);
5473
5503
  }
5504
+ function getEditMeasureEl(editable) {
5505
+ return editable.closest("[data-ohw-href-key]") ?? editable;
5506
+ }
5507
+ function isDragHandleDisabled(el) {
5508
+ const carriers = [
5509
+ el.closest("[data-ohw-href-key]"),
5510
+ el.closest("[data-ohw-editable]")
5511
+ ];
5512
+ return carriers.some((carrier) => {
5513
+ if (!carrier) return false;
5514
+ const raw = carrier.getAttribute("data-ohw-drag-disabled");
5515
+ return raw === "true" || raw === "";
5516
+ });
5517
+ }
5474
5518
  function collectEditableNodes() {
5475
5519
  const nodes = Array.from(document.querySelectorAll("[data-ohw-editable]")).map((el) => {
5476
5520
  if (el.dataset.ohwEditable === "image") {
@@ -5523,6 +5567,14 @@ function getHrefKeyFromElement(el) {
5523
5567
  function isNavbarButton(el) {
5524
5568
  return Boolean(el.closest('[data-ohw-role="navbar-button"]'));
5525
5569
  }
5570
+ function getReorderHandleState(el) {
5571
+ const linkEl = el.closest("[data-ohw-href-key]");
5572
+ if (!linkEl || isNavbarButton(el)) return { key: null, disabled: false };
5573
+ return {
5574
+ key: linkEl.dataset.ohwHrefKey ?? null,
5575
+ disabled: isDragHandleDisabled(el)
5576
+ };
5577
+ }
5526
5578
  function clearHrefKeyHover(anchor) {
5527
5579
  anchor.removeAttribute("data-ohw-hovered");
5528
5580
  anchor.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
@@ -5671,24 +5723,64 @@ var TOOLBAR_GROUPS = [
5671
5723
  { cmd: "insertOrderedList", title: "Numbered List" }
5672
5724
  ]
5673
5725
  ];
5674
- function GlowFrame({ rect, elRef }) {
5726
+ function EditGlowChrome({
5727
+ rect,
5728
+ elRef,
5729
+ reorderHrefKey,
5730
+ dragDisabled = false
5731
+ }) {
5675
5732
  const GAP = 6;
5676
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5733
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5677
5734
  "div",
5678
5735
  {
5679
5736
  ref: elRef,
5737
+ "data-ohw-edit-chrome": "",
5680
5738
  style: {
5681
5739
  position: "fixed",
5682
5740
  top: rect.top - GAP,
5683
5741
  left: rect.left - GAP,
5684
5742
  width: rect.width + GAP * 2,
5685
5743
  height: rect.height + GAP * 2,
5686
- border: "2px solid #0885FE",
5687
- borderRadius: 8,
5688
- boxShadow: "0 0 0 4px rgba(8, 133, 254, 0.12)",
5689
5744
  pointerEvents: "none",
5690
5745
  zIndex: 2147483646
5691
- }
5746
+ },
5747
+ children: [
5748
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5749
+ "div",
5750
+ {
5751
+ style: {
5752
+ position: "absolute",
5753
+ inset: 0,
5754
+ border: "2px solid #0885FE",
5755
+ borderRadius: 8,
5756
+ boxShadow: "0 0 0 4px rgba(8, 133, 254, 0.12)",
5757
+ pointerEvents: "none"
5758
+ }
5759
+ }
5760
+ ),
5761
+ reorderHrefKey && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5762
+ "div",
5763
+ {
5764
+ "data-ohw-drag-handle-container": "",
5765
+ "data-ohw-drag-disabled": dragDisabled ? "" : void 0,
5766
+ style: {
5767
+ position: "absolute",
5768
+ left: 0,
5769
+ top: "50%",
5770
+ transform: "translate(calc(-100% - 7px), -50%)",
5771
+ pointerEvents: dragDisabled ? "none" : "auto"
5772
+ },
5773
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5774
+ DragHandle,
5775
+ {
5776
+ "aria-label": `Reorder ${reorderHrefKey}`,
5777
+ disabled: dragDisabled,
5778
+ "aria-disabled": dragDisabled
5779
+ }
5780
+ )
5781
+ }
5782
+ )
5783
+ ]
5692
5784
  }
5693
5785
  );
5694
5786
  }
@@ -5768,9 +5860,9 @@ function calcToolbarPos(rect, parentScroll, approxW = 306) {
5768
5860
  const left = Math.max(GAP + APPROX_W / 2, Math.min(rawLeft, window.innerWidth - GAP - APPROX_W / 2));
5769
5861
  return { top, left, transform };
5770
5862
  }
5771
- var EDIT_LINK_ICON = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("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: [
5772
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
5773
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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
+ var EDIT_LINK_ICON = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("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: [
5864
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
5865
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
5774
5866
  ] });
5775
5867
  function FloatingToolbar({
5776
5868
  rect,
@@ -5785,7 +5877,7 @@ function FloatingToolbar({
5785
5877
  const approxW = variant === "link-action" ? 112 : 306;
5786
5878
  const { top, left, transform } = calcToolbarPos(rect, parentScroll, approxW);
5787
5879
  if (variant === "link-action") {
5788
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5880
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5789
5881
  "div",
5790
5882
  {
5791
5883
  ref: elRef,
@@ -5810,7 +5902,7 @@ function FloatingToolbar({
5810
5902
  },
5811
5903
  onMouseDown: (e) => e.stopPropagation(),
5812
5904
  children: [
5813
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5905
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5814
5906
  "button",
5815
5907
  {
5816
5908
  type: "button",
@@ -5845,8 +5937,8 @@ function FloatingToolbar({
5845
5937
  children: EDIT_LINK_ICON
5846
5938
  }
5847
5939
  ),
5848
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5849
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5940
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5941
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5850
5942
  "button",
5851
5943
  {
5852
5944
  type: "button",
@@ -5865,10 +5957,10 @@ function FloatingToolbar({
5865
5957
  padding: 6,
5866
5958
  opacity: 0.6
5867
5959
  },
5868
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: [
5869
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "5", cy: "12", r: "1.5" }),
5870
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "12", cy: "12", r: "1.5" }),
5871
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "19", cy: "12", r: "1.5" })
5960
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: [
5961
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "5", cy: "12", r: "1.5" }),
5962
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "12", r: "1.5" }),
5963
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "19", cy: "12", r: "1.5" })
5872
5964
  ] })
5873
5965
  }
5874
5966
  )
@@ -5876,7 +5968,7 @@ function FloatingToolbar({
5876
5968
  }
5877
5969
  );
5878
5970
  }
5879
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5971
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5880
5972
  "div",
5881
5973
  {
5882
5974
  ref: elRef,
@@ -5901,11 +5993,11 @@ function FloatingToolbar({
5901
5993
  },
5902
5994
  onMouseDown: (e) => e.stopPropagation(),
5903
5995
  children: [
5904
- TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react5.default.Fragment, { children: [
5905
- gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5996
+ TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react5.default.Fragment, { children: [
5997
+ gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { display: "block", width: 1, height: 24, background: "#E7E5E4", flexShrink: 0 } }),
5906
5998
  btns.map((btn) => {
5907
5999
  const isActive = activeCommands.has(btn.cmd);
5908
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6000
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5909
6001
  "button",
5910
6002
  {
5911
6003
  title: btn.title,
@@ -5931,7 +6023,7 @@ function FloatingToolbar({
5931
6023
  flexShrink: 0,
5932
6024
  padding: 6
5933
6025
  },
5934
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6026
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5935
6027
  "svg",
5936
6028
  {
5937
6029
  width: "16",
@@ -5951,7 +6043,7 @@ function FloatingToolbar({
5951
6043
  );
5952
6044
  })
5953
6045
  ] }, gi)),
5954
- showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6046
+ showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5955
6047
  "button",
5956
6048
  {
5957
6049
  type: "button",
@@ -6000,7 +6092,7 @@ function StateToggle({
6000
6092
  states,
6001
6093
  onStateChange
6002
6094
  }) {
6003
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6095
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6004
6096
  ToggleGroup,
6005
6097
  {
6006
6098
  "data-ohw-state-toggle": "",
@@ -6014,7 +6106,7 @@ function StateToggle({
6014
6106
  left: rect.right - 8,
6015
6107
  transform: "translateX(-100%)"
6016
6108
  },
6017
- children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
6109
+ children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
6018
6110
  }
6019
6111
  );
6020
6112
  }
@@ -6111,6 +6203,8 @@ function OhhwellsBridge() {
6111
6203
  const [toolbarVariant, setToolbarVariant] = (0, import_react5.useState)("none");
6112
6204
  const toolbarVariantRef = (0, import_react5.useRef)("none");
6113
6205
  toolbarVariantRef.current = toolbarVariant;
6206
+ const [reorderHrefKey, setReorderHrefKey] = (0, import_react5.useState)(null);
6207
+ const [reorderDragDisabled, setReorderDragDisabled] = (0, import_react5.useState)(false);
6114
6208
  const [toggleState, setToggleState] = (0, import_react5.useState)(null);
6115
6209
  const [maxBadge, setMaxBadge] = (0, import_react5.useState)(null);
6116
6210
  const [activeCommands, setActiveCommands] = (0, import_react5.useState)(/* @__PURE__ */ new Set());
@@ -6217,7 +6311,7 @@ function OhhwellsBridge() {
6217
6311
  (0, import_react5.useEffect)(() => {
6218
6312
  const update = () => {
6219
6313
  const el = activeElRef.current ?? selectedElRef.current;
6220
- if (el) setToolbarRect(el.getBoundingClientRect());
6314
+ if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
6221
6315
  setToggleState((prev) => {
6222
6316
  if (!prev || !activeStateElRef.current) return prev;
6223
6317
  return { ...prev, rect: activeStateElRef.current.getBoundingClientRect() };
@@ -6284,6 +6378,8 @@ function OhhwellsBridge() {
6284
6378
  }
6285
6379
  el.removeAttribute("contenteditable");
6286
6380
  activeElRef.current = null;
6381
+ setReorderHrefKey(null);
6382
+ setReorderDragDisabled(false);
6287
6383
  if (!selectedElRef.current) {
6288
6384
  setToolbarRect(null);
6289
6385
  setToolbarVariant("none");
@@ -6321,11 +6417,15 @@ function OhhwellsBridge() {
6321
6417
  setToolbarVariant("rich-text");
6322
6418
  el.setAttribute("contenteditable", "true");
6323
6419
  el.removeAttribute("data-ohw-hovered");
6420
+ el.closest("[data-ohw-href-key]")?.removeAttribute("data-ohw-hovered");
6324
6421
  activeElRef.current = el;
6325
6422
  originalContentRef.current = el.innerHTML;
6326
6423
  el.focus();
6327
- setToolbarRect(el.getBoundingClientRect());
6328
6424
  setToolbarShowEditLink(Boolean(getHrefKeyFromElement(el)));
6425
+ const { key: reorderKey, disabled: reorderDisabled } = getReorderHandleState(el);
6426
+ setReorderHrefKey(reorderKey);
6427
+ setReorderDragDisabled(reorderDisabled);
6428
+ setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
6329
6429
  postToParent({ type: "ow:enter-edit", key: el.dataset.ohwKey });
6330
6430
  requestAnimationFrame(() => refreshActiveCommandsRef.current());
6331
6431
  }, [deactivate, postToParent]);
@@ -6547,6 +6647,11 @@ function OhhwellsBridge() {
6547
6647
  if (target.closest("[data-ohw-state-toggle]")) return;
6548
6648
  if (target.closest("[data-ohw-max-badge]")) return;
6549
6649
  if (isInsideLinkEditor(target)) return;
6650
+ if (target.closest('[data-ohw-edit-chrome], [data-ohw-drag-handle-container], [data-slot="drag-handle"]')) {
6651
+ e.preventDefault();
6652
+ e.stopPropagation();
6653
+ return;
6654
+ }
6550
6655
  const editable = target.closest("[data-ohw-editable]");
6551
6656
  if (editable) {
6552
6657
  if (editable.dataset.ohwEditable === "link") {
@@ -6623,14 +6728,18 @@ function OhhwellsBridge() {
6623
6728
  const selected = selectedElRef.current;
6624
6729
  if (selected && (selected === editable || selected.contains(editable))) return;
6625
6730
  if (editable.dataset.ohwEditable !== "image" && editable.dataset.ohwEditable !== "bg-image" && !editable.hasAttribute("contenteditable")) {
6626
- editable.setAttribute("data-ohw-hovered", "");
6731
+ const hoverTarget = editable.closest("[data-ohw-href-key]") ?? editable;
6732
+ hoverTarget.setAttribute("data-ohw-hovered", "");
6627
6733
  }
6628
6734
  };
6629
6735
  const handleMouseOut = (e) => {
6630
6736
  const editable = e.target.closest("[data-ohw-editable]");
6631
6737
  if (!editable) return;
6738
+ const related = e.relatedTarget instanceof Element ? e.relatedTarget : null;
6739
+ if (related?.closest("[data-ohw-drag-handle-container]")) return;
6632
6740
  if (editable.dataset.ohwEditable !== "image" && editable.dataset.ohwEditable !== "bg-image") {
6633
- editable.removeAttribute("data-ohw-hovered");
6741
+ const hoverTarget = editable.closest("[data-ohw-href-key]") ?? editable;
6742
+ hoverTarget.removeAttribute("data-ohw-hovered");
6634
6743
  }
6635
6744
  };
6636
6745
  const toProbeCoords = (clientX, clientY, fromParentViewport) => {
@@ -6745,11 +6854,20 @@ function OhhwellsBridge() {
6745
6854
  return;
6746
6855
  }
6747
6856
  }
6857
+ if (activeElRef.current) {
6858
+ if (hoveredImageRef.current) {
6859
+ hoveredImageRef.current = null;
6860
+ hoveredImageHasTextOverlapRef.current = false;
6861
+ resumeAnimTracks();
6862
+ postToParentRef.current({ type: "ow:image-unhover" });
6863
+ }
6864
+ return;
6865
+ }
6748
6866
  const imgEl = findImageAtPoint(clientX, clientY, fromParentViewport);
6749
6867
  if (imgEl) {
6750
6868
  const { x, y } = toProbeCoords(clientX, clientY, fromParentViewport);
6751
6869
  const topEl = document.elementFromPoint(x, y);
6752
- if (topEl?.closest("[data-ohw-toolbar]")) {
6870
+ if (topEl?.closest('[data-ohw-toolbar], [data-ohw-edit-chrome], [data-ohw-drag-handle-container], [data-slot="drag-handle"]')) {
6753
6871
  if (hoveredImageRef.current) {
6754
6872
  hoveredImageRef.current = null;
6755
6873
  resumeAnimTracks();
@@ -7042,7 +7160,7 @@ function OhhwellsBridge() {
7042
7160
  const el = e.target;
7043
7161
  const key = el.dataset.ohwKey;
7044
7162
  if (!key) return;
7045
- if (el === activeElRef.current) setToolbarRect(el.getBoundingClientRect());
7163
+ if (el === activeElRef.current) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
7046
7164
  const maxLen = el.dataset.ohwMaxLength ? parseInt(el.dataset.ohwMaxLength, 10) : null;
7047
7165
  if (maxLen) {
7048
7166
  const current = el.innerText.replace(/\n$/, "").length;
@@ -7450,7 +7568,7 @@ function OhhwellsBridge() {
7450
7568
  const handleCommand = (0, import_react5.useCallback)((cmd) => {
7451
7569
  document.execCommand(cmd, false);
7452
7570
  activeElRef.current?.focus();
7453
- if (activeElRef.current) setToolbarRect(activeElRef.current.getBoundingClientRect());
7571
+ if (activeElRef.current) setToolbarRect(getEditMeasureEl(activeElRef.current).getBoundingClientRect());
7454
7572
  refreshActiveCommandsRef.current();
7455
7573
  }, []);
7456
7574
  const handleStateChange = (0, import_react5.useCallback)((state) => {
@@ -7503,11 +7621,19 @@ function OhhwellsBridge() {
7503
7621
  const currentSections = sectionsByPath[pathname] ?? [];
7504
7622
  linkPopoverOpenRef.current = linkPopover !== null;
7505
7623
  return bridgeRoot ? (0, import_react_dom2.createPortal)(
7506
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
7507
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
7508
- toolbarRect && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
7509
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GlowFrame, { rect: toolbarRect, elRef: glowElRef }),
7510
- toolbarVariant === "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
7624
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
7625
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
7626
+ toolbarRect && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
7627
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7628
+ EditGlowChrome,
7629
+ {
7630
+ rect: toolbarRect,
7631
+ elRef: glowElRef,
7632
+ reorderHrefKey,
7633
+ dragDisabled: reorderDragDisabled
7634
+ }
7635
+ ),
7636
+ toolbarVariant === "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7511
7637
  FloatingToolbar,
7512
7638
  {
7513
7639
  variant: "rich-text",
@@ -7520,7 +7646,7 @@ function OhhwellsBridge() {
7520
7646
  onEditLink: openLinkPopoverForActive
7521
7647
  }
7522
7648
  ),
7523
- toolbarVariant === "link-action" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
7649
+ toolbarVariant === "link-action" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7524
7650
  FloatingToolbar,
7525
7651
  {
7526
7652
  variant: "link-action",
@@ -7533,7 +7659,7 @@ function OhhwellsBridge() {
7533
7659
  }
7534
7660
  )
7535
7661
  ] }),
7536
- maxBadge && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
7662
+ maxBadge && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
7537
7663
  "div",
7538
7664
  {
7539
7665
  "data-ohw-max-badge": "",
@@ -7559,7 +7685,7 @@ function OhhwellsBridge() {
7559
7685
  ]
7560
7686
  }
7561
7687
  ),
7562
- toggleState && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
7688
+ toggleState && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7563
7689
  StateToggle,
7564
7690
  {
7565
7691
  rect: toggleState.rect,
@@ -7568,15 +7694,15 @@ function OhhwellsBridge() {
7568
7694
  onStateChange: handleStateChange
7569
7695
  }
7570
7696
  ),
7571
- sectionGap && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
7697
+ sectionGap && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
7572
7698
  "div",
7573
7699
  {
7574
7700
  "data-ohw-section-insert-line": "",
7575
7701
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
7576
7702
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
7577
7703
  children: [
7578
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7579
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
7704
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7705
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7580
7706
  Badge,
7581
7707
  {
7582
7708
  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",
@@ -7589,11 +7715,11 @@ function OhhwellsBridge() {
7589
7715
  children: "Add Section"
7590
7716
  }
7591
7717
  ),
7592
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7718
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7593
7719
  ]
7594
7720
  }
7595
7721
  ),
7596
- linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
7722
+ linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7597
7723
  LinkPopover,
7598
7724
  {
7599
7725
  panelRef: linkPopoverPanelRef,
@@ -7609,15 +7735,15 @@ function OhhwellsBridge() {
7609
7735
  },
7610
7736
  `${linkPopover.key}-${pathname}`
7611
7737
  ) : null,
7612
- sectionGap && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
7738
+ sectionGap && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
7613
7739
  "div",
7614
7740
  {
7615
7741
  "data-ohw-section-insert-line": "",
7616
7742
  className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
7617
7743
  style: { top: sectionGap.y, transform: "translateY(-50%)" },
7618
7744
  children: [
7619
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7620
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
7745
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
7746
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7621
7747
  Badge,
7622
7748
  {
7623
7749
  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",
@@ -7630,7 +7756,7 @@ function OhhwellsBridge() {
7630
7756
  children: "Add Section"
7631
7757
  }
7632
7758
  ),
7633
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7759
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
7634
7760
  ]
7635
7761
  }
7636
7762
  )
@@ -7640,6 +7766,7 @@ function OhhwellsBridge() {
7640
7766
  }
7641
7767
  // Annotate the CommonJS export names for ESM import in node:
7642
7768
  0 && (module.exports = {
7769
+ DragHandle,
7643
7770
  LinkEditorPanel,
7644
7771
  LinkPopover,
7645
7772
  OhhwellsBridge,
@@ -7650,6 +7777,7 @@ function OhhwellsBridge() {
7650
7777
  buildTarget,
7651
7778
  filterAvailablePages,
7652
7779
  getEditModeInitialState,
7780
+ isEditSessionActive,
7653
7781
  isValidUrl,
7654
7782
  parseTarget,
7655
7783
  toggleVariants,