@ohhwells/bridge 0.1.67-next.193 → 0.1.67-next.194
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 +163 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +162 -267
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12607,127 +12607,16 @@ function FloatingPanel({
|
|
|
12607
12607
|
);
|
|
12608
12608
|
}
|
|
12609
12609
|
|
|
12610
|
-
// src/ui/logo-size-panel.tsx
|
|
12611
|
-
var import_lucide_react15 = require("lucide-react");
|
|
12612
|
-
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
12613
|
-
function SizeSlider({
|
|
12614
|
-
value,
|
|
12615
|
-
onChange
|
|
12616
|
-
}) {
|
|
12617
|
-
const pct = (value - LOGO_SIZE_MIN) / (LOGO_SIZE_MAX - LOGO_SIZE_MIN) * 100;
|
|
12618
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
|
|
12619
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center gap-2 text-sm font-medium leading-5", children: [
|
|
12620
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "min-w-0 flex-1 text-foreground", children: "Size" }),
|
|
12621
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "shrink-0 whitespace-nowrap text-muted-foreground", children: [
|
|
12622
|
-
value,
|
|
12623
|
-
" px"
|
|
12624
|
-
] })
|
|
12625
|
-
] }),
|
|
12626
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative h-2 w-full rounded-full bg-primary-50", children: [
|
|
12627
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12628
|
-
"div",
|
|
12629
|
-
{
|
|
12630
|
-
className: "absolute inset-y-0 left-0 rounded-full bg-primary",
|
|
12631
|
-
style: { width: `${pct}%` }
|
|
12632
|
-
}
|
|
12633
|
-
),
|
|
12634
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12635
|
-
"input",
|
|
12636
|
-
{
|
|
12637
|
-
type: "range",
|
|
12638
|
-
min: LOGO_SIZE_MIN,
|
|
12639
|
-
max: LOGO_SIZE_MAX,
|
|
12640
|
-
step: 1,
|
|
12641
|
-
value,
|
|
12642
|
-
"aria-label": "Logo size",
|
|
12643
|
-
className: cn(
|
|
12644
|
-
"absolute inset-0 h-full w-full cursor-pointer appearance-none bg-transparent",
|
|
12645
|
-
"[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:size-5",
|
|
12646
|
-
"[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2",
|
|
12647
|
-
"[&::-webkit-slider-thumb]:border-primary [&::-webkit-slider-thumb]:bg-background",
|
|
12648
|
-
"[&::-moz-range-thumb]:size-5 [&::-moz-range-thumb]:rounded-full",
|
|
12649
|
-
"[&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary",
|
|
12650
|
-
"[&::-moz-range-thumb]:bg-background"
|
|
12651
|
-
),
|
|
12652
|
-
onChange: (e) => onChange(Number(e.target.value))
|
|
12653
|
-
}
|
|
12654
|
-
)
|
|
12655
|
-
] })
|
|
12656
|
-
] });
|
|
12657
|
-
}
|
|
12658
|
-
function LogoSizePanel({
|
|
12659
|
-
viewport,
|
|
12660
|
-
sizePx,
|
|
12661
|
-
mobileFollowing = true,
|
|
12662
|
-
onSizeChange,
|
|
12663
|
-
onCustomizeMobile,
|
|
12664
|
-
onResetMobile,
|
|
12665
|
-
onUpdateEverywhere,
|
|
12666
|
-
className
|
|
12667
|
-
}) {
|
|
12668
|
-
const showFollowing = viewport === "mobile" && mobileFollowing;
|
|
12669
|
-
const showMobileSlider = viewport === "mobile" && !mobileFollowing;
|
|
12670
|
-
const showDesktopSlider = viewport === "desktop";
|
|
12671
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex w-full flex-col gap-4", className), children: [
|
|
12672
|
-
showFollowing ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
|
|
12673
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-start gap-1", children: [
|
|
12674
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.Link, { size: 16, className: "mt-0.5 shrink-0 text-foreground", "aria-hidden": true }),
|
|
12675
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm font-semibold leading-5 text-foreground", children: "Following desktop size" })
|
|
12676
|
-
] }),
|
|
12677
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm leading-5 text-muted-foreground", children: "Mobile uses the desktop size until you customize it. Change the desktop size and it follows automatically." }),
|
|
12678
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12679
|
-
Button,
|
|
12680
|
-
{
|
|
12681
|
-
type: "button",
|
|
12682
|
-
variant: "outline",
|
|
12683
|
-
size: "sm",
|
|
12684
|
-
className: "h-9 w-full min-w-0 cursor-pointer",
|
|
12685
|
-
onClick: onCustomizeMobile,
|
|
12686
|
-
children: "Customize for mobile"
|
|
12687
|
-
}
|
|
12688
|
-
)
|
|
12689
|
-
] }) : null,
|
|
12690
|
-
showDesktopSlider || showMobileSlider ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SizeSlider, { value: sizePx, onChange: onSizeChange }) : null,
|
|
12691
|
-
showMobileSlider ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12692
|
-
Button,
|
|
12693
|
-
{
|
|
12694
|
-
type: "button",
|
|
12695
|
-
variant: "outline",
|
|
12696
|
-
size: "sm",
|
|
12697
|
-
className: "h-9 w-full min-w-0 cursor-pointer",
|
|
12698
|
-
onClick: onResetMobile,
|
|
12699
|
-
children: "Reset to desktop size"
|
|
12700
|
-
}
|
|
12701
|
-
) : null,
|
|
12702
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-px w-full bg-border", role: "separator" }),
|
|
12703
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
12704
|
-
Button,
|
|
12705
|
-
{
|
|
12706
|
-
type: "button",
|
|
12707
|
-
variant: "outline",
|
|
12708
|
-
size: "sm",
|
|
12709
|
-
className: "h-9 w-full min-w-0 cursor-pointer gap-1",
|
|
12710
|
-
onClick: onUpdateEverywhere,
|
|
12711
|
-
children: [
|
|
12712
|
-
"Update logo everywhere",
|
|
12713
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ArrowUpRight, { size: 16, "aria-hidden": true })
|
|
12714
|
-
]
|
|
12715
|
-
}
|
|
12716
|
-
),
|
|
12717
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm leading-5 text-muted-foreground", children: "Matches the right version to your background." })
|
|
12718
|
-
] });
|
|
12719
|
-
}
|
|
12720
|
-
|
|
12721
12610
|
// src/ui/socials-display-panel.tsx
|
|
12722
|
-
var
|
|
12611
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
12723
12612
|
function DisplaySwitch({
|
|
12724
12613
|
label,
|
|
12725
12614
|
checked,
|
|
12726
12615
|
disabled,
|
|
12727
12616
|
onChange
|
|
12728
12617
|
}) {
|
|
12729
|
-
return /* @__PURE__ */ (0,
|
|
12730
|
-
/* @__PURE__ */ (0,
|
|
12618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
|
|
12619
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12731
12620
|
"span",
|
|
12732
12621
|
{
|
|
12733
12622
|
className: cn(
|
|
@@ -12737,7 +12626,7 @@ function DisplaySwitch({
|
|
|
12737
12626
|
children: label
|
|
12738
12627
|
}
|
|
12739
12628
|
),
|
|
12740
|
-
/* @__PURE__ */ (0,
|
|
12629
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12741
12630
|
"button",
|
|
12742
12631
|
{
|
|
12743
12632
|
type: "button",
|
|
@@ -12751,7 +12640,7 @@ function DisplaySwitch({
|
|
|
12751
12640
|
checked ? "bg-primary" : "bg-primary-50",
|
|
12752
12641
|
disabled ? "cursor-default opacity-50" : "cursor-pointer"
|
|
12753
12642
|
),
|
|
12754
|
-
children: /* @__PURE__ */ (0,
|
|
12643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12755
12644
|
"span",
|
|
12756
12645
|
{
|
|
12757
12646
|
className: cn(
|
|
@@ -12765,8 +12654,8 @@ function DisplaySwitch({
|
|
|
12765
12654
|
] });
|
|
12766
12655
|
}
|
|
12767
12656
|
function SocialsDisplayPanel({ display, onChange, className }) {
|
|
12768
|
-
return /* @__PURE__ */ (0,
|
|
12769
|
-
/* @__PURE__ */ (0,
|
|
12657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
|
|
12658
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12770
12659
|
DisplaySwitch,
|
|
12771
12660
|
{
|
|
12772
12661
|
label: "Text",
|
|
@@ -12775,7 +12664,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
|
|
|
12775
12664
|
onChange: (text) => onChange({ ...display, text })
|
|
12776
12665
|
}
|
|
12777
12666
|
),
|
|
12778
|
-
/* @__PURE__ */ (0,
|
|
12667
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
12779
12668
|
DisplaySwitch,
|
|
12780
12669
|
{
|
|
12781
12670
|
label: "Icon",
|
|
@@ -13662,8 +13551,8 @@ function useSectionDrag({
|
|
|
13662
13551
|
}
|
|
13663
13552
|
|
|
13664
13553
|
// src/ui/footer-container-chrome.tsx
|
|
13665
|
-
var
|
|
13666
|
-
var
|
|
13554
|
+
var import_lucide_react15 = require("lucide-react");
|
|
13555
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
13667
13556
|
function FooterContainerChrome({
|
|
13668
13557
|
rect,
|
|
13669
13558
|
onAdd,
|
|
@@ -13671,7 +13560,7 @@ function FooterContainerChrome({
|
|
|
13671
13560
|
}) {
|
|
13672
13561
|
const chromeGap = 6;
|
|
13673
13562
|
const buttonMargin = 7;
|
|
13674
|
-
return /* @__PURE__ */ (0,
|
|
13563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
13675
13564
|
"div",
|
|
13676
13565
|
{
|
|
13677
13566
|
"data-ohw-footer-container-chrome": "",
|
|
@@ -13683,8 +13572,8 @@ function FooterContainerChrome({
|
|
|
13683
13572
|
width: rect.width + chromeGap * 2,
|
|
13684
13573
|
height: rect.height + chromeGap * 2
|
|
13685
13574
|
},
|
|
13686
|
-
children: /* @__PURE__ */ (0,
|
|
13687
|
-
/* @__PURE__ */ (0,
|
|
13575
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { children: [
|
|
13576
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
13688
13577
|
"button",
|
|
13689
13578
|
{
|
|
13690
13579
|
type: "button",
|
|
@@ -13703,10 +13592,10 @@ function FooterContainerChrome({
|
|
|
13703
13592
|
if (addDisabled) return;
|
|
13704
13593
|
onAdd();
|
|
13705
13594
|
},
|
|
13706
|
-
children: /* @__PURE__ */ (0,
|
|
13595
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
13707
13596
|
}
|
|
13708
13597
|
) }),
|
|
13709
|
-
/* @__PURE__ */ (0,
|
|
13598
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
|
|
13710
13599
|
] })
|
|
13711
13600
|
}
|
|
13712
13601
|
) });
|
|
@@ -14168,14 +14057,14 @@ function deleteSelectedNavFooterItem(deps) {
|
|
|
14168
14057
|
}
|
|
14169
14058
|
|
|
14170
14059
|
// src/ui/navbar-container-chrome.tsx
|
|
14171
|
-
var
|
|
14172
|
-
var
|
|
14060
|
+
var import_lucide_react16 = require("lucide-react");
|
|
14061
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
14173
14062
|
function NavbarContainerChrome({
|
|
14174
14063
|
rect,
|
|
14175
14064
|
onAdd
|
|
14176
14065
|
}) {
|
|
14177
14066
|
const chromeGap = 6;
|
|
14178
|
-
return /* @__PURE__ */ (0,
|
|
14067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
14179
14068
|
"div",
|
|
14180
14069
|
{
|
|
14181
14070
|
"data-ohw-navbar-container-chrome": "",
|
|
@@ -14187,7 +14076,7 @@ function NavbarContainerChrome({
|
|
|
14187
14076
|
width: rect.width + chromeGap * 2,
|
|
14188
14077
|
height: rect.height + chromeGap * 2
|
|
14189
14078
|
},
|
|
14190
|
-
children: /* @__PURE__ */ (0,
|
|
14079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
14191
14080
|
"button",
|
|
14192
14081
|
{
|
|
14193
14082
|
type: "button",
|
|
@@ -14204,7 +14093,7 @@ function NavbarContainerChrome({
|
|
|
14204
14093
|
e.stopPropagation();
|
|
14205
14094
|
onAdd();
|
|
14206
14095
|
},
|
|
14207
|
-
children: /* @__PURE__ */ (0,
|
|
14096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
14208
14097
|
}
|
|
14209
14098
|
)
|
|
14210
14099
|
}
|
|
@@ -14213,7 +14102,7 @@ function NavbarContainerChrome({
|
|
|
14213
14102
|
|
|
14214
14103
|
// src/ui/drop-indicator.tsx
|
|
14215
14104
|
var React10 = __toESM(require("react"), 1);
|
|
14216
|
-
var
|
|
14105
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
14217
14106
|
var dropIndicatorVariants = cva(
|
|
14218
14107
|
"ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
|
|
14219
14108
|
{
|
|
@@ -14237,7 +14126,7 @@ var dropIndicatorVariants = cva(
|
|
|
14237
14126
|
);
|
|
14238
14127
|
var DropIndicator = React10.forwardRef(
|
|
14239
14128
|
({ className, direction, state, ...props }, ref) => {
|
|
14240
|
-
return /* @__PURE__ */ (0,
|
|
14129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
14241
14130
|
"div",
|
|
14242
14131
|
{
|
|
14243
14132
|
ref,
|
|
@@ -14254,7 +14143,7 @@ var DropIndicator = React10.forwardRef(
|
|
|
14254
14143
|
DropIndicator.displayName = "DropIndicator";
|
|
14255
14144
|
|
|
14256
14145
|
// src/ui/badge.tsx
|
|
14257
|
-
var
|
|
14146
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
14258
14147
|
var badgeVariants = cva(
|
|
14259
14148
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
14260
14149
|
{
|
|
@@ -14272,12 +14161,12 @@ var badgeVariants = cva(
|
|
|
14272
14161
|
}
|
|
14273
14162
|
);
|
|
14274
14163
|
function Badge({ className, variant, ...props }) {
|
|
14275
|
-
return /* @__PURE__ */ (0,
|
|
14164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
14276
14165
|
}
|
|
14277
14166
|
|
|
14278
14167
|
// src/OhhwellsBridge.tsx
|
|
14279
|
-
var
|
|
14280
|
-
var
|
|
14168
|
+
var import_lucide_react17 = require("lucide-react");
|
|
14169
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
14281
14170
|
var PRIMARY3 = "#0885FE";
|
|
14282
14171
|
var IMAGE_FADE_MS = 300;
|
|
14283
14172
|
function runOpacityFade(el, onDone) {
|
|
@@ -14446,7 +14335,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
|
|
|
14446
14335
|
const root = (0, import_client2.createRoot)(container);
|
|
14447
14336
|
(0, import_react_dom3.flushSync)(() => {
|
|
14448
14337
|
root.render(
|
|
14449
|
-
/* @__PURE__ */ (0,
|
|
14338
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14450
14339
|
SchedulingWidget,
|
|
14451
14340
|
{
|
|
14452
14341
|
notifyOnConnect,
|
|
@@ -15127,7 +15016,7 @@ function EditGlowChrome({
|
|
|
15127
15016
|
hideHandle = false
|
|
15128
15017
|
}) {
|
|
15129
15018
|
const GAP = SELECTION_CHROME_GAP2;
|
|
15130
|
-
return /* @__PURE__ */ (0,
|
|
15019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
15131
15020
|
"div",
|
|
15132
15021
|
{
|
|
15133
15022
|
ref: elRef,
|
|
@@ -15142,7 +15031,7 @@ function EditGlowChrome({
|
|
|
15142
15031
|
zIndex: 2147483646
|
|
15143
15032
|
},
|
|
15144
15033
|
children: [
|
|
15145
|
-
/* @__PURE__ */ (0,
|
|
15034
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15146
15035
|
"div",
|
|
15147
15036
|
{
|
|
15148
15037
|
style: {
|
|
@@ -15155,7 +15044,7 @@ function EditGlowChrome({
|
|
|
15155
15044
|
}
|
|
15156
15045
|
}
|
|
15157
15046
|
),
|
|
15158
|
-
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0,
|
|
15047
|
+
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15159
15048
|
"div",
|
|
15160
15049
|
{
|
|
15161
15050
|
"data-ohw-drag-handle-container": "",
|
|
@@ -15167,7 +15056,7 @@ function EditGlowChrome({
|
|
|
15167
15056
|
transform: "translate(calc(-100% - 7px), -50%)",
|
|
15168
15057
|
pointerEvents: dragDisabled ? "none" : "auto"
|
|
15169
15058
|
},
|
|
15170
|
-
children: /* @__PURE__ */ (0,
|
|
15059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15171
15060
|
DragHandle,
|
|
15172
15061
|
{
|
|
15173
15062
|
"aria-label": `Reorder ${reorderHrefKey}`,
|
|
@@ -15377,7 +15266,7 @@ function FloatingToolbar({
|
|
|
15377
15266
|
return () => ro.disconnect();
|
|
15378
15267
|
}, [showEditLink, activeCommands]);
|
|
15379
15268
|
const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
|
|
15380
|
-
return /* @__PURE__ */ (0,
|
|
15269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15381
15270
|
"div",
|
|
15382
15271
|
{
|
|
15383
15272
|
ref: setRefs,
|
|
@@ -15389,12 +15278,12 @@ function FloatingToolbar({
|
|
|
15389
15278
|
zIndex: 2147483647,
|
|
15390
15279
|
pointerEvents: "auto"
|
|
15391
15280
|
},
|
|
15392
|
-
children: /* @__PURE__ */ (0,
|
|
15393
|
-
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0,
|
|
15394
|
-
gi > 0 && /* @__PURE__ */ (0,
|
|
15281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(CustomToolbar, { children: [
|
|
15282
|
+
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react17.default.Fragment, { children: [
|
|
15283
|
+
gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomToolbarDivider, {}),
|
|
15395
15284
|
btns.map((btn) => {
|
|
15396
15285
|
const isActive = activeCommands.has(btn.cmd);
|
|
15397
|
-
return /* @__PURE__ */ (0,
|
|
15286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15398
15287
|
CustomToolbarButton,
|
|
15399
15288
|
{
|
|
15400
15289
|
title: btn.title,
|
|
@@ -15403,7 +15292,7 @@ function FloatingToolbar({
|
|
|
15403
15292
|
e.preventDefault();
|
|
15404
15293
|
onCommand(btn.cmd);
|
|
15405
15294
|
},
|
|
15406
|
-
children: /* @__PURE__ */ (0,
|
|
15295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15407
15296
|
"svg",
|
|
15408
15297
|
{
|
|
15409
15298
|
width: "16",
|
|
@@ -15424,7 +15313,7 @@ function FloatingToolbar({
|
|
|
15424
15313
|
);
|
|
15425
15314
|
})
|
|
15426
15315
|
] }, gi)),
|
|
15427
|
-
showEditLink ? /* @__PURE__ */ (0,
|
|
15316
|
+
showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15428
15317
|
CustomToolbarButton,
|
|
15429
15318
|
{
|
|
15430
15319
|
type: "button",
|
|
@@ -15438,7 +15327,7 @@ function FloatingToolbar({
|
|
|
15438
15327
|
e.preventDefault();
|
|
15439
15328
|
e.stopPropagation();
|
|
15440
15329
|
},
|
|
15441
|
-
children: /* @__PURE__ */ (0,
|
|
15330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
15442
15331
|
}
|
|
15443
15332
|
) : null
|
|
15444
15333
|
] })
|
|
@@ -15455,7 +15344,7 @@ function StateToggle({
|
|
|
15455
15344
|
states,
|
|
15456
15345
|
onStateChange
|
|
15457
15346
|
}) {
|
|
15458
|
-
return /* @__PURE__ */ (0,
|
|
15347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15459
15348
|
ToggleGroup,
|
|
15460
15349
|
{
|
|
15461
15350
|
"data-ohw-state-toggle": "",
|
|
@@ -15469,7 +15358,7 @@ function StateToggle({
|
|
|
15469
15358
|
left: rect.right - 8,
|
|
15470
15359
|
transform: "translateX(-100%)"
|
|
15471
15360
|
},
|
|
15472
|
-
children: states.map((state) => /* @__PURE__ */ (0,
|
|
15361
|
+
children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
|
|
15473
15362
|
}
|
|
15474
15363
|
);
|
|
15475
15364
|
}
|
|
@@ -15485,9 +15374,9 @@ var OHW_LOADER_STYLE = {
|
|
|
15485
15374
|
justifyContent: "center"
|
|
15486
15375
|
};
|
|
15487
15376
|
function OhwLoaderSpinner() {
|
|
15488
|
-
return /* @__PURE__ */ (0,
|
|
15489
|
-
/* @__PURE__ */ (0,
|
|
15490
|
-
/* @__PURE__ */ (0,
|
|
15377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
|
|
15378
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
|
|
15379
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15491
15380
|
"circle",
|
|
15492
15381
|
{
|
|
15493
15382
|
cx: "14",
|
|
@@ -15497,7 +15386,7 @@ function OhwLoaderSpinner() {
|
|
|
15497
15386
|
strokeWidth: "3",
|
|
15498
15387
|
strokeDasharray: "17 52",
|
|
15499
15388
|
strokeLinecap: "round",
|
|
15500
|
-
children: /* @__PURE__ */ (0,
|
|
15389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
15501
15390
|
"animateTransform",
|
|
15502
15391
|
{
|
|
15503
15392
|
attributeName: "transform",
|
|
@@ -17053,6 +16942,25 @@ function OhhwellsBridge() {
|
|
|
17053
16942
|
setLogoSizeDraft(null);
|
|
17054
16943
|
deselectRef.current();
|
|
17055
16944
|
}, []);
|
|
16945
|
+
(0, import_react17.useEffect)(() => {
|
|
16946
|
+
const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
|
|
16947
|
+
if (!session || !logoSizeDraft) {
|
|
16948
|
+
postToParentRef.current({ type: "ow:logo-size-panel", open: false });
|
|
16949
|
+
return;
|
|
16950
|
+
}
|
|
16951
|
+
postToParentRef.current({
|
|
16952
|
+
type: "ow:logo-size-panel",
|
|
16953
|
+
open: true,
|
|
16954
|
+
title: session.title,
|
|
16955
|
+
context: session.context ?? "",
|
|
16956
|
+
placement: session.placement,
|
|
16957
|
+
viewport: editorViewport,
|
|
16958
|
+
mobileFollowing: logoSizeDraft.mobileFollowing,
|
|
16959
|
+
sizePx: editorViewport === "mobile" && !logoSizeDraft.mobileFollowing ? logoSizeDraft.mobilePx : logoSizeDraft.desktopPx,
|
|
16960
|
+
min: LOGO_SIZE_MIN,
|
|
16961
|
+
max: LOGO_SIZE_MAX
|
|
16962
|
+
});
|
|
16963
|
+
}, [floatingPanel, logoSizeDraft, editorViewport]);
|
|
17056
16964
|
const persistLogoSizeDraft = (0, import_react17.useCallback)(
|
|
17057
16965
|
(placement, draft) => {
|
|
17058
16966
|
const desktopKey = LOGO_SIZE_DESKTOP_KEYS[placement];
|
|
@@ -20281,6 +20189,44 @@ function OhhwellsBridge() {
|
|
|
20281
20189
|
if (el) setToolbarRect(getEditMeasureEl(el).getBoundingClientRect());
|
|
20282
20190
|
refreshActiveCommandsRef.current();
|
|
20283
20191
|
}, []);
|
|
20192
|
+
(0, import_react17.useEffect)(() => {
|
|
20193
|
+
const session = floatingPanel && floatingPanel.kind === "logo-size" ? floatingPanel : null;
|
|
20194
|
+
if (!session || !logoSizeDraft) return;
|
|
20195
|
+
const onPanelAction = (e) => {
|
|
20196
|
+
const type = e.data?.type;
|
|
20197
|
+
if (type === "ow:logo-size-close") {
|
|
20198
|
+
closeFloatingPanelAndDeselect();
|
|
20199
|
+
return;
|
|
20200
|
+
}
|
|
20201
|
+
if (type === "ow:logo-size-update-everywhere") {
|
|
20202
|
+
postToParentRef.current({ type: "ow:open-logo-settings", ...readLogoIdentityFromDom() });
|
|
20203
|
+
return;
|
|
20204
|
+
}
|
|
20205
|
+
if (type === "ow:logo-size-customize-mobile" || type === "ow:logo-size-reset-mobile") {
|
|
20206
|
+
const following = type === "ow:logo-size-reset-mobile";
|
|
20207
|
+
const next2 = {
|
|
20208
|
+
...logoSizeDraft,
|
|
20209
|
+
mobileFollowing: following,
|
|
20210
|
+
mobilePx: logoSizeDraft.desktopPx
|
|
20211
|
+
};
|
|
20212
|
+
setLogoSizeDraft(next2);
|
|
20213
|
+
persistLogoSizeDraft(session.placement, next2);
|
|
20214
|
+
return;
|
|
20215
|
+
}
|
|
20216
|
+
if (type !== "ow:logo-size-set") return;
|
|
20217
|
+
const px = Number(e.data.px);
|
|
20218
|
+
if (!Number.isFinite(px)) return;
|
|
20219
|
+
const next = editorViewport === "mobile" ? { ...logoSizeDraft, mobilePx: px, mobileFollowing: false } : {
|
|
20220
|
+
...logoSizeDraft,
|
|
20221
|
+
desktopPx: px,
|
|
20222
|
+
mobilePx: logoSizeDraft.mobileFollowing ? px : logoSizeDraft.mobilePx
|
|
20223
|
+
};
|
|
20224
|
+
setLogoSizeDraft(next);
|
|
20225
|
+
persistLogoSizeDraft(session.placement, next);
|
|
20226
|
+
};
|
|
20227
|
+
window.addEventListener("message", onPanelAction);
|
|
20228
|
+
return () => window.removeEventListener("message", onPanelAction);
|
|
20229
|
+
}, [floatingPanel, logoSizeDraft, editorViewport, persistLogoSizeDraft, closeFloatingPanelAndDeselect]);
|
|
20284
20230
|
const handleStateChange = (0, import_react17.useCallback)((state) => {
|
|
20285
20231
|
if (!activeStateElRef.current) return;
|
|
20286
20232
|
const el = activeStateElRef.current;
|
|
@@ -20632,19 +20578,19 @@ function OhhwellsBridge() {
|
|
|
20632
20578
|
},
|
|
20633
20579
|
[postToParent2]
|
|
20634
20580
|
);
|
|
20635
|
-
return /* @__PURE__ */ (0,
|
|
20636
|
-
/* @__PURE__ */ (0,
|
|
20637
|
-
/* @__PURE__ */ (0,
|
|
20581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
20582
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OhwLoaderSpinner, {}) }),
|
|
20583
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT } }),
|
|
20638
20584
|
bridgeRoot ? (0, import_react_dom4.createPortal)(
|
|
20639
|
-
/* @__PURE__ */ (0,
|
|
20640
|
-
/* @__PURE__ */ (0,
|
|
20641
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
20642
|
-
isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
20585
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
20586
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
|
|
20587
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AiSectionOverlay, { postToParent: postToParent2, apiRef: aiSectionApiRef }),
|
|
20588
|
+
isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20643
20589
|
"div",
|
|
20644
20590
|
{
|
|
20645
20591
|
className: "pointer-events-none fixed z-2147483646",
|
|
20646
20592
|
style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
|
|
20647
|
-
children: /* @__PURE__ */ (0,
|
|
20593
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20648
20594
|
DropIndicator,
|
|
20649
20595
|
{
|
|
20650
20596
|
direction: "horizontal",
|
|
@@ -20655,7 +20601,7 @@ function OhhwellsBridge() {
|
|
|
20655
20601
|
},
|
|
20656
20602
|
`section-drop-${slot.insertIndex}-${i}`
|
|
20657
20603
|
)),
|
|
20658
|
-
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0,
|
|
20604
|
+
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20659
20605
|
MediaOverlay,
|
|
20660
20606
|
{
|
|
20661
20607
|
hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
|
|
@@ -20666,7 +20612,7 @@ function OhhwellsBridge() {
|
|
|
20666
20612
|
},
|
|
20667
20613
|
`uploading-${key}`
|
|
20668
20614
|
)),
|
|
20669
|
-
mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0,
|
|
20615
|
+
mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20670
20616
|
MediaOverlay,
|
|
20671
20617
|
{
|
|
20672
20618
|
hover: mediaHover,
|
|
@@ -20676,7 +20622,7 @@ function OhhwellsBridge() {
|
|
|
20676
20622
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
20677
20623
|
}
|
|
20678
20624
|
),
|
|
20679
|
-
selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0,
|
|
20625
|
+
selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20680
20626
|
MediaOverlay,
|
|
20681
20627
|
{
|
|
20682
20628
|
hover: selectedMedia,
|
|
@@ -20688,11 +20634,11 @@ function OhhwellsBridge() {
|
|
|
20688
20634
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
20689
20635
|
}
|
|
20690
20636
|
),
|
|
20691
|
-
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
20692
|
-
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0,
|
|
20693
|
-
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0,
|
|
20694
|
-
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0,
|
|
20695
|
-
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
20637
|
+
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CarouselOverlay, { hover: carouselHover, onEdit: handleEditCarousel }),
|
|
20638
|
+
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
|
|
20639
|
+
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
|
|
20640
|
+
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
|
|
20641
|
+
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20696
20642
|
"div",
|
|
20697
20643
|
{
|
|
20698
20644
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -20702,7 +20648,7 @@ function OhhwellsBridge() {
|
|
|
20702
20648
|
width: slot.width,
|
|
20703
20649
|
height: slot.height
|
|
20704
20650
|
},
|
|
20705
|
-
children: /* @__PURE__ */ (0,
|
|
20651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20706
20652
|
DropIndicator,
|
|
20707
20653
|
{
|
|
20708
20654
|
direction: slot.direction,
|
|
@@ -20713,7 +20659,7 @@ function OhhwellsBridge() {
|
|
|
20713
20659
|
},
|
|
20714
20660
|
`footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
|
|
20715
20661
|
)),
|
|
20716
|
-
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
20662
|
+
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20717
20663
|
"div",
|
|
20718
20664
|
{
|
|
20719
20665
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -20723,7 +20669,7 @@ function OhhwellsBridge() {
|
|
|
20723
20669
|
width: slot.width,
|
|
20724
20670
|
height: slot.height
|
|
20725
20671
|
},
|
|
20726
|
-
children: /* @__PURE__ */ (0,
|
|
20672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20727
20673
|
DropIndicator,
|
|
20728
20674
|
{
|
|
20729
20675
|
direction: slot.direction,
|
|
@@ -20734,10 +20680,10 @@ function OhhwellsBridge() {
|
|
|
20734
20680
|
},
|
|
20735
20681
|
`nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
|
|
20736
20682
|
)),
|
|
20737
|
-
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
20738
|
-
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0,
|
|
20739
|
-
hoveredTextRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0,
|
|
20740
|
-
formPickRect && !isItemDragging && /* @__PURE__ */ (0,
|
|
20683
|
+
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
20684
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
20685
|
+
hoveredTextRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
|
|
20686
|
+
formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20741
20687
|
ItemInteractionLayer,
|
|
20742
20688
|
{
|
|
20743
20689
|
rect: formPickRect,
|
|
@@ -20745,13 +20691,13 @@ function OhhwellsBridge() {
|
|
|
20745
20691
|
itemDragSurface: false,
|
|
20746
20692
|
toolbarAlign: "left",
|
|
20747
20693
|
chromeGap: 24,
|
|
20748
|
-
toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0,
|
|
20694
|
+
toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
20749
20695
|
"div",
|
|
20750
20696
|
{
|
|
20751
20697
|
"data-ohw-form-toolbar": "",
|
|
20752
20698
|
className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
|
|
20753
20699
|
children: [
|
|
20754
|
-
/* @__PURE__ */ (0,
|
|
20700
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20755
20701
|
"button",
|
|
20756
20702
|
{
|
|
20757
20703
|
type: "button",
|
|
@@ -20759,11 +20705,11 @@ function OhhwellsBridge() {
|
|
|
20759
20705
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
|
|
20760
20706
|
onClick: () => setFieldTypePickerOpen((open) => !open),
|
|
20761
20707
|
"data-ohw-add-field": "",
|
|
20762
|
-
children: /* @__PURE__ */ (0,
|
|
20708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Plus, { size: 15, "aria-hidden": true })
|
|
20763
20709
|
}
|
|
20764
20710
|
),
|
|
20765
|
-
/* @__PURE__ */ (0,
|
|
20766
|
-
/* @__PURE__ */ (0,
|
|
20711
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
20712
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
20767
20713
|
"button",
|
|
20768
20714
|
{
|
|
20769
20715
|
type: "button",
|
|
@@ -20778,11 +20724,11 @@ function OhhwellsBridge() {
|
|
|
20778
20724
|
});
|
|
20779
20725
|
},
|
|
20780
20726
|
children: [
|
|
20781
|
-
/* @__PURE__ */ (0,
|
|
20727
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Settings, { size: 14, "aria-hidden": true }),
|
|
20782
20728
|
"Form settings",
|
|
20783
20729
|
formPickCount ? (
|
|
20784
20730
|
// Counter pill, per the design — not a text suffix.
|
|
20785
|
-
/* @__PURE__ */ (0,
|
|
20731
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20786
20732
|
"span",
|
|
20787
20733
|
{
|
|
20788
20734
|
"data-ohw-form-count": "",
|
|
@@ -20794,8 +20740,8 @@ function OhhwellsBridge() {
|
|
|
20794
20740
|
]
|
|
20795
20741
|
}
|
|
20796
20742
|
),
|
|
20797
|
-
/* @__PURE__ */ (0,
|
|
20798
|
-
/* @__PURE__ */ (0,
|
|
20743
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
20744
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20799
20745
|
"button",
|
|
20800
20746
|
{
|
|
20801
20747
|
type: "button",
|
|
@@ -20825,7 +20771,7 @@ function OhhwellsBridge() {
|
|
|
20825
20771
|
)
|
|
20826
20772
|
}
|
|
20827
20773
|
),
|
|
20828
|
-
formHoverRect && !isItemDragging && /* @__PURE__ */ (0,
|
|
20774
|
+
formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20829
20775
|
ItemInteractionLayer,
|
|
20830
20776
|
{
|
|
20831
20777
|
rect: formHoverRect,
|
|
@@ -20833,7 +20779,7 @@ function OhhwellsBridge() {
|
|
|
20833
20779
|
chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
|
|
20834
20780
|
}
|
|
20835
20781
|
),
|
|
20836
|
-
fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0,
|
|
20782
|
+
fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20837
20783
|
ItemInteractionLayer,
|
|
20838
20784
|
{
|
|
20839
20785
|
rect: fieldPickRect,
|
|
@@ -20845,7 +20791,7 @@ function OhhwellsBridge() {
|
|
|
20845
20791
|
dragHandleLabel: "Reorder field",
|
|
20846
20792
|
onDragHandleDragStart: handleFieldDragStart,
|
|
20847
20793
|
onDragHandleDragEnd: handleFieldDragEnd,
|
|
20848
|
-
toolbar: /* @__PURE__ */ (0,
|
|
20794
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20849
20795
|
FormFieldToolbar,
|
|
20850
20796
|
{
|
|
20851
20797
|
type: fieldPickState.type,
|
|
@@ -20858,12 +20804,12 @@ function OhhwellsBridge() {
|
|
|
20858
20804
|
)
|
|
20859
20805
|
}
|
|
20860
20806
|
),
|
|
20861
|
-
fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
20807
|
+
fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20862
20808
|
"div",
|
|
20863
20809
|
{
|
|
20864
20810
|
className: "pointer-events-none fixed z-[2147483644]",
|
|
20865
20811
|
style: { top: slot.top, left: slot.left, width: slot.width },
|
|
20866
|
-
children: /* @__PURE__ */ (0,
|
|
20812
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20867
20813
|
DropIndicator,
|
|
20868
20814
|
{
|
|
20869
20815
|
direction: "horizontal",
|
|
@@ -20874,16 +20820,16 @@ function OhhwellsBridge() {
|
|
|
20874
20820
|
},
|
|
20875
20821
|
`field-drop-${i}`
|
|
20876
20822
|
)) : null,
|
|
20877
|
-
fieldTypePickerOpen && formPickRect && /* @__PURE__ */ (0,
|
|
20823
|
+
fieldTypePickerOpen && formPickRect && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20878
20824
|
"div",
|
|
20879
20825
|
{
|
|
20880
20826
|
className: "pointer-events-none fixed z-[2147483645]",
|
|
20881
20827
|
style: { top: formPickRect.top + 16, left: formPickRect.left + 24 },
|
|
20882
|
-
children: /* @__PURE__ */ (0,
|
|
20828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FieldTypePicker, { onPick: handleAddField })
|
|
20883
20829
|
}
|
|
20884
20830
|
),
|
|
20885
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
20886
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
20831
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
20832
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20887
20833
|
FooterContainerChrome,
|
|
20888
20834
|
{
|
|
20889
20835
|
rect: toolbarRect,
|
|
@@ -20891,7 +20837,7 @@ function OhhwellsBridge() {
|
|
|
20891
20837
|
addDisabled: !canAddFooterColumn()
|
|
20892
20838
|
}
|
|
20893
20839
|
),
|
|
20894
|
-
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0,
|
|
20840
|
+
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20895
20841
|
ItemInteractionLayer,
|
|
20896
20842
|
{
|
|
20897
20843
|
rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected) ? draggedItemRect : toolbarRect,
|
|
@@ -20906,7 +20852,7 @@ function OhhwellsBridge() {
|
|
|
20906
20852
|
onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
|
|
20907
20853
|
onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
|
|
20908
20854
|
itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection,
|
|
20909
|
-
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0,
|
|
20855
|
+
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20910
20856
|
ItemActionToolbar,
|
|
20911
20857
|
{
|
|
20912
20858
|
onEditLink: openLinkPopoverForSelected,
|
|
@@ -20942,8 +20888,8 @@ function OhhwellsBridge() {
|
|
|
20942
20888
|
) : void 0
|
|
20943
20889
|
}
|
|
20944
20890
|
),
|
|
20945
|
-
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0,
|
|
20946
|
-
/* @__PURE__ */ (0,
|
|
20891
|
+
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
20892
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20947
20893
|
EditGlowChrome,
|
|
20948
20894
|
{
|
|
20949
20895
|
rect: toolbarRect,
|
|
@@ -20953,7 +20899,7 @@ function OhhwellsBridge() {
|
|
|
20953
20899
|
hideHandle: isItemDragging
|
|
20954
20900
|
}
|
|
20955
20901
|
),
|
|
20956
|
-
/* @__PURE__ */ (0,
|
|
20902
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20957
20903
|
FloatingToolbar,
|
|
20958
20904
|
{
|
|
20959
20905
|
rect: toolbarRect,
|
|
@@ -20966,7 +20912,7 @@ function OhhwellsBridge() {
|
|
|
20966
20912
|
}
|
|
20967
20913
|
)
|
|
20968
20914
|
] }),
|
|
20969
|
-
maxBadge && /* @__PURE__ */ (0,
|
|
20915
|
+
maxBadge && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
20970
20916
|
"div",
|
|
20971
20917
|
{
|
|
20972
20918
|
"data-ohw-max-badge": "",
|
|
@@ -20992,7 +20938,7 @@ function OhhwellsBridge() {
|
|
|
20992
20938
|
]
|
|
20993
20939
|
}
|
|
20994
20940
|
),
|
|
20995
|
-
toggleState && !linkPopover && /* @__PURE__ */ (0,
|
|
20941
|
+
toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
20996
20942
|
StateToggle,
|
|
20997
20943
|
{
|
|
20998
20944
|
rect: toggleState.rect,
|
|
@@ -21001,15 +20947,15 @@ function OhhwellsBridge() {
|
|
|
21001
20947
|
onStateChange: handleStateChange
|
|
21002
20948
|
}
|
|
21003
20949
|
),
|
|
21004
|
-
sectionGap && !linkPopover && /* @__PURE__ */ (0,
|
|
20950
|
+
sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
21005
20951
|
"div",
|
|
21006
20952
|
{
|
|
21007
20953
|
"data-ohw-section-insert-line": "",
|
|
21008
20954
|
className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
|
|
21009
20955
|
style: { top: sectionGap.y, transform: "translateY(-50%)" },
|
|
21010
20956
|
children: [
|
|
21011
|
-
/* @__PURE__ */ (0,
|
|
21012
|
-
/* @__PURE__ */ (0,
|
|
20957
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
|
|
20958
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
21013
20959
|
Badge,
|
|
21014
20960
|
{
|
|
21015
20961
|
className: "px-8 py-1 bg-primary hover:bg-primary text-primary-foreground text-xs font-medium shrink-0 rounded-full cursor-pointer pointer-events-auto",
|
|
@@ -21026,11 +20972,11 @@ function OhhwellsBridge() {
|
|
|
21026
20972
|
children: "Add Section"
|
|
21027
20973
|
}
|
|
21028
20974
|
),
|
|
21029
|
-
/* @__PURE__ */ (0,
|
|
20975
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
|
|
21030
20976
|
]
|
|
21031
20977
|
}
|
|
21032
20978
|
),
|
|
21033
|
-
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0,
|
|
20979
|
+
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
21034
20980
|
LinkPopover,
|
|
21035
20981
|
{
|
|
21036
20982
|
panelRef: linkPopoverPanelRef,
|
|
@@ -21047,7 +20993,7 @@ function OhhwellsBridge() {
|
|
|
21047
20993
|
},
|
|
21048
20994
|
linkPopover.key
|
|
21049
20995
|
) : null,
|
|
21050
|
-
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0,
|
|
20996
|
+
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
21051
20997
|
FloatingPanel,
|
|
21052
20998
|
{
|
|
21053
20999
|
open: true,
|
|
@@ -21057,7 +21003,7 @@ function OhhwellsBridge() {
|
|
|
21057
21003
|
onPositionChange: setFloatingPanelPos,
|
|
21058
21004
|
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
21059
21005
|
onClose: closeFloatingPanelOnly,
|
|
21060
|
-
children: /* @__PURE__ */ (0,
|
|
21006
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
21061
21007
|
SocialsDisplayPanel,
|
|
21062
21008
|
{
|
|
21063
21009
|
display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
|
|
@@ -21068,57 +21014,6 @@ function OhhwellsBridge() {
|
|
|
21068
21014
|
}
|
|
21069
21015
|
)
|
|
21070
21016
|
}
|
|
21071
|
-
) : null,
|
|
21072
|
-
floatingPanel && floatingPanel.kind === "logo-size" && logoSizeDraft ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
21073
|
-
FloatingPanel,
|
|
21074
|
-
{
|
|
21075
|
-
open: true,
|
|
21076
|
-
title: floatingPanel.title,
|
|
21077
|
-
context: floatingPanel.context,
|
|
21078
|
-
position: floatingPanelPos,
|
|
21079
|
-
onPositionChange: setFloatingPanelPos,
|
|
21080
|
-
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
21081
|
-
onClose: closeFloatingPanelAndDeselect,
|
|
21082
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
21083
|
-
LogoSizePanel,
|
|
21084
|
-
{
|
|
21085
|
-
viewport: editorViewport,
|
|
21086
|
-
sizePx: editorViewport === "mobile" && !logoSizeDraft.mobileFollowing ? logoSizeDraft.mobilePx : logoSizeDraft.desktopPx,
|
|
21087
|
-
mobileFollowing: logoSizeDraft.mobileFollowing,
|
|
21088
|
-
onSizeChange: (px) => {
|
|
21089
|
-
const next = editorViewport === "mobile" ? { ...logoSizeDraft, mobilePx: px, mobileFollowing: false } : {
|
|
21090
|
-
...logoSizeDraft,
|
|
21091
|
-
desktopPx: px,
|
|
21092
|
-
mobilePx: logoSizeDraft.mobileFollowing ? px : logoSizeDraft.mobilePx
|
|
21093
|
-
};
|
|
21094
|
-
setLogoSizeDraft(next);
|
|
21095
|
-
persistLogoSizeDraft(floatingPanel.placement, next);
|
|
21096
|
-
},
|
|
21097
|
-
onCustomizeMobile: () => {
|
|
21098
|
-
const next = {
|
|
21099
|
-
...logoSizeDraft,
|
|
21100
|
-
mobileFollowing: false,
|
|
21101
|
-
mobilePx: logoSizeDraft.desktopPx
|
|
21102
|
-
};
|
|
21103
|
-
setLogoSizeDraft(next);
|
|
21104
|
-
persistLogoSizeDraft(floatingPanel.placement, next);
|
|
21105
|
-
},
|
|
21106
|
-
onResetMobile: () => {
|
|
21107
|
-
const next = {
|
|
21108
|
-
...logoSizeDraft,
|
|
21109
|
-
mobileFollowing: true,
|
|
21110
|
-
mobilePx: logoSizeDraft.desktopPx
|
|
21111
|
-
};
|
|
21112
|
-
setLogoSizeDraft(next);
|
|
21113
|
-
persistLogoSizeDraft(floatingPanel.placement, next);
|
|
21114
|
-
},
|
|
21115
|
-
onUpdateEverywhere: () => {
|
|
21116
|
-
const identity = readLogoIdentityFromDom();
|
|
21117
|
-
postToParent2({ type: "ow:open-logo-settings", ...identity });
|
|
21118
|
-
}
|
|
21119
|
-
}
|
|
21120
|
-
)
|
|
21121
|
-
}
|
|
21122
21017
|
) : null
|
|
21123
21018
|
] }),
|
|
21124
21019
|
bridgeRoot
|
|
@@ -21128,10 +21023,10 @@ function OhhwellsBridge() {
|
|
|
21128
21023
|
|
|
21129
21024
|
// src/ui/EmptySection.tsx
|
|
21130
21025
|
var import_link = __toESM(require("next/link"), 1);
|
|
21131
|
-
var
|
|
21026
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
21132
21027
|
function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
|
|
21133
|
-
return /* @__PURE__ */ (0,
|
|
21134
|
-
/* @__PURE__ */ (0,
|
|
21028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
21029
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
21135
21030
|
"p",
|
|
21136
21031
|
{
|
|
21137
21032
|
style: {
|
|
@@ -21143,10 +21038,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
21143
21038
|
color: "var(--brand-accent)",
|
|
21144
21039
|
marginBottom: "1.5rem"
|
|
21145
21040
|
},
|
|
21146
|
-
children: /* @__PURE__ */ (0,
|
|
21041
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
|
|
21147
21042
|
}
|
|
21148
21043
|
),
|
|
21149
|
-
/* @__PURE__ */ (0,
|
|
21044
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
21150
21045
|
"h1",
|
|
21151
21046
|
{
|
|
21152
21047
|
style: {
|
|
@@ -21161,7 +21056,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
21161
21056
|
children: title
|
|
21162
21057
|
}
|
|
21163
21058
|
),
|
|
21164
|
-
/* @__PURE__ */ (0,
|
|
21059
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
21165
21060
|
"p",
|
|
21166
21061
|
{
|
|
21167
21062
|
style: {
|