@ohhwells/bridge 0.1.151 → 0.1.152
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 +689 -546
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -2
- package/dist/index.d.ts +98 -2
- package/dist/index.js +674 -546
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
AI_TREE_TOKENS: () => AI_TREE_TOKENS,
|
|
38
38
|
AiFooterRenderer: () => AiFooterRenderer,
|
|
39
39
|
AiTreeRenderer: () => AiTreeRenderer,
|
|
40
|
+
BRAND_TITLE_KEY: () => BRAND_TITLE_KEY,
|
|
40
41
|
CustomToolbar: () => CustomToolbar,
|
|
41
42
|
CustomToolbarButton: () => CustomToolbarButton,
|
|
42
43
|
CustomToolbarDivider: () => CustomToolbarDivider,
|
|
@@ -56,7 +57,12 @@ __export(index_exports, {
|
|
|
56
57
|
ItemInteractionLayer: () => ItemInteractionLayer,
|
|
57
58
|
LinkEditorPanel: () => LinkEditorPanel,
|
|
58
59
|
LinkPopover: () => LinkPopover,
|
|
60
|
+
OHW_LOADER_PREHYDRATE_SCRIPT: () => OHW_LOADER_PREHYDRATE_SCRIPT,
|
|
61
|
+
OHW_LOADER_STYLE: () => OHW_LOADER_STYLE,
|
|
59
62
|
OhhwellsBridge: () => OhhwellsBridge,
|
|
63
|
+
OhwLoaderSpinner: () => OhwLoaderSpinner,
|
|
64
|
+
OhwLoaderSurface: () => OhwLoaderSurface,
|
|
65
|
+
SITE_OG_IMAGE_KEY: () => SITE_OG_IMAGE_KEY,
|
|
60
66
|
SchedulingWidget: () => SchedulingWidget,
|
|
61
67
|
Toggle: () => Toggle,
|
|
62
68
|
ToggleGroup: () => ToggleGroup,
|
|
@@ -67,6 +73,8 @@ __export(index_exports, {
|
|
|
67
73
|
TooltipTrigger: () => TooltipTrigger,
|
|
68
74
|
addFooterLinkColumn: () => addFooterLinkColumn,
|
|
69
75
|
appendFooterSocial: () => appendFooterSocial,
|
|
76
|
+
applyBrandChrome: () => applyBrandChrome,
|
|
77
|
+
applyStickySearchParams: () => applyStickySearchParams,
|
|
70
78
|
buildDefaultFooterTree: () => buildDefaultFooterTree,
|
|
71
79
|
buildTarget: () => buildTarget,
|
|
72
80
|
dropIndicatorVariants: () => dropIndicatorVariants,
|
|
@@ -74,18 +82,25 @@ __export(index_exports, {
|
|
|
74
82
|
filterAvailablePages: () => filterAvailablePages,
|
|
75
83
|
foldAlignIntoTrees: () => foldAlignIntoTrees,
|
|
76
84
|
getEditModeInitialState: () => getEditModeInitialState,
|
|
85
|
+
hasMountedContentNodes: () => hasMountedContentNodes,
|
|
77
86
|
insertFooterHours: () => insertFooterHours,
|
|
78
87
|
isEditSessionActive: () => isEditSessionActive,
|
|
88
|
+
isPlainLeftClick: () => isPlainLeftClick,
|
|
79
89
|
isRenderableFooterTree: () => isRenderableFooterTree,
|
|
80
90
|
isRenderableTree: () => isRenderableTree,
|
|
91
|
+
isStickySearchParam: () => isStickySearchParam,
|
|
81
92
|
isValidUrl: () => isValidUrl,
|
|
82
93
|
nextViableSlide: () => nextViableSlide,
|
|
83
94
|
parseAiFooterState: () => parseAiFooterState,
|
|
84
95
|
parseAiSectionsState: () => parseAiSectionsState,
|
|
85
96
|
parseTarget: () => parseTarget,
|
|
97
|
+
recordOverriddenPaths: () => recordOverriddenPaths,
|
|
86
98
|
removeFooterBlock: () => removeFooterBlock,
|
|
99
|
+
resetOverriddenPathsCache: () => resetOverriddenPathsCache,
|
|
87
100
|
resolveFooterCopyright: () => resolveFooterCopyright,
|
|
101
|
+
resolveStickyNavigation: () => resolveStickyNavigation,
|
|
88
102
|
serializeAiFooterState: () => serializeAiFooterState,
|
|
103
|
+
shouldFetchContentForPath: () => shouldFetchContentForPath,
|
|
89
104
|
stepViableSlide: () => stepViableSlide,
|
|
90
105
|
stripTextAlignCss: () => stripTextAlignCss,
|
|
91
106
|
toggleVariants: () => toggleVariants,
|
|
@@ -6790,8 +6805,9 @@ function upsertMeta(selector, attr, token, value) {
|
|
|
6790
6805
|
}
|
|
6791
6806
|
if (el.getAttribute("content") !== value) el.setAttribute("content", value);
|
|
6792
6807
|
}
|
|
6793
|
-
function
|
|
6794
|
-
document.head.querySelector(selector)
|
|
6808
|
+
function clearMeta(selector) {
|
|
6809
|
+
const el = document.head.querySelector(selector);
|
|
6810
|
+
if (el && el.getAttribute("content") !== "") el.setAttribute("content", "");
|
|
6795
6811
|
}
|
|
6796
6812
|
function escapeXml(value) {
|
|
6797
6813
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
@@ -6821,8 +6837,8 @@ function applyOgImage(url) {
|
|
|
6821
6837
|
upsertMeta('meta[name="twitter:card"]', "name", "twitter:card", "summary_large_image");
|
|
6822
6838
|
return;
|
|
6823
6839
|
}
|
|
6824
|
-
|
|
6825
|
-
|
|
6840
|
+
clearMeta('meta[property="og:image"]');
|
|
6841
|
+
clearMeta('meta[name="twitter:image"]');
|
|
6826
6842
|
}
|
|
6827
6843
|
function applyBrandChrome(content) {
|
|
6828
6844
|
const name = content[BRAND_NAME_KEY];
|
|
@@ -11664,6 +11680,89 @@ function useLinkHrefGuardian(...deps) {
|
|
|
11664
11680
|
}, deps);
|
|
11665
11681
|
}
|
|
11666
11682
|
|
|
11683
|
+
// src/lib/sticky-search-params.ts
|
|
11684
|
+
var STICKY_EXACT = /* @__PURE__ */ new Set([
|
|
11685
|
+
// Site identity. Required in local dev and in the canvas editor's iframe, where there is no
|
|
11686
|
+
// router to inject __OHW_SUBDOMAIN__ or set the ohw-subdomain cookie, so the query string is
|
|
11687
|
+
// the only thing that says which site this is.
|
|
11688
|
+
"subdomain",
|
|
11689
|
+
// Ad-click / attribution ids. Dropping these on the first internal click is what breaks
|
|
11690
|
+
// campaign attribution for a site whose landing page is not the page that converts.
|
|
11691
|
+
"ref",
|
|
11692
|
+
"gclid",
|
|
11693
|
+
"fbclid",
|
|
11694
|
+
"msclkid",
|
|
11695
|
+
"ttclid",
|
|
11696
|
+
"twclid"
|
|
11697
|
+
]);
|
|
11698
|
+
var STICKY_PREFIXES = ["utm_"];
|
|
11699
|
+
function isStickySearchParam(name) {
|
|
11700
|
+
const key = name.toLowerCase();
|
|
11701
|
+
return STICKY_EXACT.has(key) || STICKY_PREFIXES.some((p) => key.startsWith(p));
|
|
11702
|
+
}
|
|
11703
|
+
function applyStickySearchParams(target, currentSearch) {
|
|
11704
|
+
const current = new URLSearchParams(currentSearch);
|
|
11705
|
+
let changed = false;
|
|
11706
|
+
for (const [name, value] of current) {
|
|
11707
|
+
if (!isStickySearchParam(name)) continue;
|
|
11708
|
+
if (target.searchParams.has(name)) continue;
|
|
11709
|
+
target.searchParams.set(name, value);
|
|
11710
|
+
changed = true;
|
|
11711
|
+
}
|
|
11712
|
+
return changed;
|
|
11713
|
+
}
|
|
11714
|
+
function isPlainLeftClick(e) {
|
|
11715
|
+
return e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey && !e.defaultPrevented;
|
|
11716
|
+
}
|
|
11717
|
+
function resolveStickyNavigation(anchor, currentSearch, origin) {
|
|
11718
|
+
if (anchor.target && anchor.target !== "_self") return null;
|
|
11719
|
+
if (anchor.hasAttribute("download")) return null;
|
|
11720
|
+
const href = anchor.getAttribute("href");
|
|
11721
|
+
if (!href) return null;
|
|
11722
|
+
if (href.startsWith("#")) return null;
|
|
11723
|
+
let url;
|
|
11724
|
+
try {
|
|
11725
|
+
url = new URL(href, origin);
|
|
11726
|
+
} catch {
|
|
11727
|
+
return null;
|
|
11728
|
+
}
|
|
11729
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return null;
|
|
11730
|
+
if (url.origin !== origin) return null;
|
|
11731
|
+
if (!applyStickySearchParams(url, currentSearch)) return null;
|
|
11732
|
+
return url.pathname + url.search + url.hash;
|
|
11733
|
+
}
|
|
11734
|
+
|
|
11735
|
+
// src/lib/content-mount-observer.ts
|
|
11736
|
+
var CONTENT_SELECTOR = "[data-ohw-key],[data-ohw-section],[data-ohw-editable]";
|
|
11737
|
+
function hasMountedContentNodes(records) {
|
|
11738
|
+
for (const record of records) {
|
|
11739
|
+
for (const node of record.addedNodes) {
|
|
11740
|
+
if (node.nodeType !== 1) continue;
|
|
11741
|
+
const el = node;
|
|
11742
|
+
if (el.matches(CONTENT_SELECTOR) || el.querySelector(CONTENT_SELECTOR)) return true;
|
|
11743
|
+
}
|
|
11744
|
+
}
|
|
11745
|
+
return false;
|
|
11746
|
+
}
|
|
11747
|
+
|
|
11748
|
+
// src/lib/content-fetch-policy.ts
|
|
11749
|
+
var overriddenPathsBySubdomain = /* @__PURE__ */ new Map();
|
|
11750
|
+
function recordOverriddenPaths(subdomain, raw) {
|
|
11751
|
+
overriddenPathsBySubdomain.set(
|
|
11752
|
+
subdomain,
|
|
11753
|
+
Array.isArray(raw) ? raw.filter((p) => typeof p === "string") : void 0
|
|
11754
|
+
);
|
|
11755
|
+
}
|
|
11756
|
+
function shouldFetchContentForPath(subdomain, path) {
|
|
11757
|
+
if (!overriddenPathsBySubdomain.has(subdomain)) return true;
|
|
11758
|
+
const overridden = overriddenPathsBySubdomain.get(subdomain);
|
|
11759
|
+
if (!overridden) return true;
|
|
11760
|
+
return overridden.includes(path);
|
|
11761
|
+
}
|
|
11762
|
+
function resetOverriddenPathsCache() {
|
|
11763
|
+
overriddenPathsBySubdomain.clear();
|
|
11764
|
+
}
|
|
11765
|
+
|
|
11667
11766
|
// src/useSavedLinkNavigation.ts
|
|
11668
11767
|
var import_react4 = require("react");
|
|
11669
11768
|
var import_navigation = require("next/navigation");
|
|
@@ -11688,8 +11787,10 @@ function useSavedLinkNavigation(isEditMode) {
|
|
|
11688
11787
|
if (!href) return;
|
|
11689
11788
|
e.preventDefault();
|
|
11690
11789
|
e.stopPropagation();
|
|
11691
|
-
if (isRouterHref(href))
|
|
11692
|
-
|
|
11790
|
+
if (isRouterHref(href)) {
|
|
11791
|
+
const sticky = resolveStickyNavigation(anchor, window.location.search, window.location.origin);
|
|
11792
|
+
router.push(sticky ?? href);
|
|
11793
|
+
} else window.location.assign(href);
|
|
11693
11794
|
};
|
|
11694
11795
|
document.addEventListener("click", onClick, true);
|
|
11695
11796
|
return () => document.removeEventListener("click", onClick, true);
|
|
@@ -12507,6 +12608,63 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
12507
12608
|
);
|
|
12508
12609
|
}
|
|
12509
12610
|
|
|
12611
|
+
// src/ui/OhwLoaderSurface.tsx
|
|
12612
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
12613
|
+
var OHW_LOADER_STYLE = {
|
|
12614
|
+
position: "fixed",
|
|
12615
|
+
inset: 0,
|
|
12616
|
+
background: "var(--brand-background, #fff)",
|
|
12617
|
+
zIndex: 2147483646,
|
|
12618
|
+
display: "flex",
|
|
12619
|
+
alignItems: "center",
|
|
12620
|
+
justifyContent: "center"
|
|
12621
|
+
};
|
|
12622
|
+
var OHW_LOADER_SPIN_KEYFRAMES = "@keyframes ohw-loader-spin{to{transform:rotate(360deg)}}";
|
|
12623
|
+
function OhwLoaderSpinner() {
|
|
12624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
12625
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("style", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_SPIN_KEYFRAMES } }),
|
|
12626
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
12627
|
+
"svg",
|
|
12628
|
+
{
|
|
12629
|
+
width: "28",
|
|
12630
|
+
height: "28",
|
|
12631
|
+
viewBox: "0 0 28 28",
|
|
12632
|
+
fill: "none",
|
|
12633
|
+
"aria-hidden": true,
|
|
12634
|
+
style: { animation: "ohw-loader-spin 0.7s linear infinite", transformOrigin: "center" },
|
|
12635
|
+
children: [
|
|
12636
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "14", cy: "14", r: "11", style: { stroke: "var(--brand-border, #E7E5E4)" }, strokeWidth: "3" }),
|
|
12637
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12638
|
+
"circle",
|
|
12639
|
+
{
|
|
12640
|
+
cx: "14",
|
|
12641
|
+
cy: "14",
|
|
12642
|
+
r: "11",
|
|
12643
|
+
style: { stroke: "var(--brand-primary, #1C1917)" },
|
|
12644
|
+
strokeWidth: "3",
|
|
12645
|
+
strokeDasharray: "17 52",
|
|
12646
|
+
strokeLinecap: "round"
|
|
12647
|
+
}
|
|
12648
|
+
)
|
|
12649
|
+
]
|
|
12650
|
+
}
|
|
12651
|
+
)
|
|
12652
|
+
] });
|
|
12653
|
+
}
|
|
12654
|
+
var OHW_LOADER_PREHYDRATE_SCRIPT = `(function(){try{var fromGlobal=typeof window!=="undefined"&&window.__OHW_SUBDOMAIN__?String(window.__OHW_SUBDOMAIN__):"";var p=location.hostname.split(".");var fromHost=location.hostname.endsWith(".ohhwells.site")&&p[0]&&p[0]!=="www"?p[0]:"";var fromQuery=new URLSearchParams(location.search).get("subdomain")||"";var fromCookie=(document.cookie.match(/(?:^|; )ohw-subdomain=([^;]*)/)||[])[1];fromCookie=fromCookie?decodeURIComponent(fromCookie):"";if(!fromGlobal&&!fromHost&&!fromQuery&&!fromCookie)return;var e=document.getElementById("ohw-loader");if(e)e.style.display="flex"}catch(e){}})();`;
|
|
12655
|
+
function OhwLoaderSurface() {
|
|
12656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
12657
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(OhwLoaderSpinner, {}) }),
|
|
12658
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12659
|
+
"script",
|
|
12660
|
+
{
|
|
12661
|
+
suppressHydrationWarning: true,
|
|
12662
|
+
dangerouslySetInnerHTML: { __html: OHW_LOADER_PREHYDRATE_SCRIPT }
|
|
12663
|
+
}
|
|
12664
|
+
)
|
|
12665
|
+
] });
|
|
12666
|
+
}
|
|
12667
|
+
|
|
12510
12668
|
// src/ui/toggle-group.tsx
|
|
12511
12669
|
var React3 = __toESM(require("react"), 1);
|
|
12512
12670
|
|
|
@@ -15828,7 +15986,7 @@ var cva = (base, config) => (props) => {
|
|
|
15828
15986
|
|
|
15829
15987
|
// src/ui/toggle.tsx
|
|
15830
15988
|
var import_radix_ui2 = require("radix-ui");
|
|
15831
|
-
var
|
|
15989
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
15832
15990
|
var toggleVariants = cva(
|
|
15833
15991
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-bridge-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
15834
15992
|
{
|
|
@@ -15855,7 +16013,7 @@ function Toggle({
|
|
|
15855
16013
|
size,
|
|
15856
16014
|
...props
|
|
15857
16015
|
}) {
|
|
15858
|
-
return /* @__PURE__ */ (0,
|
|
16016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15859
16017
|
import_radix_ui2.Toggle.Root,
|
|
15860
16018
|
{
|
|
15861
16019
|
"data-slot": "toggle",
|
|
@@ -15866,7 +16024,7 @@ function Toggle({
|
|
|
15866
16024
|
}
|
|
15867
16025
|
|
|
15868
16026
|
// src/ui/toggle-group.tsx
|
|
15869
|
-
var
|
|
16027
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
15870
16028
|
var ToggleGroupContext = React3.createContext({
|
|
15871
16029
|
value: "",
|
|
15872
16030
|
onValueChange: () => {
|
|
@@ -15879,13 +16037,13 @@ function ToggleGroup({
|
|
|
15879
16037
|
children,
|
|
15880
16038
|
...props
|
|
15881
16039
|
}) {
|
|
15882
|
-
return /* @__PURE__ */ (0,
|
|
16040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15883
16041
|
"div",
|
|
15884
16042
|
{
|
|
15885
16043
|
role: "group",
|
|
15886
16044
|
className: cn("flex items-center gap-1 p-1 bg-muted rounded-md", className),
|
|
15887
16045
|
...props,
|
|
15888
|
-
children: /* @__PURE__ */ (0,
|
|
16046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ToggleGroupContext.Provider, { value: { value, onValueChange }, children })
|
|
15889
16047
|
}
|
|
15890
16048
|
);
|
|
15891
16049
|
}
|
|
@@ -15896,7 +16054,7 @@ function ToggleGroupItem({
|
|
|
15896
16054
|
...props
|
|
15897
16055
|
}) {
|
|
15898
16056
|
const { value: groupValue, onValueChange } = React3.useContext(ToggleGroupContext);
|
|
15899
|
-
return /* @__PURE__ */ (0,
|
|
16057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15900
16058
|
Toggle,
|
|
15901
16059
|
{
|
|
15902
16060
|
pressed: groupValue === value,
|
|
@@ -15918,10 +16076,10 @@ function ToggleGroupItem({
|
|
|
15918
16076
|
// src/ui/drag-handle.tsx
|
|
15919
16077
|
var React4 = __toESM(require("react"), 1);
|
|
15920
16078
|
var import_lucide_react2 = require("lucide-react");
|
|
15921
|
-
var
|
|
16079
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
15922
16080
|
var DragHandle = React4.forwardRef(
|
|
15923
16081
|
({ className, type = "button", ...props }, ref) => {
|
|
15924
|
-
return /* @__PURE__ */ (0,
|
|
16082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
15925
16083
|
"button",
|
|
15926
16084
|
{
|
|
15927
16085
|
ref,
|
|
@@ -15936,7 +16094,7 @@ var DragHandle = React4.forwardRef(
|
|
|
15936
16094
|
className
|
|
15937
16095
|
),
|
|
15938
16096
|
...props,
|
|
15939
|
-
children: /* @__PURE__ */ (0,
|
|
16097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.GripVertical, { className: "size-4 shrink-0", "aria-hidden": "true" })
|
|
15940
16098
|
}
|
|
15941
16099
|
);
|
|
15942
16100
|
}
|
|
@@ -15945,8 +16103,8 @@ DragHandle.displayName = "DragHandle";
|
|
|
15945
16103
|
|
|
15946
16104
|
// src/ui/custom-toolbar.tsx
|
|
15947
16105
|
var React5 = __toESM(require("react"), 1);
|
|
15948
|
-
var
|
|
15949
|
-
var CustomToolbar = React5.forwardRef(({ className, onMouseDown, ...props }, ref) => /* @__PURE__ */ (0,
|
|
16106
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
16107
|
+
var CustomToolbar = React5.forwardRef(({ className, onMouseDown, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
15950
16108
|
"div",
|
|
15951
16109
|
{
|
|
15952
16110
|
ref,
|
|
@@ -15965,7 +16123,7 @@ var CustomToolbar = React5.forwardRef(({ className, onMouseDown, ...props }, ref
|
|
|
15965
16123
|
));
|
|
15966
16124
|
CustomToolbar.displayName = "CustomToolbar";
|
|
15967
16125
|
function CustomToolbarDivider({ className, ...props }) {
|
|
15968
|
-
return /* @__PURE__ */ (0,
|
|
16126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
15969
16127
|
"span",
|
|
15970
16128
|
{
|
|
15971
16129
|
"aria-hidden": true,
|
|
@@ -15975,7 +16133,7 @@ function CustomToolbarDivider({ className, ...props }) {
|
|
|
15975
16133
|
);
|
|
15976
16134
|
}
|
|
15977
16135
|
var CustomToolbarButton = React5.forwardRef(
|
|
15978
|
-
({ className, active = false, type = "button", ...props }, ref) => /* @__PURE__ */ (0,
|
|
16136
|
+
({ className, active = false, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
15979
16137
|
"button",
|
|
15980
16138
|
{
|
|
15981
16139
|
ref,
|
|
@@ -15998,17 +16156,17 @@ var import_lucide_react3 = require("lucide-react");
|
|
|
15998
16156
|
// src/ui/dropdown-menu.tsx
|
|
15999
16157
|
var React6 = __toESM(require("react"), 1);
|
|
16000
16158
|
var import_radix_ui3 = require("radix-ui");
|
|
16001
|
-
var
|
|
16159
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
16002
16160
|
function DropdownMenu({ ...props }) {
|
|
16003
|
-
return /* @__PURE__ */ (0,
|
|
16161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_radix_ui3.DropdownMenu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
16004
16162
|
}
|
|
16005
|
-
var DropdownMenuTrigger = React6.forwardRef((props, ref) => /* @__PURE__ */ (0,
|
|
16163
|
+
var DropdownMenuTrigger = React6.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_radix_ui3.DropdownMenu.Trigger, { ref, "data-slot": "dropdown-menu-trigger", ...props }));
|
|
16006
16164
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
16007
16165
|
function DropdownMenuGroup({
|
|
16008
16166
|
className,
|
|
16009
16167
|
...props
|
|
16010
16168
|
}) {
|
|
16011
|
-
return /* @__PURE__ */ (0,
|
|
16169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16012
16170
|
import_radix_ui3.DropdownMenu.Group,
|
|
16013
16171
|
{
|
|
16014
16172
|
"data-slot": "dropdown-menu-group",
|
|
@@ -16022,7 +16180,7 @@ function DropdownMenuContent({
|
|
|
16022
16180
|
sideOffset = 6,
|
|
16023
16181
|
...props
|
|
16024
16182
|
}) {
|
|
16025
|
-
return /* @__PURE__ */ (0,
|
|
16183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_radix_ui3.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16026
16184
|
import_radix_ui3.DropdownMenu.Content,
|
|
16027
16185
|
{
|
|
16028
16186
|
"data-slot": "dropdown-menu-content",
|
|
@@ -16046,7 +16204,7 @@ function DropdownMenuItem({
|
|
|
16046
16204
|
variant = "default",
|
|
16047
16205
|
...props
|
|
16048
16206
|
}) {
|
|
16049
|
-
return /* @__PURE__ */ (0,
|
|
16207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16050
16208
|
import_radix_ui3.DropdownMenu.Item,
|
|
16051
16209
|
{
|
|
16052
16210
|
"data-slot": "dropdown-menu-item",
|
|
@@ -16076,7 +16234,7 @@ function DropdownMenuSeparator({
|
|
|
16076
16234
|
className,
|
|
16077
16235
|
...props
|
|
16078
16236
|
}) {
|
|
16079
|
-
return /* @__PURE__ */ (0,
|
|
16237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
16080
16238
|
import_radix_ui3.DropdownMenu.Separator,
|
|
16081
16239
|
{
|
|
16082
16240
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -16088,18 +16246,18 @@ function DropdownMenuSeparator({
|
|
|
16088
16246
|
|
|
16089
16247
|
// src/ui/tooltip.tsx
|
|
16090
16248
|
var import_radix_ui4 = require("radix-ui");
|
|
16091
|
-
var
|
|
16249
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
16092
16250
|
function TooltipProvider({
|
|
16093
16251
|
delayDuration = 0,
|
|
16094
16252
|
...props
|
|
16095
16253
|
}) {
|
|
16096
|
-
return /* @__PURE__ */ (0,
|
|
16254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui4.Tooltip.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
|
|
16097
16255
|
}
|
|
16098
16256
|
function Tooltip({ ...props }) {
|
|
16099
|
-
return /* @__PURE__ */ (0,
|
|
16257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui4.Tooltip.Root, { "data-slot": "tooltip", ...props });
|
|
16100
16258
|
}
|
|
16101
16259
|
function TooltipTrigger({ ...props }) {
|
|
16102
|
-
return /* @__PURE__ */ (0,
|
|
16260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui4.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
16103
16261
|
}
|
|
16104
16262
|
var arrowClassBySide = {
|
|
16105
16263
|
top: "before:bottom-0 before:left-1/2 before:-translate-x-1/2 before:translate-y-1/2",
|
|
@@ -16116,7 +16274,7 @@ function TooltipContent({
|
|
|
16116
16274
|
...props
|
|
16117
16275
|
}) {
|
|
16118
16276
|
const resolvedSide = side ?? "bottom";
|
|
16119
|
-
return /* @__PURE__ */ (0,
|
|
16277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui4.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
16120
16278
|
import_radix_ui4.Tooltip.Content,
|
|
16121
16279
|
{
|
|
16122
16280
|
"data-slot": "tooltip-content",
|
|
@@ -16139,7 +16297,7 @@ function TooltipContent({
|
|
|
16139
16297
|
}
|
|
16140
16298
|
|
|
16141
16299
|
// src/ui/item-action-toolbar.tsx
|
|
16142
|
-
var
|
|
16300
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
16143
16301
|
function ToolbarActionTooltip({
|
|
16144
16302
|
label,
|
|
16145
16303
|
side = "bottom",
|
|
@@ -16147,10 +16305,10 @@ function ToolbarActionTooltip({
|
|
|
16147
16305
|
buttonProps,
|
|
16148
16306
|
children
|
|
16149
16307
|
}) {
|
|
16150
|
-
const button = /* @__PURE__ */ (0,
|
|
16151
|
-
return /* @__PURE__ */ (0,
|
|
16152
|
-
/* @__PURE__ */ (0,
|
|
16153
|
-
/* @__PURE__ */ (0,
|
|
16308
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CustomToolbarButton, { type: "button", "aria-label": label, disabled, ...buttonProps, children });
|
|
16309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Tooltip, { children: [
|
|
16310
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "inline-flex", children: button }) : button }),
|
|
16311
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipContent, { side, sideOffset: 9, children: label })
|
|
16154
16312
|
] });
|
|
16155
16313
|
}
|
|
16156
16314
|
function ItemActionToolbar({
|
|
@@ -16181,9 +16339,9 @@ function ItemActionToolbar({
|
|
|
16181
16339
|
const showDropdownToggle = dropdownOpen !== null && dropdownOpen !== void 0;
|
|
16182
16340
|
const showHeadingToggle = headingVisible !== null && headingVisible !== void 0;
|
|
16183
16341
|
const headingTooltip = headingVisible ? "Hide heading" : "Show heading";
|
|
16184
|
-
return /* @__PURE__ */ (0,
|
|
16185
|
-
showDropdownToggle ? /* @__PURE__ */ (0,
|
|
16186
|
-
/* @__PURE__ */ (0,
|
|
16342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(CustomToolbar, { children: [
|
|
16343
|
+
showDropdownToggle ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
16344
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
16187
16345
|
ToggleGroup,
|
|
16188
16346
|
{
|
|
16189
16347
|
value: dropdownOpen ? "open" : "closed",
|
|
@@ -16195,7 +16353,7 @@ function ItemActionToolbar({
|
|
|
16195
16353
|
e.stopPropagation();
|
|
16196
16354
|
},
|
|
16197
16355
|
children: [
|
|
16198
|
-
/* @__PURE__ */ (0,
|
|
16356
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16199
16357
|
ToggleGroupItem,
|
|
16200
16358
|
{
|
|
16201
16359
|
value: "closed",
|
|
@@ -16210,7 +16368,7 @@ function ItemActionToolbar({
|
|
|
16210
16368
|
children: "Closed"
|
|
16211
16369
|
}
|
|
16212
16370
|
),
|
|
16213
|
-
/* @__PURE__ */ (0,
|
|
16371
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16214
16372
|
ToggleGroupItem,
|
|
16215
16373
|
{
|
|
16216
16374
|
value: "open",
|
|
@@ -16228,9 +16386,9 @@ function ItemActionToolbar({
|
|
|
16228
16386
|
]
|
|
16229
16387
|
}
|
|
16230
16388
|
),
|
|
16231
|
-
/* @__PURE__ */ (0,
|
|
16389
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CustomToolbarDivider, {})
|
|
16232
16390
|
] }) : null,
|
|
16233
|
-
showEditLink ? /* @__PURE__ */ (0,
|
|
16391
|
+
showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16234
16392
|
ToolbarActionTooltip,
|
|
16235
16393
|
{
|
|
16236
16394
|
label: "Edit link",
|
|
@@ -16248,10 +16406,10 @@ function ItemActionToolbar({
|
|
|
16248
16406
|
e.stopPropagation();
|
|
16249
16407
|
}
|
|
16250
16408
|
},
|
|
16251
|
-
children: /* @__PURE__ */ (0,
|
|
16409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
16252
16410
|
}
|
|
16253
16411
|
) : null,
|
|
16254
|
-
showStyle ? /* @__PURE__ */ (0,
|
|
16412
|
+
showStyle ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16255
16413
|
ToolbarActionTooltip,
|
|
16256
16414
|
{
|
|
16257
16415
|
label: "Style",
|
|
@@ -16272,10 +16430,10 @@ function ItemActionToolbar({
|
|
|
16272
16430
|
e.stopPropagation();
|
|
16273
16431
|
}
|
|
16274
16432
|
},
|
|
16275
|
-
children: /* @__PURE__ */ (0,
|
|
16433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Brush, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
16276
16434
|
}
|
|
16277
16435
|
) : null,
|
|
16278
|
-
showAddItem ? /* @__PURE__ */ (0,
|
|
16436
|
+
showAddItem ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16279
16437
|
ToolbarActionTooltip,
|
|
16280
16438
|
{
|
|
16281
16439
|
label: "Add item",
|
|
@@ -16289,10 +16447,10 @@ function ItemActionToolbar({
|
|
|
16289
16447
|
onAddItem?.();
|
|
16290
16448
|
}
|
|
16291
16449
|
},
|
|
16292
|
-
children: /* @__PURE__ */ (0,
|
|
16450
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Plus, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
16293
16451
|
}
|
|
16294
16452
|
) : null,
|
|
16295
|
-
showHeadingToggle ? /* @__PURE__ */ (0,
|
|
16453
|
+
showHeadingToggle ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16296
16454
|
ToolbarActionTooltip,
|
|
16297
16455
|
{
|
|
16298
16456
|
label: headingTooltip,
|
|
@@ -16309,12 +16467,12 @@ function ItemActionToolbar({
|
|
|
16309
16467
|
onHeadingVisibleChange?.(!headingVisible);
|
|
16310
16468
|
}
|
|
16311
16469
|
},
|
|
16312
|
-
children: /* @__PURE__ */ (0,
|
|
16470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Heading, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
16313
16471
|
}
|
|
16314
16472
|
) : null,
|
|
16315
|
-
showMore ? /* @__PURE__ */ (0,
|
|
16316
|
-
/* @__PURE__ */ (0,
|
|
16317
|
-
/* @__PURE__ */ (0,
|
|
16473
|
+
showMore ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DropdownMenu, { open: moreOpen, onOpenChange: setMoreOpen, children: [
|
|
16474
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Tooltip, { open: moreOpen ? false : void 0, children: [
|
|
16475
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuTrigger, { asChild: true, disabled: moreDisabled, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
16318
16476
|
CustomToolbarButton,
|
|
16319
16477
|
{
|
|
16320
16478
|
type: "button",
|
|
@@ -16324,12 +16482,12 @@ function ItemActionToolbar({
|
|
|
16324
16482
|
e.preventDefault();
|
|
16325
16483
|
e.stopPropagation();
|
|
16326
16484
|
},
|
|
16327
|
-
children: /* @__PURE__ */ (0,
|
|
16485
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.MoreHorizontal, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
16328
16486
|
}
|
|
16329
16487
|
) }) }),
|
|
16330
|
-
/* @__PURE__ */ (0,
|
|
16488
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipContent, { side: tooltipSide, sideOffset: 9, children: "More" })
|
|
16331
16489
|
] }),
|
|
16332
|
-
/* @__PURE__ */ (0,
|
|
16490
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
16333
16491
|
DropdownMenuContent,
|
|
16334
16492
|
{
|
|
16335
16493
|
align: "end",
|
|
@@ -16340,39 +16498,39 @@ function ItemActionToolbar({
|
|
|
16340
16498
|
e.stopPropagation();
|
|
16341
16499
|
},
|
|
16342
16500
|
children: [
|
|
16343
|
-
/* @__PURE__ */ (0,
|
|
16344
|
-
/* @__PURE__ */ (0,
|
|
16501
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DropdownMenuGroup, { children: [
|
|
16502
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
16345
16503
|
DropdownMenuItem,
|
|
16346
16504
|
{
|
|
16347
16505
|
disabled: selectParentDisabled,
|
|
16348
16506
|
onSelect: () => onSelectParent?.(),
|
|
16349
16507
|
children: [
|
|
16350
|
-
/* @__PURE__ */ (0,
|
|
16508
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.CornerLeftUp, { size: 12, "aria-hidden": true }),
|
|
16351
16509
|
"Select parent"
|
|
16352
16510
|
]
|
|
16353
16511
|
}
|
|
16354
16512
|
),
|
|
16355
|
-
/* @__PURE__ */ (0,
|
|
16513
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
16356
16514
|
DropdownMenuItem,
|
|
16357
16515
|
{
|
|
16358
16516
|
disabled: duplicateDisabled,
|
|
16359
16517
|
onSelect: () => onDuplicate?.(),
|
|
16360
16518
|
children: [
|
|
16361
|
-
/* @__PURE__ */ (0,
|
|
16519
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Copy, { size: 12, "aria-hidden": true }),
|
|
16362
16520
|
"Duplicate"
|
|
16363
16521
|
]
|
|
16364
16522
|
}
|
|
16365
16523
|
)
|
|
16366
16524
|
] }),
|
|
16367
|
-
/* @__PURE__ */ (0,
|
|
16368
|
-
/* @__PURE__ */ (0,
|
|
16525
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuSeparator, {}),
|
|
16526
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
16369
16527
|
DropdownMenuItem,
|
|
16370
16528
|
{
|
|
16371
16529
|
variant: "destructive",
|
|
16372
16530
|
disabled: deleteDisabled,
|
|
16373
16531
|
onSelect: () => onDelete?.(),
|
|
16374
16532
|
children: [
|
|
16375
|
-
/* @__PURE__ */ (0,
|
|
16533
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Trash2, { size: 15, "aria-hidden": true }),
|
|
16376
16534
|
"Delete"
|
|
16377
16535
|
]
|
|
16378
16536
|
}
|
|
@@ -16387,7 +16545,7 @@ function ItemActionToolbar({
|
|
|
16387
16545
|
// src/ui/item-interaction-layer.tsx
|
|
16388
16546
|
var import_react8 = require("react");
|
|
16389
16547
|
var import_react_dom3 = require("react-dom");
|
|
16390
|
-
var
|
|
16548
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
16391
16549
|
var PRIMARY = "var(--ohw-primary, #0885FE)";
|
|
16392
16550
|
var CHROME_RADIUS = 6;
|
|
16393
16551
|
var FOCUS_RING = `0 0 0 4px color-mix(in srgb, ${PRIMARY} 12%, transparent)`;
|
|
@@ -16481,7 +16639,7 @@ function ClampedToolbarSlot({
|
|
|
16481
16639
|
window.removeEventListener("resize", clamp);
|
|
16482
16640
|
};
|
|
16483
16641
|
}, [placement, children, align]);
|
|
16484
|
-
return /* @__PURE__ */ (0,
|
|
16642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16485
16643
|
"div",
|
|
16486
16644
|
{
|
|
16487
16645
|
ref: slotRef,
|
|
@@ -16556,7 +16714,7 @@ function DetachedBelowToolbarSlot({
|
|
|
16556
16714
|
}, [centerX, belowRect, belowEl, children]);
|
|
16557
16715
|
if (!portalTarget) return null;
|
|
16558
16716
|
return (0, import_react_dom3.createPortal)(
|
|
16559
|
-
/* @__PURE__ */ (0,
|
|
16717
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16560
16718
|
"div",
|
|
16561
16719
|
{
|
|
16562
16720
|
ref: slotRef,
|
|
@@ -16614,7 +16772,7 @@ function ItemInteractionLayer({
|
|
|
16614
16772
|
if (typeof elRef === "function") elRef(node);
|
|
16615
16773
|
else if (elRef) elRef.current = node;
|
|
16616
16774
|
};
|
|
16617
|
-
return /* @__PURE__ */ (0,
|
|
16775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
16618
16776
|
"div",
|
|
16619
16777
|
{
|
|
16620
16778
|
ref: setRootRef,
|
|
@@ -16631,7 +16789,7 @@ function ItemInteractionLayer({
|
|
|
16631
16789
|
display: hidden ? "none" : "block"
|
|
16632
16790
|
},
|
|
16633
16791
|
children: [
|
|
16634
|
-
/* @__PURE__ */ (0,
|
|
16792
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16635
16793
|
"div",
|
|
16636
16794
|
{
|
|
16637
16795
|
"aria-hidden": true,
|
|
@@ -16639,7 +16797,7 @@ function ItemInteractionLayer({
|
|
|
16639
16797
|
style: { ...getChromeStyle(state), borderRadius: CHROME_RADIUS }
|
|
16640
16798
|
}
|
|
16641
16799
|
),
|
|
16642
|
-
itemDragEnabled && /* @__PURE__ */ (0,
|
|
16800
|
+
itemDragEnabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16643
16801
|
"div",
|
|
16644
16802
|
{
|
|
16645
16803
|
"data-ohw-item-drag-surface": "",
|
|
@@ -16656,14 +16814,14 @@ function ItemInteractionLayer({
|
|
|
16656
16814
|
}
|
|
16657
16815
|
}
|
|
16658
16816
|
),
|
|
16659
|
-
showDragHandle && /* @__PURE__ */ (0,
|
|
16817
|
+
showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16660
16818
|
"div",
|
|
16661
16819
|
{
|
|
16662
16820
|
"data-ohw-drag-handle-container": "",
|
|
16663
16821
|
className: "pointer-events-auto absolute left-0 top-1/2 z-10 -translate-x-[calc(100%+7px)] -translate-y-1/2",
|
|
16664
16822
|
style: isDragging ? { opacity: 0 } : void 0,
|
|
16665
16823
|
"aria-hidden": isDragging || void 0,
|
|
16666
|
-
children: /* @__PURE__ */ (0,
|
|
16824
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16667
16825
|
DragHandle,
|
|
16668
16826
|
{
|
|
16669
16827
|
draggable: !dragDisabled,
|
|
@@ -16693,9 +16851,9 @@ function ItemInteractionLayer({
|
|
|
16693
16851
|
)
|
|
16694
16852
|
}
|
|
16695
16853
|
),
|
|
16696
|
-
showToolbar && state === "active-top" && /* @__PURE__ */ (0,
|
|
16697
|
-
showToolbar && state === "active-bottom" && !useDetachedBelowToolbar && /* @__PURE__ */ (0,
|
|
16698
|
-
useDetachedBelowToolbar && toolbarBelowRect ? /* @__PURE__ */ (0,
|
|
16854
|
+
showToolbar && state === "active-top" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ClampedToolbarSlot, { align: toolbarAlign, placement: "top", children: toolbar }),
|
|
16855
|
+
showToolbar && state === "active-bottom" && !useDetachedBelowToolbar && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ClampedToolbarSlot, { align: toolbarAlign, placement: "bottom", children: toolbar }),
|
|
16856
|
+
useDetachedBelowToolbar && toolbarBelowRect ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
16699
16857
|
DetachedBelowToolbarSlot,
|
|
16700
16858
|
{
|
|
16701
16859
|
centerX: rect.left + rect.width / 2,
|
|
@@ -17230,7 +17388,7 @@ function reconcileFieldsFromContent(form, content) {
|
|
|
17230
17388
|
|
|
17231
17389
|
// src/ui/form-field-toolbar.tsx
|
|
17232
17390
|
var import_lucide_react4 = require("lucide-react");
|
|
17233
|
-
var
|
|
17391
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
17234
17392
|
var TYPE_ICONS = {
|
|
17235
17393
|
"short-text": import_lucide_react4.Type,
|
|
17236
17394
|
"long-text": import_lucide_react4.TextQuote,
|
|
@@ -17247,35 +17405,35 @@ function FormFieldToolbar({
|
|
|
17247
17405
|
}) {
|
|
17248
17406
|
const TypeIcon = TYPE_ICONS[type];
|
|
17249
17407
|
const typeLabel = FIELD_TYPES.find((entry) => entry.type === type)?.label ?? "Short text";
|
|
17250
|
-
return /* @__PURE__ */ (0,
|
|
17408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
17251
17409
|
"div",
|
|
17252
17410
|
{
|
|
17253
17411
|
"data-ohw-field-toolbar": "",
|
|
17254
17412
|
className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
|
|
17255
17413
|
children: [
|
|
17256
|
-
/* @__PURE__ */ (0,
|
|
17257
|
-
/* @__PURE__ */ (0,
|
|
17414
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu, { children: [
|
|
17415
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
17258
17416
|
"button",
|
|
17259
17417
|
{
|
|
17260
17418
|
type: "button",
|
|
17261
17419
|
className: "flex h-7 items-center gap-1.5 whitespace-nowrap rounded-md px-2 text-[13px] font-medium text-foreground transition-colors hover:bg-muted/70",
|
|
17262
17420
|
"data-ohw-field-type-trigger": "",
|
|
17263
17421
|
children: [
|
|
17264
|
-
/* @__PURE__ */ (0,
|
|
17422
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TypeIcon, { size: 14, strokeWidth: 1.75, "aria-hidden": true }),
|
|
17265
17423
|
typeLabel,
|
|
17266
|
-
/* @__PURE__ */ (0,
|
|
17424
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronDown, { size: 13, className: "text-muted-foreground", "aria-hidden": true })
|
|
17267
17425
|
]
|
|
17268
17426
|
}
|
|
17269
17427
|
) }),
|
|
17270
|
-
/* @__PURE__ */ (0,
|
|
17428
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuContent, { align: "start", sideOffset: 8, className: "min-w-47.5 p-1", children: FIELD_TYPES.map((entry) => {
|
|
17271
17429
|
const Icon = TYPE_ICONS[entry.type];
|
|
17272
|
-
return /* @__PURE__ */ (0,
|
|
17430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
17273
17431
|
DropdownMenuItem,
|
|
17274
17432
|
{
|
|
17275
17433
|
onSelect: () => onTypeChange(entry.type),
|
|
17276
17434
|
className: "rounded-md py-2 text-[13px] " + (entry.type === type ? "bg-bridge-primary/10" : ""),
|
|
17277
17435
|
children: [
|
|
17278
|
-
/* @__PURE__ */ (0,
|
|
17436
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { size: 14, strokeWidth: 1.75, className: "shrink-0", "aria-hidden": true }),
|
|
17279
17437
|
entry.label
|
|
17280
17438
|
]
|
|
17281
17439
|
},
|
|
@@ -17283,8 +17441,8 @@ function FormFieldToolbar({
|
|
|
17283
17441
|
);
|
|
17284
17442
|
}) })
|
|
17285
17443
|
] }),
|
|
17286
|
-
/* @__PURE__ */ (0,
|
|
17287
|
-
/* @__PURE__ */ (0,
|
|
17444
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
17445
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
17288
17446
|
"button",
|
|
17289
17447
|
{
|
|
17290
17448
|
type: "button",
|
|
@@ -17293,30 +17451,30 @@ function FormFieldToolbar({
|
|
|
17293
17451
|
className: "flex h-7 items-center gap-1.5 whitespace-nowrap rounded-md px-2 text-[13px] font-medium transition-colors " + (required ? "bg-bridge-primary/10 text-bridge-primary" : "text-foreground hover:bg-muted/70"),
|
|
17294
17452
|
"data-ohw-field-required-toggle": "",
|
|
17295
17453
|
children: [
|
|
17296
|
-
/* @__PURE__ */ (0,
|
|
17454
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Asterisk, { size: 14, strokeWidth: 2, "aria-hidden": true }),
|
|
17297
17455
|
"Required"
|
|
17298
17456
|
]
|
|
17299
17457
|
}
|
|
17300
17458
|
),
|
|
17301
|
-
/* @__PURE__ */ (0,
|
|
17302
|
-
/* @__PURE__ */ (0,
|
|
17303
|
-
/* @__PURE__ */ (0,
|
|
17459
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
17460
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu, { children: [
|
|
17461
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17304
17462
|
"button",
|
|
17305
17463
|
{
|
|
17306
17464
|
type: "button",
|
|
17307
17465
|
title: "More",
|
|
17308
17466
|
"aria-label": "More",
|
|
17309
17467
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/70",
|
|
17310
|
-
children: /* @__PURE__ */ (0,
|
|
17468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MoreHorizontal, { size: 15, "aria-hidden": true })
|
|
17311
17469
|
}
|
|
17312
17470
|
) }),
|
|
17313
|
-
/* @__PURE__ */ (0,
|
|
17314
|
-
/* @__PURE__ */ (0,
|
|
17315
|
-
/* @__PURE__ */ (0,
|
|
17471
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuContent, { align: "start", sideOffset: 8, className: "min-w-42.5 p-1", children: [
|
|
17472
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem, { onSelect: onDuplicate, className: "rounded-md py-2 text-[13px]", children: [
|
|
17473
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Copy, { size: 14, strokeWidth: 1.75, className: "shrink-0", "aria-hidden": true }),
|
|
17316
17474
|
"Duplicate"
|
|
17317
17475
|
] }),
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17319
|
-
/* @__PURE__ */ (0,
|
|
17476
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuItem, { variant: "destructive", onSelect: onDelete, className: "rounded-md py-2 text-[13px]", children: [
|
|
17477
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Trash2, { size: 14, strokeWidth: 1.75, className: "shrink-0", "aria-hidden": true }),
|
|
17320
17478
|
"Delete"
|
|
17321
17479
|
] })
|
|
17322
17480
|
] })
|
|
@@ -17326,21 +17484,21 @@ function FormFieldToolbar({
|
|
|
17326
17484
|
);
|
|
17327
17485
|
}
|
|
17328
17486
|
function FieldTypePicker({ onPick }) {
|
|
17329
|
-
return /* @__PURE__ */ (0,
|
|
17487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
17330
17488
|
"div",
|
|
17331
17489
|
{
|
|
17332
17490
|
"data-ohw-field-type-picker": "",
|
|
17333
17491
|
className: "pointer-events-auto grid w-[280px] grid-cols-2 gap-2 rounded-xl border border-border bg-background p-3 shadow-lg",
|
|
17334
17492
|
children: FIELD_TYPES.map((entry) => {
|
|
17335
17493
|
const Icon = TYPE_ICONS[entry.type];
|
|
17336
|
-
return /* @__PURE__ */ (0,
|
|
17494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
17337
17495
|
"button",
|
|
17338
17496
|
{
|
|
17339
17497
|
type: "button",
|
|
17340
17498
|
onClick: () => onPick(entry.type),
|
|
17341
17499
|
className: "flex h-[76px] flex-col items-center justify-center gap-2 rounded-xl border border-border text-[15px] font-medium text-foreground transition-colors hover:border-bridge-primary hover:bg-bridge-primary/5",
|
|
17342
17500
|
children: [
|
|
17343
|
-
/* @__PURE__ */ (0,
|
|
17501
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { size: 26, strokeWidth: 1.5, "aria-hidden": true }),
|
|
17344
17502
|
entry.label
|
|
17345
17503
|
]
|
|
17346
17504
|
},
|
|
@@ -17358,7 +17516,7 @@ var import_lucide_react5 = require("lucide-react");
|
|
|
17358
17516
|
// src/ui/button.tsx
|
|
17359
17517
|
var React7 = __toESM(require("react"), 1);
|
|
17360
17518
|
var import_radix_ui5 = require("radix-ui");
|
|
17361
|
-
var
|
|
17519
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
17362
17520
|
var buttonVariants = cva(
|
|
17363
17521
|
"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",
|
|
17364
17522
|
{
|
|
@@ -17382,7 +17540,7 @@ var buttonVariants = cva(
|
|
|
17382
17540
|
var Button = React7.forwardRef(
|
|
17383
17541
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
17384
17542
|
const Comp = asChild ? import_radix_ui5.Slot.Root : "button";
|
|
17385
|
-
return /* @__PURE__ */ (0,
|
|
17543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
17386
17544
|
Comp,
|
|
17387
17545
|
{
|
|
17388
17546
|
ref,
|
|
@@ -17416,7 +17574,7 @@ var MEDIA_SKELETON_CSS = `
|
|
|
17416
17574
|
`;
|
|
17417
17575
|
|
|
17418
17576
|
// src/ui/MediaOverlay.tsx
|
|
17419
|
-
var
|
|
17577
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
17420
17578
|
var VIDEO_SETTINGS_BAR_INSET = 8;
|
|
17421
17579
|
var OVERLAY_BUTTON_STYLE = {
|
|
17422
17580
|
pointerEvents: "auto",
|
|
@@ -17482,7 +17640,7 @@ function MediaOverlay({
|
|
|
17482
17640
|
return () => anim.cancel();
|
|
17483
17641
|
}, [isUploading, fadingOut, onFadeOutComplete, hover.key]);
|
|
17484
17642
|
if (isUploading) {
|
|
17485
|
-
return /* @__PURE__ */ (0,
|
|
17643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17486
17644
|
"div",
|
|
17487
17645
|
{
|
|
17488
17646
|
ref: skeletonRef,
|
|
@@ -17491,11 +17649,11 @@ function MediaOverlay({
|
|
|
17491
17649
|
"data-ohw-media-skeleton": "",
|
|
17492
17650
|
"aria-hidden": true,
|
|
17493
17651
|
style: { ...box, pointerEvents: "none" },
|
|
17494
|
-
children: /* @__PURE__ */ (0,
|
|
17652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("style", { children: MEDIA_SKELETON_CSS })
|
|
17495
17653
|
}
|
|
17496
17654
|
);
|
|
17497
17655
|
}
|
|
17498
|
-
const settingsBar = isVideo && !hover.isDragOver && showChrome ? /* @__PURE__ */ (0,
|
|
17656
|
+
const settingsBar = isVideo && !hover.isDragOver && showChrome ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
17499
17657
|
"div",
|
|
17500
17658
|
{
|
|
17501
17659
|
"data-ohw-bridge": "",
|
|
@@ -17511,7 +17669,7 @@ function MediaOverlay({
|
|
|
17511
17669
|
},
|
|
17512
17670
|
onClick: (e) => e.stopPropagation(),
|
|
17513
17671
|
children: [
|
|
17514
|
-
/* @__PURE__ */ (0,
|
|
17672
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17515
17673
|
Button,
|
|
17516
17674
|
{
|
|
17517
17675
|
"data-ohw-media-overlay": "",
|
|
@@ -17526,10 +17684,10 @@ function MediaOverlay({
|
|
|
17526
17684
|
e.stopPropagation();
|
|
17527
17685
|
onVideoSettingsChange?.(hover.key, { autoplay: !autoplay });
|
|
17528
17686
|
},
|
|
17529
|
-
children: autoplay ? /* @__PURE__ */ (0,
|
|
17687
|
+
children: autoplay ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Pause, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Play, { size: 14 })
|
|
17530
17688
|
}
|
|
17531
17689
|
),
|
|
17532
|
-
/* @__PURE__ */ (0,
|
|
17690
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
17533
17691
|
Button,
|
|
17534
17692
|
{
|
|
17535
17693
|
"data-ohw-media-overlay": "",
|
|
@@ -17544,15 +17702,15 @@ function MediaOverlay({
|
|
|
17544
17702
|
e.stopPropagation();
|
|
17545
17703
|
onVideoSettingsChange?.(hover.key, { muted: !muted });
|
|
17546
17704
|
},
|
|
17547
|
-
children: muted ? /* @__PURE__ */ (0,
|
|
17705
|
+
children: muted ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.VolumeX, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Volume2, { size: 14 })
|
|
17548
17706
|
}
|
|
17549
17707
|
)
|
|
17550
17708
|
]
|
|
17551
17709
|
}
|
|
17552
17710
|
) : null;
|
|
17553
|
-
return /* @__PURE__ */ (0,
|
|
17711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
17554
17712
|
settingsBar,
|
|
17555
|
-
/* @__PURE__ */ (0,
|
|
17713
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
17556
17714
|
"div",
|
|
17557
17715
|
{
|
|
17558
17716
|
"data-ohw-bridge": "",
|
|
@@ -17572,7 +17730,7 @@ function MediaOverlay({
|
|
|
17572
17730
|
},
|
|
17573
17731
|
onClick: () => onSelect && !selected ? onSelect(hover.key) : onReplace(hover.key),
|
|
17574
17732
|
children: [
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17733
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
17576
17734
|
Button,
|
|
17577
17735
|
{
|
|
17578
17736
|
ref: probeRef,
|
|
@@ -17590,12 +17748,12 @@ function MediaOverlay({
|
|
|
17590
17748
|
pointerEvents: "none"
|
|
17591
17749
|
},
|
|
17592
17750
|
children: [
|
|
17593
|
-
isVideo ? /* @__PURE__ */ (0,
|
|
17751
|
+
isVideo ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Film, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.ImageIcon, { size: 14 }),
|
|
17594
17752
|
isVideo ? "Replace video" : "Replace image"
|
|
17595
17753
|
]
|
|
17596
17754
|
}
|
|
17597
17755
|
),
|
|
17598
|
-
replaceMode === "none" || cueOnly ? null : /* @__PURE__ */ (0,
|
|
17756
|
+
replaceMode === "none" || cueOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
17599
17757
|
Button,
|
|
17600
17758
|
{
|
|
17601
17759
|
"data-ohw-media-overlay": "",
|
|
@@ -17623,7 +17781,7 @@ function MediaOverlay({
|
|
|
17623
17781
|
onReplace(hover.key);
|
|
17624
17782
|
},
|
|
17625
17783
|
children: [
|
|
17626
|
-
isVideo ? /* @__PURE__ */ (0,
|
|
17784
|
+
isVideo ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Film, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.ImageIcon, { size: 14 }),
|
|
17627
17785
|
replaceMode === "full" ? isVideo ? "Replace video" : hover.elementType === "bg-image" ? "Replace background" : "Replace image" : null
|
|
17628
17786
|
]
|
|
17629
17787
|
}
|
|
@@ -17636,7 +17794,7 @@ function MediaOverlay({
|
|
|
17636
17794
|
|
|
17637
17795
|
// src/ui/CarouselOverlay.tsx
|
|
17638
17796
|
var import_lucide_react6 = require("lucide-react");
|
|
17639
|
-
var
|
|
17797
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
17640
17798
|
var OVERLAY_BUTTON_STYLE2 = {
|
|
17641
17799
|
pointerEvents: "auto",
|
|
17642
17800
|
fontFamily: "Inter, sans-serif",
|
|
@@ -17649,7 +17807,7 @@ function CarouselOverlay({
|
|
|
17649
17807
|
cueOnly = false
|
|
17650
17808
|
}) {
|
|
17651
17809
|
const { rect } = hover;
|
|
17652
|
-
return /* @__PURE__ */ (0,
|
|
17810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
17653
17811
|
"div",
|
|
17654
17812
|
{
|
|
17655
17813
|
"data-ohw-bridge": "",
|
|
@@ -17667,7 +17825,7 @@ function CarouselOverlay({
|
|
|
17667
17825
|
background: "color-mix(in srgb, var(--color-bridge-primary) 20%, transparent)"
|
|
17668
17826
|
},
|
|
17669
17827
|
onClick: () => onEdit(hover.key),
|
|
17670
|
-
children: cueOnly ? null : /* @__PURE__ */ (0,
|
|
17828
|
+
children: cueOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
17671
17829
|
Button,
|
|
17672
17830
|
{
|
|
17673
17831
|
"data-ohw-carousel-overlay": "",
|
|
@@ -17681,7 +17839,7 @@ function CarouselOverlay({
|
|
|
17681
17839
|
onEdit(hover.key);
|
|
17682
17840
|
},
|
|
17683
17841
|
children: [
|
|
17684
|
-
/* @__PURE__ */ (0,
|
|
17842
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.GalleryHorizontal, { size: 14 }),
|
|
17685
17843
|
"Edit gallery"
|
|
17686
17844
|
]
|
|
17687
17845
|
}
|
|
@@ -17693,7 +17851,7 @@ function CarouselOverlay({
|
|
|
17693
17851
|
// src/ui/ai-section/AiSectionOverlay.tsx
|
|
17694
17852
|
var import_react9 = require("react");
|
|
17695
17853
|
var import_lucide_react7 = require("lucide-react");
|
|
17696
|
-
var
|
|
17854
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
17697
17855
|
var findSectionElement = findByInstanceId;
|
|
17698
17856
|
function readRect(instanceId) {
|
|
17699
17857
|
const el = findSectionElement(instanceId);
|
|
@@ -17807,8 +17965,8 @@ function ReviewButton({
|
|
|
17807
17965
|
color
|
|
17808
17966
|
}) {
|
|
17809
17967
|
const [hover, setHover] = (0, import_react9.useState)(false);
|
|
17810
|
-
return /* @__PURE__ */ (0,
|
|
17811
|
-
/* @__PURE__ */ (0,
|
|
17968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { position: "relative" }, children: [
|
|
17969
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
17812
17970
|
"button",
|
|
17813
17971
|
{
|
|
17814
17972
|
type: "button",
|
|
@@ -17832,7 +17990,7 @@ function ReviewButton({
|
|
|
17832
17990
|
children
|
|
17833
17991
|
}
|
|
17834
17992
|
),
|
|
17835
|
-
hover && /* @__PURE__ */ (0,
|
|
17993
|
+
hover && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
17836
17994
|
"div",
|
|
17837
17995
|
{
|
|
17838
17996
|
style: {
|
|
@@ -18033,8 +18191,8 @@ function AiSectionOverlay({
|
|
|
18033
18191
|
isLast
|
|
18034
18192
|
});
|
|
18035
18193
|
}, [activeSelectionId, selectionRect, postToParent2]);
|
|
18036
|
-
return /* @__PURE__ */ (0,
|
|
18037
|
-
hoverRect && /* @__PURE__ */ (0,
|
|
18194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18195
|
+
hoverRect && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18038
18196
|
"div",
|
|
18039
18197
|
{
|
|
18040
18198
|
"data-ohw-ai-section-hover": "",
|
|
@@ -18052,7 +18210,7 @@ function AiSectionOverlay({
|
|
|
18052
18210
|
}
|
|
18053
18211
|
}
|
|
18054
18212
|
),
|
|
18055
|
-
showSelectionBorder && selectionRect && /* @__PURE__ */ (0,
|
|
18213
|
+
showSelectionBorder && selectionRect && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18056
18214
|
"div",
|
|
18057
18215
|
{
|
|
18058
18216
|
"data-ohw-ai-section-selected": "",
|
|
@@ -18070,8 +18228,8 @@ function AiSectionOverlay({
|
|
|
18070
18228
|
}
|
|
18071
18229
|
}
|
|
18072
18230
|
),
|
|
18073
|
-
reviewRect && /* @__PURE__ */ (0,
|
|
18074
|
-
subtractRect(reviewRect, navToggleHole).map((r2, i) => /* @__PURE__ */ (0,
|
|
18231
|
+
reviewRect && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18232
|
+
subtractRect(reviewRect, navToggleHole).map((r2, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18075
18233
|
"div",
|
|
18076
18234
|
{
|
|
18077
18235
|
"data-ohw-ai-review": "",
|
|
@@ -18091,7 +18249,7 @@ function AiSectionOverlay({
|
|
|
18091
18249
|
},
|
|
18092
18250
|
i
|
|
18093
18251
|
)),
|
|
18094
|
-
/* @__PURE__ */ (0,
|
|
18252
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
18095
18253
|
"div",
|
|
18096
18254
|
{
|
|
18097
18255
|
"aria-hidden": true,
|
|
@@ -18108,7 +18266,7 @@ function AiSectionOverlay({
|
|
|
18108
18266
|
}
|
|
18109
18267
|
}
|
|
18110
18268
|
),
|
|
18111
|
-
!reviewButtonsHidden && /* @__PURE__ */ (0,
|
|
18269
|
+
!reviewButtonsHidden && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
18112
18270
|
"div",
|
|
18113
18271
|
{
|
|
18114
18272
|
style: {
|
|
@@ -18123,8 +18281,8 @@ function AiSectionOverlay({
|
|
|
18123
18281
|
zIndex: 2147483201
|
|
18124
18282
|
},
|
|
18125
18283
|
children: [
|
|
18126
|
-
/* @__PURE__ */ (0,
|
|
18127
|
-
/* @__PURE__ */ (0,
|
|
18284
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReviewButton, { label: "Accept", onClick: () => decide("accept"), background: PRIMARY2, color: "#ffffff", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Check, { size: 16, strokeWidth: 2.5, "aria-hidden": true }) }),
|
|
18285
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ReviewButton, { label: "Discard", onClick: () => decide("discard"), background: "#EFF6FF", color: "#0c0a09", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.X, { size: 16, strokeWidth: 2, "aria-hidden": true }) })
|
|
18128
18286
|
]
|
|
18129
18287
|
}
|
|
18130
18288
|
)
|
|
@@ -18274,7 +18432,7 @@ function setMediaStripItemLink(tree, index, link) {
|
|
|
18274
18432
|
}
|
|
18275
18433
|
|
|
18276
18434
|
// src/ui/ai-section/AiMediaStripOverlay.tsx
|
|
18277
|
-
var
|
|
18435
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
18278
18436
|
var PRIMARY3 = "#0885FE";
|
|
18279
18437
|
var OHW_BLUE = `var(--ohw-primary, ${PRIMARY3})`;
|
|
18280
18438
|
var OHW_BLUE_DARK = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY3}) 60%, #000000)`;
|
|
@@ -18362,7 +18520,7 @@ function Pill({
|
|
|
18362
18520
|
disabled,
|
|
18363
18521
|
active
|
|
18364
18522
|
}) {
|
|
18365
|
-
return /* @__PURE__ */ (0,
|
|
18523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18366
18524
|
"button",
|
|
18367
18525
|
{
|
|
18368
18526
|
type: "button",
|
|
@@ -18393,7 +18551,7 @@ function Pill({
|
|
|
18393
18551
|
function AltInput({ value, onCommit }) {
|
|
18394
18552
|
const [draft, setDraft] = (0, import_react10.useState)(value);
|
|
18395
18553
|
(0, import_react10.useEffect)(() => setDraft(value), [value]);
|
|
18396
|
-
return /* @__PURE__ */ (0,
|
|
18554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
18397
18555
|
"div",
|
|
18398
18556
|
{
|
|
18399
18557
|
style: {
|
|
@@ -18409,7 +18567,7 @@ function AltInput({ value, onCommit }) {
|
|
|
18409
18567
|
boxSizing: "border-box"
|
|
18410
18568
|
},
|
|
18411
18569
|
children: [
|
|
18412
|
-
/* @__PURE__ */ (0,
|
|
18570
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18413
18571
|
"span",
|
|
18414
18572
|
{
|
|
18415
18573
|
style: {
|
|
@@ -18423,7 +18581,7 @@ function AltInput({ value, onCommit }) {
|
|
|
18423
18581
|
children: "Alt"
|
|
18424
18582
|
}
|
|
18425
18583
|
),
|
|
18426
|
-
/* @__PURE__ */ (0,
|
|
18584
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18427
18585
|
"input",
|
|
18428
18586
|
{
|
|
18429
18587
|
type: "text",
|
|
@@ -18492,7 +18650,7 @@ function LinkInput({ value, onCommit }) {
|
|
|
18492
18650
|
setInvalid(false);
|
|
18493
18651
|
onCommit(next);
|
|
18494
18652
|
};
|
|
18495
|
-
return /* @__PURE__ */ (0,
|
|
18653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
18496
18654
|
"div",
|
|
18497
18655
|
{
|
|
18498
18656
|
style: {
|
|
@@ -18509,7 +18667,7 @@ function LinkInput({ value, onCommit }) {
|
|
|
18509
18667
|
boxShadow: invalid ? "inset 0 0 0 1.5px #EF4444" : "none"
|
|
18510
18668
|
},
|
|
18511
18669
|
children: [
|
|
18512
|
-
/* @__PURE__ */ (0,
|
|
18670
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18513
18671
|
"span",
|
|
18514
18672
|
{
|
|
18515
18673
|
style: {
|
|
@@ -18523,7 +18681,7 @@ function LinkInput({ value, onCommit }) {
|
|
|
18523
18681
|
children: "Link"
|
|
18524
18682
|
}
|
|
18525
18683
|
),
|
|
18526
|
-
/* @__PURE__ */ (0,
|
|
18684
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18527
18685
|
"input",
|
|
18528
18686
|
{
|
|
18529
18687
|
type: "text",
|
|
@@ -18599,7 +18757,7 @@ function MediaStripToolbar({
|
|
|
18599
18757
|
width: "100%",
|
|
18600
18758
|
scrollbarWidth: "none"
|
|
18601
18759
|
} : { display: "flex", gap: 6, flexWrap: "nowrap", justifyContent: "center" };
|
|
18602
|
-
return /* @__PURE__ */ (0,
|
|
18760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
18603
18761
|
"div",
|
|
18604
18762
|
{
|
|
18605
18763
|
"data-ohw-bridge": "",
|
|
@@ -18619,38 +18777,38 @@ function MediaStripToolbar({
|
|
|
18619
18777
|
maxWidth: isMobile ? "calc(100vw - 24px)" : "none"
|
|
18620
18778
|
},
|
|
18621
18779
|
children: [
|
|
18622
|
-
/* @__PURE__ */ (0,
|
|
18623
|
-
VARIANTS.map((v) => /* @__PURE__ */ (0,
|
|
18624
|
-
ALIGNS.map((a) => /* @__PURE__ */ (0,
|
|
18780
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rowStyle, children: [
|
|
18781
|
+
VARIANTS.map((v) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: v.label, active: variant === v.value, onClick: () => onSetVariant(v.value) }, v.value)),
|
|
18782
|
+
ALIGNS.map((a) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: a.label, active: align === a.value, onClick: () => onSetAlign(a.value) }, a.value))
|
|
18625
18783
|
] }),
|
|
18626
|
-
/* @__PURE__ */ (0,
|
|
18627
|
-
HOVERS.map((h) => /* @__PURE__ */ (0,
|
|
18628
|
-
TREATMENTS.map((t) => /* @__PURE__ */ (0,
|
|
18784
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rowStyle, children: [
|
|
18785
|
+
HOVERS.map((h) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: h.label, active: hover === h.value, onClick: () => onSetHover(h.value) }, h.value)),
|
|
18786
|
+
TREATMENTS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: t.label, active: treatment === t.value, onClick: () => onSetTreatment(t.value) }, t.value))
|
|
18629
18787
|
] }),
|
|
18630
|
-
/* @__PURE__ */ (0,
|
|
18631
|
-
/* @__PURE__ */ (0,
|
|
18632
|
-
/* @__PURE__ */ (0,
|
|
18788
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
|
|
18789
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "\u2212", onClick: () => onResize(-8) }),
|
|
18790
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { color: "#ffffff", fontSize: 12, minWidth: 34, textAlign: "center" }, children: [
|
|
18633
18791
|
sizeValue,
|
|
18634
18792
|
"px"
|
|
18635
18793
|
] }),
|
|
18636
|
-
/* @__PURE__ */ (0,
|
|
18794
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "+", onClick: () => onResize(8) })
|
|
18637
18795
|
] }),
|
|
18638
|
-
/* @__PURE__ */ (0,
|
|
18639
|
-
/* @__PURE__ */ (0,
|
|
18640
|
-
currentHref && /* @__PURE__ */ (0,
|
|
18641
|
-
/* @__PURE__ */ (0,
|
|
18642
|
-
/* @__PURE__ */ (0,
|
|
18796
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "flex", justifyContent: "center", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AltInput, { value: currentAlt, onCommit: onSetAlt }) }),
|
|
18797
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "flex", justifyContent: "center", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LinkInput, { value: currentHref, onCommit: (href) => onSetLink(href, currentTarget) }) }),
|
|
18798
|
+
currentHref && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rowStyle, children: [
|
|
18799
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "New tab", active: currentTarget === "new-tab", onClick: () => onSetLink(currentHref, "new-tab") }),
|
|
18800
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "Same tab", active: currentTarget === "same-tab", onClick: () => onSetLink(currentHref, "same-tab") })
|
|
18643
18801
|
] }),
|
|
18644
|
-
/* @__PURE__ */ (0,
|
|
18645
|
-
/* @__PURE__ */ (0,
|
|
18646
|
-
/* @__PURE__ */ (0,
|
|
18647
|
-
/* @__PURE__ */ (0,
|
|
18802
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rowStyle, children: [
|
|
18803
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "Change Image", onClick: onChangeImage }),
|
|
18804
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "+ Item", onClick: onAddItem }),
|
|
18805
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "\u2212 Item", onClick: onRemoveItem, disabled: itemCount <= 1 })
|
|
18648
18806
|
] }),
|
|
18649
|
-
/* @__PURE__ */ (0,
|
|
18650
|
-
/* @__PURE__ */ (0,
|
|
18651
|
-
/* @__PURE__ */ (0,
|
|
18807
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: rowStyle, children: [
|
|
18808
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "\u2190 Move", onClick: onMoveLeft, disabled: index <= 0 }),
|
|
18809
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Pill, { label: "\u2192 Move", onClick: onMoveRight, disabled: index >= itemCount - 1 })
|
|
18652
18810
|
] }),
|
|
18653
|
-
error && /* @__PURE__ */ (0,
|
|
18811
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
|
|
18654
18812
|
]
|
|
18655
18813
|
}
|
|
18656
18814
|
);
|
|
@@ -18779,8 +18937,8 @@ function AiMediaStripOverlay({
|
|
|
18779
18937
|
const activeItemRect = useLiveItemRect(active);
|
|
18780
18938
|
const TOOLBAR_APPROX_H = 170;
|
|
18781
18939
|
const toolbarState = activeItemRect && activeItemRect.top < TOOLBAR_APPROX_H ? "active-bottom" : "active-top";
|
|
18782
|
-
return /* @__PURE__ */ (0,
|
|
18783
|
-
hoverHandleRect && hover && /* @__PURE__ */ (0,
|
|
18940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
18941
|
+
hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18784
18942
|
"button",
|
|
18785
18943
|
{
|
|
18786
18944
|
type: "button",
|
|
@@ -18808,15 +18966,15 @@ function AiMediaStripOverlay({
|
|
|
18808
18966
|
fontSize: 14,
|
|
18809
18967
|
fontWeight: 700
|
|
18810
18968
|
},
|
|
18811
|
-
children: /* @__PURE__ */ (0,
|
|
18969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.Star, { size: 14, style: { pointerEvents: "none" } })
|
|
18812
18970
|
}
|
|
18813
18971
|
),
|
|
18814
|
-
activeItemRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
18972
|
+
activeItemRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18815
18973
|
ItemInteractionLayer,
|
|
18816
18974
|
{
|
|
18817
18975
|
rect: activeItemRect,
|
|
18818
18976
|
state: toolbarState,
|
|
18819
|
-
toolbar: /* @__PURE__ */ (0,
|
|
18977
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
18820
18978
|
MediaStripToolbar,
|
|
18821
18979
|
{
|
|
18822
18980
|
entry: activeEntry,
|
|
@@ -18896,7 +19054,7 @@ function AiMediaStripOverlay({
|
|
|
18896
19054
|
// src/ui/ai-section/AiPricingCardOverlay.tsx
|
|
18897
19055
|
var import_react11 = require("react");
|
|
18898
19056
|
var import_lucide_react9 = require("lucide-react");
|
|
18899
|
-
var
|
|
19057
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
18900
19058
|
var PRIMARY4 = "var(--ohw-primary, #0885FE)";
|
|
18901
19059
|
var CHROME_SELECTOR = "[data-ohw-toolbar], [data-ohw-edit-chrome], [data-ohw-item-interaction], [data-ohw-link-modal-root], [data-ohw-section-picker], [data-ohw-ai-review], [data-ohw-more-menu]";
|
|
18902
19060
|
function findPricingCardElement(sectionId, index) {
|
|
@@ -18985,7 +19143,7 @@ function GridToolbarSlot({ gridRect, children }) {
|
|
|
18985
19143
|
return () => ro.disconnect();
|
|
18986
19144
|
}, [centerX, children]);
|
|
18987
19145
|
const mobile = window.innerWidth <= 480;
|
|
18988
|
-
return /* @__PURE__ */ (0,
|
|
19146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
18989
19147
|
"div",
|
|
18990
19148
|
{
|
|
18991
19149
|
ref: slotRef,
|
|
@@ -19020,7 +19178,7 @@ function requestValidateTree2(postToParent2, tree) {
|
|
|
19020
19178
|
});
|
|
19021
19179
|
}
|
|
19022
19180
|
function StyleSwatch({ style }) {
|
|
19023
|
-
return /* @__PURE__ */ (0,
|
|
19181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
19024
19182
|
"span",
|
|
19025
19183
|
{
|
|
19026
19184
|
"aria-hidden": true,
|
|
@@ -19034,19 +19192,19 @@ function StyleSwatch({ style }) {
|
|
|
19034
19192
|
);
|
|
19035
19193
|
}
|
|
19036
19194
|
function ButtonGlyph() {
|
|
19037
|
-
return /* @__PURE__ */ (0,
|
|
19038
|
-
/* @__PURE__ */ (0,
|
|
19039
|
-
/* @__PURE__ */ (0,
|
|
19195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "18", height: "12", viewBox: "0 0 18 12", fill: "none", "aria-hidden": true, style: { pointerEvents: "none" }, children: [
|
|
19196
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "0.75", y: "0.75", width: "16.5", height: "10.5", rx: "3", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
19197
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M5.5 6H12.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
19040
19198
|
] });
|
|
19041
19199
|
}
|
|
19042
19200
|
function FeatureGlyph({ mode }) {
|
|
19043
|
-
return /* @__PURE__ */ (0,
|
|
19044
|
-
/* @__PURE__ */ (0,
|
|
19045
|
-
/* @__PURE__ */ (0,
|
|
19046
|
-
/* @__PURE__ */ (0,
|
|
19047
|
-
/* @__PURE__ */ (0,
|
|
19048
|
-
/* @__PURE__ */ (0,
|
|
19049
|
-
mode === "add" && /* @__PURE__ */ (0,
|
|
19201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": true, style: { pointerEvents: "none" }, children: [
|
|
19202
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "8", cy: "8", r: "7.25", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
19203
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M5 8.2L7.2 10.3L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
19204
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "13.5", cy: "13.5", r: "4.25", fill: "var(--ohw-background, #ffffff)", stroke: "var(--ohw-background, #ffffff)", strokeWidth: "1" }),
|
|
19205
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "13.5", cy: "13.5", r: "3.75", fill: "var(--ohw-background, #ffffff)", stroke: PRIMARY4, strokeWidth: "1" }),
|
|
19206
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M11.5 13.5H15.5", stroke: PRIMARY4, strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
19207
|
+
mode === "add" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M13.5 11.5V15.5", stroke: PRIMARY4, strokeWidth: "1.5", strokeLinecap: "round" })
|
|
19050
19208
|
] });
|
|
19051
19209
|
}
|
|
19052
19210
|
function ToolbarAction({
|
|
@@ -19055,14 +19213,14 @@ function ToolbarAction({
|
|
|
19055
19213
|
disabled = false,
|
|
19056
19214
|
children
|
|
19057
19215
|
}) {
|
|
19058
|
-
const button = /* @__PURE__ */ (0,
|
|
19059
|
-
return /* @__PURE__ */ (0,
|
|
19060
|
-
/* @__PURE__ */ (0,
|
|
19061
|
-
/* @__PURE__ */ (0,
|
|
19216
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CustomToolbarButton, { type: "button", "aria-label": label, disabled, onClick, className: "size-8", children });
|
|
19217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Tooltip, { children: [
|
|
19218
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "inline-flex", children: button }) : button }),
|
|
19219
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: label })
|
|
19062
19220
|
] });
|
|
19063
19221
|
}
|
|
19064
19222
|
function ToolbarSeparator() {
|
|
19065
|
-
return /* @__PURE__ */ (0,
|
|
19223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { "aria-hidden": true, className: "mx-0.5 block h-6 w-px shrink-0 bg-border" });
|
|
19066
19224
|
}
|
|
19067
19225
|
function CardStyleMenu({
|
|
19068
19226
|
value,
|
|
@@ -19070,7 +19228,7 @@ function CardStyleMenu({
|
|
|
19070
19228
|
disabled = false
|
|
19071
19229
|
}) {
|
|
19072
19230
|
const current = PRICING_CARD_STYLES.find((s) => s.value === value) ?? PRICING_CARD_STYLES[0];
|
|
19073
|
-
const trigger = /* @__PURE__ */ (0,
|
|
19231
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
19074
19232
|
"button",
|
|
19075
19233
|
{
|
|
19076
19234
|
type: "button",
|
|
@@ -19081,28 +19239,28 @@ function CardStyleMenu({
|
|
|
19081
19239
|
disabled && "cursor-not-allowed opacity-40 hover:bg-transparent"
|
|
19082
19240
|
),
|
|
19083
19241
|
children: [
|
|
19084
|
-
/* @__PURE__ */ (0,
|
|
19085
|
-
/* @__PURE__ */ (0,
|
|
19086
|
-
/* @__PURE__ */ (0,
|
|
19242
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyleSwatch, { style: current.value }),
|
|
19243
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex-1 text-left", children: current.label }),
|
|
19244
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.ChevronDown, { size: 16, style: { pointerEvents: "none" } })
|
|
19087
19245
|
]
|
|
19088
19246
|
}
|
|
19089
19247
|
);
|
|
19090
19248
|
if (disabled) {
|
|
19091
|
-
return /* @__PURE__ */ (0,
|
|
19092
|
-
/* @__PURE__ */ (0,
|
|
19093
|
-
/* @__PURE__ */ (0,
|
|
19094
|
-
/* @__PURE__ */ (0,
|
|
19095
|
-
/* @__PURE__ */ (0,
|
|
19249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1.5 pl-1.5", children: [
|
|
19250
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xs text-muted-foreground opacity-50", children: "Card style" }),
|
|
19251
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Tooltip, { children: [
|
|
19252
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "inline-flex", children: trigger }) }),
|
|
19253
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: "Mark as featured to edit card style" })
|
|
19096
19254
|
] })
|
|
19097
19255
|
] });
|
|
19098
19256
|
}
|
|
19099
|
-
return /* @__PURE__ */ (0,
|
|
19100
|
-
/* @__PURE__ */ (0,
|
|
19101
|
-
/* @__PURE__ */ (0,
|
|
19102
|
-
/* @__PURE__ */ (0,
|
|
19103
|
-
/* @__PURE__ */ (0,
|
|
19257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1.5 pl-1.5", children: [
|
|
19258
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xs text-muted-foreground", children: "Card style" }),
|
|
19259
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DropdownMenu, { modal: false, children: [
|
|
19260
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuTrigger, { asChild: true, children: trigger }),
|
|
19261
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuContent, { align: "end", sideOffset: 8, className: "w-[152px] min-w-[152px] p-1", children: PRICING_CARD_STYLES.map((style) => {
|
|
19104
19262
|
const selected = style.value === value;
|
|
19105
|
-
return /* @__PURE__ */ (0,
|
|
19263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
19106
19264
|
DropdownMenuItem,
|
|
19107
19265
|
{
|
|
19108
19266
|
role: "menuitemradio",
|
|
@@ -19110,9 +19268,9 @@ function CardStyleMenu({
|
|
|
19110
19268
|
onSelect: () => onChange(style.value),
|
|
19111
19269
|
className: cn("grid grid-cols-[18px_1fr_16px] gap-2 py-2 pl-2 pr-2 text-[13px]", selected && "bg-muted"),
|
|
19112
19270
|
children: [
|
|
19113
|
-
/* @__PURE__ */ (0,
|
|
19114
|
-
/* @__PURE__ */ (0,
|
|
19115
|
-
selected && /* @__PURE__ */ (0,
|
|
19271
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyleSwatch, { style: style.value }),
|
|
19272
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: style.label }),
|
|
19273
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.Check, { size: 16, className: "text-bridge-primary" })
|
|
19116
19274
|
]
|
|
19117
19275
|
},
|
|
19118
19276
|
style.value
|
|
@@ -19142,7 +19300,7 @@ function PricingCardToolbar({
|
|
|
19142
19300
|
const style = pricingCardStyle(entry.tree, index);
|
|
19143
19301
|
const featuredTag = pricingCardFeaturedTag(entry.tree, index);
|
|
19144
19302
|
const mobile = window.innerWidth <= 480;
|
|
19145
|
-
return /* @__PURE__ */ (0,
|
|
19303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
19146
19304
|
"div",
|
|
19147
19305
|
{
|
|
19148
19306
|
"data-ohw-bridge": "",
|
|
@@ -19154,7 +19312,7 @@ function PricingCardToolbar({
|
|
|
19154
19312
|
),
|
|
19155
19313
|
style: { maxWidth: mobile ? "calc(100vw - 24px)" : void 0 },
|
|
19156
19314
|
children: [
|
|
19157
|
-
/* @__PURE__ */ (0,
|
|
19315
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
19158
19316
|
"div",
|
|
19159
19317
|
{
|
|
19160
19318
|
className: cn(
|
|
@@ -19163,8 +19321,8 @@ function PricingCardToolbar({
|
|
|
19163
19321
|
mobile ? "flex-wrap justify-center" : "flex-nowrap"
|
|
19164
19322
|
),
|
|
19165
19323
|
children: [
|
|
19166
|
-
/* @__PURE__ */ (0,
|
|
19167
|
-
/* @__PURE__ */ (0,
|
|
19324
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Tooltip, { children: [
|
|
19325
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
19168
19326
|
CustomToolbarButton,
|
|
19169
19327
|
{
|
|
19170
19328
|
type: "button",
|
|
@@ -19172,7 +19330,7 @@ function PricingCardToolbar({
|
|
|
19172
19330
|
"aria-pressed": featuredTag,
|
|
19173
19331
|
onClick: () => onSetFeaturedTag(!featuredTag),
|
|
19174
19332
|
className: "group size-8",
|
|
19175
|
-
children: /* @__PURE__ */ (0,
|
|
19333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
19176
19334
|
import_lucide_react9.Star,
|
|
19177
19335
|
{
|
|
19178
19336
|
size: 16,
|
|
@@ -19187,25 +19345,25 @@ function PricingCardToolbar({
|
|
|
19187
19345
|
)
|
|
19188
19346
|
}
|
|
19189
19347
|
) }),
|
|
19190
|
-
/* @__PURE__ */ (0,
|
|
19348
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: featuredTag ? "Unmark featured" : "Mark as featured" })
|
|
19191
19349
|
] }),
|
|
19192
|
-
/* @__PURE__ */ (0,
|
|
19193
|
-
/* @__PURE__ */ (0,
|
|
19194
|
-
/* @__PURE__ */ (0,
|
|
19195
|
-
/* @__PURE__ */ (0,
|
|
19196
|
-
/* @__PURE__ */ (0,
|
|
19197
|
-
/* @__PURE__ */ (0,
|
|
19198
|
-
/* @__PURE__ */ (0,
|
|
19350
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarSeparator, {}),
|
|
19351
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardStyleMenu, { value: style, onChange: onSetStyle, disabled: !featuredTag }),
|
|
19352
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarSeparator, {}),
|
|
19353
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarAction, { label: "Add button", onClick: onAddButton, disabled: buttonCount >= 2, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ButtonGlyph, {}) }),
|
|
19354
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarAction, { label: "Remove button", onClick: onRemoveButton, disabled: buttonCount === 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "relative inline-flex", children: [
|
|
19355
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ButtonGlyph, {}),
|
|
19356
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.Minus, { size: 10, strokeWidth: 2.5, className: "absolute -right-1.5 -top-1.5 rounded-full bg-background text-bridge-primary" })
|
|
19199
19357
|
] }) }),
|
|
19200
|
-
/* @__PURE__ */ (0,
|
|
19201
|
-
/* @__PURE__ */ (0,
|
|
19202
|
-
/* @__PURE__ */ (0,
|
|
19203
|
-
/* @__PURE__ */ (0,
|
|
19204
|
-
/* @__PURE__ */ (0,
|
|
19358
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarAction, { label: "Add feature", onClick: onAddFeature, disabled: featureCount >= 10, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureGlyph, { mode: "add" }) }),
|
|
19359
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarAction, { label: "Remove feature", onClick: onRemoveFeature, disabled: featureCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FeatureGlyph, { mode: "remove" }) }),
|
|
19360
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarSeparator, {}),
|
|
19361
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarAction, { label: "Add tier", onClick: onAddTier, disabled: collectionCount >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.Plus, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
19362
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ToolbarAction, { label: "Remove tier", onClick: onRemoveTier, disabled: collectionCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.Minus, { size: 16, style: { pointerEvents: "none" } }) })
|
|
19205
19363
|
]
|
|
19206
19364
|
}
|
|
19207
19365
|
),
|
|
19208
|
-
error && /* @__PURE__ */ (0,
|
|
19366
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "max-w-[260px] rounded-md bg-background px-2 py-1 text-center text-[11px] text-destructive shadow-sm", children: error })
|
|
19209
19367
|
]
|
|
19210
19368
|
}
|
|
19211
19369
|
) });
|
|
@@ -19323,11 +19481,11 @@ function AiPricingCardOverlay({
|
|
|
19323
19481
|
const activeCardRect = useLiveCardRect(active);
|
|
19324
19482
|
const activeGridRect = useLiveCardRect(active, true);
|
|
19325
19483
|
const hoverRect = useLiveCardRect(hover && !sameRef(hover, active) ? hover : null);
|
|
19326
|
-
return /* @__PURE__ */ (0,
|
|
19327
|
-
hoverRect && /* @__PURE__ */ (0,
|
|
19328
|
-
activeCardRect && activeGridRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
19329
|
-
/* @__PURE__ */ (0,
|
|
19330
|
-
/* @__PURE__ */ (0,
|
|
19484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
19485
|
+
hoverRect && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ItemInteractionLayer, { rect: hoverRect, state: "hover" }),
|
|
19486
|
+
activeCardRect && activeGridRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
19487
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ItemInteractionLayer, { rect: activeCardRect, state: "active-top" }),
|
|
19488
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GridToolbarSlot, { gridRect: activeGridRect, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
19331
19489
|
PricingCardToolbar,
|
|
19332
19490
|
{
|
|
19333
19491
|
entry: activeEntry,
|
|
@@ -19355,7 +19513,7 @@ function AiPricingCardOverlay({
|
|
|
19355
19513
|
onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
|
|
19356
19514
|
}
|
|
19357
19515
|
) }),
|
|
19358
|
-
/* @__PURE__ */ (0,
|
|
19516
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
19359
19517
|
"div",
|
|
19360
19518
|
{
|
|
19361
19519
|
"data-ohw-bridge": "",
|
|
@@ -19448,7 +19606,7 @@ function extractYouTubeId(input) {
|
|
|
19448
19606
|
}
|
|
19449
19607
|
|
|
19450
19608
|
// src/ui/ai-section/AiVideoOverlay.tsx
|
|
19451
|
-
var
|
|
19609
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
19452
19610
|
var PRIMARY5 = "#0885FE";
|
|
19453
19611
|
var OHW_BLUE2 = `var(--ohw-primary, ${PRIMARY5})`;
|
|
19454
19612
|
var OHW_BLUE_DARK2 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY5}) 60%, #000000)`;
|
|
@@ -19516,7 +19674,7 @@ function Pill2({
|
|
|
19516
19674
|
onClick,
|
|
19517
19675
|
disabled
|
|
19518
19676
|
}) {
|
|
19519
|
-
return /* @__PURE__ */ (0,
|
|
19677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
19520
19678
|
"button",
|
|
19521
19679
|
{
|
|
19522
19680
|
type: "button",
|
|
@@ -19575,8 +19733,8 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
19575
19733
|
onCommit(id);
|
|
19576
19734
|
}
|
|
19577
19735
|
};
|
|
19578
|
-
return /* @__PURE__ */ (0,
|
|
19579
|
-
/* @__PURE__ */ (0,
|
|
19736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%", maxWidth: 280 }, children: [
|
|
19737
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
19580
19738
|
"div",
|
|
19581
19739
|
{
|
|
19582
19740
|
style: {
|
|
@@ -19592,7 +19750,7 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
19592
19750
|
boxShadow: invalid ? "inset 0 0 0 1.5px #EF4444" : "none"
|
|
19593
19751
|
},
|
|
19594
19752
|
children: [
|
|
19595
|
-
/* @__PURE__ */ (0,
|
|
19753
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
19596
19754
|
"span",
|
|
19597
19755
|
{
|
|
19598
19756
|
style: {
|
|
@@ -19607,7 +19765,7 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
19607
19765
|
children: "Video"
|
|
19608
19766
|
}
|
|
19609
19767
|
),
|
|
19610
|
-
/* @__PURE__ */ (0,
|
|
19768
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
19611
19769
|
"input",
|
|
19612
19770
|
{
|
|
19613
19771
|
type: "text",
|
|
@@ -19644,7 +19802,7 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
19644
19802
|
]
|
|
19645
19803
|
}
|
|
19646
19804
|
),
|
|
19647
|
-
invalid && /* @__PURE__ */ (0,
|
|
19805
|
+
invalid && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, textAlign: "center" }, children: "That doesn't look like a YouTube link \u2014 try pasting the video URL again." })
|
|
19648
19806
|
] });
|
|
19649
19807
|
}
|
|
19650
19808
|
function VideoToolbar({
|
|
@@ -19654,7 +19812,7 @@ function VideoToolbar({
|
|
|
19654
19812
|
onSetVideoId,
|
|
19655
19813
|
onRemove
|
|
19656
19814
|
}) {
|
|
19657
|
-
return /* @__PURE__ */ (0,
|
|
19815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
19658
19816
|
"div",
|
|
19659
19817
|
{
|
|
19660
19818
|
"data-ohw-bridge": "",
|
|
@@ -19674,9 +19832,9 @@ function VideoToolbar({
|
|
|
19674
19832
|
opacity: pending ? 0.6 : 1
|
|
19675
19833
|
},
|
|
19676
19834
|
children: [
|
|
19677
|
-
/* @__PURE__ */ (0,
|
|
19678
|
-
/* @__PURE__ */ (0,
|
|
19679
|
-
error && /* @__PURE__ */ (0,
|
|
19835
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VideoUrlInput, { value: videoId, onCommit: onSetVideoId }),
|
|
19836
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Pill2, { label: "Remove video", onClick: onRemove, disabled: !videoId }),
|
|
19837
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
|
|
19680
19838
|
]
|
|
19681
19839
|
}
|
|
19682
19840
|
);
|
|
@@ -19796,8 +19954,8 @@ function AiVideoOverlay({
|
|
|
19796
19954
|
const activeBlockRect = useLiveBlockRect(active);
|
|
19797
19955
|
const TOOLBAR_APPROX_H = 90;
|
|
19798
19956
|
const toolbarState = activeBlockRect && activeBlockRect.top < TOOLBAR_APPROX_H ? "active-bottom" : "active-top";
|
|
19799
|
-
return /* @__PURE__ */ (0,
|
|
19800
|
-
hoverHandleRect && hover && /* @__PURE__ */ (0,
|
|
19957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
19958
|
+
hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
19801
19959
|
"button",
|
|
19802
19960
|
{
|
|
19803
19961
|
type: "button",
|
|
@@ -19825,15 +19983,15 @@ function AiVideoOverlay({
|
|
|
19825
19983
|
fontSize: 14,
|
|
19826
19984
|
fontWeight: 700
|
|
19827
19985
|
},
|
|
19828
|
-
children: /* @__PURE__ */ (0,
|
|
19986
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react10.Star, { size: 14, style: { pointerEvents: "none" } })
|
|
19829
19987
|
}
|
|
19830
19988
|
),
|
|
19831
|
-
activeBlockRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
19989
|
+
activeBlockRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
19832
19990
|
ItemInteractionLayer,
|
|
19833
19991
|
{
|
|
19834
19992
|
rect: activeBlockRect,
|
|
19835
19993
|
state: toolbarState,
|
|
19836
|
-
toolbar: /* @__PURE__ */ (0,
|
|
19994
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
19837
19995
|
VideoToolbar,
|
|
19838
19996
|
{
|
|
19839
19997
|
videoId: videoIdAt(activeEntry.tree, active.path),
|
|
@@ -19908,7 +20066,7 @@ function setCarouselAutoplay(tree, on) {
|
|
|
19908
20066
|
}
|
|
19909
20067
|
|
|
19910
20068
|
// src/ui/ai-section/AiFadeCarouselOverlay.tsx
|
|
19911
|
-
var
|
|
20069
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
19912
20070
|
var PRIMARY6 = "#0885FE";
|
|
19913
20071
|
var OHW_BLUE3 = `var(--ohw-primary, ${PRIMARY6})`;
|
|
19914
20072
|
var OHW_BLUE_DARK3 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY6}) 60%, #000000)`;
|
|
@@ -19991,7 +20149,7 @@ function requestAssetPick2(postToParent2) {
|
|
|
19991
20149
|
});
|
|
19992
20150
|
}
|
|
19993
20151
|
function Pill3({ label, onClick, disabled }) {
|
|
19994
|
-
return /* @__PURE__ */ (0,
|
|
20152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
19995
20153
|
"button",
|
|
19996
20154
|
{
|
|
19997
20155
|
type: "button",
|
|
@@ -20025,7 +20183,7 @@ function TogglePill({
|
|
|
20025
20183
|
onToggle,
|
|
20026
20184
|
disabled
|
|
20027
20185
|
}) {
|
|
20028
|
-
return /* @__PURE__ */ (0,
|
|
20186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
20029
20187
|
"button",
|
|
20030
20188
|
{
|
|
20031
20189
|
type: "button",
|
|
@@ -20054,7 +20212,7 @@ function TogglePill({
|
|
|
20054
20212
|
},
|
|
20055
20213
|
children: [
|
|
20056
20214
|
label,
|
|
20057
|
-
/* @__PURE__ */ (0,
|
|
20215
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
20058
20216
|
"span",
|
|
20059
20217
|
{
|
|
20060
20218
|
"aria-hidden": true,
|
|
@@ -20070,7 +20228,7 @@ function TogglePill({
|
|
|
20070
20228
|
background: on ? OHW_BLUE_DARK3 : "#CBD5E1",
|
|
20071
20229
|
transition: "background 120ms ease"
|
|
20072
20230
|
},
|
|
20073
|
-
children: /* @__PURE__ */ (0,
|
|
20231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
20074
20232
|
"span",
|
|
20075
20233
|
{
|
|
20076
20234
|
style: {
|
|
@@ -20099,7 +20257,7 @@ function CarouselSlideToolbar({
|
|
|
20099
20257
|
onChangeImage,
|
|
20100
20258
|
onToggleAutoplay
|
|
20101
20259
|
}) {
|
|
20102
|
-
return /* @__PURE__ */ (0,
|
|
20260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
20103
20261
|
"div",
|
|
20104
20262
|
{
|
|
20105
20263
|
"data-ohw-bridge": "",
|
|
@@ -20122,11 +20280,11 @@ function CarouselSlideToolbar({
|
|
|
20122
20280
|
pointerEvents: pending ? "none" : "auto"
|
|
20123
20281
|
},
|
|
20124
20282
|
children: [
|
|
20125
|
-
/* @__PURE__ */ (0,
|
|
20126
|
-
/* @__PURE__ */ (0,
|
|
20127
|
-
/* @__PURE__ */ (0,
|
|
20283
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
|
|
20284
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Pill3, { label: "Change Image", onClick: onChangeImage }),
|
|
20285
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TogglePill, { label: "Autoplay", on: autoplay, onToggle: onToggleAutoplay })
|
|
20128
20286
|
] }),
|
|
20129
|
-
error && /* @__PURE__ */ (0,
|
|
20287
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
|
|
20130
20288
|
]
|
|
20131
20289
|
}
|
|
20132
20290
|
);
|
|
@@ -20266,8 +20424,8 @@ function AiFadeCarouselOverlay({
|
|
|
20266
20424
|
const activeItemRect = useLiveItemRect2(active);
|
|
20267
20425
|
const TOOLBAR_APPROX_H = 90;
|
|
20268
20426
|
const toolbarState = activeItemRect && activeItemRect.top < TOOLBAR_APPROX_H ? "active-bottom" : "active-top";
|
|
20269
|
-
return /* @__PURE__ */ (0,
|
|
20270
|
-
hoverHandleRect && hover && /* @__PURE__ */ (0,
|
|
20427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
20428
|
+
hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
20271
20429
|
"button",
|
|
20272
20430
|
{
|
|
20273
20431
|
type: "button",
|
|
@@ -20296,10 +20454,10 @@ function AiFadeCarouselOverlay({
|
|
|
20296
20454
|
fontSize: 14,
|
|
20297
20455
|
fontWeight: 700
|
|
20298
20456
|
},
|
|
20299
|
-
children: /* @__PURE__ */ (0,
|
|
20457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react11.Star, { size: 14, style: { pointerEvents: "none" } })
|
|
20300
20458
|
}
|
|
20301
20459
|
),
|
|
20302
|
-
swapping && /* @__PURE__ */ (0,
|
|
20460
|
+
swapping && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
20303
20461
|
"div",
|
|
20304
20462
|
{
|
|
20305
20463
|
ref: skeletonRef,
|
|
@@ -20317,15 +20475,15 @@ function AiFadeCarouselOverlay({
|
|
|
20317
20475
|
zIndex: 2147483646,
|
|
20318
20476
|
pointerEvents: "none"
|
|
20319
20477
|
},
|
|
20320
|
-
children: /* @__PURE__ */ (0,
|
|
20478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("style", { children: MEDIA_SKELETON_CSS })
|
|
20321
20479
|
}
|
|
20322
20480
|
),
|
|
20323
|
-
activeItemRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
20481
|
+
activeItemRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
20324
20482
|
ItemInteractionLayer,
|
|
20325
20483
|
{
|
|
20326
20484
|
rect: activeItemRect,
|
|
20327
20485
|
state: toolbarState,
|
|
20328
|
-
toolbar: /* @__PURE__ */ (0,
|
|
20486
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
20329
20487
|
CarouselSlideToolbar,
|
|
20330
20488
|
{
|
|
20331
20489
|
pending,
|
|
@@ -20682,22 +20840,22 @@ var import_react17 = require("react");
|
|
|
20682
20840
|
var React9 = __toESM(require("react"), 1);
|
|
20683
20841
|
var import_radix_ui6 = require("radix-ui");
|
|
20684
20842
|
var import_lucide_react12 = require("lucide-react");
|
|
20685
|
-
var
|
|
20843
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
20686
20844
|
function Dialog2({
|
|
20687
20845
|
...props
|
|
20688
20846
|
}) {
|
|
20689
|
-
return /* @__PURE__ */ (0,
|
|
20847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_radix_ui6.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
20690
20848
|
}
|
|
20691
20849
|
function DialogPortal({
|
|
20692
20850
|
...props
|
|
20693
20851
|
}) {
|
|
20694
|
-
return /* @__PURE__ */ (0,
|
|
20852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_radix_ui6.Dialog.Portal, { ...props });
|
|
20695
20853
|
}
|
|
20696
20854
|
function DialogOverlay({
|
|
20697
20855
|
className,
|
|
20698
20856
|
...props
|
|
20699
20857
|
}) {
|
|
20700
|
-
return /* @__PURE__ */ (0,
|
|
20858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
20701
20859
|
import_radix_ui6.Dialog.Overlay,
|
|
20702
20860
|
{
|
|
20703
20861
|
"data-slot": "dialog-overlay",
|
|
@@ -20710,9 +20868,9 @@ function DialogOverlay({
|
|
|
20710
20868
|
var DialogContent = React9.forwardRef(
|
|
20711
20869
|
({ className, children, showCloseButton = true, container, ...props }, ref) => {
|
|
20712
20870
|
const positionMode = container ? "absolute" : "fixed";
|
|
20713
|
-
return /* @__PURE__ */ (0,
|
|
20714
|
-
/* @__PURE__ */ (0,
|
|
20715
|
-
/* @__PURE__ */ (0,
|
|
20871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogPortal, { container: container ?? void 0, children: [
|
|
20872
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
|
|
20873
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
20716
20874
|
import_radix_ui6.Dialog.Content,
|
|
20717
20875
|
{
|
|
20718
20876
|
ref,
|
|
@@ -20728,13 +20886,13 @@ var DialogContent = React9.forwardRef(
|
|
|
20728
20886
|
...props,
|
|
20729
20887
|
children: [
|
|
20730
20888
|
children,
|
|
20731
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
20889
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
20732
20890
|
import_radix_ui6.Dialog.Close,
|
|
20733
20891
|
{
|
|
20734
20892
|
type: "button",
|
|
20735
20893
|
className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
|
|
20736
20894
|
"aria-label": "Close",
|
|
20737
|
-
children: /* @__PURE__ */ (0,
|
|
20895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.X, { size: 16, "aria-hidden": true })
|
|
20738
20896
|
}
|
|
20739
20897
|
) : null
|
|
20740
20898
|
]
|
|
@@ -20748,13 +20906,13 @@ function DialogHeader({
|
|
|
20748
20906
|
className,
|
|
20749
20907
|
...props
|
|
20750
20908
|
}) {
|
|
20751
|
-
return /* @__PURE__ */ (0,
|
|
20909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
20752
20910
|
}
|
|
20753
20911
|
function DialogFooter({
|
|
20754
20912
|
className,
|
|
20755
20913
|
...props
|
|
20756
20914
|
}) {
|
|
20757
|
-
return /* @__PURE__ */ (0,
|
|
20915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
20758
20916
|
"div",
|
|
20759
20917
|
{
|
|
20760
20918
|
className: cn("flex items-center justify-end gap-2", className),
|
|
@@ -20762,7 +20920,7 @@ function DialogFooter({
|
|
|
20762
20920
|
}
|
|
20763
20921
|
);
|
|
20764
20922
|
}
|
|
20765
|
-
var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
20923
|
+
var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
20766
20924
|
import_radix_ui6.Dialog.Title,
|
|
20767
20925
|
{
|
|
20768
20926
|
ref,
|
|
@@ -20774,7 +20932,7 @@ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
20774
20932
|
}
|
|
20775
20933
|
));
|
|
20776
20934
|
DialogTitle.displayName = import_radix_ui6.Dialog.Title.displayName;
|
|
20777
|
-
var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
20935
|
+
var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
20778
20936
|
import_radix_ui6.Dialog.Description,
|
|
20779
20937
|
{
|
|
20780
20938
|
ref,
|
|
@@ -20790,19 +20948,19 @@ var import_lucide_react16 = require("lucide-react");
|
|
|
20790
20948
|
|
|
20791
20949
|
// src/ui/link-modal/DestinationBreadcrumb.tsx
|
|
20792
20950
|
var import_lucide_react13 = require("lucide-react");
|
|
20793
|
-
var
|
|
20951
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
20794
20952
|
function DestinationBreadcrumb({
|
|
20795
20953
|
pageTitle,
|
|
20796
20954
|
sectionLabel
|
|
20797
20955
|
}) {
|
|
20798
|
-
return /* @__PURE__ */ (0,
|
|
20799
|
-
/* @__PURE__ */ (0,
|
|
20800
|
-
/* @__PURE__ */ (0,
|
|
20801
|
-
/* @__PURE__ */ (0,
|
|
20802
|
-
/* @__PURE__ */ (0,
|
|
20803
|
-
/* @__PURE__ */ (0,
|
|
20956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
|
|
20957
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-medium! text-foreground m-0", children: "Destination" }),
|
|
20958
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
20959
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
20960
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react13.File, { size: 16, className: "shrink-0 text-foreground", "aria-hidden": true }),
|
|
20961
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-medium leading-none text-foreground!", children: pageTitle })
|
|
20804
20962
|
] }),
|
|
20805
|
-
/* @__PURE__ */ (0,
|
|
20963
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
20806
20964
|
import_lucide_react13.ArrowRight,
|
|
20807
20965
|
{
|
|
20808
20966
|
size: 16,
|
|
@@ -20810,8 +20968,8 @@ function DestinationBreadcrumb({
|
|
|
20810
20968
|
"aria-hidden": true
|
|
20811
20969
|
}
|
|
20812
20970
|
),
|
|
20813
|
-
/* @__PURE__ */ (0,
|
|
20814
|
-
/* @__PURE__ */ (0,
|
|
20971
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
20972
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
20815
20973
|
import_lucide_react13.GalleryVertical,
|
|
20816
20974
|
{
|
|
20817
20975
|
size: 16,
|
|
@@ -20819,7 +20977,7 @@ function DestinationBreadcrumb({
|
|
|
20819
20977
|
"aria-hidden": true
|
|
20820
20978
|
}
|
|
20821
20979
|
),
|
|
20822
|
-
/* @__PURE__ */ (0,
|
|
20980
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
|
|
20823
20981
|
] })
|
|
20824
20982
|
] })
|
|
20825
20983
|
] });
|
|
@@ -20827,22 +20985,22 @@ function DestinationBreadcrumb({
|
|
|
20827
20985
|
|
|
20828
20986
|
// src/ui/link-modal/SectionTreeItem.tsx
|
|
20829
20987
|
var import_lucide_react14 = require("lucide-react");
|
|
20830
|
-
var
|
|
20988
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
20831
20989
|
function SectionTreeItem({
|
|
20832
20990
|
section,
|
|
20833
20991
|
onSelect,
|
|
20834
20992
|
selected
|
|
20835
20993
|
}) {
|
|
20836
20994
|
const interactive = Boolean(onSelect);
|
|
20837
|
-
return /* @__PURE__ */ (0,
|
|
20838
|
-
/* @__PURE__ */ (0,
|
|
20995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
|
|
20996
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
20839
20997
|
"div",
|
|
20840
20998
|
{
|
|
20841
20999
|
className: "-mr-px h-9 w-2 shrink-0 rounded-bl-sm border-b border-l border-border mb-4",
|
|
20842
21000
|
"aria-hidden": true
|
|
20843
21001
|
}
|
|
20844
21002
|
),
|
|
20845
|
-
/* @__PURE__ */ (0,
|
|
21003
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
20846
21004
|
"div",
|
|
20847
21005
|
{
|
|
20848
21006
|
role: interactive ? "button" : void 0,
|
|
@@ -20860,7 +21018,7 @@ function SectionTreeItem({
|
|
|
20860
21018
|
interactive && selected && "border-bridge-primary"
|
|
20861
21019
|
),
|
|
20862
21020
|
children: [
|
|
20863
|
-
/* @__PURE__ */ (0,
|
|
21021
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
20864
21022
|
import_lucide_react14.GalleryVertical,
|
|
20865
21023
|
{
|
|
20866
21024
|
size: 16,
|
|
@@ -20868,7 +21026,7 @@ function SectionTreeItem({
|
|
|
20868
21026
|
"aria-hidden": true
|
|
20869
21027
|
}
|
|
20870
21028
|
),
|
|
20871
|
-
/* @__PURE__ */ (0,
|
|
21029
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
|
|
20872
21030
|
]
|
|
20873
21031
|
}
|
|
20874
21032
|
)
|
|
@@ -20880,10 +21038,10 @@ var import_react14 = require("react");
|
|
|
20880
21038
|
|
|
20881
21039
|
// src/ui/input.tsx
|
|
20882
21040
|
var React10 = __toESM(require("react"), 1);
|
|
20883
|
-
var
|
|
21041
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
20884
21042
|
var Input = React10.forwardRef(
|
|
20885
21043
|
({ className, type, ...props }, ref) => {
|
|
20886
|
-
return /* @__PURE__ */ (0,
|
|
21044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
20887
21045
|
"input",
|
|
20888
21046
|
{
|
|
20889
21047
|
type,
|
|
@@ -20902,9 +21060,9 @@ Input.displayName = "Input";
|
|
|
20902
21060
|
|
|
20903
21061
|
// src/ui/label.tsx
|
|
20904
21062
|
var import_radix_ui7 = require("radix-ui");
|
|
20905
|
-
var
|
|
21063
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
20906
21064
|
function Label({ className, ...props }) {
|
|
20907
|
-
return /* @__PURE__ */ (0,
|
|
21065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
20908
21066
|
import_radix_ui7.Label.Root,
|
|
20909
21067
|
{
|
|
20910
21068
|
"data-slot": "label",
|
|
@@ -20916,11 +21074,11 @@ function Label({ className, ...props }) {
|
|
|
20916
21074
|
|
|
20917
21075
|
// src/ui/link-modal/UrlOrPageInput.tsx
|
|
20918
21076
|
var import_lucide_react15 = require("lucide-react");
|
|
20919
|
-
var
|
|
21077
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
20920
21078
|
function FieldChevron({
|
|
20921
21079
|
onClick
|
|
20922
21080
|
}) {
|
|
20923
|
-
return /* @__PURE__ */ (0,
|
|
21081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
20924
21082
|
"button",
|
|
20925
21083
|
{
|
|
20926
21084
|
type: "button",
|
|
@@ -20928,7 +21086,7 @@ function FieldChevron({
|
|
|
20928
21086
|
onClick,
|
|
20929
21087
|
"aria-label": "Open page list",
|
|
20930
21088
|
tabIndex: -1,
|
|
20931
|
-
children: /* @__PURE__ */ (0,
|
|
21089
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.ChevronDown, { size: 16 })
|
|
20932
21090
|
}
|
|
20933
21091
|
);
|
|
20934
21092
|
}
|
|
@@ -20989,11 +21147,11 @@ function UrlOrPageInput({
|
|
|
20989
21147
|
"data-ohw-link-field flex h-[36px] w-full items-center overflow-hidden rounded-md border bg-background pl-3 pr-3 py-2 outline-none transition-[border-color,box-shadow]",
|
|
20990
21148
|
urlError ? "border-destructive shadow-[0_0_0_1px_var(--ohw-destructive)]" : isFocused ? "border-bridge-primary shadow-[0_0_0_1px_var(--ohw-primary)]" : "border-input"
|
|
20991
21149
|
);
|
|
20992
|
-
return /* @__PURE__ */ (0,
|
|
20993
|
-
/* @__PURE__ */ (0,
|
|
20994
|
-
/* @__PURE__ */ (0,
|
|
20995
|
-
/* @__PURE__ */ (0,
|
|
20996
|
-
selectedPage ? /* @__PURE__ */ (0,
|
|
21150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
|
|
21151
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
|
|
21152
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
|
|
21153
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
|
|
21154
|
+
selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
20997
21155
|
import_lucide_react15.File,
|
|
20998
21156
|
{
|
|
20999
21157
|
size: 16,
|
|
@@ -21001,7 +21159,7 @@ function UrlOrPageInput({
|
|
|
21001
21159
|
"aria-hidden": true
|
|
21002
21160
|
}
|
|
21003
21161
|
) }) : null,
|
|
21004
|
-
readOnly ? /* @__PURE__ */ (0,
|
|
21162
|
+
readOnly ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
21005
21163
|
Input,
|
|
21006
21164
|
{
|
|
21007
21165
|
ref: inputRef,
|
|
@@ -21027,7 +21185,7 @@ function UrlOrPageInput({
|
|
|
21027
21185
|
)
|
|
21028
21186
|
}
|
|
21029
21187
|
),
|
|
21030
|
-
selectedPage && !readOnly ? /* @__PURE__ */ (0,
|
|
21188
|
+
selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
21031
21189
|
"button",
|
|
21032
21190
|
{
|
|
21033
21191
|
type: "button",
|
|
@@ -21035,26 +21193,26 @@ function UrlOrPageInput({
|
|
|
21035
21193
|
onMouseDown: clearSelection,
|
|
21036
21194
|
"aria-label": "Clear selected page",
|
|
21037
21195
|
tabIndex: -1,
|
|
21038
|
-
children: /* @__PURE__ */ (0,
|
|
21196
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.X, { size: 16, "aria-hidden": true })
|
|
21039
21197
|
}
|
|
21040
21198
|
) : null,
|
|
21041
|
-
!readOnly ? /* @__PURE__ */ (0,
|
|
21199
|
+
!readOnly ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
|
|
21042
21200
|
] }),
|
|
21043
|
-
dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0,
|
|
21201
|
+
dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
21044
21202
|
"div",
|
|
21045
21203
|
{
|
|
21046
21204
|
"data-ohw-link-page-dropdown": "",
|
|
21047
21205
|
className: "absolute left-0 right-0 top-[calc(100%+4px)] z-50 max-h-48 overflow-auto rounded-lg border border-border bg-popover py-1 shadow-lg",
|
|
21048
21206
|
onMouseDown: (e) => e.preventDefault(),
|
|
21049
|
-
children: filteredPages.map((page) => /* @__PURE__ */ (0,
|
|
21207
|
+
children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
21050
21208
|
"button",
|
|
21051
21209
|
{
|
|
21052
21210
|
type: "button",
|
|
21053
21211
|
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",
|
|
21054
21212
|
onClick: () => onPageSelect(page),
|
|
21055
21213
|
children: [
|
|
21056
|
-
/* @__PURE__ */ (0,
|
|
21057
|
-
/* @__PURE__ */ (0,
|
|
21214
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.File, { size: 16, className: "shrink-0", "aria-hidden": true }),
|
|
21215
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "truncate", children: page.title })
|
|
21058
21216
|
]
|
|
21059
21217
|
},
|
|
21060
21218
|
page.path
|
|
@@ -21062,34 +21220,34 @@ function UrlOrPageInput({
|
|
|
21062
21220
|
}
|
|
21063
21221
|
) : null
|
|
21064
21222
|
] }),
|
|
21065
|
-
urlError ? /* @__PURE__ */ (0,
|
|
21223
|
+
urlError ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
|
|
21066
21224
|
] });
|
|
21067
21225
|
}
|
|
21068
21226
|
|
|
21069
21227
|
// src/ui/link-modal/LinkEditorPanel.tsx
|
|
21070
|
-
var
|
|
21228
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
21071
21229
|
function LinkEditorPanel({ state, onClose }) {
|
|
21072
21230
|
const isCancel = state.secondaryLabel === "Cancel" || state.secondaryLabel === "Back to sections";
|
|
21073
|
-
return /* @__PURE__ */ (0,
|
|
21074
|
-
/* @__PURE__ */ (0,
|
|
21231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
21232
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
21075
21233
|
"button",
|
|
21076
21234
|
{
|
|
21077
21235
|
type: "button",
|
|
21078
21236
|
className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50 h-7",
|
|
21079
21237
|
"aria-label": "Close",
|
|
21080
21238
|
onClick: onClose,
|
|
21081
|
-
children: /* @__PURE__ */ (0,
|
|
21239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.X, { size: 16, "aria-hidden": true })
|
|
21082
21240
|
}
|
|
21083
21241
|
) }),
|
|
21084
|
-
/* @__PURE__ */ (0,
|
|
21085
|
-
/* @__PURE__ */ (0,
|
|
21086
|
-
state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0,
|
|
21242
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
|
|
21243
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
|
|
21244
|
+
state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
21087
21245
|
DestinationBreadcrumb,
|
|
21088
21246
|
{
|
|
21089
21247
|
pageTitle: state.selectedPage.title,
|
|
21090
21248
|
sectionLabel: state.selectedSection.label
|
|
21091
21249
|
}
|
|
21092
|
-
) : /* @__PURE__ */ (0,
|
|
21250
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
21093
21251
|
UrlOrPageInput,
|
|
21094
21252
|
{
|
|
21095
21253
|
value: state.searchValue,
|
|
@@ -21102,8 +21260,8 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
21102
21260
|
urlError: state.urlError
|
|
21103
21261
|
}
|
|
21104
21262
|
),
|
|
21105
|
-
state.showChooseSection ? /* @__PURE__ */ (0,
|
|
21106
|
-
/* @__PURE__ */ (0,
|
|
21263
|
+
state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
|
|
21264
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
21107
21265
|
Button,
|
|
21108
21266
|
{
|
|
21109
21267
|
type: "button",
|
|
@@ -21114,15 +21272,15 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
21114
21272
|
children: "Choose a section"
|
|
21115
21273
|
}
|
|
21116
21274
|
),
|
|
21117
|
-
/* @__PURE__ */ (0,
|
|
21118
|
-
/* @__PURE__ */ (0,
|
|
21119
|
-
/* @__PURE__ */ (0,
|
|
21275
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
|
|
21276
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.Info, { size: 16, className: "shrink-0", "aria-hidden": true }),
|
|
21277
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Pick a section this link should scroll to." })
|
|
21120
21278
|
] })
|
|
21121
21279
|
] }) : null,
|
|
21122
|
-
state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0,
|
|
21280
|
+
state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
|
|
21123
21281
|
] }),
|
|
21124
|
-
/* @__PURE__ */ (0,
|
|
21125
|
-
/* @__PURE__ */ (0,
|
|
21282
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
|
|
21283
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
21126
21284
|
Button,
|
|
21127
21285
|
{
|
|
21128
21286
|
type: "button",
|
|
@@ -21137,7 +21295,7 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
21137
21295
|
children: state.secondaryLabel
|
|
21138
21296
|
}
|
|
21139
21297
|
),
|
|
21140
|
-
/* @__PURE__ */ (0,
|
|
21298
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
21141
21299
|
Button,
|
|
21142
21300
|
{
|
|
21143
21301
|
type: "button",
|
|
@@ -21180,7 +21338,7 @@ function getIframeChromeClip(parentScroll) {
|
|
|
21180
21338
|
}
|
|
21181
21339
|
|
|
21182
21340
|
// src/ui/link-modal/SectionPickerOverlay.tsx
|
|
21183
|
-
var
|
|
21341
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
21184
21342
|
var DIM_OVERLAY = "rgba(0, 0, 0, 0.45)";
|
|
21185
21343
|
function rectsEqual(a, b) {
|
|
21186
21344
|
if (a.size !== b.size) return false;
|
|
@@ -21411,7 +21569,7 @@ function SectionPickerOverlay({
|
|
|
21411
21569
|
const portalRoot = typeof document !== "undefined" ? document.querySelector("[data-ohw-bridge-root]") ?? document.body : null;
|
|
21412
21570
|
if (!portalRoot) return null;
|
|
21413
21571
|
return (0, import_react_dom4.createPortal)(
|
|
21414
|
-
/* @__PURE__ */ (0,
|
|
21572
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
21415
21573
|
"div",
|
|
21416
21574
|
{
|
|
21417
21575
|
"data-ohw-section-picker": "",
|
|
@@ -21421,12 +21579,12 @@ function SectionPickerOverlay({
|
|
|
21421
21579
|
role: "dialog",
|
|
21422
21580
|
"aria-label": "Choose a section",
|
|
21423
21581
|
children: [
|
|
21424
|
-
/* @__PURE__ */ (0,
|
|
21582
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
21425
21583
|
"div",
|
|
21426
21584
|
{
|
|
21427
21585
|
className: "pointer-events-auto fixed left-5 z-[2]",
|
|
21428
21586
|
style: { top: chromeClip.top + 20 },
|
|
21429
|
-
children: /* @__PURE__ */ (0,
|
|
21587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
21430
21588
|
Button,
|
|
21431
21589
|
{
|
|
21432
21590
|
type: "button",
|
|
@@ -21435,14 +21593,14 @@ function SectionPickerOverlay({
|
|
|
21435
21593
|
className: "h-8 min-w-0 gap-1 border-border bg-background px-2 py-1.5 shadow-sm hover:bg-muted cursor-pointer",
|
|
21436
21594
|
onClick: onBack,
|
|
21437
21595
|
children: [
|
|
21438
|
-
/* @__PURE__ */ (0,
|
|
21596
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.ArrowLeft, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
21439
21597
|
"Back"
|
|
21440
21598
|
]
|
|
21441
21599
|
}
|
|
21442
21600
|
)
|
|
21443
21601
|
}
|
|
21444
21602
|
),
|
|
21445
|
-
/* @__PURE__ */ (0,
|
|
21603
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
21446
21604
|
"div",
|
|
21447
21605
|
{
|
|
21448
21606
|
className: "pointer-events-none fixed left-1/2 z-[2] rounded-lg px-4 py-3 text-xs leading-4 tracking-[0.18px] text-white shadow-md",
|
|
@@ -21455,7 +21613,7 @@ function SectionPickerOverlay({
|
|
|
21455
21613
|
children: "Click on section to select"
|
|
21456
21614
|
}
|
|
21457
21615
|
),
|
|
21458
|
-
!isOnTargetPage ? /* @__PURE__ */ (0,
|
|
21616
|
+
!isOnTargetPage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
21459
21617
|
"div",
|
|
21460
21618
|
{
|
|
21461
21619
|
className: "pointer-events-none fixed left-1/2 z-[1] -translate-x-1/2 rounded-md px-3 py-2 text-sm text-muted-foreground shadow-sm",
|
|
@@ -21463,14 +21621,14 @@ function SectionPickerOverlay({
|
|
|
21463
21621
|
children: "Loading page preview\u2026"
|
|
21464
21622
|
}
|
|
21465
21623
|
) : null,
|
|
21466
|
-
isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0,
|
|
21624
|
+
isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pointer-events-auto fixed inset-0 z-[1] flex items-center justify-center bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." }) }) : null,
|
|
21467
21625
|
isOnTargetPage ? liveSections.map((section) => {
|
|
21468
21626
|
const rect = rects.get(section.id);
|
|
21469
21627
|
if (!rect || rect.width <= 0 || rect.height <= 0) return null;
|
|
21470
21628
|
const isSelected = selectedId === section.id;
|
|
21471
21629
|
const isHovered = hoveredId === section.id;
|
|
21472
21630
|
const isLit = isSelected || isHovered;
|
|
21473
|
-
return /* @__PURE__ */ (0,
|
|
21631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
21474
21632
|
"button",
|
|
21475
21633
|
{
|
|
21476
21634
|
type: "button",
|
|
@@ -21485,7 +21643,7 @@ function SectionPickerOverlay({
|
|
|
21485
21643
|
"aria-label": `Select section ${section.label}`,
|
|
21486
21644
|
onClick: () => handleSelect(section),
|
|
21487
21645
|
children: [
|
|
21488
|
-
isLit ? /* @__PURE__ */ (0,
|
|
21646
|
+
isLit ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
21489
21647
|
"span",
|
|
21490
21648
|
{
|
|
21491
21649
|
className: "pointer-events-none absolute",
|
|
@@ -21498,13 +21656,13 @@ function SectionPickerOverlay({
|
|
|
21498
21656
|
"aria-hidden": true
|
|
21499
21657
|
}
|
|
21500
21658
|
) : null,
|
|
21501
|
-
isSelected ? /* @__PURE__ */ (0,
|
|
21659
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
21502
21660
|
"span",
|
|
21503
21661
|
{
|
|
21504
21662
|
className: "absolute right-3 top-3 flex size-8 items-center justify-center rounded-full text-white",
|
|
21505
21663
|
style: { backgroundColor: "var(--ohw-primary, #0885fe)" },
|
|
21506
21664
|
"aria-hidden": true,
|
|
21507
|
-
children: /* @__PURE__ */ (0,
|
|
21665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react17.Check, { className: "size-5" })
|
|
21508
21666
|
}
|
|
21509
21667
|
) : null
|
|
21510
21668
|
]
|
|
@@ -21684,7 +21842,7 @@ function useLinkModalState({
|
|
|
21684
21842
|
}
|
|
21685
21843
|
|
|
21686
21844
|
// src/ui/link-modal/LinkPopover.tsx
|
|
21687
|
-
var
|
|
21845
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
21688
21846
|
function postToParent(data) {
|
|
21689
21847
|
window.parent?.postMessage(data, "*");
|
|
21690
21848
|
}
|
|
@@ -21780,15 +21938,15 @@ function LinkPopover({
|
|
|
21780
21938
|
);
|
|
21781
21939
|
};
|
|
21782
21940
|
}, [open, sectionPickerActive]);
|
|
21783
|
-
return /* @__PURE__ */ (0,
|
|
21784
|
-
/* @__PURE__ */ (0,
|
|
21941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
21942
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
21785
21943
|
Dialog2,
|
|
21786
21944
|
{
|
|
21787
21945
|
open: open && !sectionPickerActive,
|
|
21788
21946
|
onOpenChange: (next) => {
|
|
21789
21947
|
if (!next) onClose?.();
|
|
21790
21948
|
},
|
|
21791
|
-
children: /* @__PURE__ */ (0,
|
|
21949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
21792
21950
|
DialogContent,
|
|
21793
21951
|
{
|
|
21794
21952
|
ref: panelRef,
|
|
@@ -21798,12 +21956,12 @@ function LinkPopover({
|
|
|
21798
21956
|
"data-ohw-bridge": "",
|
|
21799
21957
|
showCloseButton: false,
|
|
21800
21958
|
className: "gap-0 p-0 w-full max-w-[448px] pointer-events-auto z-[2147483646] overflow-visible",
|
|
21801
|
-
children: /* @__PURE__ */ (0,
|
|
21959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LinkEditorPanel, { state, onClose })
|
|
21802
21960
|
}
|
|
21803
21961
|
)
|
|
21804
21962
|
}
|
|
21805
21963
|
),
|
|
21806
|
-
sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0,
|
|
21964
|
+
sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
21807
21965
|
SectionPickerOverlay,
|
|
21808
21966
|
{
|
|
21809
21967
|
pagePath: state.selectedPage.path,
|
|
@@ -21956,7 +22114,7 @@ function addFooterColumnWithPersist({
|
|
|
21956
22114
|
// src/ui/FloatingPanel.tsx
|
|
21957
22115
|
var import_react18 = require("react");
|
|
21958
22116
|
var import_lucide_react18 = require("lucide-react");
|
|
21959
|
-
var
|
|
22117
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
21960
22118
|
var PANEL_WIDTH = 256;
|
|
21961
22119
|
var EDGE_MARGIN = 16;
|
|
21962
22120
|
var HEADER_MIN = 56;
|
|
@@ -22128,7 +22286,7 @@ function FloatingPanel({
|
|
|
22128
22286
|
}, [open]);
|
|
22129
22287
|
(0, import_react18.useEffect)(() => () => document.documentElement.removeAttribute("data-ohw-panel-dragging"), []);
|
|
22130
22288
|
if (!open) return null;
|
|
22131
|
-
return /* @__PURE__ */ (0,
|
|
22289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
22132
22290
|
"div",
|
|
22133
22291
|
{
|
|
22134
22292
|
ref: panelRef,
|
|
@@ -22145,7 +22303,7 @@ function FloatingPanel({
|
|
|
22145
22303
|
onPointerDown: (e) => e.stopPropagation(),
|
|
22146
22304
|
onClick: (e) => e.stopPropagation(),
|
|
22147
22305
|
children: [
|
|
22148
|
-
/* @__PURE__ */ (0,
|
|
22306
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
22149
22307
|
"div",
|
|
22150
22308
|
{
|
|
22151
22309
|
"data-ohw-floating-panel-header": "",
|
|
@@ -22155,14 +22313,14 @@ function FloatingPanel({
|
|
|
22155
22313
|
onPointerUp: endDrag,
|
|
22156
22314
|
onPointerCancel: endDrag,
|
|
22157
22315
|
children: [
|
|
22158
|
-
/* @__PURE__ */ (0,
|
|
22159
|
-
/* @__PURE__ */ (0,
|
|
22160
|
-
icon ? /* @__PURE__ */ (0,
|
|
22161
|
-
/* @__PURE__ */ (0,
|
|
22316
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
22317
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
22318
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "shrink-0 text-foreground", children: icon }) : null,
|
|
22319
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "min-w-0 flex-1 text-lg font-semibold leading-7 text-foreground", children: title })
|
|
22162
22320
|
] }),
|
|
22163
|
-
context ? /* @__PURE__ */ (0,
|
|
22321
|
+
context ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "w-full text-sm leading-5 text-muted-foreground", children: context }) : null
|
|
22164
22322
|
] }),
|
|
22165
|
-
/* @__PURE__ */ (0,
|
|
22323
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
22166
22324
|
"button",
|
|
22167
22325
|
{
|
|
22168
22326
|
type: "button",
|
|
@@ -22174,13 +22332,13 @@ function FloatingPanel({
|
|
|
22174
22332
|
onClose();
|
|
22175
22333
|
},
|
|
22176
22334
|
onPointerDown: (e) => e.stopPropagation(),
|
|
22177
|
-
children: /* @__PURE__ */ (0,
|
|
22335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.X, { size: 16, "aria-hidden": true })
|
|
22178
22336
|
}
|
|
22179
22337
|
)
|
|
22180
22338
|
]
|
|
22181
22339
|
}
|
|
22182
22340
|
),
|
|
22183
|
-
/* @__PURE__ */ (0,
|
|
22341
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
22184
22342
|
"div",
|
|
22185
22343
|
{
|
|
22186
22344
|
"data-ohw-floating-panel-body": "",
|
|
@@ -22198,15 +22356,15 @@ function FloatingPanel({
|
|
|
22198
22356
|
}
|
|
22199
22357
|
|
|
22200
22358
|
// src/ui/socials-display-panel.tsx
|
|
22201
|
-
var
|
|
22359
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
22202
22360
|
function DisplaySwitch({
|
|
22203
22361
|
label,
|
|
22204
22362
|
checked,
|
|
22205
22363
|
disabled,
|
|
22206
22364
|
onChange
|
|
22207
22365
|
}) {
|
|
22208
|
-
return /* @__PURE__ */ (0,
|
|
22209
|
-
/* @__PURE__ */ (0,
|
|
22366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
|
|
22367
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
22210
22368
|
"span",
|
|
22211
22369
|
{
|
|
22212
22370
|
className: cn(
|
|
@@ -22216,7 +22374,7 @@ function DisplaySwitch({
|
|
|
22216
22374
|
children: label
|
|
22217
22375
|
}
|
|
22218
22376
|
),
|
|
22219
|
-
/* @__PURE__ */ (0,
|
|
22377
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
22220
22378
|
"button",
|
|
22221
22379
|
{
|
|
22222
22380
|
type: "button",
|
|
@@ -22230,7 +22388,7 @@ function DisplaySwitch({
|
|
|
22230
22388
|
checked ? "bg-bridge-primary" : "bg-primary-50",
|
|
22231
22389
|
disabled ? "cursor-default opacity-50" : "cursor-pointer"
|
|
22232
22390
|
),
|
|
22233
|
-
children: /* @__PURE__ */ (0,
|
|
22391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
22234
22392
|
"span",
|
|
22235
22393
|
{
|
|
22236
22394
|
className: cn(
|
|
@@ -22244,8 +22402,8 @@ function DisplaySwitch({
|
|
|
22244
22402
|
] });
|
|
22245
22403
|
}
|
|
22246
22404
|
function SocialsDisplayPanel({ display, onChange, className }) {
|
|
22247
|
-
return /* @__PURE__ */ (0,
|
|
22248
|
-
/* @__PURE__ */ (0,
|
|
22405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
|
|
22406
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
22249
22407
|
DisplaySwitch,
|
|
22250
22408
|
{
|
|
22251
22409
|
label: "Text",
|
|
@@ -22254,7 +22412,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
|
|
|
22254
22412
|
onChange: (text) => onChange({ ...display, text })
|
|
22255
22413
|
}
|
|
22256
22414
|
),
|
|
22257
|
-
/* @__PURE__ */ (0,
|
|
22415
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
22258
22416
|
DisplaySwitch,
|
|
22259
22417
|
{
|
|
22260
22418
|
label: "Icon",
|
|
@@ -22268,7 +22426,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
|
|
|
22268
22426
|
|
|
22269
22427
|
// src/ui/button-style-panel.tsx
|
|
22270
22428
|
var import_lucide_react19 = require("lucide-react");
|
|
22271
|
-
var
|
|
22429
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
22272
22430
|
var SIZE_LABEL = { s: "S", m: "M", l: "L" };
|
|
22273
22431
|
function ButtonStylePanel({
|
|
22274
22432
|
variants,
|
|
@@ -22282,15 +22440,15 @@ function ButtonStylePanel({
|
|
|
22282
22440
|
}) {
|
|
22283
22441
|
const preview = scaleGeometry(sizes.m, 0.75);
|
|
22284
22442
|
const label = previewLabel.trim() || "Book Now";
|
|
22285
|
-
return /* @__PURE__ */ (0,
|
|
22286
|
-
/* @__PURE__ */ (0,
|
|
22287
|
-
/* @__PURE__ */ (0,
|
|
22288
|
-
/* @__PURE__ */ (0,
|
|
22443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
|
|
22444
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
|
|
22445
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500 font-sans", children: "Variants" }),
|
|
22446
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex w-full flex-col gap-2.5", children: BUTTON_VARIANT_IDS.map((id) => {
|
|
22289
22447
|
const chrome = variants[id];
|
|
22290
22448
|
const selected = id === variant;
|
|
22291
22449
|
const hasBorder = parseFloat(chrome.borderWidth) > 0;
|
|
22292
22450
|
const cardSlot = previewSlotForChrome(chrome, slotBackground);
|
|
22293
|
-
return /* @__PURE__ */ (0,
|
|
22451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
22294
22452
|
"button",
|
|
22295
22453
|
{
|
|
22296
22454
|
type: "button",
|
|
@@ -22306,12 +22464,12 @@ function ButtonStylePanel({
|
|
|
22306
22464
|
selected ? "border-2 border-primary" : "border border-border"
|
|
22307
22465
|
),
|
|
22308
22466
|
children: [
|
|
22309
|
-
/* @__PURE__ */ (0,
|
|
22467
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
22310
22468
|
"div",
|
|
22311
22469
|
{
|
|
22312
22470
|
className: "flex w-full items-center justify-center py-4",
|
|
22313
22471
|
style: { background: cardSlot },
|
|
22314
|
-
children: /* @__PURE__ */ (0,
|
|
22472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
22315
22473
|
"span",
|
|
22316
22474
|
{
|
|
22317
22475
|
className: "inline-flex items-center justify-center whitespace-nowrap font-semibold uppercase leading-none",
|
|
@@ -22333,12 +22491,12 @@ function ButtonStylePanel({
|
|
|
22333
22491
|
)
|
|
22334
22492
|
}
|
|
22335
22493
|
),
|
|
22336
|
-
selected ? /* @__PURE__ */ (0,
|
|
22494
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
22337
22495
|
"span",
|
|
22338
22496
|
{
|
|
22339
22497
|
className: "absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground",
|
|
22340
22498
|
"aria-hidden": true,
|
|
22341
|
-
children: /* @__PURE__ */ (0,
|
|
22499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Check, { className: "size-3", strokeWidth: 3 })
|
|
22342
22500
|
}
|
|
22343
22501
|
) : null
|
|
22344
22502
|
]
|
|
@@ -22347,9 +22505,9 @@ function ButtonStylePanel({
|
|
|
22347
22505
|
);
|
|
22348
22506
|
}) })
|
|
22349
22507
|
] }),
|
|
22350
|
-
/* @__PURE__ */ (0,
|
|
22351
|
-
/* @__PURE__ */ (0,
|
|
22352
|
-
/* @__PURE__ */ (0,
|
|
22508
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
|
|
22509
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500 font-sans", children: "Size" }),
|
|
22510
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
22353
22511
|
"div",
|
|
22354
22512
|
{
|
|
22355
22513
|
className: "flex w-full items-start rounded-lg bg-stone-100 p-1",
|
|
@@ -22357,7 +22515,7 @@ function ButtonStylePanel({
|
|
|
22357
22515
|
"aria-label": "Size",
|
|
22358
22516
|
children: BUTTON_SIZE_IDS.map((id) => {
|
|
22359
22517
|
const selected = id === size;
|
|
22360
|
-
return /* @__PURE__ */ (0,
|
|
22518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
22361
22519
|
"button",
|
|
22362
22520
|
{
|
|
22363
22521
|
type: "button",
|
|
@@ -23364,7 +23522,7 @@ function useSectionDrag({
|
|
|
23364
23522
|
|
|
23365
23523
|
// src/ui/footer-container-chrome.tsx
|
|
23366
23524
|
var import_lucide_react20 = require("lucide-react");
|
|
23367
|
-
var
|
|
23525
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
23368
23526
|
function FooterContainerChrome({
|
|
23369
23527
|
rect,
|
|
23370
23528
|
onAdd,
|
|
@@ -23372,7 +23530,7 @@ function FooterContainerChrome({
|
|
|
23372
23530
|
}) {
|
|
23373
23531
|
const chromeGap = 6;
|
|
23374
23532
|
const buttonMargin = 7;
|
|
23375
|
-
return /* @__PURE__ */ (0,
|
|
23533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
23376
23534
|
"div",
|
|
23377
23535
|
{
|
|
23378
23536
|
"data-ohw-footer-container-chrome": "",
|
|
@@ -23384,8 +23542,8 @@ function FooterContainerChrome({
|
|
|
23384
23542
|
width: rect.width + chromeGap * 2,
|
|
23385
23543
|
height: rect.height + chromeGap * 2
|
|
23386
23544
|
},
|
|
23387
|
-
children: /* @__PURE__ */ (0,
|
|
23388
|
-
/* @__PURE__ */ (0,
|
|
23545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Tooltip, { children: [
|
|
23546
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
23389
23547
|
"button",
|
|
23390
23548
|
{
|
|
23391
23549
|
type: "button",
|
|
@@ -23404,10 +23562,10 @@ function FooterContainerChrome({
|
|
|
23404
23562
|
if (addDisabled) return;
|
|
23405
23563
|
onAdd();
|
|
23406
23564
|
},
|
|
23407
|
-
children: /* @__PURE__ */ (0,
|
|
23565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
23408
23566
|
}
|
|
23409
23567
|
) }),
|
|
23410
|
-
/* @__PURE__ */ (0,
|
|
23568
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
|
|
23411
23569
|
] })
|
|
23412
23570
|
}
|
|
23413
23571
|
) });
|
|
@@ -23584,13 +23742,13 @@ function deleteSelectedNavFooterItem(deps) {
|
|
|
23584
23742
|
|
|
23585
23743
|
// src/ui/navbar-container-chrome.tsx
|
|
23586
23744
|
var import_lucide_react21 = require("lucide-react");
|
|
23587
|
-
var
|
|
23745
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
23588
23746
|
function NavbarContainerChrome({
|
|
23589
23747
|
rect,
|
|
23590
23748
|
onAdd
|
|
23591
23749
|
}) {
|
|
23592
23750
|
const chromeGap = 6;
|
|
23593
|
-
return /* @__PURE__ */ (0,
|
|
23751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
23594
23752
|
"div",
|
|
23595
23753
|
{
|
|
23596
23754
|
"data-ohw-navbar-container-chrome": "",
|
|
@@ -23602,7 +23760,7 @@ function NavbarContainerChrome({
|
|
|
23602
23760
|
width: rect.width + chromeGap * 2,
|
|
23603
23761
|
height: rect.height + chromeGap * 2
|
|
23604
23762
|
},
|
|
23605
|
-
children: /* @__PURE__ */ (0,
|
|
23763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
23606
23764
|
"button",
|
|
23607
23765
|
{
|
|
23608
23766
|
type: "button",
|
|
@@ -23619,7 +23777,7 @@ function NavbarContainerChrome({
|
|
|
23619
23777
|
e.stopPropagation();
|
|
23620
23778
|
onAdd();
|
|
23621
23779
|
},
|
|
23622
|
-
children: /* @__PURE__ */ (0,
|
|
23780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react21.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
23623
23781
|
}
|
|
23624
23782
|
)
|
|
23625
23783
|
}
|
|
@@ -23628,7 +23786,7 @@ function NavbarContainerChrome({
|
|
|
23628
23786
|
|
|
23629
23787
|
// src/ui/drop-indicator.tsx
|
|
23630
23788
|
var React11 = __toESM(require("react"), 1);
|
|
23631
|
-
var
|
|
23789
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
23632
23790
|
var dropIndicatorVariants = cva(
|
|
23633
23791
|
"ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
|
|
23634
23792
|
{
|
|
@@ -23652,7 +23810,7 @@ var dropIndicatorVariants = cva(
|
|
|
23652
23810
|
);
|
|
23653
23811
|
var DropIndicator = React11.forwardRef(
|
|
23654
23812
|
({ className, direction, state, ...props }, ref) => {
|
|
23655
|
-
return /* @__PURE__ */ (0,
|
|
23813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
23656
23814
|
"div",
|
|
23657
23815
|
{
|
|
23658
23816
|
ref,
|
|
@@ -23669,7 +23827,7 @@ var DropIndicator = React11.forwardRef(
|
|
|
23669
23827
|
DropIndicator.displayName = "DropIndicator";
|
|
23670
23828
|
|
|
23671
23829
|
// src/ui/badge.tsx
|
|
23672
|
-
var
|
|
23830
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
23673
23831
|
var badgeVariants = cva(
|
|
23674
23832
|
"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",
|
|
23675
23833
|
{
|
|
@@ -23687,12 +23845,12 @@ var badgeVariants = cva(
|
|
|
23687
23845
|
}
|
|
23688
23846
|
);
|
|
23689
23847
|
function Badge({ className, variant, ...props }) {
|
|
23690
|
-
return /* @__PURE__ */ (0,
|
|
23848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
23691
23849
|
}
|
|
23692
23850
|
|
|
23693
23851
|
// src/OhhwellsBridge.tsx
|
|
23694
23852
|
var import_lucide_react22 = require("lucide-react");
|
|
23695
|
-
var
|
|
23853
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
23696
23854
|
var PRIMARY7 = "#0885FE";
|
|
23697
23855
|
var IMAGE_FADE_MS = 300;
|
|
23698
23856
|
var MEDIA_SETTLE_TIMEOUT_MS = 2500;
|
|
@@ -23814,7 +23972,7 @@ function duplicateSchedulingWidget(instanceId, scheduleId) {
|
|
|
23814
23972
|
schedulingRoots.set(container, root);
|
|
23815
23973
|
(0, import_react_dom5.flushSync)(() => {
|
|
23816
23974
|
root.render(
|
|
23817
|
-
/* @__PURE__ */ (0,
|
|
23975
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
23818
23976
|
SchedulingWidget,
|
|
23819
23977
|
{
|
|
23820
23978
|
notifyOnConnect: false,
|
|
@@ -23942,7 +24100,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
|
|
|
23942
24100
|
schedulingRoots.set(container, root);
|
|
23943
24101
|
(0, import_react_dom5.flushSync)(() => {
|
|
23944
24102
|
root.render(
|
|
23945
|
-
/* @__PURE__ */ (0,
|
|
24103
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
23946
24104
|
SchedulingWidget,
|
|
23947
24105
|
{
|
|
23948
24106
|
notifyOnConnect,
|
|
@@ -24722,7 +24880,7 @@ function EditGlowChrome({
|
|
|
24722
24880
|
hideHandle = false
|
|
24723
24881
|
}) {
|
|
24724
24882
|
const GAP = SELECTION_CHROME_GAP2;
|
|
24725
|
-
return /* @__PURE__ */ (0,
|
|
24883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
24726
24884
|
"div",
|
|
24727
24885
|
{
|
|
24728
24886
|
ref: elRef,
|
|
@@ -24737,7 +24895,7 @@ function EditGlowChrome({
|
|
|
24737
24895
|
zIndex: 2147483646
|
|
24738
24896
|
},
|
|
24739
24897
|
children: [
|
|
24740
|
-
/* @__PURE__ */ (0,
|
|
24898
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
24741
24899
|
"div",
|
|
24742
24900
|
{
|
|
24743
24901
|
style: {
|
|
@@ -24751,7 +24909,7 @@ function EditGlowChrome({
|
|
|
24751
24909
|
}
|
|
24752
24910
|
}
|
|
24753
24911
|
),
|
|
24754
|
-
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0,
|
|
24912
|
+
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
24755
24913
|
"div",
|
|
24756
24914
|
{
|
|
24757
24915
|
"data-ohw-drag-handle-container": "",
|
|
@@ -24763,7 +24921,7 @@ function EditGlowChrome({
|
|
|
24763
24921
|
transform: "translate(calc(-100% - 7px), -50%)",
|
|
24764
24922
|
pointerEvents: dragDisabled ? "none" : "auto"
|
|
24765
24923
|
},
|
|
24766
|
-
children: /* @__PURE__ */ (0,
|
|
24924
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
24767
24925
|
DragHandle,
|
|
24768
24926
|
{
|
|
24769
24927
|
"aria-label": `Reorder ${reorderHrefKey}`,
|
|
@@ -24967,7 +25125,7 @@ function FloatingToolbar({
|
|
|
24967
25125
|
return () => ro.disconnect();
|
|
24968
25126
|
}, [showEditLink, activeCommands]);
|
|
24969
25127
|
const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
|
|
24970
|
-
return /* @__PURE__ */ (0,
|
|
25128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
24971
25129
|
"div",
|
|
24972
25130
|
{
|
|
24973
25131
|
ref: setRefs,
|
|
@@ -24979,12 +25137,12 @@ function FloatingToolbar({
|
|
|
24979
25137
|
zIndex: 2147483647,
|
|
24980
25138
|
pointerEvents: "auto"
|
|
24981
25139
|
},
|
|
24982
|
-
children: /* @__PURE__ */ (0,
|
|
24983
|
-
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0,
|
|
24984
|
-
gi > 0 && /* @__PURE__ */ (0,
|
|
25140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CustomToolbar, { children: [
|
|
25141
|
+
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react21.default.Fragment, { children: [
|
|
25142
|
+
gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CustomToolbarDivider, {}),
|
|
24985
25143
|
btns.map((btn) => {
|
|
24986
25144
|
const isActive = activeCommands.has(btn.cmd);
|
|
24987
|
-
return /* @__PURE__ */ (0,
|
|
25145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
24988
25146
|
CustomToolbarButton,
|
|
24989
25147
|
{
|
|
24990
25148
|
title: btn.title,
|
|
@@ -24993,7 +25151,7 @@ function FloatingToolbar({
|
|
|
24993
25151
|
e.preventDefault();
|
|
24994
25152
|
onCommand(btn.cmd);
|
|
24995
25153
|
},
|
|
24996
|
-
children: /* @__PURE__ */ (0,
|
|
25154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
24997
25155
|
"svg",
|
|
24998
25156
|
{
|
|
24999
25157
|
width: "16",
|
|
@@ -25014,7 +25172,7 @@ function FloatingToolbar({
|
|
|
25014
25172
|
);
|
|
25015
25173
|
})
|
|
25016
25174
|
] }, gi)),
|
|
25017
|
-
showEditLink ? /* @__PURE__ */ (0,
|
|
25175
|
+
showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
25018
25176
|
CustomToolbarButton,
|
|
25019
25177
|
{
|
|
25020
25178
|
type: "button",
|
|
@@ -25028,7 +25186,7 @@ function FloatingToolbar({
|
|
|
25028
25186
|
e.preventDefault();
|
|
25029
25187
|
e.stopPropagation();
|
|
25030
25188
|
},
|
|
25031
|
-
children: /* @__PURE__ */ (0,
|
|
25189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
25032
25190
|
}
|
|
25033
25191
|
) : null
|
|
25034
25192
|
] })
|
|
@@ -25045,7 +25203,7 @@ function StateToggle({
|
|
|
25045
25203
|
states,
|
|
25046
25204
|
onStateChange
|
|
25047
25205
|
}) {
|
|
25048
|
-
return /* @__PURE__ */ (0,
|
|
25206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
25049
25207
|
ToggleGroup,
|
|
25050
25208
|
{
|
|
25051
25209
|
"data-ohw-state-toggle": "",
|
|
@@ -25059,52 +25217,15 @@ function StateToggle({
|
|
|
25059
25217
|
left: rect.right - 8,
|
|
25060
25218
|
transform: "translateX(-100%)"
|
|
25061
25219
|
},
|
|
25062
|
-
children: states.map((state) => /* @__PURE__ */ (0,
|
|
25220
|
+
children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
|
|
25063
25221
|
}
|
|
25064
25222
|
);
|
|
25065
25223
|
}
|
|
25066
25224
|
var contentCache = /* @__PURE__ */ new Map();
|
|
25067
25225
|
var fetchedContentPaths = /* @__PURE__ */ new Set();
|
|
25068
25226
|
var brandingCache = /* @__PURE__ */ new Map();
|
|
25069
|
-
var OHW_LOADER_STYLE = {
|
|
25070
|
-
position: "fixed",
|
|
25071
|
-
inset: 0,
|
|
25072
|
-
background: "#fff",
|
|
25073
|
-
zIndex: 2147483646,
|
|
25074
|
-
display: "flex",
|
|
25075
|
-
alignItems: "center",
|
|
25076
|
-
justifyContent: "center"
|
|
25077
|
-
};
|
|
25078
|
-
function OhwLoaderSpinner() {
|
|
25079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", "aria-hidden": true, children: [
|
|
25080
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("circle", { cx: "14", cy: "14", r: "11", stroke: "#E7E5E4", strokeWidth: "3" }),
|
|
25081
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
25082
|
-
"circle",
|
|
25083
|
-
{
|
|
25084
|
-
cx: "14",
|
|
25085
|
-
cy: "14",
|
|
25086
|
-
r: "11",
|
|
25087
|
-
stroke: "#1C1917",
|
|
25088
|
-
strokeWidth: "3",
|
|
25089
|
-
strokeDasharray: "17 52",
|
|
25090
|
-
strokeLinecap: "round",
|
|
25091
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
25092
|
-
"animateTransform",
|
|
25093
|
-
{
|
|
25094
|
-
attributeName: "transform",
|
|
25095
|
-
type: "rotate",
|
|
25096
|
-
from: "0 14 14",
|
|
25097
|
-
to: "360 14 14",
|
|
25098
|
-
dur: "0.7s",
|
|
25099
|
-
repeatCount: "indefinite"
|
|
25100
|
-
}
|
|
25101
|
-
)
|
|
25102
|
-
}
|
|
25103
|
-
)
|
|
25104
|
-
] });
|
|
25105
|
-
}
|
|
25106
25227
|
function OhwBrandMark() {
|
|
25107
|
-
return /* @__PURE__ */ (0,
|
|
25228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
25108
25229
|
"svg",
|
|
25109
25230
|
{
|
|
25110
25231
|
width: "16",
|
|
@@ -25115,7 +25236,7 @@ function OhwBrandMark() {
|
|
|
25115
25236
|
style: { display: "block", flexShrink: 0 },
|
|
25116
25237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25117
25238
|
children: [
|
|
25118
|
-
/* @__PURE__ */ (0,
|
|
25239
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
25119
25240
|
"mask",
|
|
25120
25241
|
{
|
|
25121
25242
|
id: "ohw-badge-mark",
|
|
@@ -25125,15 +25246,15 @@ function OhwBrandMark() {
|
|
|
25125
25246
|
y: "0",
|
|
25126
25247
|
width: "48",
|
|
25127
25248
|
height: "48",
|
|
25128
|
-
children: /* @__PURE__ */ (0,
|
|
25249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M23.8741 48C37.0594 48 47.7481 37.2548 47.7481 24C47.7481 10.7452 37.0594 0 23.8741 0C10.6888 0 0 10.7452 0 24C0 37.2548 10.6888 48 23.8741 48Z", fill: "white" })
|
|
25129
25250
|
}
|
|
25130
25251
|
),
|
|
25131
|
-
/* @__PURE__ */ (0,
|
|
25132
|
-
/* @__PURE__ */ (0,
|
|
25133
|
-
/* @__PURE__ */ (0,
|
|
25134
|
-
/* @__PURE__ */ (0,
|
|
25135
|
-
/* @__PURE__ */ (0,
|
|
25136
|
-
/* @__PURE__ */ (0,
|
|
25252
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
|
|
25253
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M23.8731 48.0497C37.0584 48.0497 47.7472 37.3046 47.7472 24.0497C47.7472 10.7949 37.0584 0.0497208 23.8731 0.0497208C10.6878 0.0497208 -0.000976562 10.7949 -0.000976562 24.0497C-0.000976562 37.3046 10.6878 48.0497 23.8731 48.0497Z", fill: "#0078E5" }),
|
|
25254
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M17.1307 14.7172C13.1687 14.7172 9.38102 18.1154 8.65114 22.34C8.38885 23.8488 8.5598 25.2581 9.06929 26.4451C6.20005 29.1677 1.77216 27.8721 -1.40212 26.1536C-2.73618 25.4317 -3.92695 27.4745 -2.59037 28.1981C1.33389 30.3226 6.86037 31.6621 10.4402 28.4188C11.4718 29.3859 12.867 29.9621 14.4894 29.9621C18.4161 29.9621 22.2038 26.5318 22.9337 22.34C23.6636 18.1162 21.0566 14.7172 17.1298 14.7172H17.1307ZM19.9798 22.34C19.5281 25.0399 17.2689 27.231 14.9754 27.231C12.6466 27.231 11.1877 25.0399 11.6394 22.34C12.1262 19.6401 14.3151 17.4482 16.6438 17.4482C18.9374 17.4482 20.4667 19.6401 19.9798 22.34Z", fill: "white" }),
|
|
25255
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M40.0017 27.0262C39.1797 27.081 38.2721 26.995 37.4668 26.7415C37.3344 26.6993 37.28 26.5401 37.3529 26.4205C37.5959 26.0212 37.8255 25.6152 38.009 25.1889C38.1071 24.9918 38.2018 24.793 38.2897 24.5908C38.3274 24.5041 38.4163 24.451 38.5101 24.4619C38.63 24.4754 38.7054 24.4821 38.8881 24.4821L39.1529 24.4796L39.8283 24.4543C45.9229 24.0492 50.4765 20.4319 54.8466 16.9014C56.0172 15.9554 57.6932 17.6208 56.5116 18.5752C51.7687 22.4065 47.1966 26.5081 40.9319 26.9689", fill: "white" }),
|
|
25256
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M37.9687 24.27C38.4472 23.1319 38.7656 21.9045 38.9609 20.6991C39.5927 16.76 38.5058 14.2193 36.1553 14.2193C34.1835 14.2193 33.1469 17.2427 32.9199 18.8694C32.743 19.9872 32.5914 22.1219 33.6028 23.9524C33.7553 24.259 34.15 24.7712 34.471 25.1259C34.5447 25.2067 34.6746 25.2 34.7349 25.1082C34.9528 24.7788 35.1615 24.4039 35.3584 24.0257C35.5444 23.6677 35.5888 23.6138 35.8587 23.0207C35.8838 22.966 35.8813 22.9002 35.8478 22.8505C35.5888 22.4597 35.2168 21.9787 35.1204 21.4614C34.9184 20.4455 34.9436 19.2257 35.2218 18.1078C35.4413 17.3118 35.7195 16.7844 35.9039 16.5106C35.9466 16.4466 36.0279 16.4129 36.0975 16.4449C36.369 16.5671 36.5827 16.8838 36.7385 17.396C37.0167 18.2089 37.0167 19.3782 36.814 20.6999C36.6991 21.5271 36.4771 22.3729 36.1746 23.1673C36.1293 23.308 36.0757 23.4461 36.0187 23.5826C36.0187 23.5868 36.0187 23.591 36.0187 23.5961C35.9911 23.6946 35.9207 23.8067 35.8846 23.901C35.5536 24.5497 35.2344 25.1697 34.8439 25.7838C34.8388 25.7863 34.8346 25.7914 34.8296 25.7931C34.6528 26.0525 34.4718 26.2901 34.2866 26.4965C34.2774 26.5099 34.2682 26.5234 34.2589 26.5369C34.2405 26.5638 34.2179 26.5815 34.1944 26.595C33.5064 27.3212 32.7665 27.6893 32.0123 27.6893C31.8606 27.6893 31.6838 27.664 31.507 27.4349C31.3042 27.1299 30.85 26.0879 31.2539 22.9112C31.4785 21.3949 31.8011 20.0268 31.931 19.5408C31.9579 19.4413 31.8908 19.3419 31.7886 19.3293L30.0062 19.1162C29.9241 19.1061 29.8478 19.1566 29.8252 19.2366C29.2704 21.1615 27.0305 27.6885 24.9599 27.6885C24.328 27.6885 24.1512 26.6211 24.1001 26.2909C23.775 23.6264 25.528 18.5492 29.5302 16.2267C29.6048 16.1838 29.635 16.0928 29.5998 16.0136L28.9042 14.467C28.8632 14.3752 28.7501 14.3389 28.6638 14.3886C25.8079 16.0414 24.1847 18.5231 23.2915 20.3436C22.2046 22.5793 21.6993 25.0189 21.9515 26.8738C22.1795 28.7794 23.1398 29.872 24.6054 29.872C26.0543 29.872 27.4369 28.9066 28.7098 27.0187C28.7953 26.8915 28.9889 26.9311 29.0149 27.0819C29.2646 28.5283 29.9811 29.872 31.6579 29.872C33.5282 29.872 35.3232 28.7288 36.7134 26.6447C36.7712 26.5874 36.7972 26.5411 36.8181 26.4906C36.8232 26.4931 36.8282 26.4948 36.8332 26.4973C37.01 26.2025 37.181 25.9051 37.3444 25.6027C37.4508 25.4005 37.5572 25.1992 37.6586 24.9945C37.7181 24.874 37.7743 24.7527 37.8262 24.6289C37.838 24.6002 37.8547 24.5665 37.8706 24.5337", fill: "white" }),
|
|
25257
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d: "M30.5839 31.6397C25.7546 34.8577 19.4773 34.7853 14.6907 31.5243C13.5368 30.7384 12.5044 32.6498 13.6474 33.4281C19.034 37.0985 26.3077 37.096 31.7218 33.488C32.8791 32.7172 31.7478 30.8639 30.5839 31.6397Z", fill: "white" })
|
|
25137
25258
|
] })
|
|
25138
25259
|
]
|
|
25139
25260
|
}
|
|
@@ -25170,7 +25291,7 @@ var OHW_BADGE_LABEL_STYLE = {
|
|
|
25170
25291
|
whiteSpace: "nowrap"
|
|
25171
25292
|
};
|
|
25172
25293
|
function MadeWithOhhWells() {
|
|
25173
|
-
return /* @__PURE__ */ (0,
|
|
25294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
25174
25295
|
"a",
|
|
25175
25296
|
{
|
|
25176
25297
|
href: "https://ohhwells.com",
|
|
@@ -25180,13 +25301,12 @@ function MadeWithOhhWells() {
|
|
|
25180
25301
|
"data-ohw-badge": "",
|
|
25181
25302
|
style: OHW_BADGE_STYLE,
|
|
25182
25303
|
children: [
|
|
25183
|
-
/* @__PURE__ */ (0,
|
|
25184
|
-
/* @__PURE__ */ (0,
|
|
25304
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OhwBrandMark, {}),
|
|
25305
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { style: OHW_BADGE_LABEL_STYLE, children: "Made with OhhWells" })
|
|
25185
25306
|
]
|
|
25186
25307
|
}
|
|
25187
25308
|
);
|
|
25188
25309
|
}
|
|
25189
|
-
var OHW_LOADER_PREHYDRATE_SCRIPT = `(function(){try{var fromGlobal=typeof window!=="undefined"&&window.__OHW_SUBDOMAIN__?String(window.__OHW_SUBDOMAIN__):"";var p=location.hostname.split(".");var fromHost=location.hostname.endsWith(".ohhwells.site")&&p[0]&&p[0]!=="www"?p[0]:"";var fromQuery=new URLSearchParams(location.search).get("subdomain")||"";var fromCookie=(document.cookie.match(/(?:^|; )ohw-subdomain=([^;]*)/)||[])[1];fromCookie=fromCookie?decodeURIComponent(fromCookie):"";if(!fromGlobal&&!fromHost&&!fromQuery&&!fromCookie)return;var e=document.getElementById("ohw-loader");if(e)e.style.display="flex"}catch(e){}})();`;
|
|
25190
25310
|
function subdomainFromCookie() {
|
|
25191
25311
|
if (typeof document === "undefined") return "";
|
|
25192
25312
|
const match = document.cookie.match(/(?:^|; )ohw-subdomain=([^;]*)/);
|
|
@@ -27547,6 +27667,7 @@ function OhhwellsBridge() {
|
|
|
27547
27667
|
const branding = Boolean(data?.showBranding);
|
|
27548
27668
|
contentCache.set(subdomain, content);
|
|
27549
27669
|
brandingCache.set(subdomain, branding);
|
|
27670
|
+
recordOverriddenPaths(subdomain, data?.overriddenPaths);
|
|
27550
27671
|
setShowBranding(branding);
|
|
27551
27672
|
return applyContent(content);
|
|
27552
27673
|
}).catch(() => {
|
|
@@ -27745,7 +27866,7 @@ function OhhwellsBridge() {
|
|
|
27745
27866
|
};
|
|
27746
27867
|
applyFromCache();
|
|
27747
27868
|
const pathCacheKey = `${subdomain}::${pathname}`;
|
|
27748
|
-
if (!fetchedContentPaths.has(pathCacheKey)) {
|
|
27869
|
+
if (!fetchedContentPaths.has(pathCacheKey) && shouldFetchContentForPath(subdomain, pathname)) {
|
|
27749
27870
|
fetchedContentPaths.add(pathCacheKey);
|
|
27750
27871
|
const apiUrl = process.env.NEXT_PUBLIC_FLOWOPS_API_URL ?? "https://flowops-backend-staging-2yfdh7pwpq-as.a.run.app";
|
|
27751
27872
|
fetch(`${apiUrl}/api/public/sites/${subdomain}/content?path=${encodeURIComponent(pathname)}`, { cache: "no-store" }).then((r2) => r2.ok ? r2.json() : null).then((data) => {
|
|
@@ -27755,7 +27876,17 @@ function OhhwellsBridge() {
|
|
|
27755
27876
|
}).catch(() => {
|
|
27756
27877
|
});
|
|
27757
27878
|
}
|
|
27758
|
-
observer = new MutationObserver(
|
|
27879
|
+
observer = new MutationObserver((records) => {
|
|
27880
|
+
if (hasMountedContentNodes(records)) {
|
|
27881
|
+
if (debounceTimer) {
|
|
27882
|
+
clearTimeout(debounceTimer);
|
|
27883
|
+
debounceTimer = null;
|
|
27884
|
+
}
|
|
27885
|
+
applyFromCache();
|
|
27886
|
+
return;
|
|
27887
|
+
}
|
|
27888
|
+
scheduleApply();
|
|
27889
|
+
});
|
|
27759
27890
|
observer.observe(document.body, { childList: true, subtree: true });
|
|
27760
27891
|
return () => {
|
|
27761
27892
|
observer?.disconnect();
|
|
@@ -27969,21 +28100,19 @@ function OhhwellsBridge() {
|
|
|
27969
28100
|
};
|
|
27970
28101
|
}, [pathname, isEditMode, postToParent2]);
|
|
27971
28102
|
(0, import_react21.useEffect)(() => {
|
|
27972
|
-
if (
|
|
28103
|
+
if (isEditMode) return;
|
|
27973
28104
|
const handleClick = (e) => {
|
|
28105
|
+
if (!isPlainLeftClick(e)) return;
|
|
27974
28106
|
const anchor = e.target.closest("a");
|
|
27975
|
-
if (!anchor
|
|
27976
|
-
const
|
|
27977
|
-
if (!
|
|
27978
|
-
const url = new URL(href, window.location.origin);
|
|
27979
|
-
if (url.searchParams.has("subdomain")) return;
|
|
28107
|
+
if (!anchor) return;
|
|
28108
|
+
const next = resolveStickyNavigation(anchor, window.location.search, window.location.origin);
|
|
28109
|
+
if (!next) return;
|
|
27980
28110
|
e.preventDefault();
|
|
27981
|
-
|
|
27982
|
-
router.push(url.pathname + url.search);
|
|
28111
|
+
router.push(next);
|
|
27983
28112
|
};
|
|
27984
28113
|
document.addEventListener("click", handleClick, true);
|
|
27985
28114
|
return () => document.removeEventListener("click", handleClick, true);
|
|
27986
|
-
}, [
|
|
28115
|
+
}, [isEditMode, router, pathname]);
|
|
27987
28116
|
(0, import_react21.useEffect)(() => {
|
|
27988
28117
|
if (!isEditMode) {
|
|
27989
28118
|
editStylesRef.current?.base.remove();
|
|
@@ -31702,7 +31831,7 @@ function OhhwellsBridge() {
|
|
|
31702
31831
|
postToParent2({
|
|
31703
31832
|
type: "ow:ready",
|
|
31704
31833
|
version: "1",
|
|
31705
|
-
bridgeVersion: "0.1.
|
|
31834
|
+
bridgeVersion: "0.1.152",
|
|
31706
31835
|
path: pathname,
|
|
31707
31836
|
nodes: collectEditableNodes(editContentRef.current),
|
|
31708
31837
|
sections
|
|
@@ -32239,14 +32368,13 @@ function OhhwellsBridge() {
|
|
|
32239
32368
|
},
|
|
32240
32369
|
[postToParent2]
|
|
32241
32370
|
);
|
|
32242
|
-
return /* @__PURE__ */ (0,
|
|
32243
|
-
/* @__PURE__ */ (0,
|
|
32244
|
-
/* @__PURE__ */ (0,
|
|
32245
|
-
subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MadeWithOhhWells, {}),
|
|
32371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
32372
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OhwLoaderSurface, {}),
|
|
32373
|
+
subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MadeWithOhhWells, {}),
|
|
32246
32374
|
bridgeRoot ? (0, import_react_dom6.createPortal)(
|
|
32247
|
-
/* @__PURE__ */ (0,
|
|
32248
|
-
/* @__PURE__ */ (0,
|
|
32249
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
32375
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
32376
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
|
|
32377
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32250
32378
|
AiSectionOverlay,
|
|
32251
32379
|
{
|
|
32252
32380
|
postToParent: postToParent2,
|
|
@@ -32254,7 +32382,7 @@ function OhhwellsBridge() {
|
|
|
32254
32382
|
onSelectionChange: handleAiSectionSelectionChange
|
|
32255
32383
|
}
|
|
32256
32384
|
),
|
|
32257
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
32385
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32258
32386
|
AiMediaStripOverlay,
|
|
32259
32387
|
{
|
|
32260
32388
|
postToParent: postToParent2,
|
|
@@ -32263,7 +32391,7 @@ function OhhwellsBridge() {
|
|
|
32263
32391
|
clearInteractionChromeRef
|
|
32264
32392
|
}
|
|
32265
32393
|
),
|
|
32266
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
32394
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32267
32395
|
AiPricingCardOverlay,
|
|
32268
32396
|
{
|
|
32269
32397
|
postToParent: postToParent2,
|
|
@@ -32271,7 +32399,7 @@ function OhhwellsBridge() {
|
|
|
32271
32399
|
applyTreeLocalRef
|
|
32272
32400
|
}
|
|
32273
32401
|
),
|
|
32274
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
32402
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32275
32403
|
AiVideoOverlay,
|
|
32276
32404
|
{
|
|
32277
32405
|
postToParent: postToParent2,
|
|
@@ -32280,7 +32408,7 @@ function OhhwellsBridge() {
|
|
|
32280
32408
|
clearInteractionChromeRef
|
|
32281
32409
|
}
|
|
32282
32410
|
),
|
|
32283
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
32411
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32284
32412
|
AiFadeCarouselOverlay,
|
|
32285
32413
|
{
|
|
32286
32414
|
postToParent: postToParent2,
|
|
@@ -32289,12 +32417,12 @@ function OhhwellsBridge() {
|
|
|
32289
32417
|
clearInteractionChromeRef
|
|
32290
32418
|
}
|
|
32291
32419
|
),
|
|
32292
|
-
isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
32420
|
+
isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32293
32421
|
"div",
|
|
32294
32422
|
{
|
|
32295
32423
|
className: "pointer-events-none fixed z-2147483646",
|
|
32296
32424
|
style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
|
|
32297
|
-
children: /* @__PURE__ */ (0,
|
|
32425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32298
32426
|
DropIndicator,
|
|
32299
32427
|
{
|
|
32300
32428
|
direction: "horizontal",
|
|
@@ -32305,7 +32433,7 @@ function OhhwellsBridge() {
|
|
|
32305
32433
|
},
|
|
32306
32434
|
`section-drop-${slot.insertIndex}-${i}`
|
|
32307
32435
|
)),
|
|
32308
|
-
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0,
|
|
32436
|
+
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32309
32437
|
MediaOverlay,
|
|
32310
32438
|
{
|
|
32311
32439
|
hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
|
|
@@ -32316,7 +32444,7 @@ function OhhwellsBridge() {
|
|
|
32316
32444
|
},
|
|
32317
32445
|
`uploading-${key}`
|
|
32318
32446
|
)),
|
|
32319
|
-
mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0,
|
|
32447
|
+
mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32320
32448
|
MediaOverlay,
|
|
32321
32449
|
{
|
|
32322
32450
|
hover: mediaHover,
|
|
@@ -32327,7 +32455,7 @@ function OhhwellsBridge() {
|
|
|
32327
32455
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
32328
32456
|
}
|
|
32329
32457
|
),
|
|
32330
|
-
selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0,
|
|
32458
|
+
selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32331
32459
|
MediaOverlay,
|
|
32332
32460
|
{
|
|
32333
32461
|
hover: selectedMedia,
|
|
@@ -32339,7 +32467,7 @@ function OhhwellsBridge() {
|
|
|
32339
32467
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
32340
32468
|
}
|
|
32341
32469
|
),
|
|
32342
|
-
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
32470
|
+
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32343
32471
|
CarouselOverlay,
|
|
32344
32472
|
{
|
|
32345
32473
|
hover: carouselHover,
|
|
@@ -32347,10 +32475,10 @@ function OhhwellsBridge() {
|
|
|
32347
32475
|
cueOnly: !!carouselHover.fullBleedSectionId && carouselHover.fullBleedSectionId !== selectedAiSectionId
|
|
32348
32476
|
}
|
|
32349
32477
|
),
|
|
32350
|
-
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0,
|
|
32351
|
-
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0,
|
|
32352
|
-
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && selectedElRef.current !== buttonCollectionDragRef.current && /* @__PURE__ */ (0,
|
|
32353
|
-
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
32478
|
+
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
|
|
32479
|
+
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
|
|
32480
|
+
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && selectedElRef.current !== buttonCollectionDragRef.current && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
|
|
32481
|
+
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32354
32482
|
"div",
|
|
32355
32483
|
{
|
|
32356
32484
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -32360,7 +32488,7 @@ function OhhwellsBridge() {
|
|
|
32360
32488
|
width: slot.width,
|
|
32361
32489
|
height: slot.height
|
|
32362
32490
|
},
|
|
32363
|
-
children: /* @__PURE__ */ (0,
|
|
32491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32364
32492
|
DropIndicator,
|
|
32365
32493
|
{
|
|
32366
32494
|
direction: slot.direction,
|
|
@@ -32371,7 +32499,7 @@ function OhhwellsBridge() {
|
|
|
32371
32499
|
},
|
|
32372
32500
|
`footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
|
|
32373
32501
|
)),
|
|
32374
|
-
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
32502
|
+
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32375
32503
|
"div",
|
|
32376
32504
|
{
|
|
32377
32505
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -32381,7 +32509,7 @@ function OhhwellsBridge() {
|
|
|
32381
32509
|
width: slot.width,
|
|
32382
32510
|
height: slot.height
|
|
32383
32511
|
},
|
|
32384
|
-
children: /* @__PURE__ */ (0,
|
|
32512
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32385
32513
|
DropIndicator,
|
|
32386
32514
|
{
|
|
32387
32515
|
direction: slot.direction,
|
|
@@ -32392,7 +32520,7 @@ function OhhwellsBridge() {
|
|
|
32392
32520
|
},
|
|
32393
32521
|
`nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
|
|
32394
32522
|
)),
|
|
32395
|
-
isItemDragging && buttonDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
32523
|
+
isItemDragging && buttonDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32396
32524
|
"div",
|
|
32397
32525
|
{
|
|
32398
32526
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -32402,7 +32530,7 @@ function OhhwellsBridge() {
|
|
|
32402
32530
|
width: slot.width,
|
|
32403
32531
|
height: slot.height
|
|
32404
32532
|
},
|
|
32405
|
-
children: /* @__PURE__ */ (0,
|
|
32533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32406
32534
|
DropIndicator,
|
|
32407
32535
|
{
|
|
32408
32536
|
direction: slot.direction,
|
|
@@ -32413,10 +32541,10 @@ function OhhwellsBridge() {
|
|
|
32413
32541
|
},
|
|
32414
32542
|
`button-drop-${slot.direction}-${slot.insertIndex}-${i}`
|
|
32415
32543
|
)),
|
|
32416
|
-
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
32417
|
-
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0,
|
|
32418
|
-
hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0,
|
|
32419
|
-
formPickRect && !isItemDragging && /* @__PURE__ */ (0,
|
|
32544
|
+
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
32545
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
32546
|
+
hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
|
|
32547
|
+
formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32420
32548
|
ItemInteractionLayer,
|
|
32421
32549
|
{
|
|
32422
32550
|
rect: formPickRect,
|
|
@@ -32424,13 +32552,13 @@ function OhhwellsBridge() {
|
|
|
32424
32552
|
itemDragSurface: false,
|
|
32425
32553
|
toolbarAlign: "left",
|
|
32426
32554
|
chromeGap: 24,
|
|
32427
|
-
toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0,
|
|
32555
|
+
toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
32428
32556
|
"div",
|
|
32429
32557
|
{
|
|
32430
32558
|
"data-ohw-form-toolbar": "",
|
|
32431
32559
|
className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
|
|
32432
32560
|
children: [
|
|
32433
|
-
/* @__PURE__ */ (0,
|
|
32561
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32434
32562
|
"button",
|
|
32435
32563
|
{
|
|
32436
32564
|
type: "button",
|
|
@@ -32438,11 +32566,11 @@ function OhhwellsBridge() {
|
|
|
32438
32566
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
|
|
32439
32567
|
onClick: () => setFieldTypePickerOpen((open) => !open),
|
|
32440
32568
|
"data-ohw-add-field": "",
|
|
32441
|
-
children: /* @__PURE__ */ (0,
|
|
32569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Plus, { size: 15, "aria-hidden": true })
|
|
32442
32570
|
}
|
|
32443
32571
|
),
|
|
32444
|
-
/* @__PURE__ */ (0,
|
|
32445
|
-
/* @__PURE__ */ (0,
|
|
32572
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
32573
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
32446
32574
|
"button",
|
|
32447
32575
|
{
|
|
32448
32576
|
type: "button",
|
|
@@ -32458,11 +32586,11 @@ function OhhwellsBridge() {
|
|
|
32458
32586
|
});
|
|
32459
32587
|
},
|
|
32460
32588
|
children: [
|
|
32461
|
-
/* @__PURE__ */ (0,
|
|
32589
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Settings, { size: 14, "aria-hidden": true }),
|
|
32462
32590
|
"Form settings",
|
|
32463
32591
|
formPickCount ? (
|
|
32464
32592
|
// Counter pill, per the design — not a text suffix.
|
|
32465
|
-
/* @__PURE__ */ (0,
|
|
32593
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32466
32594
|
"span",
|
|
32467
32595
|
{
|
|
32468
32596
|
"data-ohw-form-count": "",
|
|
@@ -32474,8 +32602,8 @@ function OhhwellsBridge() {
|
|
|
32474
32602
|
]
|
|
32475
32603
|
}
|
|
32476
32604
|
),
|
|
32477
|
-
/* @__PURE__ */ (0,
|
|
32478
|
-
/* @__PURE__ */ (0,
|
|
32605
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
32606
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32479
32607
|
"button",
|
|
32480
32608
|
{
|
|
32481
32609
|
type: "button",
|
|
@@ -32506,7 +32634,7 @@ function OhhwellsBridge() {
|
|
|
32506
32634
|
)
|
|
32507
32635
|
}
|
|
32508
32636
|
),
|
|
32509
|
-
formHoverRect && !isItemDragging && /* @__PURE__ */ (0,
|
|
32637
|
+
formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32510
32638
|
ItemInteractionLayer,
|
|
32511
32639
|
{
|
|
32512
32640
|
rect: formHoverRect,
|
|
@@ -32514,7 +32642,7 @@ function OhhwellsBridge() {
|
|
|
32514
32642
|
chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
|
|
32515
32643
|
}
|
|
32516
32644
|
),
|
|
32517
|
-
fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0,
|
|
32645
|
+
fieldPickRect && fieldPickState && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32518
32646
|
ItemInteractionLayer,
|
|
32519
32647
|
{
|
|
32520
32648
|
rect: fieldPickRect,
|
|
@@ -32526,7 +32654,7 @@ function OhhwellsBridge() {
|
|
|
32526
32654
|
dragHandleLabel: "Reorder field",
|
|
32527
32655
|
onDragHandleDragStart: handleFieldDragStart,
|
|
32528
32656
|
onDragHandleDragEnd: handleFieldDragEnd,
|
|
32529
|
-
toolbar: /* @__PURE__ */ (0,
|
|
32657
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32530
32658
|
FormFieldToolbar,
|
|
32531
32659
|
{
|
|
32532
32660
|
type: fieldPickState.type,
|
|
@@ -32539,12 +32667,12 @@ function OhhwellsBridge() {
|
|
|
32539
32667
|
)
|
|
32540
32668
|
}
|
|
32541
32669
|
),
|
|
32542
|
-
fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
32670
|
+
fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32543
32671
|
"div",
|
|
32544
32672
|
{
|
|
32545
32673
|
className: "pointer-events-none fixed z-[2147483644]",
|
|
32546
32674
|
style: { top: slot.top, left: slot.left, width: slot.width },
|
|
32547
|
-
children: /* @__PURE__ */ (0,
|
|
32675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32548
32676
|
DropIndicator,
|
|
32549
32677
|
{
|
|
32550
32678
|
direction: "horizontal",
|
|
@@ -32557,7 +32685,7 @@ function OhhwellsBridge() {
|
|
|
32557
32685
|
)) : null,
|
|
32558
32686
|
fieldTypePickerOpen && formPickRect ? (() => {
|
|
32559
32687
|
const toolbar = document.querySelector("[data-ohw-form-toolbar]")?.getBoundingClientRect();
|
|
32560
|
-
return /* @__PURE__ */ (0,
|
|
32688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32561
32689
|
"div",
|
|
32562
32690
|
{
|
|
32563
32691
|
className: "pointer-events-none fixed z-[2147483645]",
|
|
@@ -32565,12 +32693,12 @@ function OhhwellsBridge() {
|
|
|
32565
32693
|
top: toolbar ? toolbar.bottom + 6 : formPickRect.top + 16,
|
|
32566
32694
|
left: toolbar ? toolbar.left : formPickRect.left + 24
|
|
32567
32695
|
},
|
|
32568
|
-
children: /* @__PURE__ */ (0,
|
|
32696
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FieldTypePicker, { onPick: handleAddField })
|
|
32569
32697
|
}
|
|
32570
32698
|
);
|
|
32571
32699
|
})() : null,
|
|
32572
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
32573
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
32700
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
32701
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32574
32702
|
FooterContainerChrome,
|
|
32575
32703
|
{
|
|
32576
32704
|
rect: toolbarRect,
|
|
@@ -32578,7 +32706,7 @@ function OhhwellsBridge() {
|
|
|
32578
32706
|
addDisabled: !canAddFooterColumn()
|
|
32579
32707
|
}
|
|
32580
32708
|
),
|
|
32581
|
-
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0,
|
|
32709
|
+
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32582
32710
|
ItemInteractionLayer,
|
|
32583
32711
|
{
|
|
32584
32712
|
rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected || selectedElRef.current === buttonCollectionDragRef.current) ? draggedItemRect : toolbarRect,
|
|
@@ -32598,7 +32726,7 @@ function OhhwellsBridge() {
|
|
|
32598
32726
|
onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
|
|
32599
32727
|
onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
|
|
32600
32728
|
itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection && !selectedIsSocialsRow,
|
|
32601
|
-
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0,
|
|
32729
|
+
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32602
32730
|
ItemActionToolbar,
|
|
32603
32731
|
{
|
|
32604
32732
|
onEditLink: openLinkPopoverForSelected,
|
|
@@ -32649,8 +32777,8 @@ function OhhwellsBridge() {
|
|
|
32649
32777
|
) : void 0
|
|
32650
32778
|
}
|
|
32651
32779
|
),
|
|
32652
|
-
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0,
|
|
32653
|
-
/* @__PURE__ */ (0,
|
|
32780
|
+
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
32781
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32654
32782
|
EditGlowChrome,
|
|
32655
32783
|
{
|
|
32656
32784
|
rect: toolbarRect,
|
|
@@ -32660,7 +32788,7 @@ function OhhwellsBridge() {
|
|
|
32660
32788
|
hideHandle: isItemDragging
|
|
32661
32789
|
}
|
|
32662
32790
|
),
|
|
32663
|
-
/* @__PURE__ */ (0,
|
|
32791
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32664
32792
|
FloatingToolbar,
|
|
32665
32793
|
{
|
|
32666
32794
|
rect: toolbarRect,
|
|
@@ -32673,7 +32801,7 @@ function OhhwellsBridge() {
|
|
|
32673
32801
|
}
|
|
32674
32802
|
)
|
|
32675
32803
|
] }),
|
|
32676
|
-
maxBadge && /* @__PURE__ */ (0,
|
|
32804
|
+
maxBadge && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
32677
32805
|
"div",
|
|
32678
32806
|
{
|
|
32679
32807
|
"data-ohw-max-badge": "",
|
|
@@ -32699,7 +32827,7 @@ function OhhwellsBridge() {
|
|
|
32699
32827
|
]
|
|
32700
32828
|
}
|
|
32701
32829
|
),
|
|
32702
|
-
toggleState && !linkPopover && /* @__PURE__ */ (0,
|
|
32830
|
+
toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32703
32831
|
StateToggle,
|
|
32704
32832
|
{
|
|
32705
32833
|
rect: toggleState.rect,
|
|
@@ -32708,15 +32836,15 @@ function OhhwellsBridge() {
|
|
|
32708
32836
|
onStateChange: handleStateChange
|
|
32709
32837
|
}
|
|
32710
32838
|
),
|
|
32711
|
-
sectionGap && !linkPopover && /* @__PURE__ */ (0,
|
|
32839
|
+
sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
32712
32840
|
"div",
|
|
32713
32841
|
{
|
|
32714
32842
|
"data-ohw-section-insert-line": "",
|
|
32715
32843
|
className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
|
|
32716
32844
|
style: { top: sectionGap.y, transform: "translateY(-50%)" },
|
|
32717
32845
|
children: [
|
|
32718
|
-
/* @__PURE__ */ (0,
|
|
32719
|
-
/* @__PURE__ */ (0,
|
|
32846
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
|
|
32847
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32720
32848
|
Badge,
|
|
32721
32849
|
{
|
|
32722
32850
|
className: "px-8 py-1 bg-bridge-primary hover:bg-bridge-primary text-primary-foreground text-xs font-medium shrink-0 rounded-full cursor-pointer pointer-events-auto",
|
|
@@ -32733,11 +32861,11 @@ function OhhwellsBridge() {
|
|
|
32733
32861
|
children: "Add Section"
|
|
32734
32862
|
}
|
|
32735
32863
|
),
|
|
32736
|
-
/* @__PURE__ */ (0,
|
|
32864
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } })
|
|
32737
32865
|
]
|
|
32738
32866
|
}
|
|
32739
32867
|
),
|
|
32740
|
-
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0,
|
|
32868
|
+
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32741
32869
|
LinkPopover,
|
|
32742
32870
|
{
|
|
32743
32871
|
panelRef: linkPopoverPanelRef,
|
|
@@ -32754,7 +32882,7 @@ function OhhwellsBridge() {
|
|
|
32754
32882
|
},
|
|
32755
32883
|
linkPopover.key
|
|
32756
32884
|
) : null,
|
|
32757
|
-
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0,
|
|
32885
|
+
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32758
32886
|
FloatingPanel,
|
|
32759
32887
|
{
|
|
32760
32888
|
open: true,
|
|
@@ -32764,7 +32892,7 @@ function OhhwellsBridge() {
|
|
|
32764
32892
|
onPositionChange: setFloatingPanelPos,
|
|
32765
32893
|
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
32766
32894
|
onClose: closeFloatingPanelOnly,
|
|
32767
|
-
children: /* @__PURE__ */ (0,
|
|
32895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32768
32896
|
SocialsDisplayPanel,
|
|
32769
32897
|
{
|
|
32770
32898
|
display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
|
|
@@ -32785,19 +32913,19 @@ function OhhwellsBridge() {
|
|
|
32785
32913
|
const tokens = tokensFromButton(button);
|
|
32786
32914
|
const current = assignmentFor(button, editContentRef.current, tokens);
|
|
32787
32915
|
void buttonStyleTick;
|
|
32788
|
-
return /* @__PURE__ */ (0,
|
|
32916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32789
32917
|
FloatingPanel,
|
|
32790
32918
|
{
|
|
32791
32919
|
open: true,
|
|
32792
32920
|
title: floatingPanel.title,
|
|
32793
32921
|
context: floatingPanel.context,
|
|
32794
|
-
icon: /* @__PURE__ */ (0,
|
|
32922
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Brush, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
32795
32923
|
position: floatingPanelPos,
|
|
32796
32924
|
onPositionChange: setFloatingPanelPos,
|
|
32797
32925
|
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
32798
32926
|
onClose: closeFloatingPanelOnly,
|
|
32799
32927
|
bodyClassName: "gap-5",
|
|
32800
|
-
children: /* @__PURE__ */ (0,
|
|
32928
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
32801
32929
|
ButtonStylePanel,
|
|
32802
32930
|
{
|
|
32803
32931
|
variants: tokens.variants,
|
|
@@ -32825,10 +32953,10 @@ function OhhwellsBridge() {
|
|
|
32825
32953
|
|
|
32826
32954
|
// src/ui/EmptySection.tsx
|
|
32827
32955
|
var import_link = __toESM(require("next/link"), 1);
|
|
32828
|
-
var
|
|
32956
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
32829
32957
|
function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
|
|
32830
|
-
return /* @__PURE__ */ (0,
|
|
32831
|
-
/* @__PURE__ */ (0,
|
|
32958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
32959
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
32832
32960
|
"p",
|
|
32833
32961
|
{
|
|
32834
32962
|
style: {
|
|
@@ -32840,10 +32968,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
32840
32968
|
color: "var(--brand-accent)",
|
|
32841
32969
|
marginBottom: "1.5rem"
|
|
32842
32970
|
},
|
|
32843
|
-
children: /* @__PURE__ */ (0,
|
|
32971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
|
|
32844
32972
|
}
|
|
32845
32973
|
),
|
|
32846
|
-
/* @__PURE__ */ (0,
|
|
32974
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
32847
32975
|
"h1",
|
|
32848
32976
|
{
|
|
32849
32977
|
style: {
|
|
@@ -32858,7 +32986,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
32858
32986
|
children: title
|
|
32859
32987
|
}
|
|
32860
32988
|
),
|
|
32861
|
-
/* @__PURE__ */ (0,
|
|
32989
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
32862
32990
|
"p",
|
|
32863
32991
|
{
|
|
32864
32992
|
style: {
|
|
@@ -32883,6 +33011,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
32883
33011
|
AI_TREE_TOKENS,
|
|
32884
33012
|
AiFooterRenderer,
|
|
32885
33013
|
AiTreeRenderer,
|
|
33014
|
+
BRAND_TITLE_KEY,
|
|
32886
33015
|
CustomToolbar,
|
|
32887
33016
|
CustomToolbarButton,
|
|
32888
33017
|
CustomToolbarDivider,
|
|
@@ -32902,7 +33031,12 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
32902
33031
|
ItemInteractionLayer,
|
|
32903
33032
|
LinkEditorPanel,
|
|
32904
33033
|
LinkPopover,
|
|
33034
|
+
OHW_LOADER_PREHYDRATE_SCRIPT,
|
|
33035
|
+
OHW_LOADER_STYLE,
|
|
32905
33036
|
OhhwellsBridge,
|
|
33037
|
+
OhwLoaderSpinner,
|
|
33038
|
+
OhwLoaderSurface,
|
|
33039
|
+
SITE_OG_IMAGE_KEY,
|
|
32906
33040
|
SchedulingWidget,
|
|
32907
33041
|
Toggle,
|
|
32908
33042
|
ToggleGroup,
|
|
@@ -32913,6 +33047,8 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
32913
33047
|
TooltipTrigger,
|
|
32914
33048
|
addFooterLinkColumn,
|
|
32915
33049
|
appendFooterSocial,
|
|
33050
|
+
applyBrandChrome,
|
|
33051
|
+
applyStickySearchParams,
|
|
32916
33052
|
buildDefaultFooterTree,
|
|
32917
33053
|
buildTarget,
|
|
32918
33054
|
dropIndicatorVariants,
|
|
@@ -32920,18 +33056,25 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
32920
33056
|
filterAvailablePages,
|
|
32921
33057
|
foldAlignIntoTrees,
|
|
32922
33058
|
getEditModeInitialState,
|
|
33059
|
+
hasMountedContentNodes,
|
|
32923
33060
|
insertFooterHours,
|
|
32924
33061
|
isEditSessionActive,
|
|
33062
|
+
isPlainLeftClick,
|
|
32925
33063
|
isRenderableFooterTree,
|
|
32926
33064
|
isRenderableTree,
|
|
33065
|
+
isStickySearchParam,
|
|
32927
33066
|
isValidUrl,
|
|
32928
33067
|
nextViableSlide,
|
|
32929
33068
|
parseAiFooterState,
|
|
32930
33069
|
parseAiSectionsState,
|
|
32931
33070
|
parseTarget,
|
|
33071
|
+
recordOverriddenPaths,
|
|
32932
33072
|
removeFooterBlock,
|
|
33073
|
+
resetOverriddenPathsCache,
|
|
32933
33074
|
resolveFooterCopyright,
|
|
33075
|
+
resolveStickyNavigation,
|
|
32934
33076
|
serializeAiFooterState,
|
|
33077
|
+
shouldFetchContentForPath,
|
|
32935
33078
|
stepViableSlide,
|
|
32936
33079
|
stripTextAlignCss,
|
|
32937
33080
|
toggleVariants,
|