@ohhwells/bridge 0.1.179-next.478 → 0.1.179-next.480
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 +987 -720
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +829 -567
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -56,6 +56,8 @@ __export(index_exports, {
|
|
|
56
56
|
HIDDEN_EDITABLES_KEY: () => HIDDEN_EDITABLES_KEY,
|
|
57
57
|
ItemActionToolbar: () => ItemActionToolbar,
|
|
58
58
|
ItemInteractionLayer: () => ItemInteractionLayer,
|
|
59
|
+
LAYOUT_PREVIEWS_REQUEST: () => LAYOUT_PREVIEWS_REQUEST,
|
|
60
|
+
LAYOUT_PREVIEW_REPLY: () => LAYOUT_PREVIEW_REPLY,
|
|
59
61
|
LOGO_ON_DARK_KEY: () => LOGO_ON_DARK_KEY,
|
|
60
62
|
LOGO_ON_LIGHT_KEY: () => LOGO_ON_LIGHT_KEY,
|
|
61
63
|
LOGO_PRIMARY_ATTR: () => LOGO_PRIMARY_ATTR,
|
|
@@ -92,6 +94,7 @@ __export(index_exports, {
|
|
|
92
94
|
blockPathFromEditKey: () => blockPathFromEditKey,
|
|
93
95
|
brandColorVars: () => brandColorVars,
|
|
94
96
|
buildDefaultFooterTree: () => buildDefaultFooterTree,
|
|
97
|
+
buildLayoutPreviewDoc: () => buildLayoutPreviewDoc,
|
|
95
98
|
buildTarget: () => buildTarget,
|
|
96
99
|
canRemoveAiBlock: () => canRemoveAiBlock,
|
|
97
100
|
canRemoveAiTextBlock: () => canRemoveAiTextBlock,
|
|
@@ -114,11 +117,13 @@ __export(index_exports, {
|
|
|
114
117
|
isDeadPageHref: () => isDeadPageHref,
|
|
115
118
|
isEditSessionActive: () => isEditSessionActive,
|
|
116
119
|
isEditableKeyHidden: () => isEditableKeyHidden,
|
|
120
|
+
isLayoutPreviewRequest: () => isLayoutPreviewRequest,
|
|
117
121
|
isPlainLeftClick: () => isPlainLeftClick,
|
|
118
122
|
isRenderableFooterTree: () => isRenderableFooterTree,
|
|
119
123
|
isRenderableTree: () => isRenderableTree,
|
|
120
124
|
isStickySearchParam: () => isStickySearchParam,
|
|
121
125
|
isValidUrl: () => isValidUrl,
|
|
126
|
+
layoutPreviewBackground: () => layoutPreviewBackground,
|
|
122
127
|
linearGradientColourAt: () => linearGradientColourAt,
|
|
123
128
|
logoVersionNodesFromMessage: () => logoVersionNodesFromMessage,
|
|
124
129
|
mapRegionToImage: () => mapRegionToImage,
|
|
@@ -171,8 +176,8 @@ module.exports = __toCommonJS(index_exports);
|
|
|
171
176
|
|
|
172
177
|
// src/OhhwellsBridge.tsx
|
|
173
178
|
var import_react27 = __toESM(require("react"), 1);
|
|
174
|
-
var
|
|
175
|
-
var
|
|
179
|
+
var import_client4 = require("react-dom/client");
|
|
180
|
+
var import_react_dom6 = require("react-dom");
|
|
176
181
|
|
|
177
182
|
// src/linkHrefStore.ts
|
|
178
183
|
var linkHrefStore = /* @__PURE__ */ new Map();
|
|
@@ -882,7 +887,7 @@ function loadImage(url, onSettled) {
|
|
|
882
887
|
img.crossOrigin = "anonymous";
|
|
883
888
|
img.decoding = "async";
|
|
884
889
|
let done = false;
|
|
885
|
-
const
|
|
890
|
+
const settle2 = (ok) => {
|
|
886
891
|
if (done) return;
|
|
887
892
|
done = true;
|
|
888
893
|
clearTimeout(timer);
|
|
@@ -890,9 +895,9 @@ function loadImage(url, onSettled) {
|
|
|
890
895
|
imageCache.set(url, ok ? { state: "ok", img } : { state: "fail" });
|
|
891
896
|
for (const waiter of entry.waiters) waiter();
|
|
892
897
|
};
|
|
893
|
-
const timer = setTimeout(() =>
|
|
894
|
-
img.onload = () =>
|
|
895
|
-
img.onerror = () =>
|
|
898
|
+
const timer = setTimeout(() => settle2(false), SAMPLE_TIMEOUT_MS);
|
|
899
|
+
img.onload = () => settle2(img.naturalWidth > 0);
|
|
900
|
+
img.onerror = () => settle2(false);
|
|
896
901
|
img.src = url;
|
|
897
902
|
return entry;
|
|
898
903
|
}
|
|
@@ -9997,6 +10002,8 @@ var AI_MOBILE_CSS = [
|
|
|
9997
10002
|
// layout decision this responsive shim has no business making.
|
|
9998
10003
|
"[data-ai-fill-height] [data-ai-row] > [data-ai-cell]:only-child{flex:1 1 auto;min-height:0}",
|
|
9999
10004
|
"[data-ai-grid]{grid-template-columns:1fr !important}",
|
|
10005
|
+
// Masonry keeps two staggered columns on phones (Section System 2 mobile frame).
|
|
10006
|
+
"[data-ai-masonry]{column-count:2 !important}",
|
|
10000
10007
|
// Group containers flatten to a column on phones; span placements come along for free.
|
|
10001
10008
|
// Excludes `overlap` (OHH-796): its whole point is stacking children on top of each other via
|
|
10002
10009
|
// CSS grid (`grid-area: 1 / 1` on every child) at every viewport width — flattening it to a
|
|
@@ -10438,6 +10445,8 @@ function ButtonEl({
|
|
|
10438
10445
|
style: {
|
|
10439
10446
|
display: fullWidth ? "flex" : "inline-flex",
|
|
10440
10447
|
width: fullWidth ? "100%" : void 0,
|
|
10448
|
+
// Padding inside the 100%, or a full-width CTA runs past its card's edge by its own padding.
|
|
10449
|
+
boxSizing: "border-box",
|
|
10441
10450
|
alignItems: "center",
|
|
10442
10451
|
justifyContent: "center",
|
|
10443
10452
|
textDecoration: "none",
|
|
@@ -10669,7 +10678,7 @@ function PricingCard({ node, ctx, path }) {
|
|
|
10669
10678
|
{
|
|
10670
10679
|
...ctx.keyFor ? { "data-ohw-key": ctx.keyFor(`${path}.featured.badge`), "data-ohw-editable": "plain" } : {},
|
|
10671
10680
|
style: {
|
|
10672
|
-
alignSelf: "flex-start",
|
|
10681
|
+
...horizontal ? { alignSelf: "flex-start" } : { position: "absolute", top: 0, left: "50%", transform: "translate(-50%, -50%)", zIndex: 1, whiteSpace: "nowrap" },
|
|
10673
10682
|
padding: `${AI_TREE_TOKENS.spacing2 / 2}px ${AI_TREE_TOKENS.spacing3}px`,
|
|
10674
10683
|
borderRadius: 999,
|
|
10675
10684
|
background: ctx.brand.palette.primary,
|
|
@@ -10842,6 +10851,58 @@ function TestimonialCard({ node, ctx, path }) {
|
|
|
10842
10851
|
const hasBg = slots.background === true;
|
|
10843
10852
|
const person = slots.person;
|
|
10844
10853
|
const avatarPos = avatarPosition(slots);
|
|
10854
|
+
if (slots.layout === "centered") {
|
|
10855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
10856
|
+
"div",
|
|
10857
|
+
{
|
|
10858
|
+
"data-ohw-card": "",
|
|
10859
|
+
style: {
|
|
10860
|
+
display: "flex",
|
|
10861
|
+
flexDirection: "column",
|
|
10862
|
+
alignItems: "center",
|
|
10863
|
+
gap: AI_TREE_TOKENS.spacing6,
|
|
10864
|
+
textAlign: "center",
|
|
10865
|
+
maxWidth: 720,
|
|
10866
|
+
margin: "0 auto",
|
|
10867
|
+
padding: hasBg ? AI_TREE_TOKENS.paddingBlock : 0,
|
|
10868
|
+
background: hasBg ? ctx.cardSurface : "transparent",
|
|
10869
|
+
borderRadius: hasBg ? cardRadius(slots) : 0,
|
|
10870
|
+
minWidth: 0,
|
|
10871
|
+
boxSizing: "border-box"
|
|
10872
|
+
},
|
|
10873
|
+
children: [
|
|
10874
|
+
typeof slots.rating === "number" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RatingEl, { value: slots.rating, ctx }),
|
|
10875
|
+
str(slots.quote) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10876
|
+
"div",
|
|
10877
|
+
{
|
|
10878
|
+
...textAttrs(ctx, `${path}.quote`),
|
|
10879
|
+
style: { ...typeStyle(AI_TREE_TOKENS.type.h2, ctx.brand.fonts.heading), color: ctx.brand.palette.dark },
|
|
10880
|
+
dangerouslySetInnerHTML: { __html: `"${str(slots.quote)}"` }
|
|
10881
|
+
}
|
|
10882
|
+
),
|
|
10883
|
+
person?.avatar && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AvatarDisc, { person, ctx, path, size: 72 }),
|
|
10884
|
+
person && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
10885
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10886
|
+
"div",
|
|
10887
|
+
{
|
|
10888
|
+
...textAttrs(ctx, `${path}.person.name`),
|
|
10889
|
+
style: { ...typeStyle(AI_TREE_TOKENS.type.bodyMBold, ctx.brand.fonts.body), color: ctx.brand.palette.dark },
|
|
10890
|
+
children: person.name
|
|
10891
|
+
}
|
|
10892
|
+
),
|
|
10893
|
+
person.role && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
10894
|
+
"div",
|
|
10895
|
+
{
|
|
10896
|
+
...textAttrs(ctx, `${path}.person.role`),
|
|
10897
|
+
style: { ...typeStyle(AI_TREE_TOKENS.type.bodyM, ctx.brand.fonts.body), color: ctx.brand.palette.accent },
|
|
10898
|
+
children: person.role
|
|
10899
|
+
}
|
|
10900
|
+
)
|
|
10901
|
+
] })
|
|
10902
|
+
]
|
|
10903
|
+
}
|
|
10904
|
+
);
|
|
10905
|
+
}
|
|
10845
10906
|
const content = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
10846
10907
|
"div",
|
|
10847
10908
|
{
|
|
@@ -10876,7 +10937,9 @@ function TestimonialCard({ node, ctx, path }) {
|
|
|
10876
10937
|
borderRadius: hasBg ? cardRadius(slots) : 0,
|
|
10877
10938
|
overflow: "hidden",
|
|
10878
10939
|
outline: slots.featured === true ? `2px solid ${ctx.brand.palette.primary}` : void 0,
|
|
10879
|
-
minWidth: 0
|
|
10940
|
+
minWidth: 0,
|
|
10941
|
+
// Same reason as TeamCard: copy lines up with the left-hand avatar.
|
|
10942
|
+
textAlign: "left"
|
|
10880
10943
|
},
|
|
10881
10944
|
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
10882
10945
|
"div",
|
|
@@ -10916,6 +10979,9 @@ function TeamCard({ node, ctx, path }) {
|
|
|
10916
10979
|
overflow: "hidden",
|
|
10917
10980
|
outline: slots.featured === true ? `2px solid ${ctx.brand.palette.primary}` : void 0,
|
|
10918
10981
|
minWidth: 0,
|
|
10982
|
+
// The avatar is a block at the left edge, so the copy under it must be left too, or a
|
|
10983
|
+
// centred section centres the name and role under a left-hand avatar.
|
|
10984
|
+
textAlign: "left",
|
|
10919
10985
|
display: avatarPos === "left" ? "flex" : "block",
|
|
10920
10986
|
alignItems: avatarPos === "left" ? "flex-start" : void 0
|
|
10921
10987
|
},
|
|
@@ -11359,31 +11425,34 @@ function Carousel({ items, itemsPerRow, ctx }) {
|
|
|
11359
11425
|
cursor: "pointer",
|
|
11360
11426
|
padding: 0
|
|
11361
11427
|
});
|
|
11362
|
-
const viewport =
|
|
11363
|
-
|
|
11364
|
-
{
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
"div",
|
|
11372
|
-
{
|
|
11373
|
-
"data-ai-grid": String(perPage),
|
|
11374
|
-
style: {
|
|
11375
|
-
flex: "0 0 100%",
|
|
11376
|
-
display: "grid",
|
|
11377
|
-
gridTemplateColumns: `repeat(${perPage}, 1fr)`,
|
|
11378
|
-
gap: AI_TREE_TOKENS.spacing8,
|
|
11379
|
-
alignItems: "start"
|
|
11380
|
-
},
|
|
11381
|
-
children: group
|
|
11428
|
+
const viewport = (
|
|
11429
|
+
// Clip sideways only: a featured pricing card's badge rides above the card's top edge.
|
|
11430
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { flex: isMobile ? "0 0 auto" : 1, minWidth: 0, width: "100%", overflowX: "clip", overflowY: "visible" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
11431
|
+
"div",
|
|
11432
|
+
{
|
|
11433
|
+
style: {
|
|
11434
|
+
display: "flex",
|
|
11435
|
+
transform: `translateX(-${current * 100}%)`,
|
|
11436
|
+
transition: "transform 0.4s ease"
|
|
11382
11437
|
},
|
|
11383
|
-
p
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11438
|
+
children: pageGroups.map((group, p) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
11439
|
+
"div",
|
|
11440
|
+
{
|
|
11441
|
+
"data-ai-grid": String(perPage),
|
|
11442
|
+
style: {
|
|
11443
|
+
flex: "0 0 100%",
|
|
11444
|
+
display: "grid",
|
|
11445
|
+
gridTemplateColumns: `repeat(${perPage}, 1fr)`,
|
|
11446
|
+
gap: AI_TREE_TOKENS.spacing8,
|
|
11447
|
+
alignItems: "start"
|
|
11448
|
+
},
|
|
11449
|
+
children: group
|
|
11450
|
+
},
|
|
11451
|
+
p
|
|
11452
|
+
))
|
|
11453
|
+
}
|
|
11454
|
+
) })
|
|
11455
|
+
);
|
|
11387
11456
|
const prevBtn = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
11388
11457
|
"button",
|
|
11389
11458
|
{
|
|
@@ -11733,13 +11802,20 @@ function pricingIndexFromPath(path) {
|
|
|
11733
11802
|
const m = /\.c(\d+)$/.exec(path);
|
|
11734
11803
|
return m ? Number(m[1]) : 0;
|
|
11735
11804
|
}
|
|
11805
|
+
function carouselPageSize(children) {
|
|
11806
|
+
const cardSlots = children.map((c) => c.type === "card" ? c.slots ?? {} : null);
|
|
11807
|
+
if (cardSlots.length && cardSlots.every((s) => s?.layout === "centered")) return 1;
|
|
11808
|
+
if (cardSlots.length && cardSlots.every((s) => s?.preset === "testimonial")) return 3;
|
|
11809
|
+
return 4;
|
|
11810
|
+
}
|
|
11736
11811
|
function CollectionBlock({ node, ctx, path }) {
|
|
11737
11812
|
const slots = node.slots ?? {};
|
|
11738
11813
|
const behavior = str(slots.behavior);
|
|
11739
11814
|
const children = node.children ?? [];
|
|
11740
11815
|
const itemsPerRow = behavior === "grid" ? typeof slots.itemsPerRow === "number" ? slots.itemsPerRow : Math.min(4, children.length) : behavior === "carousel" ? (
|
|
11741
|
-
// itemsPerRow is a grid-only slot; carousels show up to 4 and page the rest.
|
|
11742
|
-
|
|
11816
|
+
// itemsPerRow is a grid-only slot; carousels show up to 4 and page the rest. Section
|
|
11817
|
+
// System 2: a centred (spotlight) quote is one per page, testimonial cards three.
|
|
11818
|
+
Math.min(carouselPageSize(children), children.length)
|
|
11743
11819
|
) : children.length;
|
|
11744
11820
|
const isPricing = isPricingCardCollection(children);
|
|
11745
11821
|
const rendered = children.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { minWidth: 0 }, children: renderNode(child, ctx, `${path}.c${i}`) }, i));
|
|
@@ -11845,6 +11921,10 @@ function CollectionBlock({ node, ctx, path }) {
|
|
|
11845
11921
|
const wide = children[0]?.slots?.layout === "horizontal";
|
|
11846
11922
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "data-ohw-pricing-collection": "", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { width: "100%", maxWidth: wide ? 960 : 420, minWidth: 0 }, children: rendered[0] }) });
|
|
11847
11923
|
}
|
|
11924
|
+
const mixedAspects = children.length > 1 && children.every((child) => child.type === "media") && new Set(children.map((child) => str(child.slots?.aspect))).size > 1;
|
|
11925
|
+
if (behavior === "grid" && mixedAspects) {
|
|
11926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "data-ai-masonry": "", style: { columnCount: itemsPerRow, columnGap: AI_TREE_TOKENS.spacing6 }, children: rendered.map((tile, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { breakInside: "avoid", marginBottom: AI_TREE_TOKENS.spacing6 }, children: tile }, i)) });
|
|
11927
|
+
}
|
|
11848
11928
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
11849
11929
|
"div",
|
|
11850
11930
|
{
|
|
@@ -12519,9 +12599,7 @@ function AiTreeRenderer({
|
|
|
12519
12599
|
const hasOverlapBackground = tree.scaffold === "overlay" && tree.rows.some(
|
|
12520
12600
|
(row) => (row.blocks ?? []).some((b) => b.type === "group" && str(b.slots?.layout) === "overlap")
|
|
12521
12601
|
);
|
|
12522
|
-
const hasFullBleedCarousel = tree.rows.some(
|
|
12523
|
-
(row) => (row.blocks ?? []).some((b) => b.type === "carousel")
|
|
12524
|
-
);
|
|
12602
|
+
const hasFullBleedCarousel = tree.rows.some((row) => (row.blocks ?? []).some((b) => b.type === "carousel")) && tree.rows.every((row) => (row.blocks ?? []).every((b) => b.type === "carousel"));
|
|
12525
12603
|
const fullBleedMedia = hasOverlapBackground || hasFullBleedCarousel;
|
|
12526
12604
|
const ctx = {
|
|
12527
12605
|
brand: blockBrand,
|
|
@@ -12608,6 +12686,9 @@ function AiTreeRenderer({
|
|
|
12608
12686
|
// horizontal). The overlap branch in `renderNode` re-introduces the reading-width
|
|
12609
12687
|
// constraint around just the overlay text layer, via `ctx.heroOverlapFullBleed`.
|
|
12610
12688
|
...fullBleedMedia ? { maxWidth: void 0, margin: void 0, padding: 0 } : { maxWidth: AI_TREE_TOKENS.sectionMaxWidth, margin: "0 auto", padding: "0 40px" },
|
|
12689
|
+
// A full/half-height section is a grid, where `margin: auto` shrink-wraps this container to
|
|
12690
|
+
// its content and centres it: an Overlay hero's left-aligned copy floated mid-frame.
|
|
12691
|
+
...fillHeight && !fullBleedMedia ? { width: "100%", boxSizing: "border-box", maxWidth: AI_TREE_TOKENS.sectionMaxWidth + 80 } : {},
|
|
12611
12692
|
textAlign: settings.alignment === "center" ? "center" : void 0,
|
|
12612
12693
|
...fillHeight ? { display: "grid" } : {}
|
|
12613
12694
|
},
|
|
@@ -12630,9 +12711,8 @@ function AiTreeRenderer({
|
|
|
12630
12711
|
style: {
|
|
12631
12712
|
gridArea: "1 / 1",
|
|
12632
12713
|
zIndex: 1,
|
|
12633
|
-
//
|
|
12634
|
-
|
|
12635
|
-
justifySelf: "end",
|
|
12714
|
+
// Left side, as in Figma 4689:7282.
|
|
12715
|
+
justifySelf: "start",
|
|
12636
12716
|
alignSelf: "center",
|
|
12637
12717
|
width: "min(480px, calc(100% - 128px))",
|
|
12638
12718
|
margin: 64,
|
|
@@ -13078,6 +13158,9 @@ var TEMPLATE_FONTS_SNAPSHOT = typeof document === "undefined" ? null : withOverr
|
|
|
13078
13158
|
function deriveTemplateBrand() {
|
|
13079
13159
|
return TEMPLATE_BRAND_SNAPSHOT;
|
|
13080
13160
|
}
|
|
13161
|
+
function resolveGeneratedBrand(sectionBrand) {
|
|
13162
|
+
return brandForGenerated(deriveBrandOverride() ?? sectionBrand ?? TEMPLATE_BRAND_SNAPSHOT);
|
|
13163
|
+
}
|
|
13081
13164
|
function deriveTemplateFonts() {
|
|
13082
13165
|
return TEMPLATE_FONTS_SNAPSHOT;
|
|
13083
13166
|
}
|
|
@@ -13412,10 +13495,157 @@ function unmountAllAiSections() {
|
|
|
13412
13495
|
}
|
|
13413
13496
|
}
|
|
13414
13497
|
|
|
13415
|
-
// src/ui/ai-tree/
|
|
13416
|
-
var import_client2 = require("react-dom/client");
|
|
13498
|
+
// src/ui/ai-tree/layoutPreviews.tsx
|
|
13417
13499
|
var import_react_dom2 = require("react-dom");
|
|
13500
|
+
var import_client2 = require("react-dom/client");
|
|
13501
|
+
|
|
13502
|
+
// src/lib/ai-layout-previews.ts
|
|
13503
|
+
var LAYOUT_PREVIEWS_REQUEST = "ow:ai-layout-previews";
|
|
13504
|
+
var LAYOUT_PREVIEW_REPLY = "ow:ai-layout-preview";
|
|
13505
|
+
var escapeAttr = (value) => value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<");
|
|
13506
|
+
var safeCss = (css) => css.replace(/<\/style/gi, "<\\/style");
|
|
13507
|
+
function buildLayoutPreviewDoc(sectionHtml, ctx, width) {
|
|
13508
|
+
const links = ctx.stylesheets.map((href) => `<link rel="stylesheet" href="${escapeAttr(href)}">`).join("");
|
|
13509
|
+
const styles = ctx.styles.map((css) => `<style>${safeCss(css)}</style>`).join("");
|
|
13510
|
+
const htmlAttrs = (ctx.htmlClass ? ` class="${escapeAttr(ctx.htmlClass)}"` : "") + (ctx.htmlStyle ? ` style="${escapeAttr(ctx.htmlStyle)}"` : "");
|
|
13511
|
+
const bodyAttrs = (ctx.bodyClass ? ` class="${escapeAttr(ctx.bodyClass)}"` : "") + ` style="${escapeAttr(`${ctx.bodyStyle ? `${ctx.bodyStyle};` : ""}margin:0;overflow:hidden;background:transparent`)}"`;
|
|
13512
|
+
const wrapperStyle = `${ctx.inherited ? `${ctx.inherited};` : ""}width:${Math.round(width)}px`;
|
|
13513
|
+
return `<!doctype html><html${htmlAttrs}><head><meta charset="utf-8"><base href="${escapeAttr(ctx.origin.replace(/\/?$/, "/"))}"><meta name="viewport" content="width=${Math.round(width)}">` + links + styles + // Nothing in a preview is interactive, and scroll-linked or entrance animations would freeze
|
|
13514
|
+
// mid-way without scripts.
|
|
13515
|
+
`<style>*,*::before,*::after{animation:none!important;transition:none!important}</style></head><body${bodyAttrs}><div style="${escapeAttr(wrapperStyle)}">${sectionHtml}</div></body></html>`;
|
|
13516
|
+
}
|
|
13517
|
+
var TRANSPARENT2 = /^(transparent|rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\))$/i;
|
|
13518
|
+
function layoutPreviewBackground(backgroundColor, backgroundImage) {
|
|
13519
|
+
const color = backgroundColor.trim();
|
|
13520
|
+
const image = backgroundImage.trim();
|
|
13521
|
+
if (image && image !== "none") return "#ffffff";
|
|
13522
|
+
if (!color || TRANSPARENT2.test(color)) return "#ffffff";
|
|
13523
|
+
return color;
|
|
13524
|
+
}
|
|
13525
|
+
function isLayoutPreviewRequest(value) {
|
|
13526
|
+
if (!value || typeof value !== "object") return false;
|
|
13527
|
+
const v = value;
|
|
13528
|
+
return typeof v.requestId === "string" && Array.isArray(v.layouts) && v.layouts.length > 0 && v.layouts.every((l) => l && typeof l.id === "string" && l.tree && typeof l.tree === "object");
|
|
13529
|
+
}
|
|
13530
|
+
|
|
13531
|
+
// src/ui/ai-tree/layoutPreviews.tsx
|
|
13418
13532
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
13533
|
+
var HOST_ATTR = "data-ohw-layout-preview-host";
|
|
13534
|
+
var SETTLE_CAP_MS = 2500;
|
|
13535
|
+
var activeRequest = null;
|
|
13536
|
+
var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
13537
|
+
function cssTextOf(el) {
|
|
13538
|
+
try {
|
|
13539
|
+
const rules = el.sheet?.cssRules;
|
|
13540
|
+
if (rules && rules.length > 0) return Array.from(rules, (r2) => r2.cssText).join("\n");
|
|
13541
|
+
} catch {
|
|
13542
|
+
}
|
|
13543
|
+
return el.textContent ?? "";
|
|
13544
|
+
}
|
|
13545
|
+
function readPageContext(parent) {
|
|
13546
|
+
const stylesheets = Array.from(document.querySelectorAll('link[rel~="stylesheet"]')).filter((l) => !l.disabled && l.href).map((l) => l.href);
|
|
13547
|
+
const styles = Array.from(document.querySelectorAll("style")).filter((s) => !s.closest(`[${HOST_ATTR}]`)).map(cssTextOf).filter(Boolean);
|
|
13548
|
+
const cs = getComputedStyle(parent);
|
|
13549
|
+
const inherited = [
|
|
13550
|
+
`font-family:${cs.fontFamily}`,
|
|
13551
|
+
`color:${cs.color}`,
|
|
13552
|
+
`font-size:${cs.fontSize}`,
|
|
13553
|
+
`line-height:${cs.lineHeight}`,
|
|
13554
|
+
`letter-spacing:${cs.letterSpacing}`
|
|
13555
|
+
].join(";");
|
|
13556
|
+
return {
|
|
13557
|
+
origin: window.location.origin,
|
|
13558
|
+
stylesheets,
|
|
13559
|
+
styles,
|
|
13560
|
+
htmlClass: document.documentElement.className,
|
|
13561
|
+
htmlStyle: document.documentElement.getAttribute("style") ?? "",
|
|
13562
|
+
bodyClass: document.body.className,
|
|
13563
|
+
bodyStyle: document.body.getAttribute("style") ?? "",
|
|
13564
|
+
inherited
|
|
13565
|
+
};
|
|
13566
|
+
}
|
|
13567
|
+
async function settle(host) {
|
|
13568
|
+
const images = Array.from(host.querySelectorAll("img"));
|
|
13569
|
+
for (const img of images) img.loading = "eager";
|
|
13570
|
+
const loads = images.map(
|
|
13571
|
+
(img) => img.complete ? Promise.resolve() : img.decode().catch(() => void 0)
|
|
13572
|
+
);
|
|
13573
|
+
await Promise.race([
|
|
13574
|
+
Promise.all([...loads, document.fonts?.ready ?? Promise.resolve()]),
|
|
13575
|
+
wait(SETTLE_CAP_MS)
|
|
13576
|
+
]);
|
|
13577
|
+
}
|
|
13578
|
+
function backgroundOf(host) {
|
|
13579
|
+
let el = host.firstElementChild;
|
|
13580
|
+
for (let depth = 0; el && depth < 3; depth++) {
|
|
13581
|
+
const cs = getComputedStyle(el);
|
|
13582
|
+
const bg = layoutPreviewBackground(cs.backgroundColor, cs.backgroundImage);
|
|
13583
|
+
if (bg !== "#ffffff" || cs.backgroundImage && cs.backgroundImage !== "none") return bg;
|
|
13584
|
+
el = el.firstElementChild;
|
|
13585
|
+
}
|
|
13586
|
+
return "#ffffff";
|
|
13587
|
+
}
|
|
13588
|
+
async function renderOne(layout, req, anchor, width) {
|
|
13589
|
+
const empty = { id: layout.id, doc: "", width, height: 0, bg: "#ffffff" };
|
|
13590
|
+
if (!isRenderableTree(layout.tree)) return empty;
|
|
13591
|
+
const host = document.createElement("div");
|
|
13592
|
+
host.setAttribute(HOST_ATTR, "");
|
|
13593
|
+
host.setAttribute("aria-hidden", "true");
|
|
13594
|
+
host.style.cssText = `position:absolute;left:-100000px;top:0;width:${width}px;pointer-events:none;contain:layout paint`;
|
|
13595
|
+
const parent = anchor?.parentElement ?? document.body;
|
|
13596
|
+
parent.appendChild(host);
|
|
13597
|
+
const root = (0, import_client2.createRoot)(host);
|
|
13598
|
+
const media = req.media ?? {};
|
|
13599
|
+
try {
|
|
13600
|
+
(0, import_react_dom2.flushSync)(() => {
|
|
13601
|
+
root.render(
|
|
13602
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13603
|
+
AiTreeRenderer,
|
|
13604
|
+
{
|
|
13605
|
+
tree: layout.tree,
|
|
13606
|
+
brand: resolveGeneratedBrand(req.brand ?? null),
|
|
13607
|
+
buttonStyle: deriveTemplateButtonStyle(),
|
|
13608
|
+
resolveMedia: (ref) => media[ref] ?? null
|
|
13609
|
+
}
|
|
13610
|
+
)
|
|
13611
|
+
);
|
|
13612
|
+
});
|
|
13613
|
+
await settle(host);
|
|
13614
|
+
const rect = host.getBoundingClientRect();
|
|
13615
|
+
const height = Math.max(1, Math.round(Math.max(rect.height, host.scrollHeight)));
|
|
13616
|
+
const doc = buildLayoutPreviewDoc(host.innerHTML, readPageContext(parent), width);
|
|
13617
|
+
return { id: layout.id, doc, width, height, bg: backgroundOf(host) };
|
|
13618
|
+
} catch {
|
|
13619
|
+
return empty;
|
|
13620
|
+
} finally {
|
|
13621
|
+
root.unmount();
|
|
13622
|
+
host.remove();
|
|
13623
|
+
}
|
|
13624
|
+
}
|
|
13625
|
+
async function renderLayoutPreviews(req, post) {
|
|
13626
|
+
activeRequest = req.requestId;
|
|
13627
|
+
const anchor = req.sectionId ? document.querySelector(`[data-ohw-section="${CSS.escape(req.sectionId)}"]`) : null;
|
|
13628
|
+
const width = Math.round(anchor?.getBoundingClientRect().width || document.documentElement.clientWidth);
|
|
13629
|
+
for (const layout of req.layouts) {
|
|
13630
|
+
if (activeRequest !== req.requestId) return;
|
|
13631
|
+
const result = await renderOne(layout, req, anchor, width);
|
|
13632
|
+
if (activeRequest !== req.requestId) return;
|
|
13633
|
+
post({ type: LAYOUT_PREVIEW_REPLY, requestId: req.requestId, ...result });
|
|
13634
|
+
await wait(0);
|
|
13635
|
+
}
|
|
13636
|
+
}
|
|
13637
|
+
function createLayoutPreviewsListener(post) {
|
|
13638
|
+
return (e) => {
|
|
13639
|
+
if (e.data?.type !== LAYOUT_PREVIEWS_REQUEST) return;
|
|
13640
|
+
if (!isLayoutPreviewRequest(e.data)) return;
|
|
13641
|
+
void renderLayoutPreviews(e.data, (reply) => post(reply));
|
|
13642
|
+
};
|
|
13643
|
+
}
|
|
13644
|
+
|
|
13645
|
+
// src/ui/ai-tree/aiFooterManager.tsx
|
|
13646
|
+
var import_client3 = require("react-dom/client");
|
|
13647
|
+
var import_react_dom3 = require("react-dom");
|
|
13648
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
13419
13649
|
var CONTAINER_ATTR2 = "data-ohw-ai-footer";
|
|
13420
13650
|
var HIDDEN_ATTR2 = "data-ohw-ai-footer-replaced";
|
|
13421
13651
|
var mounted2 = null;
|
|
@@ -13551,11 +13781,11 @@ function applyAiFooterToDom(state, content) {
|
|
|
13551
13781
|
} else {
|
|
13552
13782
|
document.body.appendChild(container);
|
|
13553
13783
|
}
|
|
13554
|
-
const root = (0,
|
|
13784
|
+
const root = (0, import_client3.createRoot)(container);
|
|
13555
13785
|
const resolveMedia = (ref) => state.media?.[ref] ?? null;
|
|
13556
|
-
(0,
|
|
13786
|
+
(0, import_react_dom3.flushSync)(() => {
|
|
13557
13787
|
root.render(
|
|
13558
|
-
/* @__PURE__ */ (0,
|
|
13788
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13559
13789
|
AiFooterRenderer,
|
|
13560
13790
|
{
|
|
13561
13791
|
tree: state.tree,
|
|
@@ -14548,10 +14778,10 @@ var import_react11 = require("react");
|
|
|
14548
14778
|
// src/ui/EmailCaptureModal.tsx
|
|
14549
14779
|
var import_react10 = require("react");
|
|
14550
14780
|
var import_radix_ui = require("radix-ui");
|
|
14551
|
-
var
|
|
14781
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
14552
14782
|
var isValidEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
|
|
14553
14783
|
function Spinner() {
|
|
14554
|
-
return /* @__PURE__ */ (0,
|
|
14784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
14555
14785
|
"svg",
|
|
14556
14786
|
{
|
|
14557
14787
|
width: "32",
|
|
@@ -14560,9 +14790,9 @@ function Spinner() {
|
|
|
14560
14790
|
fill: "none",
|
|
14561
14791
|
style: { animation: "ohw-spin 0.75s linear infinite" },
|
|
14562
14792
|
children: [
|
|
14563
|
-
/* @__PURE__ */ (0,
|
|
14564
|
-
/* @__PURE__ */ (0,
|
|
14565
|
-
/* @__PURE__ */ (0,
|
|
14793
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("style", { children: `@keyframes ohw-spin { to { transform: rotate(360deg); } }` }),
|
|
14794
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "16", cy: "16", r: "12", stroke: "#e5e7eb", strokeWidth: "3" }),
|
|
14795
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14566
14796
|
"path",
|
|
14567
14797
|
{
|
|
14568
14798
|
d: "M16 4a12 12 0 0 1 12 12",
|
|
@@ -14604,10 +14834,10 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
|
|
|
14604
14834
|
const handleKeyDown = (e) => {
|
|
14605
14835
|
if (e.key === "Enter" && !loading) handleSubmit();
|
|
14606
14836
|
};
|
|
14607
|
-
return /* @__PURE__ */ (0,
|
|
14837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_radix_ui.Dialog.Root, { open: true, onOpenChange: (open) => {
|
|
14608
14838
|
if (!open) onClose();
|
|
14609
|
-
}, children: /* @__PURE__ */ (0,
|
|
14610
|
-
/* @__PURE__ */ (0,
|
|
14839
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_radix_ui.Dialog.Portal, { children: [
|
|
14840
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14611
14841
|
import_radix_ui.Dialog.Overlay,
|
|
14612
14842
|
{
|
|
14613
14843
|
"data-ohw-scheduling-modal": "",
|
|
@@ -14615,16 +14845,16 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
|
|
|
14615
14845
|
style: { background: "rgba(0,0,0,0.45)" }
|
|
14616
14846
|
}
|
|
14617
14847
|
),
|
|
14618
|
-
/* @__PURE__ */ (0,
|
|
14848
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
14619
14849
|
import_radix_ui.Dialog.Content,
|
|
14620
14850
|
{
|
|
14621
14851
|
"data-ohw-scheduling-modal": "",
|
|
14622
14852
|
className: "fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 bg-white rounded-xl shadow-xl outline-none font-body box-border overflow-hidden",
|
|
14623
14853
|
style: { maxWidth: 400 },
|
|
14624
14854
|
children: [
|
|
14625
|
-
/* @__PURE__ */ (0,
|
|
14626
|
-
/* @__PURE__ */ (0,
|
|
14627
|
-
/* @__PURE__ */ (0,
|
|
14855
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start justify-between gap-3 p-6", children: [
|
|
14856
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
14857
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14628
14858
|
import_radix_ui.Dialog.Title,
|
|
14629
14859
|
{
|
|
14630
14860
|
className: "font-body text-xl font-bold m-0 leading-tight",
|
|
@@ -14632,7 +14862,7 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
|
|
|
14632
14862
|
children: success ? isBook ? "Reservation confirmed!" : "You're on the waitlist!" : title
|
|
14633
14863
|
}
|
|
14634
14864
|
),
|
|
14635
|
-
/* @__PURE__ */ (0,
|
|
14865
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14636
14866
|
import_radix_ui.Dialog.Description,
|
|
14637
14867
|
{
|
|
14638
14868
|
className: "font-body text-sm m-0",
|
|
@@ -14641,31 +14871,31 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
|
|
|
14641
14871
|
}
|
|
14642
14872
|
)
|
|
14643
14873
|
] }),
|
|
14644
|
-
/* @__PURE__ */ (0,
|
|
14874
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14645
14875
|
import_radix_ui.Dialog.Close,
|
|
14646
14876
|
{
|
|
14647
14877
|
className: "shrink-0 w-7 h-7 flex items-center justify-center rounded-full bg-transparent border-none cursor-pointer mt-0.5 absolute top-2.5 right-1.5",
|
|
14648
14878
|
style: { color: "#6B7280" },
|
|
14649
14879
|
"aria-label": "Close",
|
|
14650
|
-
children: /* @__PURE__ */ (0,
|
|
14651
|
-
/* @__PURE__ */ (0,
|
|
14652
|
-
/* @__PURE__ */ (0,
|
|
14880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
14881
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
14882
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
14653
14883
|
] })
|
|
14654
14884
|
}
|
|
14655
14885
|
)
|
|
14656
14886
|
] }),
|
|
14657
14887
|
!success && (loading ? (
|
|
14658
14888
|
/* Loading state — full body replaced */
|
|
14659
|
-
/* @__PURE__ */ (0,
|
|
14660
|
-
/* @__PURE__ */ (0,
|
|
14661
|
-
/* @__PURE__ */ (0,
|
|
14889
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col items-center justify-center gap-3 px-7 py-12", children: [
|
|
14890
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Spinner, {}),
|
|
14891
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "font-body text-sm m-0", style: { color: "#6B7280" }, children: "Please wait" })
|
|
14662
14892
|
] })
|
|
14663
14893
|
) : (
|
|
14664
14894
|
/* Email form */
|
|
14665
|
-
/* @__PURE__ */ (0,
|
|
14666
|
-
/* @__PURE__ */ (0,
|
|
14667
|
-
/* @__PURE__ */ (0,
|
|
14668
|
-
/* @__PURE__ */ (0,
|
|
14895
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "px-7 pt-2 pb-6", children: [
|
|
14896
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1.5 mb-8", children: [
|
|
14897
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { className: "font-body text-sm font-medium", style: { color: "var(--color-dark,#200C02)" }, children: "Email" }),
|
|
14898
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14669
14899
|
"input",
|
|
14670
14900
|
{
|
|
14671
14901
|
type: "email",
|
|
@@ -14685,9 +14915,9 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
|
|
|
14685
14915
|
}
|
|
14686
14916
|
}
|
|
14687
14917
|
),
|
|
14688
|
-
error && /* @__PURE__ */ (0,
|
|
14918
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "font-body text-xs text-red-500 m-0", children: error })
|
|
14689
14919
|
] }),
|
|
14690
|
-
/* @__PURE__ */ (0,
|
|
14920
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14691
14921
|
"button",
|
|
14692
14922
|
{
|
|
14693
14923
|
onClick: handleSubmit,
|
|
@@ -14709,7 +14939,7 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
|
|
|
14709
14939
|
}
|
|
14710
14940
|
|
|
14711
14941
|
// src/ui/SchedulingWidget.tsx
|
|
14712
|
-
var
|
|
14942
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
14713
14943
|
var API_URL = process.env.NEXT_PUBLIC_FLOWOPS_API_URL ?? "https://flowops-backend-staging-2yfdh7pwpq-as.a.run.app";
|
|
14714
14944
|
var DAY_ABBR = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
|
|
14715
14945
|
function classRunsOnDate(cls, date, type) {
|
|
@@ -14771,8 +15001,8 @@ function EmptyState({ inEditor, insertAfter }) {
|
|
|
14771
15001
|
window.parent.postMessage({ type: "ow:scheduling-not-connected", insertAfter }, "*");
|
|
14772
15002
|
}
|
|
14773
15003
|
};
|
|
14774
|
-
return /* @__PURE__ */ (0,
|
|
14775
|
-
/* @__PURE__ */ (0,
|
|
15004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col items-center justify-center gap-6 p-12 bg-[#FAFAF9] border-2 border-dashed border-[#E7E5E4] rounded-[10px] h-[264px] w-full box-border", children: [
|
|
15005
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-10 h-10 bg-[#F5F5F4] rounded-[10px] flex items-center justify-center shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
14776
15006
|
"svg",
|
|
14777
15007
|
{
|
|
14778
15008
|
width: "20",
|
|
@@ -14784,20 +15014,20 @@ function EmptyState({ inEditor, insertAfter }) {
|
|
|
14784
15014
|
strokeLinecap: "round",
|
|
14785
15015
|
strokeLinejoin: "round",
|
|
14786
15016
|
children: [
|
|
14787
|
-
/* @__PURE__ */ (0,
|
|
14788
|
-
/* @__PURE__ */ (0,
|
|
14789
|
-
/* @__PURE__ */ (0,
|
|
14790
|
-
/* @__PURE__ */ (0,
|
|
14791
|
-
/* @__PURE__ */ (0,
|
|
14792
|
-
/* @__PURE__ */ (0,
|
|
15017
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
15018
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
|
15019
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
|
15020
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "3", y1: "10", x2: "21", y2: "10" }),
|
|
15021
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "12", y1: "14", x2: "12", y2: "18" }),
|
|
15022
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "10", y1: "16", x2: "14", y2: "16" })
|
|
14793
15023
|
]
|
|
14794
15024
|
}
|
|
14795
15025
|
) }),
|
|
14796
|
-
/* @__PURE__ */ (0,
|
|
14797
|
-
/* @__PURE__ */ (0,
|
|
14798
|
-
/* @__PURE__ */ (0,
|
|
15026
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
15027
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "font-body text-lg font-medium text-center text-[#0A0A0A] m-0", children: "No schedule yet" }),
|
|
15028
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "font-body text-base font-normal text-center text-(--color-accent,#A89B83) m-0", children: "Add a scheduling widget to get instant bookings." })
|
|
14799
15029
|
] }),
|
|
14800
|
-
/* @__PURE__ */ (0,
|
|
15030
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14801
15031
|
"button",
|
|
14802
15032
|
{
|
|
14803
15033
|
"data-ohw-bridge": true,
|
|
@@ -14814,35 +15044,35 @@ function LoadingSkeleton() {
|
|
|
14814
15044
|
backgroundSize: "200% 100%",
|
|
14815
15045
|
animation: "ohw-shimmer 1.5s infinite"
|
|
14816
15046
|
};
|
|
14817
|
-
return /* @__PURE__ */ (0,
|
|
14818
|
-
/* @__PURE__ */ (0,
|
|
14819
|
-
/* @__PURE__ */ (0,
|
|
14820
|
-
/* @__PURE__ */ (0,
|
|
14821
|
-
/* @__PURE__ */ (0,
|
|
15047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w-full flex flex-col gap-10", children: [
|
|
15048
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("style", { children: `@keyframes ohw-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}` }),
|
|
15049
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex h-[70px] items-stretch", children: Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 flex flex-col justify-between items-center px-1", children: [
|
|
15050
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "32px", height: "14px", borderRadius: "4px" } }),
|
|
15051
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "40px", height: "40px", borderRadius: "50%" } })
|
|
14822
15052
|
] }, i)) }),
|
|
14823
|
-
[0, 1, 2].map((i) => /* @__PURE__ */ (0,
|
|
14824
|
-
/* @__PURE__ */ (0,
|
|
14825
|
-
/* @__PURE__ */ (0,
|
|
14826
|
-
/* @__PURE__ */ (0,
|
|
14827
|
-
/* @__PURE__ */ (0,
|
|
14828
|
-
/* @__PURE__ */ (0,
|
|
15053
|
+
[0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
|
|
15054
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex gap-4 py-4 sm:hidden", children: [
|
|
15055
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2 shrink-0", children: [
|
|
15056
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "100px", height: "16px", borderRadius: "4px" } }),
|
|
15057
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "52px", height: "20px", borderRadius: "999px" } }),
|
|
15058
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "60px", height: "14px", borderRadius: "4px" } })
|
|
14829
15059
|
] }),
|
|
14830
|
-
/* @__PURE__ */ (0,
|
|
14831
|
-
/* @__PURE__ */ (0,
|
|
14832
|
-
/* @__PURE__ */ (0,
|
|
14833
|
-
/* @__PURE__ */ (0,
|
|
15060
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
15061
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "75%", height: "16px", borderRadius: "4px" } }),
|
|
15062
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "50%", height: "14px", borderRadius: "4px" } }),
|
|
15063
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "100%", height: "44px", borderRadius: "8px" } })
|
|
14834
15064
|
] })
|
|
14835
15065
|
] }),
|
|
14836
|
-
/* @__PURE__ */ (0,
|
|
14837
|
-
/* @__PURE__ */ (0,
|
|
14838
|
-
/* @__PURE__ */ (0,
|
|
14839
|
-
/* @__PURE__ */ (0,
|
|
14840
|
-
/* @__PURE__ */ (0,
|
|
15066
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "hidden sm:flex items-center gap-[60px] py-4", children: [
|
|
15067
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "120px", height: "16px", borderRadius: "4px", flexShrink: 0 } }),
|
|
15068
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
15069
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "55%", height: "16px", borderRadius: "4px" } }),
|
|
15070
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "38%", height: "14px", borderRadius: "4px" } })
|
|
14841
15071
|
] }),
|
|
14842
|
-
/* @__PURE__ */ (0,
|
|
14843
|
-
/* @__PURE__ */ (0,
|
|
15072
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "56px", height: "32px", borderRadius: "4px", flexShrink: 0 } }),
|
|
15073
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...shimmer, width: "200px", height: "44px", borderRadius: "8px", flexShrink: 0 } })
|
|
14844
15074
|
] }),
|
|
14845
|
-
i < 2 && /* @__PURE__ */ (0,
|
|
15075
|
+
i < 2 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px bg-black/20" })
|
|
14846
15076
|
] }, i))
|
|
14847
15077
|
] });
|
|
14848
15078
|
}
|
|
@@ -14909,43 +15139,43 @@ function ScheduleView({ schedule, dates, selectedIdx, onSelectDate, onOpenModal
|
|
|
14909
15139
|
() => (schedule.classes ?? []).filter((c) => selectedDate && classRunsOnDate(c, selectedDate, schedule.type)),
|
|
14910
15140
|
[schedule, selectedDate]
|
|
14911
15141
|
);
|
|
14912
|
-
return /* @__PURE__ */ (0,
|
|
14913
|
-
/* @__PURE__ */ (0,
|
|
14914
|
-
canScrollLeft && /* @__PURE__ */ (0,
|
|
15142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w-full flex flex-col gap-10", children: [
|
|
15143
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative w-full", children: [
|
|
15144
|
+
canScrollLeft && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14915
15145
|
"button",
|
|
14916
15146
|
{
|
|
14917
15147
|
onClick: () => scroll("left"),
|
|
14918
15148
|
className: "hidden sm:flex absolute left-0 top-1/2 -translate-y-1/2 z-10 w-8 h-8 items-center justify-center rounded-full border-none cursor-pointer",
|
|
14919
15149
|
style: { background: "var(--color-light,#FEFFF0)", boxShadow: "0 1px 4px rgba(0,0,0,0.15)" },
|
|
14920
15150
|
"aria-label": "Scroll left",
|
|
14921
|
-
children: /* @__PURE__ */ (0,
|
|
15151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "var(--color-dark,#200C02)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "15 18 9 12 15 6" }) })
|
|
14922
15152
|
}
|
|
14923
15153
|
),
|
|
14924
|
-
canScrollRight && /* @__PURE__ */ (0,
|
|
15154
|
+
canScrollRight && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14925
15155
|
"button",
|
|
14926
15156
|
{
|
|
14927
15157
|
onClick: () => scroll("right"),
|
|
14928
15158
|
className: "hidden sm:flex absolute right-0 top-1/2 -translate-y-1/2 z-10 w-8 h-8 items-center justify-center rounded-full border-none cursor-pointer",
|
|
14929
15159
|
style: { background: "var(--color-light,#FEFFF0)", boxShadow: "0 1px 4px rgba(0,0,0,0.15)" },
|
|
14930
15160
|
"aria-label": "Scroll right",
|
|
14931
|
-
children: /* @__PURE__ */ (0,
|
|
15161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "var(--color-dark,#200C02)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "9 18 15 12 9 6" }) })
|
|
14932
15162
|
}
|
|
14933
15163
|
),
|
|
14934
|
-
canScrollLeft && /* @__PURE__ */ (0,
|
|
15164
|
+
canScrollLeft && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14935
15165
|
"div",
|
|
14936
15166
|
{
|
|
14937
15167
|
className: "sm:hidden absolute left-0 top-0 bottom-0 w-10 z-10 pointer-events-none",
|
|
14938
15168
|
style: { background: "linear-gradient(to right, var(--color-light,#FEFFF0), transparent)" }
|
|
14939
15169
|
}
|
|
14940
15170
|
),
|
|
14941
|
-
canScrollRight && /* @__PURE__ */ (0,
|
|
15171
|
+
canScrollRight && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14942
15172
|
"div",
|
|
14943
15173
|
{
|
|
14944
15174
|
className: "sm:hidden absolute right-0 top-0 bottom-0 w-10 z-10 pointer-events-none",
|
|
14945
15175
|
style: { background: "linear-gradient(to left, var(--color-light,#FEFFF0), transparent)" }
|
|
14946
15176
|
}
|
|
14947
15177
|
),
|
|
14948
|
-
/* @__PURE__ */ (0,
|
|
15178
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14949
15179
|
"div",
|
|
14950
15180
|
{
|
|
14951
15181
|
ref: scrollRef,
|
|
@@ -14955,24 +15185,24 @@ function ScheduleView({ schedule, dates, selectedIdx, onSelectDate, onOpenModal
|
|
|
14955
15185
|
onMouseMove: onDragMove,
|
|
14956
15186
|
onMouseUp: onDragEnd,
|
|
14957
15187
|
onMouseLeave: onDragEnd,
|
|
14958
|
-
children: /* @__PURE__ */ (0,
|
|
15188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex", style: { width: `max(100%, ${dates.length * 60}px)` }, children: dates.map((date, i) => {
|
|
14959
15189
|
const isToday = date.getTime() === todayMs;
|
|
14960
15190
|
const isSelected = i === selectedIdx;
|
|
14961
15191
|
const clickable = datesWithClasses.has(i);
|
|
14962
15192
|
const label = isToday ? "TODAY" : DAY_ABBR[date.getDay()];
|
|
14963
|
-
return /* @__PURE__ */ (0,
|
|
15193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
14964
15194
|
"div",
|
|
14965
15195
|
{
|
|
14966
15196
|
onClick: () => clickable && onSelectDate(i),
|
|
14967
15197
|
className: `flex-1 h-[70px] flex flex-col justify-between items-center ${clickable ? "cursor-pointer opacity-100" : "cursor-default opacity-50"}`,
|
|
14968
15198
|
children: [
|
|
14969
|
-
/* @__PURE__ */ (0,
|
|
14970
|
-
/* @__PURE__ */ (0,
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-base font-normal text-center text-(--color-dark,#200C02)", children: label }),
|
|
15200
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14971
15201
|
"div",
|
|
14972
15202
|
{
|
|
14973
15203
|
className: "w-10 h-10 rounded-full flex items-center justify-center",
|
|
14974
15204
|
style: { background: isSelected ? "var(--color-primary, #3D312B)" : "transparent" },
|
|
14975
|
-
children: /* @__PURE__ */ (0,
|
|
15205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
14976
15206
|
"span",
|
|
14977
15207
|
{
|
|
14978
15208
|
className: "font-body text-xl font-bold text-center tracking-display-tight",
|
|
@@ -14990,17 +15220,17 @@ function ScheduleView({ schedule, dates, selectedIdx, onSelectDate, onOpenModal
|
|
|
14990
15220
|
}
|
|
14991
15221
|
)
|
|
14992
15222
|
] }),
|
|
14993
|
-
selectedClasses.length === 0 ? /* @__PURE__ */ (0,
|
|
15223
|
+
selectedClasses.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "font-body text-base text-(--color-accent,#A89B83) text-center py-8 m-0", children: "No classes scheduled for this day." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col", children: selectedClasses.map((cls, i) => {
|
|
14994
15224
|
const booked = getBookingsOnDate(cls, selectedDate);
|
|
14995
15225
|
const available = cls.maxParticipants - booked;
|
|
14996
15226
|
const isFull = available <= 0;
|
|
14997
15227
|
const isPrivate = cls.maxParticipants === 1;
|
|
14998
|
-
return /* @__PURE__ */ (0,
|
|
14999
|
-
/* @__PURE__ */ (0,
|
|
15000
|
-
/* @__PURE__ */ (0,
|
|
15001
|
-
/* @__PURE__ */ (0,
|
|
15002
|
-
/* @__PURE__ */ (0,
|
|
15003
|
-
/* @__PURE__ */ (0,
|
|
15228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
|
|
15229
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex gap-4 py-4 sm:items-center sm:gap-[60px] box-border", children: [
|
|
15230
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2 shrink-0 sm:contents", children: [
|
|
15231
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2 sm:w-[120px] sm:shrink-0", children: [
|
|
15232
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-base font-bold text-(--color-dark,#200C02) block", children: formatClassTime(cls) }),
|
|
15233
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15004
15234
|
"span",
|
|
15005
15235
|
{
|
|
15006
15236
|
className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium w-fit",
|
|
@@ -15009,20 +15239,20 @@ function ScheduleView({ schedule, dates, selectedIdx, onSelectDate, onOpenModal
|
|
|
15009
15239
|
}
|
|
15010
15240
|
)
|
|
15011
15241
|
] }),
|
|
15012
|
-
cls.showAvailability !== false && /* @__PURE__ */ (0,
|
|
15013
|
-
/* @__PURE__ */ (0,
|
|
15242
|
+
cls.showAvailability !== false && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "sm:hidden flex flex-col gap-px", children: isFull ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-sm text-(--color-dark,#200C02) opacity-80", children: "Full" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
15243
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "font-body text-sm text-(--color-dark,#200C02) opacity-80", children: [
|
|
15014
15244
|
available,
|
|
15015
15245
|
"/",
|
|
15016
15246
|
cls.maxParticipants
|
|
15017
15247
|
] }),
|
|
15018
|
-
/* @__PURE__ */ (0,
|
|
15248
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-sm text-(--color-dark,#200C02) opacity-80", children: "available" })
|
|
15019
15249
|
] }) })
|
|
15020
15250
|
] }),
|
|
15021
|
-
/* @__PURE__ */ (0,
|
|
15022
|
-
/* @__PURE__ */ (0,
|
|
15023
|
-
/* @__PURE__ */ (0,
|
|
15024
|
-
cls.hostName && /* @__PURE__ */ (0,
|
|
15025
|
-
cls.description && /* @__PURE__ */ (0,
|
|
15251
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0 sm:contents", children: [
|
|
15252
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 flex flex-col gap-2 min-w-0", children: [
|
|
15253
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-base font-bold text-(--color-dark,#200C02) block truncate", children: cls.name }),
|
|
15254
|
+
cls.hostName && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-base font-normal text-(--color-dark,#200C02) opacity-80 block truncate", children: cls.hostName }),
|
|
15255
|
+
cls.description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15026
15256
|
"span",
|
|
15027
15257
|
{
|
|
15028
15258
|
className: "font-body text-base font-normal text-(--color-dark,#200C02) opacity-80 block",
|
|
@@ -15031,15 +15261,15 @@ function ScheduleView({ schedule, dates, selectedIdx, onSelectDate, onOpenModal
|
|
|
15031
15261
|
}
|
|
15032
15262
|
)
|
|
15033
15263
|
] }),
|
|
15034
|
-
cls.showAvailability !== false && /* @__PURE__ */ (0,
|
|
15035
|
-
/* @__PURE__ */ (0,
|
|
15264
|
+
cls.showAvailability !== false && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "hidden sm:flex w-14 shrink-0 flex-col gap-px", children: isFull ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-sm text-(--color-dark,#200C02) opacity-80", children: "Full" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
15265
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "font-body text-sm text-(--color-dark,#200C02) opacity-80", children: [
|
|
15036
15266
|
available,
|
|
15037
15267
|
"/",
|
|
15038
15268
|
cls.maxParticipants
|
|
15039
15269
|
] }),
|
|
15040
|
-
/* @__PURE__ */ (0,
|
|
15270
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-sm text-(--color-dark,#200C02) opacity-80", children: "available" })
|
|
15041
15271
|
] }) }),
|
|
15042
|
-
/* @__PURE__ */ (0,
|
|
15272
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15043
15273
|
"button",
|
|
15044
15274
|
{
|
|
15045
15275
|
className: "w-full sm:w-[200px] sm:shrink-0 px-5 py-[10px] flex items-center justify-center rounded-lg font-body text-base font-bold cursor-pointer box-border",
|
|
@@ -15061,13 +15291,13 @@ function ScheduleView({ schedule, dates, selectedIdx, onSelectDate, onOpenModal
|
|
|
15061
15291
|
)
|
|
15062
15292
|
] })
|
|
15063
15293
|
] }),
|
|
15064
|
-
i < selectedClasses.length - 1 && /* @__PURE__ */ (0,
|
|
15294
|
+
i < selectedClasses.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px bg-black/20" })
|
|
15065
15295
|
] }, cls.id ?? i);
|
|
15066
15296
|
}) })
|
|
15067
15297
|
] });
|
|
15068
15298
|
}
|
|
15069
15299
|
function CalendarFoldIcon() {
|
|
15070
|
-
return /* @__PURE__ */ (0,
|
|
15300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15071
15301
|
"svg",
|
|
15072
15302
|
{
|
|
15073
15303
|
width: "16",
|
|
@@ -15080,11 +15310,11 @@ function CalendarFoldIcon() {
|
|
|
15080
15310
|
strokeLinejoin: "round",
|
|
15081
15311
|
style: { flexShrink: 0 },
|
|
15082
15312
|
children: [
|
|
15083
|
-
/* @__PURE__ */ (0,
|
|
15084
|
-
/* @__PURE__ */ (0,
|
|
15085
|
-
/* @__PURE__ */ (0,
|
|
15086
|
-
/* @__PURE__ */ (0,
|
|
15087
|
-
/* @__PURE__ */ (0,
|
|
15313
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 2v4" }),
|
|
15314
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M16 2v4" }),
|
|
15315
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M21 17V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11Z" }),
|
|
15316
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 10h18" }),
|
|
15317
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M15 22v-4a2 2 0 0 1 2-2h4" })
|
|
15088
15318
|
]
|
|
15089
15319
|
}
|
|
15090
15320
|
);
|
|
@@ -15269,9 +15499,9 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15269
15499
|
};
|
|
15270
15500
|
const sectionId = `scheduling-${insertAfter}`;
|
|
15271
15501
|
if (!inEditor && !loading && !schedule) {
|
|
15272
|
-
return /* @__PURE__ */ (0,
|
|
15502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("section", { "data-ohw-section": sectionId, "data-ohw-scheduling-anchor": insertAfter, style: { display: "none" } });
|
|
15273
15503
|
}
|
|
15274
|
-
return /* @__PURE__ */ (0,
|
|
15504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15275
15505
|
"section",
|
|
15276
15506
|
{
|
|
15277
15507
|
"data-ohw-section": sectionId,
|
|
@@ -15280,15 +15510,15 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15280
15510
|
onMouseEnter: () => inEditor && setIsHovered(true),
|
|
15281
15511
|
onMouseLeave: () => setIsHovered(false),
|
|
15282
15512
|
children: [
|
|
15283
|
-
inEditor && isHovered && !!schedule && /* @__PURE__ */ (0,
|
|
15513
|
+
inEditor && isHovered && !!schedule && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15284
15514
|
"div",
|
|
15285
15515
|
{
|
|
15286
15516
|
className: "absolute inset-0 z-10 pointer-events-auto cursor-pointer",
|
|
15287
15517
|
onClick: handleReplaceSchedule,
|
|
15288
15518
|
children: [
|
|
15289
|
-
/* @__PURE__ */ (0,
|
|
15290
|
-
/* @__PURE__ */ (0,
|
|
15291
|
-
/* @__PURE__ */ (0,
|
|
15519
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute inset-0", style: { background: "#0885FE", opacity: 0.18 } }),
|
|
15520
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute inset-0", style: { boxShadow: "inset 0 0 0 1.5px #0885FE" } }),
|
|
15521
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
15292
15522
|
"div",
|
|
15293
15523
|
{
|
|
15294
15524
|
className: "bg-white border border-[#E7E5E4] rounded-md px-3 py-1.5 flex items-center gap-1.5",
|
|
@@ -15300,7 +15530,7 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15300
15530
|
color: "#0C0A09"
|
|
15301
15531
|
},
|
|
15302
15532
|
children: [
|
|
15303
|
-
/* @__PURE__ */ (0,
|
|
15533
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CalendarFoldIcon, {}),
|
|
15304
15534
|
"Replace schedule"
|
|
15305
15535
|
]
|
|
15306
15536
|
}
|
|
@@ -15308,9 +15538,9 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15308
15538
|
]
|
|
15309
15539
|
}
|
|
15310
15540
|
),
|
|
15311
|
-
/* @__PURE__ */ (0,
|
|
15312
|
-
/* @__PURE__ */ (0,
|
|
15313
|
-
/* @__PURE__ */ (0,
|
|
15541
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "max-w-[1280px] mx-auto flex flex-col items-center gap-16", children: [
|
|
15542
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
|
|
15543
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15314
15544
|
"h2",
|
|
15315
15545
|
{
|
|
15316
15546
|
className: "font-display text-center m-0 text-(--color-dark,#200C02)",
|
|
@@ -15323,11 +15553,11 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15323
15553
|
children: schedule?.name ?? "Book an appointment"
|
|
15324
15554
|
}
|
|
15325
15555
|
),
|
|
15326
|
-
schedule?.description && /* @__PURE__ */ (0,
|
|
15556
|
+
schedule?.description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "font-body text-body text-center m-0 text-(--color-accent,#A89B83)", children: schedule.description })
|
|
15327
15557
|
] }),
|
|
15328
|
-
/* @__PURE__ */ (0,
|
|
15329
|
-
timezoneLabel && /* @__PURE__ */ (0,
|
|
15330
|
-
/* @__PURE__ */ (0,
|
|
15558
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w-full flex flex-col items-end gap-3", children: [
|
|
15559
|
+
timezoneLabel && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-body text-sm font-normal text-(--color-accent,#A89B83)", children: timezoneLabel }),
|
|
15560
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-full p-0 sm:p-10 box-border", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LoadingSkeleton, {}) : !schedule ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(EmptyState, { inEditor, insertAfter }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15331
15561
|
ScheduleView,
|
|
15332
15562
|
{
|
|
15333
15563
|
schedule,
|
|
@@ -15339,7 +15569,7 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15339
15569
|
) })
|
|
15340
15570
|
] })
|
|
15341
15571
|
] }),
|
|
15342
|
-
modalState && /* @__PURE__ */ (0,
|
|
15572
|
+
modalState && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
15343
15573
|
EmailCaptureModal,
|
|
15344
15574
|
{
|
|
15345
15575
|
title: modalState.mode === "book" ? "Confirm your spot" : "Leave your email",
|
|
@@ -15354,7 +15584,7 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
|
|
|
15354
15584
|
}
|
|
15355
15585
|
|
|
15356
15586
|
// src/ui/OhwLoaderSurface.tsx
|
|
15357
|
-
var
|
|
15587
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
15358
15588
|
var OHW_LOADER_STYLE = {
|
|
15359
15589
|
position: "fixed",
|
|
15360
15590
|
inset: 0,
|
|
@@ -15366,9 +15596,9 @@ var OHW_LOADER_STYLE = {
|
|
|
15366
15596
|
};
|
|
15367
15597
|
var OHW_LOADER_SPIN_KEYFRAMES = "@keyframes ohw-loader-spin{to{transform:rotate(360deg)}}";
|
|
15368
15598
|
function OhwLoaderSpinner() {
|
|
15369
|
-
return /* @__PURE__ */ (0,
|
|
15370
|
-
/* @__PURE__ */ (0,
|
|
15371
|
-
/* @__PURE__ */ (0,
|
|
15599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15600
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("style", { suppressHydrationWarning: true, dangerouslySetInnerHTML: { __html: OHW_LOADER_SPIN_KEYFRAMES } }),
|
|
15601
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
15372
15602
|
"svg",
|
|
15373
15603
|
{
|
|
15374
15604
|
width: "28",
|
|
@@ -15378,8 +15608,8 @@ function OhwLoaderSpinner() {
|
|
|
15378
15608
|
"aria-hidden": true,
|
|
15379
15609
|
style: { animation: "ohw-loader-spin 0.7s linear infinite", transformOrigin: "center" },
|
|
15380
15610
|
children: [
|
|
15381
|
-
/* @__PURE__ */ (0,
|
|
15382
|
-
/* @__PURE__ */ (0,
|
|
15611
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "14", cy: "14", r: "11", style: { stroke: "var(--brand-border, #E7E5E4)" }, strokeWidth: "3" }),
|
|
15612
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15383
15613
|
"circle",
|
|
15384
15614
|
{
|
|
15385
15615
|
cx: "14",
|
|
@@ -15398,9 +15628,9 @@ function OhwLoaderSpinner() {
|
|
|
15398
15628
|
}
|
|
15399
15629
|
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){}})();`;
|
|
15400
15630
|
function OhwLoaderSurface() {
|
|
15401
|
-
return /* @__PURE__ */ (0,
|
|
15402
|
-
/* @__PURE__ */ (0,
|
|
15403
|
-
/* @__PURE__ */ (0,
|
|
15631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
15632
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id: "ohw-loader", suppressHydrationWarning: true, style: { ...OHW_LOADER_STYLE, display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(OhwLoaderSpinner, {}) }),
|
|
15633
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
15404
15634
|
"script",
|
|
15405
15635
|
{
|
|
15406
15636
|
suppressHydrationWarning: true,
|
|
@@ -18731,7 +18961,7 @@ var cva = (base, config) => (props) => {
|
|
|
18731
18961
|
|
|
18732
18962
|
// src/ui/toggle.tsx
|
|
18733
18963
|
var import_radix_ui2 = require("radix-ui");
|
|
18734
|
-
var
|
|
18964
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
18735
18965
|
var toggleVariants = cva(
|
|
18736
18966
|
"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",
|
|
18737
18967
|
{
|
|
@@ -18758,7 +18988,7 @@ function Toggle({
|
|
|
18758
18988
|
size,
|
|
18759
18989
|
...props
|
|
18760
18990
|
}) {
|
|
18761
|
-
return /* @__PURE__ */ (0,
|
|
18991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
18762
18992
|
import_radix_ui2.Toggle.Root,
|
|
18763
18993
|
{
|
|
18764
18994
|
"data-slot": "toggle",
|
|
@@ -18769,7 +18999,7 @@ function Toggle({
|
|
|
18769
18999
|
}
|
|
18770
19000
|
|
|
18771
19001
|
// src/ui/toggle-group.tsx
|
|
18772
|
-
var
|
|
19002
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
18773
19003
|
var ToggleGroupContext = React4.createContext({
|
|
18774
19004
|
value: "",
|
|
18775
19005
|
onValueChange: () => {
|
|
@@ -18782,13 +19012,13 @@ function ToggleGroup({
|
|
|
18782
19012
|
children,
|
|
18783
19013
|
...props
|
|
18784
19014
|
}) {
|
|
18785
|
-
return /* @__PURE__ */ (0,
|
|
19015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
18786
19016
|
"div",
|
|
18787
19017
|
{
|
|
18788
19018
|
role: "group",
|
|
18789
19019
|
className: cn("flex items-center gap-1 p-1 bg-muted rounded-md", className),
|
|
18790
19020
|
...props,
|
|
18791
|
-
children: /* @__PURE__ */ (0,
|
|
19021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToggleGroupContext.Provider, { value: { value, onValueChange }, children })
|
|
18792
19022
|
}
|
|
18793
19023
|
);
|
|
18794
19024
|
}
|
|
@@ -18799,7 +19029,7 @@ function ToggleGroupItem({
|
|
|
18799
19029
|
...props
|
|
18800
19030
|
}) {
|
|
18801
19031
|
const { value: groupValue, onValueChange } = React4.useContext(ToggleGroupContext);
|
|
18802
|
-
return /* @__PURE__ */ (0,
|
|
19032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
18803
19033
|
Toggle,
|
|
18804
19034
|
{
|
|
18805
19035
|
pressed: groupValue === value,
|
|
@@ -18821,10 +19051,10 @@ function ToggleGroupItem({
|
|
|
18821
19051
|
// src/ui/drag-handle.tsx
|
|
18822
19052
|
var React5 = __toESM(require("react"), 1);
|
|
18823
19053
|
var import_lucide_react3 = require("lucide-react");
|
|
18824
|
-
var
|
|
19054
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
18825
19055
|
var DragHandle = React5.forwardRef(
|
|
18826
19056
|
({ className, type = "button", ...props }, ref) => {
|
|
18827
|
-
return /* @__PURE__ */ (0,
|
|
19057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
18828
19058
|
"button",
|
|
18829
19059
|
{
|
|
18830
19060
|
ref,
|
|
@@ -18839,7 +19069,7 @@ var DragHandle = React5.forwardRef(
|
|
|
18839
19069
|
className
|
|
18840
19070
|
),
|
|
18841
19071
|
...props,
|
|
18842
|
-
children: /* @__PURE__ */ (0,
|
|
19072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.GripVertical, { className: "size-4 shrink-0", "aria-hidden": "true" })
|
|
18843
19073
|
}
|
|
18844
19074
|
);
|
|
18845
19075
|
}
|
|
@@ -18848,8 +19078,8 @@ DragHandle.displayName = "DragHandle";
|
|
|
18848
19078
|
|
|
18849
19079
|
// src/ui/custom-toolbar.tsx
|
|
18850
19080
|
var React6 = __toESM(require("react"), 1);
|
|
18851
|
-
var
|
|
18852
|
-
var CustomToolbar = React6.forwardRef(({ className, onMouseDown, ...props }, ref) => /* @__PURE__ */ (0,
|
|
19081
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
19082
|
+
var CustomToolbar = React6.forwardRef(({ className, onMouseDown, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18853
19083
|
"div",
|
|
18854
19084
|
{
|
|
18855
19085
|
ref,
|
|
@@ -18868,7 +19098,7 @@ var CustomToolbar = React6.forwardRef(({ className, onMouseDown, ...props }, ref
|
|
|
18868
19098
|
));
|
|
18869
19099
|
CustomToolbar.displayName = "CustomToolbar";
|
|
18870
19100
|
function CustomToolbarDivider({ className, ...props }) {
|
|
18871
|
-
return /* @__PURE__ */ (0,
|
|
19101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18872
19102
|
"span",
|
|
18873
19103
|
{
|
|
18874
19104
|
"aria-hidden": true,
|
|
@@ -18878,7 +19108,7 @@ function CustomToolbarDivider({ className, ...props }) {
|
|
|
18878
19108
|
);
|
|
18879
19109
|
}
|
|
18880
19110
|
var CustomToolbarButton = React6.forwardRef(
|
|
18881
|
-
({ className, active = false, type = "button", ...props }, ref) => /* @__PURE__ */ (0,
|
|
19111
|
+
({ className, active = false, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
18882
19112
|
"button",
|
|
18883
19113
|
{
|
|
18884
19114
|
ref,
|
|
@@ -18901,17 +19131,17 @@ var import_lucide_react4 = require("lucide-react");
|
|
|
18901
19131
|
// src/ui/dropdown-menu.tsx
|
|
18902
19132
|
var React7 = __toESM(require("react"), 1);
|
|
18903
19133
|
var import_radix_ui3 = require("radix-ui");
|
|
18904
|
-
var
|
|
19134
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
18905
19135
|
function DropdownMenu({ ...props }) {
|
|
18906
|
-
return /* @__PURE__ */ (0,
|
|
19136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui3.DropdownMenu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
18907
19137
|
}
|
|
18908
|
-
var DropdownMenuTrigger = React7.forwardRef((props, ref) => /* @__PURE__ */ (0,
|
|
19138
|
+
var DropdownMenuTrigger = React7.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui3.DropdownMenu.Trigger, { ref, "data-slot": "dropdown-menu-trigger", ...props }));
|
|
18909
19139
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
18910
19140
|
function DropdownMenuGroup({
|
|
18911
19141
|
className,
|
|
18912
19142
|
...props
|
|
18913
19143
|
}) {
|
|
18914
|
-
return /* @__PURE__ */ (0,
|
|
19144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18915
19145
|
import_radix_ui3.DropdownMenu.Group,
|
|
18916
19146
|
{
|
|
18917
19147
|
"data-slot": "dropdown-menu-group",
|
|
@@ -18925,7 +19155,7 @@ function DropdownMenuContent({
|
|
|
18925
19155
|
sideOffset = 6,
|
|
18926
19156
|
...props
|
|
18927
19157
|
}) {
|
|
18928
|
-
return /* @__PURE__ */ (0,
|
|
19158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_radix_ui3.DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18929
19159
|
import_radix_ui3.DropdownMenu.Content,
|
|
18930
19160
|
{
|
|
18931
19161
|
"data-slot": "dropdown-menu-content",
|
|
@@ -18949,7 +19179,7 @@ function DropdownMenuItem({
|
|
|
18949
19179
|
variant = "default",
|
|
18950
19180
|
...props
|
|
18951
19181
|
}) {
|
|
18952
|
-
return /* @__PURE__ */ (0,
|
|
19182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18953
19183
|
import_radix_ui3.DropdownMenu.Item,
|
|
18954
19184
|
{
|
|
18955
19185
|
"data-slot": "dropdown-menu-item",
|
|
@@ -18979,7 +19209,7 @@ function DropdownMenuSeparator({
|
|
|
18979
19209
|
className,
|
|
18980
19210
|
...props
|
|
18981
19211
|
}) {
|
|
18982
|
-
return /* @__PURE__ */ (0,
|
|
19212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
18983
19213
|
import_radix_ui3.DropdownMenu.Separator,
|
|
18984
19214
|
{
|
|
18985
19215
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -18991,18 +19221,18 @@ function DropdownMenuSeparator({
|
|
|
18991
19221
|
|
|
18992
19222
|
// src/ui/tooltip.tsx
|
|
18993
19223
|
var import_radix_ui4 = require("radix-ui");
|
|
18994
|
-
var
|
|
19224
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
18995
19225
|
function TooltipProvider({
|
|
18996
19226
|
delayDuration = 0,
|
|
18997
19227
|
...props
|
|
18998
19228
|
}) {
|
|
18999
|
-
return /* @__PURE__ */ (0,
|
|
19229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_radix_ui4.Tooltip.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
|
|
19000
19230
|
}
|
|
19001
19231
|
function Tooltip({ ...props }) {
|
|
19002
|
-
return /* @__PURE__ */ (0,
|
|
19232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_radix_ui4.Tooltip.Root, { "data-slot": "tooltip", ...props });
|
|
19003
19233
|
}
|
|
19004
19234
|
function TooltipTrigger({ ...props }) {
|
|
19005
|
-
return /* @__PURE__ */ (0,
|
|
19235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_radix_ui4.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
19006
19236
|
}
|
|
19007
19237
|
var arrowClassBySide = {
|
|
19008
19238
|
top: "before:bottom-0 before:left-1/2 before:-translate-x-1/2 before:translate-y-1/2",
|
|
@@ -19019,7 +19249,7 @@ function TooltipContent({
|
|
|
19019
19249
|
...props
|
|
19020
19250
|
}) {
|
|
19021
19251
|
const resolvedSide = side ?? "bottom";
|
|
19022
|
-
return /* @__PURE__ */ (0,
|
|
19252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_radix_ui4.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
19023
19253
|
import_radix_ui4.Tooltip.Content,
|
|
19024
19254
|
{
|
|
19025
19255
|
"data-slot": "tooltip-content",
|
|
@@ -19042,7 +19272,7 @@ function TooltipContent({
|
|
|
19042
19272
|
}
|
|
19043
19273
|
|
|
19044
19274
|
// src/ui/item-action-toolbar.tsx
|
|
19045
|
-
var
|
|
19275
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
19046
19276
|
function ToolbarActionTooltip({
|
|
19047
19277
|
label,
|
|
19048
19278
|
side = "bottom",
|
|
@@ -19050,10 +19280,10 @@ function ToolbarActionTooltip({
|
|
|
19050
19280
|
buttonProps,
|
|
19051
19281
|
children
|
|
19052
19282
|
}) {
|
|
19053
|
-
const button = /* @__PURE__ */ (0,
|
|
19054
|
-
return /* @__PURE__ */ (0,
|
|
19055
|
-
/* @__PURE__ */ (0,
|
|
19056
|
-
/* @__PURE__ */ (0,
|
|
19283
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomToolbarButton, { type: "button", "aria-label": label, disabled, ...buttonProps, children });
|
|
19284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
19285
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "inline-flex", children: button }) : button }),
|
|
19286
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { side, sideOffset: 9, children: label })
|
|
19057
19287
|
] });
|
|
19058
19288
|
}
|
|
19059
19289
|
function ItemActionToolbar({
|
|
@@ -19084,9 +19314,9 @@ function ItemActionToolbar({
|
|
|
19084
19314
|
const showDropdownToggle = dropdownOpen !== null && dropdownOpen !== void 0;
|
|
19085
19315
|
const showHeadingToggle = headingVisible !== null && headingVisible !== void 0;
|
|
19086
19316
|
const headingTooltip = headingVisible ? "Hide heading" : "Show heading";
|
|
19087
|
-
return /* @__PURE__ */ (0,
|
|
19088
|
-
showDropdownToggle ? /* @__PURE__ */ (0,
|
|
19089
|
-
/* @__PURE__ */ (0,
|
|
19317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CustomToolbar, { children: [
|
|
19318
|
+
showDropdownToggle ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
19319
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19090
19320
|
ToggleGroup,
|
|
19091
19321
|
{
|
|
19092
19322
|
value: dropdownOpen ? "open" : "closed",
|
|
@@ -19098,7 +19328,7 @@ function ItemActionToolbar({
|
|
|
19098
19328
|
e.stopPropagation();
|
|
19099
19329
|
},
|
|
19100
19330
|
children: [
|
|
19101
|
-
/* @__PURE__ */ (0,
|
|
19331
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19102
19332
|
ToggleGroupItem,
|
|
19103
19333
|
{
|
|
19104
19334
|
value: "closed",
|
|
@@ -19113,7 +19343,7 @@ function ItemActionToolbar({
|
|
|
19113
19343
|
children: "Closed"
|
|
19114
19344
|
}
|
|
19115
19345
|
),
|
|
19116
|
-
/* @__PURE__ */ (0,
|
|
19346
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19117
19347
|
ToggleGroupItem,
|
|
19118
19348
|
{
|
|
19119
19349
|
value: "open",
|
|
@@ -19131,9 +19361,9 @@ function ItemActionToolbar({
|
|
|
19131
19361
|
]
|
|
19132
19362
|
}
|
|
19133
19363
|
),
|
|
19134
|
-
/* @__PURE__ */ (0,
|
|
19364
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomToolbarDivider, {})
|
|
19135
19365
|
] }) : null,
|
|
19136
|
-
showEditLink ? /* @__PURE__ */ (0,
|
|
19366
|
+
showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19137
19367
|
ToolbarActionTooltip,
|
|
19138
19368
|
{
|
|
19139
19369
|
label: "Edit link",
|
|
@@ -19151,10 +19381,10 @@ function ItemActionToolbar({
|
|
|
19151
19381
|
e.stopPropagation();
|
|
19152
19382
|
}
|
|
19153
19383
|
},
|
|
19154
|
-
children: /* @__PURE__ */ (0,
|
|
19384
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
19155
19385
|
}
|
|
19156
19386
|
) : null,
|
|
19157
|
-
showStyle ? /* @__PURE__ */ (0,
|
|
19387
|
+
showStyle ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19158
19388
|
ToolbarActionTooltip,
|
|
19159
19389
|
{
|
|
19160
19390
|
label: "Style",
|
|
@@ -19175,10 +19405,10 @@ function ItemActionToolbar({
|
|
|
19175
19405
|
e.stopPropagation();
|
|
19176
19406
|
}
|
|
19177
19407
|
},
|
|
19178
|
-
children: /* @__PURE__ */ (0,
|
|
19408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Brush, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
19179
19409
|
}
|
|
19180
19410
|
) : null,
|
|
19181
|
-
showAddItem ? /* @__PURE__ */ (0,
|
|
19411
|
+
showAddItem ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19182
19412
|
ToolbarActionTooltip,
|
|
19183
19413
|
{
|
|
19184
19414
|
label: "Add item",
|
|
@@ -19192,10 +19422,10 @@ function ItemActionToolbar({
|
|
|
19192
19422
|
onAddItem?.();
|
|
19193
19423
|
}
|
|
19194
19424
|
},
|
|
19195
|
-
children: /* @__PURE__ */ (0,
|
|
19425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Plus, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
19196
19426
|
}
|
|
19197
19427
|
) : null,
|
|
19198
|
-
showHeadingToggle ? /* @__PURE__ */ (0,
|
|
19428
|
+
showHeadingToggle ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19199
19429
|
ToolbarActionTooltip,
|
|
19200
19430
|
{
|
|
19201
19431
|
label: headingTooltip,
|
|
@@ -19212,12 +19442,12 @@ function ItemActionToolbar({
|
|
|
19212
19442
|
onHeadingVisibleChange?.(!headingVisible);
|
|
19213
19443
|
}
|
|
19214
19444
|
},
|
|
19215
|
-
children: /* @__PURE__ */ (0,
|
|
19445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Heading, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
19216
19446
|
}
|
|
19217
19447
|
) : null,
|
|
19218
|
-
showMore ? /* @__PURE__ */ (0,
|
|
19219
|
-
/* @__PURE__ */ (0,
|
|
19220
|
-
/* @__PURE__ */ (0,
|
|
19448
|
+
showMore ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu, { open: moreOpen, onOpenChange: setMoreOpen, children: [
|
|
19449
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { open: moreOpen ? false : void 0, children: [
|
|
19450
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger, { asChild: true, disabled: moreDisabled, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
19221
19451
|
CustomToolbarButton,
|
|
19222
19452
|
{
|
|
19223
19453
|
type: "button",
|
|
@@ -19227,12 +19457,12 @@ function ItemActionToolbar({
|
|
|
19227
19457
|
e.preventDefault();
|
|
19228
19458
|
e.stopPropagation();
|
|
19229
19459
|
},
|
|
19230
|
-
children: /* @__PURE__ */ (0,
|
|
19460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.MoreHorizontal, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
19231
19461
|
}
|
|
19232
19462
|
) }) }),
|
|
19233
|
-
/* @__PURE__ */ (0,
|
|
19463
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipContent, { side: tooltipSide, sideOffset: 9, children: "More" })
|
|
19234
19464
|
] }),
|
|
19235
|
-
/* @__PURE__ */ (0,
|
|
19465
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19236
19466
|
DropdownMenuContent,
|
|
19237
19467
|
{
|
|
19238
19468
|
align: "end",
|
|
@@ -19243,39 +19473,39 @@ function ItemActionToolbar({
|
|
|
19243
19473
|
e.stopPropagation();
|
|
19244
19474
|
},
|
|
19245
19475
|
children: [
|
|
19246
|
-
/* @__PURE__ */ (0,
|
|
19247
|
-
/* @__PURE__ */ (0,
|
|
19476
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenuGroup, { children: [
|
|
19477
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19248
19478
|
DropdownMenuItem,
|
|
19249
19479
|
{
|
|
19250
19480
|
disabled: selectParentDisabled,
|
|
19251
19481
|
onSelect: () => onSelectParent?.(),
|
|
19252
19482
|
children: [
|
|
19253
|
-
/* @__PURE__ */ (0,
|
|
19483
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.CornerLeftUp, { size: 12, "aria-hidden": true }),
|
|
19254
19484
|
"Select parent"
|
|
19255
19485
|
]
|
|
19256
19486
|
}
|
|
19257
19487
|
),
|
|
19258
|
-
/* @__PURE__ */ (0,
|
|
19488
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19259
19489
|
DropdownMenuItem,
|
|
19260
19490
|
{
|
|
19261
19491
|
disabled: duplicateDisabled,
|
|
19262
19492
|
onSelect: () => onDuplicate?.(),
|
|
19263
19493
|
children: [
|
|
19264
|
-
/* @__PURE__ */ (0,
|
|
19494
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Copy, { size: 12, "aria-hidden": true }),
|
|
19265
19495
|
"Duplicate"
|
|
19266
19496
|
]
|
|
19267
19497
|
}
|
|
19268
19498
|
)
|
|
19269
19499
|
] }),
|
|
19270
|
-
/* @__PURE__ */ (0,
|
|
19271
|
-
/* @__PURE__ */ (0,
|
|
19500
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, {}),
|
|
19501
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
19272
19502
|
DropdownMenuItem,
|
|
19273
19503
|
{
|
|
19274
19504
|
variant: "destructive",
|
|
19275
19505
|
disabled: deleteDisabled,
|
|
19276
19506
|
onSelect: () => onDelete?.(),
|
|
19277
19507
|
children: [
|
|
19278
|
-
/* @__PURE__ */ (0,
|
|
19508
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Trash2, { size: 15, "aria-hidden": true }),
|
|
19279
19509
|
"Delete"
|
|
19280
19510
|
]
|
|
19281
19511
|
}
|
|
@@ -19289,8 +19519,8 @@ function ItemActionToolbar({
|
|
|
19289
19519
|
|
|
19290
19520
|
// src/ui/item-interaction-layer.tsx
|
|
19291
19521
|
var import_react13 = require("react");
|
|
19292
|
-
var
|
|
19293
|
-
var
|
|
19522
|
+
var import_react_dom4 = require("react-dom");
|
|
19523
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
19294
19524
|
var PRIMARY = "var(--ohw-primary, #0885FE)";
|
|
19295
19525
|
var CHROME_RADIUS = 6;
|
|
19296
19526
|
var FOCUS_RING = `0 0 0 4px color-mix(in srgb, ${PRIMARY} 12%, transparent)`;
|
|
@@ -19384,7 +19614,7 @@ function ClampedToolbarSlot({
|
|
|
19384
19614
|
window.removeEventListener("resize", clamp);
|
|
19385
19615
|
};
|
|
19386
19616
|
}, [placement, children, align]);
|
|
19387
|
-
return /* @__PURE__ */ (0,
|
|
19617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19388
19618
|
"div",
|
|
19389
19619
|
{
|
|
19390
19620
|
ref: slotRef,
|
|
@@ -19458,8 +19688,8 @@ function DetachedBelowToolbarSlot({
|
|
|
19458
19688
|
};
|
|
19459
19689
|
}, [centerX, belowRect, belowEl, children]);
|
|
19460
19690
|
if (!portalTarget) return null;
|
|
19461
|
-
return (0,
|
|
19462
|
-
/* @__PURE__ */ (0,
|
|
19691
|
+
return (0, import_react_dom4.createPortal)(
|
|
19692
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19463
19693
|
"div",
|
|
19464
19694
|
{
|
|
19465
19695
|
ref: slotRef,
|
|
@@ -19517,7 +19747,7 @@ function ItemInteractionLayer({
|
|
|
19517
19747
|
if (typeof elRef === "function") elRef(node);
|
|
19518
19748
|
else if (elRef) elRef.current = node;
|
|
19519
19749
|
};
|
|
19520
|
-
return /* @__PURE__ */ (0,
|
|
19750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
19521
19751
|
"div",
|
|
19522
19752
|
{
|
|
19523
19753
|
ref: setRootRef,
|
|
@@ -19534,7 +19764,7 @@ function ItemInteractionLayer({
|
|
|
19534
19764
|
display: hidden ? "none" : "block"
|
|
19535
19765
|
},
|
|
19536
19766
|
children: [
|
|
19537
|
-
/* @__PURE__ */ (0,
|
|
19767
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19538
19768
|
"div",
|
|
19539
19769
|
{
|
|
19540
19770
|
"aria-hidden": true,
|
|
@@ -19551,7 +19781,7 @@ function ItemInteractionLayer({
|
|
|
19551
19781
|
}
|
|
19552
19782
|
}
|
|
19553
19783
|
),
|
|
19554
|
-
itemDragEnabled && /* @__PURE__ */ (0,
|
|
19784
|
+
itemDragEnabled && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19555
19785
|
"div",
|
|
19556
19786
|
{
|
|
19557
19787
|
"data-ohw-item-drag-surface": "",
|
|
@@ -19568,14 +19798,14 @@ function ItemInteractionLayer({
|
|
|
19568
19798
|
}
|
|
19569
19799
|
}
|
|
19570
19800
|
),
|
|
19571
|
-
showDragHandle && /* @__PURE__ */ (0,
|
|
19801
|
+
showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19572
19802
|
"div",
|
|
19573
19803
|
{
|
|
19574
19804
|
"data-ohw-drag-handle-container": "",
|
|
19575
19805
|
className: "pointer-events-auto absolute left-0 top-1/2 z-10 -translate-x-[calc(100%+7px)] -translate-y-1/2",
|
|
19576
19806
|
style: isDragging ? { opacity: 0 } : void 0,
|
|
19577
19807
|
"aria-hidden": isDragging || void 0,
|
|
19578
|
-
children: /* @__PURE__ */ (0,
|
|
19808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19579
19809
|
DragHandle,
|
|
19580
19810
|
{
|
|
19581
19811
|
draggable: !dragDisabled,
|
|
@@ -19605,9 +19835,9 @@ function ItemInteractionLayer({
|
|
|
19605
19835
|
)
|
|
19606
19836
|
}
|
|
19607
19837
|
),
|
|
19608
|
-
showToolbar && state === "active-top" && /* @__PURE__ */ (0,
|
|
19609
|
-
showToolbar && state === "active-bottom" && !useDetachedBelowToolbar && /* @__PURE__ */ (0,
|
|
19610
|
-
useDetachedBelowToolbar && toolbarBelowRect ? /* @__PURE__ */ (0,
|
|
19838
|
+
showToolbar && state === "active-top" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ClampedToolbarSlot, { align: toolbarAlign, placement: "top", children: toolbar }),
|
|
19839
|
+
showToolbar && state === "active-bottom" && !useDetachedBelowToolbar && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ClampedToolbarSlot, { align: toolbarAlign, placement: "bottom", children: toolbar }),
|
|
19840
|
+
useDetachedBelowToolbar && toolbarBelowRect ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
19611
19841
|
DetachedBelowToolbarSlot,
|
|
19612
19842
|
{
|
|
19613
19843
|
centerX: rect.left + rect.width / 2,
|
|
@@ -20165,6 +20395,7 @@ function insertField(form, type) {
|
|
|
20165
20395
|
wrapper.setAttribute(FIELD_ATTR, key);
|
|
20166
20396
|
wrapper.setAttribute(FIELD_TYPE_ATTR, type);
|
|
20167
20397
|
wrapper.removeAttribute(DROPDOWN_OPEN_ATTR);
|
|
20398
|
+
wrapper.removeAttribute("data-half");
|
|
20168
20399
|
applyFieldType(wrapper, type);
|
|
20169
20400
|
const defaults = FIELD_DEFAULTS[type];
|
|
20170
20401
|
const input = fieldControlOf(wrapper);
|
|
@@ -20188,6 +20419,7 @@ function duplicateField(form, wrapper) {
|
|
|
20188
20419
|
const key = uniqueKey(form, `${fieldKeyOf(wrapper)}-copy`);
|
|
20189
20420
|
copy.setAttribute(FIELD_ATTR, key);
|
|
20190
20421
|
copy.removeAttribute(DROPDOWN_OPEN_ATTR);
|
|
20422
|
+
copy.removeAttribute("data-half");
|
|
20191
20423
|
clearDropdownOptionSelection(copy);
|
|
20192
20424
|
const input = fieldControlOf(copy);
|
|
20193
20425
|
if (input) {
|
|
@@ -20469,7 +20701,7 @@ function apiBase() {
|
|
|
20469
20701
|
function bridgeVersion() {
|
|
20470
20702
|
try {
|
|
20471
20703
|
if (true) {
|
|
20472
|
-
return "0.1.179-next.
|
|
20704
|
+
return "0.1.179-next.480";
|
|
20473
20705
|
}
|
|
20474
20706
|
} catch {
|
|
20475
20707
|
}
|
|
@@ -20483,7 +20715,7 @@ function stampBridgeVersionOnDocument() {
|
|
|
20483
20715
|
return;
|
|
20484
20716
|
}
|
|
20485
20717
|
try {
|
|
20486
|
-
const v = true ? "0.1.179-next.
|
|
20718
|
+
const v = true ? "0.1.179-next.480" : "";
|
|
20487
20719
|
if (v) {
|
|
20488
20720
|
document.documentElement.setAttribute("data-ohw-bridge-version", v);
|
|
20489
20721
|
window.__OHW_BRIDGE_VERSION__ = v;
|
|
@@ -20563,7 +20795,7 @@ function armLoaderHangBeacon(subdomain, fetchState, hangMs = 15e3) {
|
|
|
20563
20795
|
|
|
20564
20796
|
// src/ui/form-field-toolbar.tsx
|
|
20565
20797
|
var import_lucide_react5 = require("lucide-react");
|
|
20566
|
-
var
|
|
20798
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
20567
20799
|
var TYPE_ICONS = {
|
|
20568
20800
|
"short-text": import_lucide_react5.Type,
|
|
20569
20801
|
"long-text": import_lucide_react5.TextQuote,
|
|
@@ -20584,35 +20816,35 @@ function FormFieldToolbar({
|
|
|
20584
20816
|
const TypeIcon = TYPE_ICONS[type];
|
|
20585
20817
|
const typeLabel = FIELD_TYPES.find((entry) => entry.type === type)?.label ?? "Short text";
|
|
20586
20818
|
const showDropdownToggle = type === "dropdown" && dropdownOpen !== null && dropdownOpen !== void 0;
|
|
20587
|
-
return /* @__PURE__ */ (0,
|
|
20819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20588
20820
|
"div",
|
|
20589
20821
|
{
|
|
20590
20822
|
"data-ohw-field-toolbar": "",
|
|
20591
20823
|
className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
|
|
20592
20824
|
children: [
|
|
20593
|
-
/* @__PURE__ */ (0,
|
|
20594
|
-
/* @__PURE__ */ (0,
|
|
20825
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DropdownMenu, { children: [
|
|
20826
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20595
20827
|
"button",
|
|
20596
20828
|
{
|
|
20597
20829
|
type: "button",
|
|
20598
20830
|
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",
|
|
20599
20831
|
"data-ohw-field-type-trigger": "",
|
|
20600
20832
|
children: [
|
|
20601
|
-
/* @__PURE__ */ (0,
|
|
20833
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TypeIcon, { size: 14, strokeWidth: 1.75, "aria-hidden": true }),
|
|
20602
20834
|
typeLabel,
|
|
20603
|
-
/* @__PURE__ */ (0,
|
|
20835
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.ChevronDown, { size: 13, className: "text-muted-foreground", "aria-hidden": true })
|
|
20604
20836
|
]
|
|
20605
20837
|
}
|
|
20606
20838
|
) }),
|
|
20607
|
-
/* @__PURE__ */ (0,
|
|
20839
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DropdownMenuContent, { align: "start", sideOffset: 8, className: "min-w-47.5 p-1", children: FIELD_TYPES.map((entry) => {
|
|
20608
20840
|
const Icon = TYPE_ICONS[entry.type];
|
|
20609
|
-
return /* @__PURE__ */ (0,
|
|
20841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20610
20842
|
DropdownMenuItem,
|
|
20611
20843
|
{
|
|
20612
20844
|
onSelect: () => onTypeChange(entry.type),
|
|
20613
20845
|
className: "rounded-md py-2 text-[13px] " + (entry.type === type ? "bg-bridge-primary/10" : ""),
|
|
20614
20846
|
children: [
|
|
20615
|
-
/* @__PURE__ */ (0,
|
|
20847
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { size: 14, strokeWidth: 1.75, className: "shrink-0", "aria-hidden": true }),
|
|
20616
20848
|
entry.label
|
|
20617
20849
|
]
|
|
20618
20850
|
},
|
|
@@ -20620,8 +20852,8 @@ function FormFieldToolbar({
|
|
|
20620
20852
|
);
|
|
20621
20853
|
}) })
|
|
20622
20854
|
] }),
|
|
20623
|
-
/* @__PURE__ */ (0,
|
|
20624
|
-
/* @__PURE__ */ (0,
|
|
20855
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
20856
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20625
20857
|
"button",
|
|
20626
20858
|
{
|
|
20627
20859
|
type: "button",
|
|
@@ -20630,14 +20862,14 @@ function FormFieldToolbar({
|
|
|
20630
20862
|
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"),
|
|
20631
20863
|
"data-ohw-field-required-toggle": "",
|
|
20632
20864
|
children: [
|
|
20633
|
-
/* @__PURE__ */ (0,
|
|
20865
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Asterisk, { size: 14, strokeWidth: 2, "aria-hidden": true }),
|
|
20634
20866
|
"Required"
|
|
20635
20867
|
]
|
|
20636
20868
|
}
|
|
20637
20869
|
),
|
|
20638
|
-
showDropdownToggle ? /* @__PURE__ */ (0,
|
|
20639
|
-
/* @__PURE__ */ (0,
|
|
20640
|
-
/* @__PURE__ */ (0,
|
|
20870
|
+
showDropdownToggle ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
20871
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
20872
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20641
20873
|
ToggleGroup,
|
|
20642
20874
|
{
|
|
20643
20875
|
value: dropdownOpen ? "open" : "closed",
|
|
@@ -20649,7 +20881,7 @@ function FormFieldToolbar({
|
|
|
20649
20881
|
e.stopPropagation();
|
|
20650
20882
|
},
|
|
20651
20883
|
children: [
|
|
20652
|
-
/* @__PURE__ */ (0,
|
|
20884
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20653
20885
|
ToggleGroupItem,
|
|
20654
20886
|
{
|
|
20655
20887
|
value: "closed",
|
|
@@ -20668,7 +20900,7 @@ function FormFieldToolbar({
|
|
|
20668
20900
|
children: "Closed"
|
|
20669
20901
|
}
|
|
20670
20902
|
),
|
|
20671
|
-
/* @__PURE__ */ (0,
|
|
20903
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20672
20904
|
ToggleGroupItem,
|
|
20673
20905
|
{
|
|
20674
20906
|
value: "open",
|
|
@@ -20691,8 +20923,8 @@ function FormFieldToolbar({
|
|
|
20691
20923
|
}
|
|
20692
20924
|
)
|
|
20693
20925
|
] }) : null,
|
|
20694
|
-
/* @__PURE__ */ (0,
|
|
20695
|
-
/* @__PURE__ */ (0,
|
|
20926
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
20927
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20696
20928
|
"button",
|
|
20697
20929
|
{
|
|
20698
20930
|
type: "button",
|
|
@@ -20700,10 +20932,10 @@ function FormFieldToolbar({
|
|
|
20700
20932
|
"aria-label": "Duplicate",
|
|
20701
20933
|
onClick: onDuplicate,
|
|
20702
20934
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/70",
|
|
20703
|
-
children: /* @__PURE__ */ (0,
|
|
20935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Copy, { size: 15, strokeWidth: 1.75, "aria-hidden": true })
|
|
20704
20936
|
}
|
|
20705
20937
|
),
|
|
20706
|
-
/* @__PURE__ */ (0,
|
|
20938
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20707
20939
|
"button",
|
|
20708
20940
|
{
|
|
20709
20941
|
type: "button",
|
|
@@ -20711,7 +20943,7 @@ function FormFieldToolbar({
|
|
|
20711
20943
|
"aria-label": "Delete",
|
|
20712
20944
|
onClick: onDelete,
|
|
20713
20945
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/70",
|
|
20714
|
-
children: /* @__PURE__ */ (0,
|
|
20946
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Trash2, { size: 15, strokeWidth: 1.75, "aria-hidden": true })
|
|
20715
20947
|
}
|
|
20716
20948
|
)
|
|
20717
20949
|
]
|
|
@@ -20723,13 +20955,13 @@ function DropdownOptionToolbar({
|
|
|
20723
20955
|
onDuplicate,
|
|
20724
20956
|
onDelete
|
|
20725
20957
|
}) {
|
|
20726
|
-
return /* @__PURE__ */ (0,
|
|
20958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20727
20959
|
"div",
|
|
20728
20960
|
{
|
|
20729
20961
|
"data-ohw-dropdown-option-toolbar": "",
|
|
20730
20962
|
className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
|
|
20731
20963
|
children: [
|
|
20732
|
-
/* @__PURE__ */ (0,
|
|
20964
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20733
20965
|
"button",
|
|
20734
20966
|
{
|
|
20735
20967
|
type: "button",
|
|
@@ -20741,10 +20973,10 @@ function DropdownOptionToolbar({
|
|
|
20741
20973
|
onDuplicate();
|
|
20742
20974
|
},
|
|
20743
20975
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/70",
|
|
20744
|
-
children: /* @__PURE__ */ (0,
|
|
20976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Copy, { size: 15, strokeWidth: 1.75, "aria-hidden": true })
|
|
20745
20977
|
}
|
|
20746
20978
|
),
|
|
20747
|
-
/* @__PURE__ */ (0,
|
|
20979
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20748
20980
|
"button",
|
|
20749
20981
|
{
|
|
20750
20982
|
type: "button",
|
|
@@ -20757,7 +20989,7 @@ function DropdownOptionToolbar({
|
|
|
20757
20989
|
if (canDelete) onDelete();
|
|
20758
20990
|
},
|
|
20759
20991
|
className: "flex h-7 w-7 items-center justify-center rounded-md transition-colors " + (canDelete ? "text-foreground hover:bg-muted/70" : "cursor-not-allowed text-muted-foreground opacity-40"),
|
|
20760
|
-
children: /* @__PURE__ */ (0,
|
|
20992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react5.Trash2, { size: 15, strokeWidth: 1.75, "aria-hidden": true })
|
|
20761
20993
|
}
|
|
20762
20994
|
)
|
|
20763
20995
|
]
|
|
@@ -20765,21 +20997,21 @@ function DropdownOptionToolbar({
|
|
|
20765
20997
|
);
|
|
20766
20998
|
}
|
|
20767
20999
|
function FieldTypePicker({ onPick }) {
|
|
20768
|
-
return /* @__PURE__ */ (0,
|
|
21000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
20769
21001
|
"div",
|
|
20770
21002
|
{
|
|
20771
21003
|
"data-ohw-field-type-picker": "",
|
|
20772
21004
|
className: "pointer-events-auto grid w-[280px] grid-cols-2 gap-2 rounded-xl border border-border bg-background p-3 shadow-lg",
|
|
20773
21005
|
children: FIELD_TYPES.map((entry) => {
|
|
20774
21006
|
const Icon = TYPE_ICONS[entry.type];
|
|
20775
|
-
return /* @__PURE__ */ (0,
|
|
21007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
20776
21008
|
"button",
|
|
20777
21009
|
{
|
|
20778
21010
|
type: "button",
|
|
20779
21011
|
onClick: () => onPick(entry.type),
|
|
20780
21012
|
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",
|
|
20781
21013
|
children: [
|
|
20782
|
-
/* @__PURE__ */ (0,
|
|
21014
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { size: 26, strokeWidth: 1.5, "aria-hidden": true }),
|
|
20783
21015
|
entry.label
|
|
20784
21016
|
]
|
|
20785
21017
|
},
|
|
@@ -20797,7 +21029,7 @@ var import_lucide_react6 = require("lucide-react");
|
|
|
20797
21029
|
// src/ui/button.tsx
|
|
20798
21030
|
var React8 = __toESM(require("react"), 1);
|
|
20799
21031
|
var import_radix_ui5 = require("radix-ui");
|
|
20800
|
-
var
|
|
21032
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
20801
21033
|
var buttonVariants = cva(
|
|
20802
21034
|
"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",
|
|
20803
21035
|
{
|
|
@@ -20821,7 +21053,7 @@ var buttonVariants = cva(
|
|
|
20821
21053
|
var Button = React8.forwardRef(
|
|
20822
21054
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
20823
21055
|
const Comp = asChild ? import_radix_ui5.Slot.Root : "button";
|
|
20824
|
-
return /* @__PURE__ */ (0,
|
|
21056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
20825
21057
|
Comp,
|
|
20826
21058
|
{
|
|
20827
21059
|
ref,
|
|
@@ -20855,7 +21087,7 @@ var MEDIA_SKELETON_CSS = `
|
|
|
20855
21087
|
`;
|
|
20856
21088
|
|
|
20857
21089
|
// src/ui/MediaOverlay.tsx
|
|
20858
|
-
var
|
|
21090
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
20859
21091
|
var VIDEO_SETTINGS_BAR_INSET = 8;
|
|
20860
21092
|
var OVERLAY_BUTTON_STYLE = {
|
|
20861
21093
|
pointerEvents: "auto",
|
|
@@ -20923,7 +21155,7 @@ function MediaOverlay({
|
|
|
20923
21155
|
return () => anim.cancel();
|
|
20924
21156
|
}, [isUploading, fadingOut, onFadeOutComplete, hover.key]);
|
|
20925
21157
|
if (isUploading) {
|
|
20926
|
-
return /* @__PURE__ */ (0,
|
|
21158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
20927
21159
|
"div",
|
|
20928
21160
|
{
|
|
20929
21161
|
ref: skeletonRef,
|
|
@@ -20932,11 +21164,11 @@ function MediaOverlay({
|
|
|
20932
21164
|
"data-ohw-media-skeleton": "",
|
|
20933
21165
|
"aria-hidden": true,
|
|
20934
21166
|
style: { ...box, pointerEvents: "none" },
|
|
20935
|
-
children: /* @__PURE__ */ (0,
|
|
21167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("style", { children: MEDIA_SKELETON_CSS })
|
|
20936
21168
|
}
|
|
20937
21169
|
);
|
|
20938
21170
|
}
|
|
20939
|
-
const settingsBar = isVideo && !hover.isDragOver && showChrome ? /* @__PURE__ */ (0,
|
|
21171
|
+
const settingsBar = isVideo && !hover.isDragOver && showChrome ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
20940
21172
|
"div",
|
|
20941
21173
|
{
|
|
20942
21174
|
"data-ohw-bridge": "",
|
|
@@ -20952,7 +21184,7 @@ function MediaOverlay({
|
|
|
20952
21184
|
},
|
|
20953
21185
|
onClick: (e) => e.stopPropagation(),
|
|
20954
21186
|
children: [
|
|
20955
|
-
/* @__PURE__ */ (0,
|
|
21187
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
20956
21188
|
Button,
|
|
20957
21189
|
{
|
|
20958
21190
|
"data-ohw-media-overlay": "",
|
|
@@ -20967,10 +21199,10 @@ function MediaOverlay({
|
|
|
20967
21199
|
e.stopPropagation();
|
|
20968
21200
|
onVideoSettingsChange?.(hover.key, { autoplay: !autoplay });
|
|
20969
21201
|
},
|
|
20970
|
-
children: autoplay ? /* @__PURE__ */ (0,
|
|
21202
|
+
children: autoplay ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Pause, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Play, { size: 14 })
|
|
20971
21203
|
}
|
|
20972
21204
|
),
|
|
20973
|
-
/* @__PURE__ */ (0,
|
|
21205
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
20974
21206
|
Button,
|
|
20975
21207
|
{
|
|
20976
21208
|
"data-ohw-media-overlay": "",
|
|
@@ -20985,15 +21217,15 @@ function MediaOverlay({
|
|
|
20985
21217
|
e.stopPropagation();
|
|
20986
21218
|
onVideoSettingsChange?.(hover.key, { muted: !muted });
|
|
20987
21219
|
},
|
|
20988
|
-
children: muted ? /* @__PURE__ */ (0,
|
|
21220
|
+
children: muted ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.VolumeX, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Volume2, { size: 14 })
|
|
20989
21221
|
}
|
|
20990
21222
|
)
|
|
20991
21223
|
]
|
|
20992
21224
|
}
|
|
20993
21225
|
) : null;
|
|
20994
|
-
return /* @__PURE__ */ (0,
|
|
21226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
20995
21227
|
settingsBar,
|
|
20996
|
-
/* @__PURE__ */ (0,
|
|
21228
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
20997
21229
|
"div",
|
|
20998
21230
|
{
|
|
20999
21231
|
"data-ohw-bridge": "",
|
|
@@ -21012,7 +21244,7 @@ function MediaOverlay({
|
|
|
21012
21244
|
},
|
|
21013
21245
|
onClick: () => onSelect && !selected ? onSelect(hover.key) : onReplace(hover.key),
|
|
21014
21246
|
children: [
|
|
21015
|
-
/* @__PURE__ */ (0,
|
|
21247
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
21016
21248
|
Button,
|
|
21017
21249
|
{
|
|
21018
21250
|
ref: probeRef,
|
|
@@ -21030,12 +21262,12 @@ function MediaOverlay({
|
|
|
21030
21262
|
pointerEvents: "none"
|
|
21031
21263
|
},
|
|
21032
21264
|
children: [
|
|
21033
|
-
isVideo ? /* @__PURE__ */ (0,
|
|
21265
|
+
isVideo ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Film, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.ImageIcon, { size: 14 }),
|
|
21034
21266
|
replaceLabel
|
|
21035
21267
|
]
|
|
21036
21268
|
}
|
|
21037
21269
|
),
|
|
21038
|
-
showChrome && replaceMode !== "none" && /* @__PURE__ */ (0,
|
|
21270
|
+
showChrome && replaceMode !== "none" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
21039
21271
|
"div",
|
|
21040
21272
|
{
|
|
21041
21273
|
className: "flex items-center gap-1.5",
|
|
@@ -21045,7 +21277,7 @@ function MediaOverlay({
|
|
|
21045
21277
|
},
|
|
21046
21278
|
onClick: (e) => e.stopPropagation(),
|
|
21047
21279
|
children: [
|
|
21048
|
-
/* @__PURE__ */ (0,
|
|
21280
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
21049
21281
|
Button,
|
|
21050
21282
|
{
|
|
21051
21283
|
"data-ohw-media-overlay": "",
|
|
@@ -21071,12 +21303,12 @@ function MediaOverlay({
|
|
|
21071
21303
|
onReplace(hover.key);
|
|
21072
21304
|
},
|
|
21073
21305
|
children: [
|
|
21074
|
-
isVideo ? /* @__PURE__ */ (0,
|
|
21306
|
+
isVideo ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Film, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.ImageIcon, { size: 14 }),
|
|
21075
21307
|
replaceMode === "full" ? replaceLabel : null
|
|
21076
21308
|
]
|
|
21077
21309
|
}
|
|
21078
21310
|
),
|
|
21079
|
-
selected && onDelete ? /* @__PURE__ */ (0,
|
|
21311
|
+
selected && onDelete ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
21080
21312
|
Button,
|
|
21081
21313
|
{
|
|
21082
21314
|
"data-ohw-media-overlay": "",
|
|
@@ -21096,7 +21328,7 @@ function MediaOverlay({
|
|
|
21096
21328
|
e.stopPropagation();
|
|
21097
21329
|
onDelete(hover.key);
|
|
21098
21330
|
},
|
|
21099
|
-
children: /* @__PURE__ */ (0,
|
|
21331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Trash2, { size: 14 })
|
|
21100
21332
|
}
|
|
21101
21333
|
) : null
|
|
21102
21334
|
]
|
|
@@ -21110,7 +21342,7 @@ function MediaOverlay({
|
|
|
21110
21342
|
|
|
21111
21343
|
// src/ui/CarouselOverlay.tsx
|
|
21112
21344
|
var import_lucide_react7 = require("lucide-react");
|
|
21113
|
-
var
|
|
21345
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
21114
21346
|
var OVERLAY_BUTTON_STYLE2 = {
|
|
21115
21347
|
pointerEvents: "auto",
|
|
21116
21348
|
fontFamily: "Inter, sans-serif",
|
|
@@ -21123,7 +21355,7 @@ function CarouselOverlay({
|
|
|
21123
21355
|
cueOnly = false
|
|
21124
21356
|
}) {
|
|
21125
21357
|
const { rect } = hover;
|
|
21126
|
-
return /* @__PURE__ */ (0,
|
|
21358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
21127
21359
|
"div",
|
|
21128
21360
|
{
|
|
21129
21361
|
"data-ohw-bridge": "",
|
|
@@ -21141,7 +21373,7 @@ function CarouselOverlay({
|
|
|
21141
21373
|
background: "color-mix(in srgb, var(--color-bridge-primary) 20%, transparent)"
|
|
21142
21374
|
},
|
|
21143
21375
|
onClick: () => onEdit(hover.key),
|
|
21144
|
-
children: cueOnly ? null : /* @__PURE__ */ (0,
|
|
21376
|
+
children: cueOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
21145
21377
|
Button,
|
|
21146
21378
|
{
|
|
21147
21379
|
"data-ohw-carousel-overlay": "",
|
|
@@ -21155,7 +21387,7 @@ function CarouselOverlay({
|
|
|
21155
21387
|
onEdit(hover.key);
|
|
21156
21388
|
},
|
|
21157
21389
|
children: [
|
|
21158
|
-
/* @__PURE__ */ (0,
|
|
21390
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react7.GalleryHorizontal, { size: 14 }),
|
|
21159
21391
|
"Edit gallery"
|
|
21160
21392
|
]
|
|
21161
21393
|
}
|
|
@@ -21287,7 +21519,7 @@ function installHistoryKeyRelay() {
|
|
|
21287
21519
|
}
|
|
21288
21520
|
|
|
21289
21521
|
// src/ui/ai-section/AiSectionOverlay.tsx
|
|
21290
|
-
var
|
|
21522
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
21291
21523
|
var findSectionElement = findByInstanceId;
|
|
21292
21524
|
function readRect(instanceId) {
|
|
21293
21525
|
const el = findSectionElement(instanceId);
|
|
@@ -21401,8 +21633,8 @@ function ReviewButton({
|
|
|
21401
21633
|
color
|
|
21402
21634
|
}) {
|
|
21403
21635
|
const [hover, setHover] = (0, import_react14.useState)(false);
|
|
21404
|
-
return /* @__PURE__ */ (0,
|
|
21405
|
-
/* @__PURE__ */ (0,
|
|
21636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { position: "relative" }, children: [
|
|
21637
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
21406
21638
|
"button",
|
|
21407
21639
|
{
|
|
21408
21640
|
type: "button",
|
|
@@ -21426,7 +21658,7 @@ function ReviewButton({
|
|
|
21426
21658
|
children
|
|
21427
21659
|
}
|
|
21428
21660
|
),
|
|
21429
|
-
hover && /* @__PURE__ */ (0,
|
|
21661
|
+
hover && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
21430
21662
|
"div",
|
|
21431
21663
|
{
|
|
21432
21664
|
style: {
|
|
@@ -21629,8 +21861,8 @@ function AiSectionOverlay({
|
|
|
21629
21861
|
isLast
|
|
21630
21862
|
});
|
|
21631
21863
|
}, [activeSelectionId, selectionRect, postToParent2]);
|
|
21632
|
-
return /* @__PURE__ */ (0,
|
|
21633
|
-
hoverRect && /* @__PURE__ */ (0,
|
|
21864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
21865
|
+
hoverRect && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
21634
21866
|
"div",
|
|
21635
21867
|
{
|
|
21636
21868
|
"data-ohw-ai-section-hover": "",
|
|
@@ -21648,7 +21880,7 @@ function AiSectionOverlay({
|
|
|
21648
21880
|
}
|
|
21649
21881
|
}
|
|
21650
21882
|
),
|
|
21651
|
-
showSelectionBorder && selectionRect && /* @__PURE__ */ (0,
|
|
21883
|
+
showSelectionBorder && selectionRect && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
21652
21884
|
"div",
|
|
21653
21885
|
{
|
|
21654
21886
|
"data-ohw-ai-section-selected": "",
|
|
@@ -21666,8 +21898,8 @@ function AiSectionOverlay({
|
|
|
21666
21898
|
}
|
|
21667
21899
|
}
|
|
21668
21900
|
),
|
|
21669
|
-
reviewRect && /* @__PURE__ */ (0,
|
|
21670
|
-
subtractRect(reviewRect, navToggleHole).map((r2, i) => /* @__PURE__ */ (0,
|
|
21901
|
+
reviewRect && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
21902
|
+
subtractRect(reviewRect, navToggleHole).map((r2, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
21671
21903
|
"div",
|
|
21672
21904
|
{
|
|
21673
21905
|
"data-ohw-ai-review": "",
|
|
@@ -21687,7 +21919,7 @@ function AiSectionOverlay({
|
|
|
21687
21919
|
},
|
|
21688
21920
|
i
|
|
21689
21921
|
)),
|
|
21690
|
-
/* @__PURE__ */ (0,
|
|
21922
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
21691
21923
|
"div",
|
|
21692
21924
|
{
|
|
21693
21925
|
"aria-hidden": true,
|
|
@@ -21704,7 +21936,7 @@ function AiSectionOverlay({
|
|
|
21704
21936
|
}
|
|
21705
21937
|
}
|
|
21706
21938
|
),
|
|
21707
|
-
!reviewButtonsHidden && /* @__PURE__ */ (0,
|
|
21939
|
+
!reviewButtonsHidden && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
21708
21940
|
"div",
|
|
21709
21941
|
{
|
|
21710
21942
|
style: {
|
|
@@ -21719,8 +21951,8 @@ function AiSectionOverlay({
|
|
|
21719
21951
|
zIndex: 2147483201
|
|
21720
21952
|
},
|
|
21721
21953
|
children: [
|
|
21722
|
-
/* @__PURE__ */ (0,
|
|
21723
|
-
/* @__PURE__ */ (0,
|
|
21954
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ReviewButton, { label: "Accept", onClick: () => decide("accept"), background: PRIMARY2, color: "#ffffff", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react8.Check, { size: 16, strokeWidth: 2.5, "aria-hidden": true }) }),
|
|
21955
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ReviewButton, { label: "Discard", onClick: () => decide("discard"), background: "#EFF6FF", color: "#0c0a09", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react8.X, { size: 16, strokeWidth: 2, "aria-hidden": true }) })
|
|
21724
21956
|
]
|
|
21725
21957
|
}
|
|
21726
21958
|
)
|
|
@@ -21865,22 +22097,22 @@ function setMediaStripItemLink(tree, index, link) {
|
|
|
21865
22097
|
var React10 = __toESM(require("react"), 1);
|
|
21866
22098
|
var import_radix_ui6 = require("radix-ui");
|
|
21867
22099
|
var import_lucide_react9 = require("lucide-react");
|
|
21868
|
-
var
|
|
22100
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
21869
22101
|
function Dialog2({
|
|
21870
22102
|
...props
|
|
21871
22103
|
}) {
|
|
21872
|
-
return /* @__PURE__ */ (0,
|
|
22104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_radix_ui6.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
21873
22105
|
}
|
|
21874
22106
|
function DialogPortal({
|
|
21875
22107
|
...props
|
|
21876
22108
|
}) {
|
|
21877
|
-
return /* @__PURE__ */ (0,
|
|
22109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_radix_ui6.Dialog.Portal, { ...props });
|
|
21878
22110
|
}
|
|
21879
22111
|
function DialogOverlay({
|
|
21880
22112
|
className,
|
|
21881
22113
|
...props
|
|
21882
22114
|
}) {
|
|
21883
|
-
return /* @__PURE__ */ (0,
|
|
22115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
21884
22116
|
import_radix_ui6.Dialog.Overlay,
|
|
21885
22117
|
{
|
|
21886
22118
|
"data-slot": "dialog-overlay",
|
|
@@ -21893,9 +22125,9 @@ function DialogOverlay({
|
|
|
21893
22125
|
var DialogContent = React10.forwardRef(
|
|
21894
22126
|
({ className, children, showCloseButton = true, container, ...props }, ref) => {
|
|
21895
22127
|
const positionMode = container ? "absolute" : "fixed";
|
|
21896
|
-
return /* @__PURE__ */ (0,
|
|
21897
|
-
/* @__PURE__ */ (0,
|
|
21898
|
-
/* @__PURE__ */ (0,
|
|
22128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DialogPortal, { container: container ?? void 0, children: [
|
|
22129
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DialogOverlay, { className: cn(positionMode, "inset-0") }),
|
|
22130
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
21899
22131
|
import_radix_ui6.Dialog.Content,
|
|
21900
22132
|
{
|
|
21901
22133
|
ref,
|
|
@@ -21911,13 +22143,13 @@ var DialogContent = React10.forwardRef(
|
|
|
21911
22143
|
...props,
|
|
21912
22144
|
children: [
|
|
21913
22145
|
children,
|
|
21914
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
22146
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
21915
22147
|
import_radix_ui6.Dialog.Close,
|
|
21916
22148
|
{
|
|
21917
22149
|
type: "button",
|
|
21918
22150
|
className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50",
|
|
21919
22151
|
"aria-label": "Close",
|
|
21920
|
-
children: /* @__PURE__ */ (0,
|
|
22152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.X, { size: 16, "aria-hidden": true })
|
|
21921
22153
|
}
|
|
21922
22154
|
) : null
|
|
21923
22155
|
]
|
|
@@ -21931,13 +22163,13 @@ function DialogHeader({
|
|
|
21931
22163
|
className,
|
|
21932
22164
|
...props
|
|
21933
22165
|
}) {
|
|
21934
|
-
return /* @__PURE__ */ (0,
|
|
22166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
21935
22167
|
}
|
|
21936
22168
|
function DialogFooter({
|
|
21937
22169
|
className,
|
|
21938
22170
|
...props
|
|
21939
22171
|
}) {
|
|
21940
|
-
return /* @__PURE__ */ (0,
|
|
22172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
21941
22173
|
"div",
|
|
21942
22174
|
{
|
|
21943
22175
|
className: cn("flex items-center justify-end gap-2", className),
|
|
@@ -21945,7 +22177,7 @@ function DialogFooter({
|
|
|
21945
22177
|
}
|
|
21946
22178
|
);
|
|
21947
22179
|
}
|
|
21948
|
-
var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
22180
|
+
var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
21949
22181
|
import_radix_ui6.Dialog.Title,
|
|
21950
22182
|
{
|
|
21951
22183
|
ref,
|
|
@@ -21957,7 +22189,7 @@ var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
21957
22189
|
}
|
|
21958
22190
|
));
|
|
21959
22191
|
DialogTitle.displayName = import_radix_ui6.Dialog.Title.displayName;
|
|
21960
|
-
var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
22192
|
+
var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
21961
22193
|
import_radix_ui6.Dialog.Description,
|
|
21962
22194
|
{
|
|
21963
22195
|
ref,
|
|
@@ -21969,7 +22201,7 @@ DialogDescription.displayName = import_radix_ui6.Dialog.Description.displayName;
|
|
|
21969
22201
|
var DialogClose = import_radix_ui6.Dialog.Close;
|
|
21970
22202
|
|
|
21971
22203
|
// src/ui/ai-section/AiMediaStripOverlay.tsx
|
|
21972
|
-
var
|
|
22204
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
21973
22205
|
var PRIMARY3 = "var(--ohw-primary, #0885FE)";
|
|
21974
22206
|
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]";
|
|
21975
22207
|
function findMediaStripItemElement(sectionId, index) {
|
|
@@ -22058,7 +22290,7 @@ function StripToolbarSlot({ stripRect, children }) {
|
|
|
22058
22290
|
return () => ro.disconnect();
|
|
22059
22291
|
}, [centerX, children]);
|
|
22060
22292
|
const mobile = window.innerWidth <= 480;
|
|
22061
|
-
return /* @__PURE__ */ (0,
|
|
22293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22062
22294
|
"div",
|
|
22063
22295
|
{
|
|
22064
22296
|
ref: slotRef,
|
|
@@ -22118,14 +22350,14 @@ function ToolbarAction({
|
|
|
22118
22350
|
active = false,
|
|
22119
22351
|
children
|
|
22120
22352
|
}) {
|
|
22121
|
-
const button = /* @__PURE__ */ (0,
|
|
22122
|
-
return /* @__PURE__ */ (0,
|
|
22123
|
-
/* @__PURE__ */ (0,
|
|
22124
|
-
/* @__PURE__ */ (0,
|
|
22353
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CustomToolbarButton, { type: "button", "aria-label": label, disabled, active, onClick, className: "size-8", children });
|
|
22354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
|
|
22355
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "inline-flex", children: button }) : button }),
|
|
22356
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: label })
|
|
22125
22357
|
] });
|
|
22126
22358
|
}
|
|
22127
22359
|
function ToolbarSeparator() {
|
|
22128
|
-
return /* @__PURE__ */ (0,
|
|
22360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { "aria-hidden": true, className: "mx-0.5 block h-6 w-px shrink-0 bg-border" });
|
|
22129
22361
|
}
|
|
22130
22362
|
function OptionMenu({
|
|
22131
22363
|
label,
|
|
@@ -22134,24 +22366,24 @@ function OptionMenu({
|
|
|
22134
22366
|
onChange
|
|
22135
22367
|
}) {
|
|
22136
22368
|
const current = options.find((o) => o.value === value) ?? options[0];
|
|
22137
|
-
return /* @__PURE__ */ (0,
|
|
22138
|
-
/* @__PURE__ */ (0,
|
|
22139
|
-
/* @__PURE__ */ (0,
|
|
22140
|
-
/* @__PURE__ */ (0,
|
|
22369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-1.5 pl-1.5", children: [
|
|
22370
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-xs text-muted-foreground", children: label }),
|
|
22371
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DropdownMenu, { modal: false, children: [
|
|
22372
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
22141
22373
|
"button",
|
|
22142
22374
|
{
|
|
22143
22375
|
type: "button",
|
|
22144
22376
|
"aria-label": label,
|
|
22145
22377
|
className: "inline-flex h-8 min-w-[76px] items-center gap-[7px] rounded-[6px] bg-transparent px-2 text-[13px] font-medium text-foreground transition-colors hover:bg-muted data-[state=open]:bg-muted",
|
|
22146
22378
|
children: [
|
|
22147
|
-
/* @__PURE__ */ (0,
|
|
22148
|
-
/* @__PURE__ */ (0,
|
|
22379
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex-1 text-left", children: current.label }),
|
|
22380
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.ChevronDown, { size: 16, style: { pointerEvents: "none" } })
|
|
22149
22381
|
]
|
|
22150
22382
|
}
|
|
22151
22383
|
) }),
|
|
22152
|
-
/* @__PURE__ */ (0,
|
|
22384
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenuContent, { align: "end", sideOffset: 8, className: "w-[132px] min-w-[132px] p-1", children: options.map((option) => {
|
|
22153
22385
|
const selected = option.value === value;
|
|
22154
|
-
return /* @__PURE__ */ (0,
|
|
22386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
22155
22387
|
DropdownMenuItem,
|
|
22156
22388
|
{
|
|
22157
22389
|
role: "menuitemradio",
|
|
@@ -22159,8 +22391,8 @@ function OptionMenu({
|
|
|
22159
22391
|
onSelect: () => onChange(option.value),
|
|
22160
22392
|
className: cn("grid grid-cols-[1fr_16px] gap-2 py-2 pl-2 pr-2 text-[13px]", selected && "bg-muted"),
|
|
22161
22393
|
children: [
|
|
22162
|
-
/* @__PURE__ */ (0,
|
|
22163
|
-
selected && /* @__PURE__ */ (0,
|
|
22394
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: option.label }),
|
|
22395
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Check, { size: 16, className: "text-bridge-primary" })
|
|
22164
22396
|
]
|
|
22165
22397
|
},
|
|
22166
22398
|
option.value
|
|
@@ -22203,10 +22435,10 @@ function LinkModal({
|
|
|
22203
22435
|
onSave(next, newTab ? "new-tab" : "same-tab");
|
|
22204
22436
|
onClose();
|
|
22205
22437
|
};
|
|
22206
|
-
return /* @__PURE__ */ (0,
|
|
22207
|
-
/* @__PURE__ */ (0,
|
|
22208
|
-
/* @__PURE__ */ (0,
|
|
22209
|
-
/* @__PURE__ */ (0,
|
|
22438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Dialog2, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogContent, { "data-ohw-link-modal-root": "", className: "max-w-[400px] gap-4 p-5", children: [
|
|
22439
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogTitle, { className: "text-base", children: "Image link" }) }),
|
|
22440
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
22441
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22210
22442
|
"input",
|
|
22211
22443
|
{
|
|
22212
22444
|
autoFocus: true,
|
|
@@ -22229,14 +22461,14 @@ function LinkModal({
|
|
|
22229
22461
|
)
|
|
22230
22462
|
}
|
|
22231
22463
|
),
|
|
22232
|
-
invalid && /* @__PURE__ */ (0,
|
|
22233
|
-
/* @__PURE__ */ (0,
|
|
22234
|
-
/* @__PURE__ */ (0,
|
|
22464
|
+
invalid && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-destructive", children: "Enter a full URL starting with http:// or https://" }),
|
|
22465
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "flex items-center gap-2 text-[13px] text-foreground", children: [
|
|
22466
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { type: "checkbox", checked: newTab, onChange: (e) => setNewTab(e.target.checked) }),
|
|
22235
22467
|
"Open in new tab"
|
|
22236
22468
|
] })
|
|
22237
22469
|
] }),
|
|
22238
|
-
/* @__PURE__ */ (0,
|
|
22239
|
-
href && /* @__PURE__ */ (0,
|
|
22470
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogFooter, { children: [
|
|
22471
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22240
22472
|
"button",
|
|
22241
22473
|
{
|
|
22242
22474
|
type: "button",
|
|
@@ -22248,7 +22480,7 @@ function LinkModal({
|
|
|
22248
22480
|
children: "Remove link"
|
|
22249
22481
|
}
|
|
22250
22482
|
),
|
|
22251
|
-
/* @__PURE__ */ (0,
|
|
22483
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22252
22484
|
"button",
|
|
22253
22485
|
{
|
|
22254
22486
|
type: "button",
|
|
@@ -22257,7 +22489,7 @@ function LinkModal({
|
|
|
22257
22489
|
children: "Cancel"
|
|
22258
22490
|
}
|
|
22259
22491
|
),
|
|
22260
|
-
/* @__PURE__ */ (0,
|
|
22492
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22261
22493
|
"button",
|
|
22262
22494
|
{
|
|
22263
22495
|
type: "button",
|
|
@@ -22298,7 +22530,7 @@ function MediaStripToolbar({
|
|
|
22298
22530
|
const sizeValue = variant === "logos" ? typeof slots?.logoMaxHeight === "number" ? slots.logoMaxHeight : 48 : typeof slots?.cardWidth === "number" ? slots.cardWidth : 240;
|
|
22299
22531
|
const mobile = window.innerWidth <= 480;
|
|
22300
22532
|
const gatedLabel = (label) => itemEditOn ? label : "Turn on the star to edit this image";
|
|
22301
|
-
return /* @__PURE__ */ (0,
|
|
22533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
22302
22534
|
"div",
|
|
22303
22535
|
{
|
|
22304
22536
|
"data-ohw-bridge": "",
|
|
@@ -22307,7 +22539,7 @@ function MediaStripToolbar({
|
|
|
22307
22539
|
className: cn("flex flex-col items-center gap-1.5 font-sans", pending && "pointer-events-none opacity-60"),
|
|
22308
22540
|
style: { maxWidth: mobile ? "calc(100vw - 24px)" : void 0 },
|
|
22309
22541
|
children: [
|
|
22310
|
-
/* @__PURE__ */ (0,
|
|
22542
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
22311
22543
|
"div",
|
|
22312
22544
|
{
|
|
22313
22545
|
className: cn(
|
|
@@ -22316,8 +22548,8 @@ function MediaStripToolbar({
|
|
|
22316
22548
|
mobile ? "flex-wrap justify-center" : "flex-nowrap"
|
|
22317
22549
|
),
|
|
22318
22550
|
children: [
|
|
22319
|
-
/* @__PURE__ */ (0,
|
|
22320
|
-
/* @__PURE__ */ (0,
|
|
22551
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
|
|
22552
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22321
22553
|
CustomToolbarButton,
|
|
22322
22554
|
{
|
|
22323
22555
|
type: "button",
|
|
@@ -22325,7 +22557,7 @@ function MediaStripToolbar({
|
|
|
22325
22557
|
"aria-pressed": itemEditOn,
|
|
22326
22558
|
onClick: onToggleItemEdit,
|
|
22327
22559
|
className: "group size-8",
|
|
22328
|
-
children: /* @__PURE__ */ (0,
|
|
22560
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22329
22561
|
import_lucide_react10.Star,
|
|
22330
22562
|
{
|
|
22331
22563
|
size: 16,
|
|
@@ -22340,49 +22572,49 @@ function MediaStripToolbar({
|
|
|
22340
22572
|
)
|
|
22341
22573
|
}
|
|
22342
22574
|
) }),
|
|
22343
|
-
/* @__PURE__ */ (0,
|
|
22575
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: itemEditOn ? "Done editing this image" : "Edit this image" })
|
|
22344
22576
|
] }),
|
|
22345
|
-
/* @__PURE__ */ (0,
|
|
22346
|
-
/* @__PURE__ */ (0,
|
|
22347
|
-
/* @__PURE__ */ (0,
|
|
22348
|
-
/* @__PURE__ */ (0,
|
|
22349
|
-
/* @__PURE__ */ (0,
|
|
22577
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarSeparator, {}),
|
|
22578
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: gatedLabel("Change image"), onClick: onChangeImage, disabled: !itemEditOn, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Image, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
22579
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: gatedLabel("Link"), onClick: onOpenLink, disabled: !itemEditOn, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Link, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
22580
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: gatedLabel("Move left"), onClick: onMoveLeft, disabled: !itemEditOn || index <= 0, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.ArrowLeft, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
22581
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22350
22582
|
ToolbarAction,
|
|
22351
22583
|
{
|
|
22352
22584
|
label: gatedLabel("Move right"),
|
|
22353
22585
|
onClick: onMoveRight,
|
|
22354
22586
|
disabled: !itemEditOn || index >= itemCount - 1,
|
|
22355
|
-
children: /* @__PURE__ */ (0,
|
|
22587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.ArrowRight, { size: 16, style: { pointerEvents: "none" } })
|
|
22356
22588
|
}
|
|
22357
22589
|
),
|
|
22358
|
-
/* @__PURE__ */ (0,
|
|
22359
|
-
/* @__PURE__ */ (0,
|
|
22360
|
-
/* @__PURE__ */ (0,
|
|
22361
|
-
/* @__PURE__ */ (0,
|
|
22362
|
-
/* @__PURE__ */ (0,
|
|
22590
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: gatedLabel("Remove image"), onClick: onRemoveItem, disabled: !itemEditOn || itemCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.ImageMinus, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
22591
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarSeparator, {}),
|
|
22592
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(OptionMenu, { label: "Layout", value: variant, options: VARIANTS, onChange: onSetVariant }),
|
|
22593
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(OptionMenu, { label: "Hover", value: hover, options: HOVERS, onChange: onSetHover }),
|
|
22594
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22363
22595
|
ToolbarAction,
|
|
22364
22596
|
{
|
|
22365
22597
|
label: treatment === "grayscale" ? "Show in color" : "Show grayscale",
|
|
22366
22598
|
active: treatment === "grayscale",
|
|
22367
22599
|
onClick: () => onSetTreatment(treatment === "grayscale" ? "color" : "grayscale"),
|
|
22368
|
-
children: /* @__PURE__ */ (0,
|
|
22600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Palette, { size: 16, style: { pointerEvents: "none" } })
|
|
22369
22601
|
}
|
|
22370
22602
|
),
|
|
22371
|
-
/* @__PURE__ */ (0,
|
|
22372
|
-
ALIGNS.map(({ value, label, Icon }) => /* @__PURE__ */ (0,
|
|
22373
|
-
/* @__PURE__ */ (0,
|
|
22374
|
-
/* @__PURE__ */ (0,
|
|
22375
|
-
/* @__PURE__ */ (0,
|
|
22603
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarSeparator, {}),
|
|
22604
|
+
ALIGNS.map(({ value, label, Icon }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label, active: align === value, onClick: () => onSetAlign(value), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { size: 16, style: { pointerEvents: "none" } }) }, value)),
|
|
22605
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarSeparator, {}),
|
|
22606
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: "Smaller", onClick: () => onResize(-8), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Minus, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
22607
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "min-w-[40px] text-center text-xs tabular-nums text-muted-foreground", children: [
|
|
22376
22608
|
sizeValue,
|
|
22377
22609
|
"px"
|
|
22378
22610
|
] }),
|
|
22379
|
-
/* @__PURE__ */ (0,
|
|
22380
|
-
/* @__PURE__ */ (0,
|
|
22381
|
-
/* @__PURE__ */ (0,
|
|
22611
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: "Larger", onClick: () => onResize(8), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Plus, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
22612
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarSeparator, {}),
|
|
22613
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolbarAction, { label: "Add image", onClick: onAddItem, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.ImagePlus, { size: 16, style: { pointerEvents: "none" } }) })
|
|
22382
22614
|
]
|
|
22383
22615
|
}
|
|
22384
22616
|
),
|
|
22385
|
-
error && /* @__PURE__ */ (0,
|
|
22617
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "max-w-[260px] rounded-md bg-background px-2 py-1 text-center text-[11px] text-destructive shadow-sm", children: error })
|
|
22386
22618
|
]
|
|
22387
22619
|
}
|
|
22388
22620
|
) });
|
|
@@ -22514,11 +22746,11 @@ function AiMediaStripOverlay({
|
|
|
22514
22746
|
const activeItem = active ? activeItems[active.index] : void 0;
|
|
22515
22747
|
const activeHref = activeItem?.href ?? "";
|
|
22516
22748
|
const activeTarget = activeItem?.linkTarget === "same-tab" ? "same-tab" : "new-tab";
|
|
22517
|
-
return /* @__PURE__ */ (0,
|
|
22518
|
-
hoverRect && /* @__PURE__ */ (0,
|
|
22519
|
-
activeItemRect && activeStripRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
22520
|
-
/* @__PURE__ */ (0,
|
|
22521
|
-
/* @__PURE__ */ (0,
|
|
22749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
22750
|
+
hoverRect && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ItemInteractionLayer, { rect: hoverRect, state: "hover" }),
|
|
22751
|
+
activeItemRect && activeStripRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
22752
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ItemInteractionLayer, { rect: activeItemRect, state: "active-top" }),
|
|
22753
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StripToolbarSlot, { stripRect: activeStripRect, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22522
22754
|
MediaStripToolbar,
|
|
22523
22755
|
{
|
|
22524
22756
|
entry: activeEntry,
|
|
@@ -22584,7 +22816,7 @@ function AiMediaStripOverlay({
|
|
|
22584
22816
|
}
|
|
22585
22817
|
}
|
|
22586
22818
|
) }),
|
|
22587
|
-
/* @__PURE__ */ (0,
|
|
22819
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22588
22820
|
"div",
|
|
22589
22821
|
{
|
|
22590
22822
|
"data-ohw-bridge": "",
|
|
@@ -22600,7 +22832,7 @@ function AiMediaStripOverlay({
|
|
|
22600
22832
|
children: "Media item"
|
|
22601
22833
|
}
|
|
22602
22834
|
),
|
|
22603
|
-
linkOpen && /* @__PURE__ */ (0,
|
|
22835
|
+
linkOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
22604
22836
|
LinkModal,
|
|
22605
22837
|
{
|
|
22606
22838
|
href: activeHref,
|
|
@@ -22621,7 +22853,7 @@ function AiMediaStripOverlay({
|
|
|
22621
22853
|
// src/ui/ai-section/AiPricingCardOverlay.tsx
|
|
22622
22854
|
var import_react16 = require("react");
|
|
22623
22855
|
var import_lucide_react11 = require("lucide-react");
|
|
22624
|
-
var
|
|
22856
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
22625
22857
|
var PRIMARY4 = "var(--ohw-primary, #0885FE)";
|
|
22626
22858
|
var CHROME_SELECTOR2 = "[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]";
|
|
22627
22859
|
function findPricingCardElement(sectionId, index) {
|
|
@@ -22710,7 +22942,7 @@ function GridToolbarSlot({ gridRect, children }) {
|
|
|
22710
22942
|
return () => ro.disconnect();
|
|
22711
22943
|
}, [centerX, children]);
|
|
22712
22944
|
const mobile = window.innerWidth <= 480;
|
|
22713
|
-
return /* @__PURE__ */ (0,
|
|
22945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
22714
22946
|
"div",
|
|
22715
22947
|
{
|
|
22716
22948
|
ref: slotRef,
|
|
@@ -22745,7 +22977,7 @@ function requestValidateTree2(postToParent2, tree) {
|
|
|
22745
22977
|
});
|
|
22746
22978
|
}
|
|
22747
22979
|
function StyleSwatch({ style }) {
|
|
22748
|
-
return /* @__PURE__ */ (0,
|
|
22980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
22749
22981
|
"span",
|
|
22750
22982
|
{
|
|
22751
22983
|
"aria-hidden": true,
|
|
@@ -22759,19 +22991,19 @@ function StyleSwatch({ style }) {
|
|
|
22759
22991
|
);
|
|
22760
22992
|
}
|
|
22761
22993
|
function ButtonGlyph() {
|
|
22762
|
-
return /* @__PURE__ */ (0,
|
|
22763
|
-
/* @__PURE__ */ (0,
|
|
22764
|
-
/* @__PURE__ */ (0,
|
|
22994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { width: "18", height: "12", viewBox: "0 0 18 12", fill: "none", "aria-hidden": true, style: { pointerEvents: "none" }, children: [
|
|
22995
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { x: "0.75", y: "0.75", width: "16.5", height: "10.5", rx: "3", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
22996
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M5.5 6H12.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
22765
22997
|
] });
|
|
22766
22998
|
}
|
|
22767
22999
|
function FeatureGlyph({ mode }) {
|
|
22768
|
-
return /* @__PURE__ */ (0,
|
|
22769
|
-
/* @__PURE__ */ (0,
|
|
22770
|
-
/* @__PURE__ */ (0,
|
|
22771
|
-
/* @__PURE__ */ (0,
|
|
22772
|
-
/* @__PURE__ */ (0,
|
|
22773
|
-
/* @__PURE__ */ (0,
|
|
22774
|
-
mode === "add" && /* @__PURE__ */ (0,
|
|
23000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": true, style: { pointerEvents: "none" }, children: [
|
|
23001
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: "8", cy: "8", r: "7.25", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
23002
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M5 8.2L7.2 10.3L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
23003
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: "13.5", cy: "13.5", r: "4.25", fill: "var(--ohw-background, #ffffff)", stroke: "var(--ohw-background, #ffffff)", strokeWidth: "1" }),
|
|
23004
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: "13.5", cy: "13.5", r: "3.75", fill: "var(--ohw-background, #ffffff)", stroke: PRIMARY4, strokeWidth: "1" }),
|
|
23005
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M11.5 13.5H15.5", stroke: PRIMARY4, strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
23006
|
+
mode === "add" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M13.5 11.5V15.5", stroke: PRIMARY4, strokeWidth: "1.5", strokeLinecap: "round" })
|
|
22775
23007
|
] });
|
|
22776
23008
|
}
|
|
22777
23009
|
function ToolbarAction2({
|
|
@@ -22780,14 +23012,14 @@ function ToolbarAction2({
|
|
|
22780
23012
|
disabled = false,
|
|
22781
23013
|
children
|
|
22782
23014
|
}) {
|
|
22783
|
-
const button = /* @__PURE__ */ (0,
|
|
22784
|
-
return /* @__PURE__ */ (0,
|
|
22785
|
-
/* @__PURE__ */ (0,
|
|
22786
|
-
/* @__PURE__ */ (0,
|
|
23015
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CustomToolbarButton, { type: "button", "aria-label": label, disabled, onClick, className: "size-8", children });
|
|
23016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Tooltip, { children: [
|
|
23017
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex", children: button }) : button }),
|
|
23018
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: label })
|
|
22787
23019
|
] });
|
|
22788
23020
|
}
|
|
22789
23021
|
function ToolbarSeparator2() {
|
|
22790
|
-
return /* @__PURE__ */ (0,
|
|
23022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": true, className: "mx-0.5 block h-6 w-px shrink-0 bg-border" });
|
|
22791
23023
|
}
|
|
22792
23024
|
function CardStyleMenu({
|
|
22793
23025
|
value,
|
|
@@ -22795,7 +23027,7 @@ function CardStyleMenu({
|
|
|
22795
23027
|
disabled = false
|
|
22796
23028
|
}) {
|
|
22797
23029
|
const current = PRICING_CARD_STYLES.find((s) => s.value === value) ?? PRICING_CARD_STYLES[0];
|
|
22798
|
-
const trigger = /* @__PURE__ */ (0,
|
|
23030
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
22799
23031
|
"button",
|
|
22800
23032
|
{
|
|
22801
23033
|
type: "button",
|
|
@@ -22806,28 +23038,28 @@ function CardStyleMenu({
|
|
|
22806
23038
|
disabled && "cursor-not-allowed opacity-40 hover:bg-transparent"
|
|
22807
23039
|
),
|
|
22808
23040
|
children: [
|
|
22809
|
-
/* @__PURE__ */ (0,
|
|
22810
|
-
/* @__PURE__ */ (0,
|
|
22811
|
-
/* @__PURE__ */ (0,
|
|
23041
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyleSwatch, { style: current.value }),
|
|
23042
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "flex-1 text-left", children: current.label }),
|
|
23043
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.ChevronDown, { size: 16, style: { pointerEvents: "none" } })
|
|
22812
23044
|
]
|
|
22813
23045
|
}
|
|
22814
23046
|
);
|
|
22815
23047
|
if (disabled) {
|
|
22816
|
-
return /* @__PURE__ */ (0,
|
|
22817
|
-
/* @__PURE__ */ (0,
|
|
22818
|
-
/* @__PURE__ */ (0,
|
|
22819
|
-
/* @__PURE__ */ (0,
|
|
22820
|
-
/* @__PURE__ */ (0,
|
|
23048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-1.5 pl-1.5", children: [
|
|
23049
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-xs text-muted-foreground opacity-50", children: "Card style" }),
|
|
23050
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Tooltip, { children: [
|
|
23051
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex", children: trigger }) }),
|
|
23052
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: "Mark as featured to edit card style" })
|
|
22821
23053
|
] })
|
|
22822
23054
|
] });
|
|
22823
23055
|
}
|
|
22824
|
-
return /* @__PURE__ */ (0,
|
|
22825
|
-
/* @__PURE__ */ (0,
|
|
22826
|
-
/* @__PURE__ */ (0,
|
|
22827
|
-
/* @__PURE__ */ (0,
|
|
22828
|
-
/* @__PURE__ */ (0,
|
|
23056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-1.5 pl-1.5", children: [
|
|
23057
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-xs text-muted-foreground", children: "Card style" }),
|
|
23058
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenu, { modal: false, children: [
|
|
23059
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuTrigger, { asChild: true, children: trigger }),
|
|
23060
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuContent, { align: "end", sideOffset: 8, className: "w-[152px] min-w-[152px] p-1", children: PRICING_CARD_STYLES.map((style) => {
|
|
22829
23061
|
const selected = style.value === value;
|
|
22830
|
-
return /* @__PURE__ */ (0,
|
|
23062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
22831
23063
|
DropdownMenuItem,
|
|
22832
23064
|
{
|
|
22833
23065
|
role: "menuitemradio",
|
|
@@ -22835,9 +23067,9 @@ function CardStyleMenu({
|
|
|
22835
23067
|
onSelect: () => onChange(style.value),
|
|
22836
23068
|
className: cn("grid grid-cols-[18px_1fr_16px] gap-2 py-2 pl-2 pr-2 text-[13px]", selected && "bg-muted"),
|
|
22837
23069
|
children: [
|
|
22838
|
-
/* @__PURE__ */ (0,
|
|
22839
|
-
/* @__PURE__ */ (0,
|
|
22840
|
-
selected && /* @__PURE__ */ (0,
|
|
23070
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyleSwatch, { style: style.value }),
|
|
23071
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: style.label }),
|
|
23072
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Check, { size: 16, className: "text-bridge-primary" })
|
|
22841
23073
|
]
|
|
22842
23074
|
},
|
|
22843
23075
|
style.value
|
|
@@ -22867,7 +23099,7 @@ function PricingCardToolbar({
|
|
|
22867
23099
|
const style = pricingCardStyle(entry.tree, index);
|
|
22868
23100
|
const featuredTag = pricingCardFeaturedTag(entry.tree, index);
|
|
22869
23101
|
const mobile = window.innerWidth <= 480;
|
|
22870
|
-
return /* @__PURE__ */ (0,
|
|
23102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
22871
23103
|
"div",
|
|
22872
23104
|
{
|
|
22873
23105
|
"data-ohw-bridge": "",
|
|
@@ -22879,7 +23111,7 @@ function PricingCardToolbar({
|
|
|
22879
23111
|
),
|
|
22880
23112
|
style: { maxWidth: mobile ? "calc(100vw - 24px)" : void 0 },
|
|
22881
23113
|
children: [
|
|
22882
|
-
/* @__PURE__ */ (0,
|
|
23114
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
22883
23115
|
"div",
|
|
22884
23116
|
{
|
|
22885
23117
|
className: cn(
|
|
@@ -22888,8 +23120,8 @@ function PricingCardToolbar({
|
|
|
22888
23120
|
mobile ? "flex-wrap justify-center" : "flex-nowrap"
|
|
22889
23121
|
),
|
|
22890
23122
|
children: [
|
|
22891
|
-
/* @__PURE__ */ (0,
|
|
22892
|
-
/* @__PURE__ */ (0,
|
|
23123
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Tooltip, { children: [
|
|
23124
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
22893
23125
|
CustomToolbarButton,
|
|
22894
23126
|
{
|
|
22895
23127
|
type: "button",
|
|
@@ -22897,7 +23129,7 @@ function PricingCardToolbar({
|
|
|
22897
23129
|
"aria-pressed": featuredTag,
|
|
22898
23130
|
onClick: () => onSetFeaturedTag(!featuredTag),
|
|
22899
23131
|
className: "group size-8",
|
|
22900
|
-
children: /* @__PURE__ */ (0,
|
|
23132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
22901
23133
|
import_lucide_react11.Star,
|
|
22902
23134
|
{
|
|
22903
23135
|
size: 16,
|
|
@@ -22912,25 +23144,25 @@ function PricingCardToolbar({
|
|
|
22912
23144
|
)
|
|
22913
23145
|
}
|
|
22914
23146
|
) }),
|
|
22915
|
-
/* @__PURE__ */ (0,
|
|
23147
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipContent, { side: "bottom", sideOffset: 8, children: featuredTag ? "Unmark featured" : "Mark as featured" })
|
|
22916
23148
|
] }),
|
|
22917
|
-
/* @__PURE__ */ (0,
|
|
22918
|
-
/* @__PURE__ */ (0,
|
|
22919
|
-
/* @__PURE__ */ (0,
|
|
22920
|
-
/* @__PURE__ */ (0,
|
|
22921
|
-
/* @__PURE__ */ (0,
|
|
22922
|
-
/* @__PURE__ */ (0,
|
|
22923
|
-
/* @__PURE__ */ (0,
|
|
23149
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarSeparator2, {}),
|
|
23150
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardStyleMenu, { value: style, onChange: onSetStyle, disabled: !featuredTag }),
|
|
23151
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarSeparator2, {}),
|
|
23152
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarAction2, { label: "Add button", onClick: onAddButton, disabled: buttonCount >= 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ButtonGlyph, {}) }),
|
|
23153
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarAction2, { label: "Remove button", onClick: onRemoveButton, disabled: buttonCount === 0, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "relative inline-flex", children: [
|
|
23154
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ButtonGlyph, {}),
|
|
23155
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Minus, { size: 10, strokeWidth: 2.5, className: "absolute -right-1.5 -top-1.5 rounded-full bg-background text-bridge-primary" })
|
|
22924
23156
|
] }) }),
|
|
22925
|
-
/* @__PURE__ */ (0,
|
|
22926
|
-
/* @__PURE__ */ (0,
|
|
22927
|
-
/* @__PURE__ */ (0,
|
|
22928
|
-
/* @__PURE__ */ (0,
|
|
22929
|
-
/* @__PURE__ */ (0,
|
|
23157
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarAction2, { label: "Add feature", onClick: onAddFeature, disabled: featureCount >= 10, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureGlyph, { mode: "add" }) }),
|
|
23158
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarAction2, { label: "Remove feature", onClick: onRemoveFeature, disabled: featureCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeatureGlyph, { mode: "remove" }) }),
|
|
23159
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarSeparator2, {}),
|
|
23160
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarAction2, { label: "Add tier", onClick: onAddTier, disabled: collectionCount >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Plus, { size: 16, style: { pointerEvents: "none" } }) }),
|
|
23161
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarAction2, { label: "Remove tier", onClick: onRemoveTier, disabled: collectionCount <= 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Minus, { size: 16, style: { pointerEvents: "none" } }) })
|
|
22930
23162
|
]
|
|
22931
23163
|
}
|
|
22932
23164
|
),
|
|
22933
|
-
error && /* @__PURE__ */ (0,
|
|
23165
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "max-w-[260px] rounded-md bg-background px-2 py-1 text-center text-[11px] text-destructive shadow-sm", children: error })
|
|
22934
23166
|
]
|
|
22935
23167
|
}
|
|
22936
23168
|
) });
|
|
@@ -23048,11 +23280,11 @@ function AiPricingCardOverlay({
|
|
|
23048
23280
|
const activeCardRect = useLiveCardRect(active);
|
|
23049
23281
|
const activeGridRect = useLiveCardRect(active, true);
|
|
23050
23282
|
const hoverRect = useLiveCardRect(hover && !sameRef2(hover, active) ? hover : null);
|
|
23051
|
-
return /* @__PURE__ */ (0,
|
|
23052
|
-
hoverRect && /* @__PURE__ */ (0,
|
|
23053
|
-
activeCardRect && activeGridRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
23054
|
-
/* @__PURE__ */ (0,
|
|
23055
|
-
/* @__PURE__ */ (0,
|
|
23283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
23284
|
+
hoverRect && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: hoverRect, state: "hover" }),
|
|
23285
|
+
activeCardRect && activeGridRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
23286
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: activeCardRect, state: "active-top" }),
|
|
23287
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(GridToolbarSlot, { gridRect: activeGridRect, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
23056
23288
|
PricingCardToolbar,
|
|
23057
23289
|
{
|
|
23058
23290
|
entry: activeEntry,
|
|
@@ -23080,7 +23312,7 @@ function AiPricingCardOverlay({
|
|
|
23080
23312
|
onRemoveFeature: () => runMutation(active.sectionId, (tree) => removePricingCardFeature(tree, active.index))
|
|
23081
23313
|
}
|
|
23082
23314
|
) }),
|
|
23083
|
-
/* @__PURE__ */ (0,
|
|
23315
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
23084
23316
|
"div",
|
|
23085
23317
|
{
|
|
23086
23318
|
"data-ohw-bridge": "",
|
|
@@ -23145,7 +23377,7 @@ function clearVideo(tree, path) {
|
|
|
23145
23377
|
}
|
|
23146
23378
|
|
|
23147
23379
|
// src/ui/ai-section/AiVideoOverlay.tsx
|
|
23148
|
-
var
|
|
23380
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
23149
23381
|
var PRIMARY5 = "#0885FE";
|
|
23150
23382
|
var OHW_BLUE = `var(--ohw-primary, ${PRIMARY5})`;
|
|
23151
23383
|
var OHW_BLUE_DARK = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY5}) 60%, #000000)`;
|
|
@@ -23213,7 +23445,7 @@ function Pill({
|
|
|
23213
23445
|
onClick,
|
|
23214
23446
|
disabled
|
|
23215
23447
|
}) {
|
|
23216
|
-
return /* @__PURE__ */ (0,
|
|
23448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
23217
23449
|
"button",
|
|
23218
23450
|
{
|
|
23219
23451
|
type: "button",
|
|
@@ -23272,8 +23504,8 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
23272
23504
|
onCommit(id);
|
|
23273
23505
|
}
|
|
23274
23506
|
};
|
|
23275
|
-
return /* @__PURE__ */ (0,
|
|
23276
|
-
/* @__PURE__ */ (0,
|
|
23507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%", maxWidth: 280 }, children: [
|
|
23508
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
23277
23509
|
"div",
|
|
23278
23510
|
{
|
|
23279
23511
|
style: {
|
|
@@ -23289,7 +23521,7 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
23289
23521
|
boxShadow: invalid ? "inset 0 0 0 1.5px #EF4444" : "none"
|
|
23290
23522
|
},
|
|
23291
23523
|
children: [
|
|
23292
|
-
/* @__PURE__ */ (0,
|
|
23524
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
23293
23525
|
"span",
|
|
23294
23526
|
{
|
|
23295
23527
|
style: {
|
|
@@ -23304,7 +23536,7 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
23304
23536
|
children: "Video"
|
|
23305
23537
|
}
|
|
23306
23538
|
),
|
|
23307
|
-
/* @__PURE__ */ (0,
|
|
23539
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
23308
23540
|
"input",
|
|
23309
23541
|
{
|
|
23310
23542
|
type: "text",
|
|
@@ -23341,7 +23573,7 @@ function VideoUrlInput({ value, onCommit }) {
|
|
|
23341
23573
|
]
|
|
23342
23574
|
}
|
|
23343
23575
|
),
|
|
23344
|
-
invalid && /* @__PURE__ */ (0,
|
|
23576
|
+
invalid && /* @__PURE__ */ (0, import_jsx_runtime25.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." })
|
|
23345
23577
|
] });
|
|
23346
23578
|
}
|
|
23347
23579
|
function VideoToolbar({
|
|
@@ -23351,7 +23583,7 @@ function VideoToolbar({
|
|
|
23351
23583
|
onSetVideoId,
|
|
23352
23584
|
onRemove
|
|
23353
23585
|
}) {
|
|
23354
|
-
return /* @__PURE__ */ (0,
|
|
23586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
23355
23587
|
"div",
|
|
23356
23588
|
{
|
|
23357
23589
|
"data-ohw-bridge": "",
|
|
@@ -23371,9 +23603,9 @@ function VideoToolbar({
|
|
|
23371
23603
|
opacity: pending ? 0.6 : 1
|
|
23372
23604
|
},
|
|
23373
23605
|
children: [
|
|
23374
|
-
/* @__PURE__ */ (0,
|
|
23375
|
-
/* @__PURE__ */ (0,
|
|
23376
|
-
error && /* @__PURE__ */ (0,
|
|
23606
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VideoUrlInput, { value: videoId, onCommit: onSetVideoId }),
|
|
23607
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Pill, { label: "Remove video", onClick: onRemove, disabled: !videoId }),
|
|
23608
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
|
|
23377
23609
|
]
|
|
23378
23610
|
}
|
|
23379
23611
|
);
|
|
@@ -23493,8 +23725,8 @@ function AiVideoOverlay({
|
|
|
23493
23725
|
const activeBlockRect = useLiveBlockRect(active);
|
|
23494
23726
|
const TOOLBAR_APPROX_H = 90;
|
|
23495
23727
|
const toolbarState = activeBlockRect && activeBlockRect.top < TOOLBAR_APPROX_H ? "active-bottom" : "active-top";
|
|
23496
|
-
return /* @__PURE__ */ (0,
|
|
23497
|
-
hoverHandleRect && hover && /* @__PURE__ */ (0,
|
|
23728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
23729
|
+
hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
23498
23730
|
"button",
|
|
23499
23731
|
{
|
|
23500
23732
|
type: "button",
|
|
@@ -23522,15 +23754,15 @@ function AiVideoOverlay({
|
|
|
23522
23754
|
fontSize: 14,
|
|
23523
23755
|
fontWeight: 700
|
|
23524
23756
|
},
|
|
23525
|
-
children: /* @__PURE__ */ (0,
|
|
23757
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.Star, { size: 14, style: { pointerEvents: "none" } })
|
|
23526
23758
|
}
|
|
23527
23759
|
),
|
|
23528
|
-
activeBlockRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
23760
|
+
activeBlockRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
23529
23761
|
ItemInteractionLayer,
|
|
23530
23762
|
{
|
|
23531
23763
|
rect: activeBlockRect,
|
|
23532
23764
|
state: toolbarState,
|
|
23533
|
-
toolbar: /* @__PURE__ */ (0,
|
|
23765
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
23534
23766
|
VideoToolbar,
|
|
23535
23767
|
{
|
|
23536
23768
|
videoId: videoIdAt(activeEntry.tree, active.path),
|
|
@@ -23605,7 +23837,7 @@ function setCarouselAutoplay(tree, on) {
|
|
|
23605
23837
|
}
|
|
23606
23838
|
|
|
23607
23839
|
// src/ui/ai-section/AiFadeCarouselOverlay.tsx
|
|
23608
|
-
var
|
|
23840
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
23609
23841
|
var PRIMARY6 = "#0885FE";
|
|
23610
23842
|
var OHW_BLUE2 = `var(--ohw-primary, ${PRIMARY6})`;
|
|
23611
23843
|
var OHW_BLUE_DARK2 = `color-mix(in srgb, var(--ohw-primary, ${PRIMARY6}) 60%, #000000)`;
|
|
@@ -23688,7 +23920,7 @@ function requestAssetPick2(postToParent2) {
|
|
|
23688
23920
|
});
|
|
23689
23921
|
}
|
|
23690
23922
|
function Pill2({ label, onClick, disabled }) {
|
|
23691
|
-
return /* @__PURE__ */ (0,
|
|
23923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
23692
23924
|
"button",
|
|
23693
23925
|
{
|
|
23694
23926
|
type: "button",
|
|
@@ -23722,7 +23954,7 @@ function TogglePill({
|
|
|
23722
23954
|
onToggle,
|
|
23723
23955
|
disabled
|
|
23724
23956
|
}) {
|
|
23725
|
-
return /* @__PURE__ */ (0,
|
|
23957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
23726
23958
|
"button",
|
|
23727
23959
|
{
|
|
23728
23960
|
type: "button",
|
|
@@ -23751,7 +23983,7 @@ function TogglePill({
|
|
|
23751
23983
|
},
|
|
23752
23984
|
children: [
|
|
23753
23985
|
label,
|
|
23754
|
-
/* @__PURE__ */ (0,
|
|
23986
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
23755
23987
|
"span",
|
|
23756
23988
|
{
|
|
23757
23989
|
"aria-hidden": true,
|
|
@@ -23767,7 +23999,7 @@ function TogglePill({
|
|
|
23767
23999
|
background: on ? OHW_BLUE_DARK2 : "#CBD5E1",
|
|
23768
24000
|
transition: "background 120ms ease"
|
|
23769
24001
|
},
|
|
23770
|
-
children: /* @__PURE__ */ (0,
|
|
24002
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
23771
24003
|
"span",
|
|
23772
24004
|
{
|
|
23773
24005
|
style: {
|
|
@@ -23796,7 +24028,7 @@ function CarouselSlideToolbar({
|
|
|
23796
24028
|
onChangeImage,
|
|
23797
24029
|
onToggleAutoplay
|
|
23798
24030
|
}) {
|
|
23799
|
-
return /* @__PURE__ */ (0,
|
|
24031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
23800
24032
|
"div",
|
|
23801
24033
|
{
|
|
23802
24034
|
"data-ohw-bridge": "",
|
|
@@ -23819,11 +24051,11 @@ function CarouselSlideToolbar({
|
|
|
23819
24051
|
pointerEvents: pending ? "none" : "auto"
|
|
23820
24052
|
},
|
|
23821
24053
|
children: [
|
|
23822
|
-
/* @__PURE__ */ (0,
|
|
23823
|
-
/* @__PURE__ */ (0,
|
|
23824
|
-
/* @__PURE__ */ (0,
|
|
24054
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
|
|
24055
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Pill2, { label: "Change Image", onClick: onChangeImage }),
|
|
24056
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TogglePill, { label: "Autoplay", on: autoplay, onToggle: onToggleAutoplay })
|
|
23825
24057
|
] }),
|
|
23826
|
-
error && /* @__PURE__ */ (0,
|
|
24058
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { color: "#FCA5A5", fontSize: 11, maxWidth: 220, textAlign: "center" }, children: error })
|
|
23827
24059
|
]
|
|
23828
24060
|
}
|
|
23829
24061
|
);
|
|
@@ -23963,8 +24195,8 @@ function AiFadeCarouselOverlay({
|
|
|
23963
24195
|
const activeItemRect = useLiveItemRect2(active);
|
|
23964
24196
|
const TOOLBAR_APPROX_H = 90;
|
|
23965
24197
|
const toolbarState = activeItemRect && activeItemRect.top < TOOLBAR_APPROX_H ? "active-bottom" : "active-top";
|
|
23966
|
-
return /* @__PURE__ */ (0,
|
|
23967
|
-
hoverHandleRect && hover && /* @__PURE__ */ (0,
|
|
24198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
24199
|
+
hoverHandleRect && hover && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
23968
24200
|
"button",
|
|
23969
24201
|
{
|
|
23970
24202
|
type: "button",
|
|
@@ -23993,10 +24225,10 @@ function AiFadeCarouselOverlay({
|
|
|
23993
24225
|
fontSize: 14,
|
|
23994
24226
|
fontWeight: 700
|
|
23995
24227
|
},
|
|
23996
|
-
children: /* @__PURE__ */ (0,
|
|
24228
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react13.Star, { size: 14, style: { pointerEvents: "none" } })
|
|
23997
24229
|
}
|
|
23998
24230
|
),
|
|
23999
|
-
swapping && /* @__PURE__ */ (0,
|
|
24231
|
+
swapping && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
24000
24232
|
"div",
|
|
24001
24233
|
{
|
|
24002
24234
|
ref: skeletonRef,
|
|
@@ -24014,15 +24246,15 @@ function AiFadeCarouselOverlay({
|
|
|
24014
24246
|
zIndex: 2147483646,
|
|
24015
24247
|
pointerEvents: "none"
|
|
24016
24248
|
},
|
|
24017
|
-
children: /* @__PURE__ */ (0,
|
|
24249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: MEDIA_SKELETON_CSS })
|
|
24018
24250
|
}
|
|
24019
24251
|
),
|
|
24020
|
-
activeItemRect && active && activeEntry && /* @__PURE__ */ (0,
|
|
24252
|
+
activeItemRect && active && activeEntry && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
24021
24253
|
ItemInteractionLayer,
|
|
24022
24254
|
{
|
|
24023
24255
|
rect: activeItemRect,
|
|
24024
24256
|
state: toolbarState,
|
|
24025
|
-
toolbar: /* @__PURE__ */ (0,
|
|
24257
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
24026
24258
|
CarouselSlideToolbar,
|
|
24027
24259
|
{
|
|
24028
24260
|
pending,
|
|
@@ -24067,7 +24299,7 @@ function AiFadeCarouselOverlay({
|
|
|
24067
24299
|
}
|
|
24068
24300
|
|
|
24069
24301
|
// src/OhhwellsBridge.tsx
|
|
24070
|
-
var
|
|
24302
|
+
var import_react_dom7 = require("react-dom");
|
|
24071
24303
|
var import_navigation4 = require("next/navigation");
|
|
24072
24304
|
|
|
24073
24305
|
// src/lib/seeable.ts
|
|
@@ -24265,19 +24497,19 @@ var import_lucide_react17 = require("lucide-react");
|
|
|
24265
24497
|
|
|
24266
24498
|
// src/ui/link-modal/DestinationBreadcrumb.tsx
|
|
24267
24499
|
var import_lucide_react14 = require("lucide-react");
|
|
24268
|
-
var
|
|
24500
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
24269
24501
|
function DestinationBreadcrumb({
|
|
24270
24502
|
pageTitle,
|
|
24271
24503
|
sectionLabel
|
|
24272
24504
|
}) {
|
|
24273
|
-
return /* @__PURE__ */ (0,
|
|
24274
|
-
/* @__PURE__ */ (0,
|
|
24275
|
-
/* @__PURE__ */ (0,
|
|
24276
|
-
/* @__PURE__ */ (0,
|
|
24277
|
-
/* @__PURE__ */ (0,
|
|
24278
|
-
/* @__PURE__ */ (0,
|
|
24505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
|
|
24506
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-medium! text-foreground m-0", children: "Destination" }),
|
|
24507
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
24508
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
24509
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react14.File, { size: 16, className: "shrink-0 text-foreground", "aria-hidden": true }),
|
|
24510
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-sm font-medium leading-none text-foreground!", children: pageTitle })
|
|
24279
24511
|
] }),
|
|
24280
|
-
/* @__PURE__ */ (0,
|
|
24512
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
24281
24513
|
import_lucide_react14.ArrowRight,
|
|
24282
24514
|
{
|
|
24283
24515
|
size: 16,
|
|
@@ -24285,8 +24517,8 @@ function DestinationBreadcrumb({
|
|
|
24285
24517
|
"aria-hidden": true
|
|
24286
24518
|
}
|
|
24287
24519
|
),
|
|
24288
|
-
/* @__PURE__ */ (0,
|
|
24289
|
-
/* @__PURE__ */ (0,
|
|
24520
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
24521
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
24290
24522
|
import_lucide_react14.GalleryVertical,
|
|
24291
24523
|
{
|
|
24292
24524
|
size: 16,
|
|
@@ -24294,7 +24526,7 @@ function DestinationBreadcrumb({
|
|
|
24294
24526
|
"aria-hidden": true
|
|
24295
24527
|
}
|
|
24296
24528
|
),
|
|
24297
|
-
/* @__PURE__ */ (0,
|
|
24529
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-sm font-medium leading-none text-foreground", children: sectionLabel })
|
|
24298
24530
|
] })
|
|
24299
24531
|
] })
|
|
24300
24532
|
] });
|
|
@@ -24302,22 +24534,22 @@ function DestinationBreadcrumb({
|
|
|
24302
24534
|
|
|
24303
24535
|
// src/ui/link-modal/SectionTreeItem.tsx
|
|
24304
24536
|
var import_lucide_react15 = require("lucide-react");
|
|
24305
|
-
var
|
|
24537
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
24306
24538
|
function SectionTreeItem({
|
|
24307
24539
|
section,
|
|
24308
24540
|
onSelect,
|
|
24309
24541
|
selected
|
|
24310
24542
|
}) {
|
|
24311
24543
|
const interactive = Boolean(onSelect);
|
|
24312
|
-
return /* @__PURE__ */ (0,
|
|
24313
|
-
/* @__PURE__ */ (0,
|
|
24544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex h-9 w-full items-end pl-3", children: [
|
|
24545
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
24314
24546
|
"div",
|
|
24315
24547
|
{
|
|
24316
24548
|
className: "-mr-px h-9 w-2 shrink-0 rounded-bl-sm border-b border-l border-border mb-4",
|
|
24317
24549
|
"aria-hidden": true
|
|
24318
24550
|
}
|
|
24319
24551
|
),
|
|
24320
|
-
/* @__PURE__ */ (0,
|
|
24552
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
24321
24553
|
"div",
|
|
24322
24554
|
{
|
|
24323
24555
|
role: interactive ? "button" : void 0,
|
|
@@ -24335,7 +24567,7 @@ function SectionTreeItem({
|
|
|
24335
24567
|
interactive && selected && "border-bridge-primary"
|
|
24336
24568
|
),
|
|
24337
24569
|
children: [
|
|
24338
|
-
/* @__PURE__ */ (0,
|
|
24570
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
24339
24571
|
import_lucide_react15.GalleryVertical,
|
|
24340
24572
|
{
|
|
24341
24573
|
size: 16,
|
|
@@ -24343,7 +24575,7 @@ function SectionTreeItem({
|
|
|
24343
24575
|
"aria-hidden": true
|
|
24344
24576
|
}
|
|
24345
24577
|
),
|
|
24346
|
-
/* @__PURE__ */ (0,
|
|
24578
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "truncate text-sm font-normal leading-5 text-foreground", children: section.label })
|
|
24347
24579
|
]
|
|
24348
24580
|
}
|
|
24349
24581
|
)
|
|
@@ -24355,10 +24587,10 @@ var import_react19 = require("react");
|
|
|
24355
24587
|
|
|
24356
24588
|
// src/ui/input.tsx
|
|
24357
24589
|
var React11 = __toESM(require("react"), 1);
|
|
24358
|
-
var
|
|
24590
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
24359
24591
|
var Input = React11.forwardRef(
|
|
24360
24592
|
({ className, type, ...props }, ref) => {
|
|
24361
|
-
return /* @__PURE__ */ (0,
|
|
24593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
24362
24594
|
"input",
|
|
24363
24595
|
{
|
|
24364
24596
|
type,
|
|
@@ -24377,9 +24609,9 @@ Input.displayName = "Input";
|
|
|
24377
24609
|
|
|
24378
24610
|
// src/ui/label.tsx
|
|
24379
24611
|
var import_radix_ui7 = require("radix-ui");
|
|
24380
|
-
var
|
|
24612
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
24381
24613
|
function Label({ className, ...props }) {
|
|
24382
|
-
return /* @__PURE__ */ (0,
|
|
24614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
24383
24615
|
import_radix_ui7.Label.Root,
|
|
24384
24616
|
{
|
|
24385
24617
|
"data-slot": "label",
|
|
@@ -24391,11 +24623,11 @@ function Label({ className, ...props }) {
|
|
|
24391
24623
|
|
|
24392
24624
|
// src/ui/link-modal/UrlOrPageInput.tsx
|
|
24393
24625
|
var import_lucide_react16 = require("lucide-react");
|
|
24394
|
-
var
|
|
24626
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
24395
24627
|
function FieldChevron({
|
|
24396
24628
|
onClick
|
|
24397
24629
|
}) {
|
|
24398
|
-
return /* @__PURE__ */ (0,
|
|
24630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
24399
24631
|
"button",
|
|
24400
24632
|
{
|
|
24401
24633
|
type: "button",
|
|
@@ -24403,7 +24635,7 @@ function FieldChevron({
|
|
|
24403
24635
|
onClick,
|
|
24404
24636
|
"aria-label": "Open page list",
|
|
24405
24637
|
tabIndex: -1,
|
|
24406
|
-
children: /* @__PURE__ */ (0,
|
|
24638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react16.ChevronDown, { size: 16 })
|
|
24407
24639
|
}
|
|
24408
24640
|
);
|
|
24409
24641
|
}
|
|
@@ -24464,11 +24696,11 @@ function UrlOrPageInput({
|
|
|
24464
24696
|
"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]",
|
|
24465
24697
|
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"
|
|
24466
24698
|
);
|
|
24467
|
-
return /* @__PURE__ */ (0,
|
|
24468
|
-
/* @__PURE__ */ (0,
|
|
24469
|
-
/* @__PURE__ */ (0,
|
|
24470
|
-
/* @__PURE__ */ (0,
|
|
24471
|
-
selectedPage ? /* @__PURE__ */ (0,
|
|
24699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex w-full flex-col gap-2 p-0", children: [
|
|
24700
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Label, { htmlFor: inputId, className: cn(urlError && "text-destructive"), children: "Destination" }),
|
|
24701
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ref: rootRef, className: "relative w-full", children: [
|
|
24702
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { "data-ohw-link-field": true, className: fieldClassName, children: [
|
|
24703
|
+
selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex shrink-0 items-center pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
24472
24704
|
import_lucide_react16.File,
|
|
24473
24705
|
{
|
|
24474
24706
|
size: 16,
|
|
@@ -24476,7 +24708,7 @@ function UrlOrPageInput({
|
|
|
24476
24708
|
"aria-hidden": true
|
|
24477
24709
|
}
|
|
24478
24710
|
) }) : null,
|
|
24479
|
-
readOnly ? /* @__PURE__ */ (0,
|
|
24711
|
+
readOnly ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm leading-5 text-foreground", children: selectedPage?.title ?? value }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
24480
24712
|
Input,
|
|
24481
24713
|
{
|
|
24482
24714
|
ref: inputRef,
|
|
@@ -24502,7 +24734,7 @@ function UrlOrPageInput({
|
|
|
24502
24734
|
)
|
|
24503
24735
|
}
|
|
24504
24736
|
),
|
|
24505
|
-
selectedPage && !readOnly ? /* @__PURE__ */ (0,
|
|
24737
|
+
selectedPage && !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
24506
24738
|
"button",
|
|
24507
24739
|
{
|
|
24508
24740
|
type: "button",
|
|
@@ -24510,26 +24742,26 @@ function UrlOrPageInput({
|
|
|
24510
24742
|
onMouseDown: clearSelection,
|
|
24511
24743
|
"aria-label": "Clear selected page",
|
|
24512
24744
|
tabIndex: -1,
|
|
24513
|
-
children: /* @__PURE__ */ (0,
|
|
24745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react16.X, { size: 16, "aria-hidden": true })
|
|
24514
24746
|
}
|
|
24515
24747
|
) : null,
|
|
24516
|
-
!readOnly ? /* @__PURE__ */ (0,
|
|
24748
|
+
!readOnly ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(FieldChevron, { onClick: toggleDropdown }) : null
|
|
24517
24749
|
] }),
|
|
24518
|
-
dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0,
|
|
24750
|
+
dropdownOpen && !readOnly && filteredPages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
24519
24751
|
"div",
|
|
24520
24752
|
{
|
|
24521
24753
|
"data-ohw-link-page-dropdown": "",
|
|
24522
24754
|
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",
|
|
24523
24755
|
onMouseDown: (e) => e.preventDefault(),
|
|
24524
|
-
children: filteredPages.map((page) => /* @__PURE__ */ (0,
|
|
24756
|
+
children: filteredPages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
24525
24757
|
"button",
|
|
24526
24758
|
{
|
|
24527
24759
|
type: "button",
|
|
24528
24760
|
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",
|
|
24529
24761
|
onClick: () => onPageSelect(page),
|
|
24530
24762
|
children: [
|
|
24531
|
-
/* @__PURE__ */ (0,
|
|
24532
|
-
/* @__PURE__ */ (0,
|
|
24763
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react16.File, { size: 16, className: "shrink-0", "aria-hidden": true }),
|
|
24764
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "truncate", children: page.title })
|
|
24533
24765
|
]
|
|
24534
24766
|
},
|
|
24535
24767
|
page.path
|
|
@@ -24537,34 +24769,34 @@ function UrlOrPageInput({
|
|
|
24537
24769
|
}
|
|
24538
24770
|
) : null
|
|
24539
24771
|
] }),
|
|
24540
|
-
urlError ? /* @__PURE__ */ (0,
|
|
24772
|
+
urlError ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm font-medium text-destructive", children: urlError }) : null
|
|
24541
24773
|
] });
|
|
24542
24774
|
}
|
|
24543
24775
|
|
|
24544
24776
|
// src/ui/link-modal/LinkEditorPanel.tsx
|
|
24545
|
-
var
|
|
24777
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
24546
24778
|
function LinkEditorPanel({ state, onClose }) {
|
|
24547
24779
|
const isCancel = state.secondaryLabel === "Cancel" || state.secondaryLabel === "Back to sections";
|
|
24548
|
-
return /* @__PURE__ */ (0,
|
|
24549
|
-
/* @__PURE__ */ (0,
|
|
24780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
24781
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24550
24782
|
"button",
|
|
24551
24783
|
{
|
|
24552
24784
|
type: "button",
|
|
24553
24785
|
className: "absolute right-[9px] top-[9px] rounded-sm p-1.5 text-foreground hover:bg-muted/50 h-7",
|
|
24554
24786
|
"aria-label": "Close",
|
|
24555
24787
|
onClick: onClose,
|
|
24556
|
-
children: /* @__PURE__ */ (0,
|
|
24788
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react17.X, { size: 16, "aria-hidden": true })
|
|
24557
24789
|
}
|
|
24558
24790
|
) }),
|
|
24559
|
-
/* @__PURE__ */ (0,
|
|
24560
|
-
/* @__PURE__ */ (0,
|
|
24561
|
-
state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0,
|
|
24791
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogHeader, { className: "w-full gap-1.5 p-6 pr-12", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DialogTitle, { className: "m-0 w-full break-words", children: state.title }) }),
|
|
24792
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex w-full flex-col gap-3 px-6 pb-8 pt-1", children: [
|
|
24793
|
+
state.showBreadcrumb && state.selectedPage && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24562
24794
|
DestinationBreadcrumb,
|
|
24563
24795
|
{
|
|
24564
24796
|
pageTitle: state.selectedPage.title,
|
|
24565
24797
|
sectionLabel: state.selectedSection.label
|
|
24566
24798
|
}
|
|
24567
|
-
) : /* @__PURE__ */ (0,
|
|
24799
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24568
24800
|
UrlOrPageInput,
|
|
24569
24801
|
{
|
|
24570
24802
|
value: state.searchValue,
|
|
@@ -24577,8 +24809,8 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
24577
24809
|
urlError: state.urlError
|
|
24578
24810
|
}
|
|
24579
24811
|
),
|
|
24580
|
-
state.showChooseSection ? /* @__PURE__ */ (0,
|
|
24581
|
-
/* @__PURE__ */ (0,
|
|
24812
|
+
state.showChooseSection ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col justify-center gap-2", children: [
|
|
24813
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24582
24814
|
Button,
|
|
24583
24815
|
{
|
|
24584
24816
|
type: "button",
|
|
@@ -24589,15 +24821,15 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
24589
24821
|
children: "Choose a section"
|
|
24590
24822
|
}
|
|
24591
24823
|
),
|
|
24592
|
-
/* @__PURE__ */ (0,
|
|
24593
|
-
/* @__PURE__ */ (0,
|
|
24594
|
-
/* @__PURE__ */ (0,
|
|
24824
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: [
|
|
24825
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react17.Info, { size: 16, className: "shrink-0", "aria-hidden": true }),
|
|
24826
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: "Pick a section this link should scroll to." })
|
|
24595
24827
|
] })
|
|
24596
24828
|
] }) : null,
|
|
24597
|
-
state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0,
|
|
24829
|
+
state.showSectionRow && state.selectedSection ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SectionTreeItem, { section: state.selectedSection, selected: true }) : null
|
|
24598
24830
|
] }),
|
|
24599
|
-
/* @__PURE__ */ (0,
|
|
24600
|
-
/* @__PURE__ */ (0,
|
|
24831
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DialogFooter, { className: "w-full px-6 pb-6", children: [
|
|
24832
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24601
24833
|
Button,
|
|
24602
24834
|
{
|
|
24603
24835
|
type: "button",
|
|
@@ -24612,7 +24844,7 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
24612
24844
|
children: state.secondaryLabel
|
|
24613
24845
|
}
|
|
24614
24846
|
),
|
|
24615
|
-
/* @__PURE__ */ (0,
|
|
24847
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24616
24848
|
Button,
|
|
24617
24849
|
{
|
|
24618
24850
|
type: "button",
|
|
@@ -24632,7 +24864,7 @@ function LinkEditorPanel({ state, onClose }) {
|
|
|
24632
24864
|
|
|
24633
24865
|
// src/ui/link-modal/SectionPickerOverlay.tsx
|
|
24634
24866
|
var import_react20 = require("react");
|
|
24635
|
-
var
|
|
24867
|
+
var import_react_dom5 = require("react-dom");
|
|
24636
24868
|
var import_lucide_react18 = require("lucide-react");
|
|
24637
24869
|
var import_navigation3 = require("next/navigation");
|
|
24638
24870
|
|
|
@@ -24655,7 +24887,7 @@ function getIframeChromeClip(parentScroll) {
|
|
|
24655
24887
|
}
|
|
24656
24888
|
|
|
24657
24889
|
// src/ui/link-modal/SectionPickerOverlay.tsx
|
|
24658
|
-
var
|
|
24890
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
24659
24891
|
var DIM_OVERLAY = "rgba(0, 0, 0, 0.45)";
|
|
24660
24892
|
function rectsEqual(a, b) {
|
|
24661
24893
|
if (a.size !== b.size) return false;
|
|
@@ -24885,8 +25117,8 @@ function SectionPickerOverlay({
|
|
|
24885
25117
|
}, [onBack]);
|
|
24886
25118
|
const portalRoot = typeof document !== "undefined" ? document.querySelector("[data-ohw-bridge-root]") ?? document.body : null;
|
|
24887
25119
|
if (!portalRoot) return null;
|
|
24888
|
-
return (0,
|
|
24889
|
-
/* @__PURE__ */ (0,
|
|
25120
|
+
return (0, import_react_dom5.createPortal)(
|
|
25121
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
24890
25122
|
"div",
|
|
24891
25123
|
{
|
|
24892
25124
|
"data-ohw-section-picker": "",
|
|
@@ -24896,12 +25128,12 @@ function SectionPickerOverlay({
|
|
|
24896
25128
|
role: "dialog",
|
|
24897
25129
|
"aria-label": "Choose a section",
|
|
24898
25130
|
children: [
|
|
24899
|
-
/* @__PURE__ */ (0,
|
|
25131
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24900
25132
|
"div",
|
|
24901
25133
|
{
|
|
24902
25134
|
className: "pointer-events-auto fixed left-5 z-[2]",
|
|
24903
25135
|
style: { top: chromeClip.top + 20 },
|
|
24904
|
-
children: /* @__PURE__ */ (0,
|
|
25136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
24905
25137
|
Button,
|
|
24906
25138
|
{
|
|
24907
25139
|
type: "button",
|
|
@@ -24910,14 +25142,14 @@ function SectionPickerOverlay({
|
|
|
24910
25142
|
className: "h-8 min-w-0 gap-1 border-border bg-background px-2 py-1.5 shadow-sm hover:bg-muted cursor-pointer",
|
|
24911
25143
|
onClick: onBack,
|
|
24912
25144
|
children: [
|
|
24913
|
-
/* @__PURE__ */ (0,
|
|
25145
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.ArrowLeft, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
24914
25146
|
"Back"
|
|
24915
25147
|
]
|
|
24916
25148
|
}
|
|
24917
25149
|
)
|
|
24918
25150
|
}
|
|
24919
25151
|
),
|
|
24920
|
-
/* @__PURE__ */ (0,
|
|
25152
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24921
25153
|
"div",
|
|
24922
25154
|
{
|
|
24923
25155
|
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",
|
|
@@ -24930,7 +25162,7 @@ function SectionPickerOverlay({
|
|
|
24930
25162
|
children: "Click on section to select"
|
|
24931
25163
|
}
|
|
24932
25164
|
),
|
|
24933
|
-
!isOnTargetPage ? /* @__PURE__ */ (0,
|
|
25165
|
+
!isOnTargetPage ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24934
25166
|
"div",
|
|
24935
25167
|
{
|
|
24936
25168
|
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",
|
|
@@ -24938,14 +25170,14 @@ function SectionPickerOverlay({
|
|
|
24938
25170
|
children: "Loading page preview\u2026"
|
|
24939
25171
|
}
|
|
24940
25172
|
) : null,
|
|
24941
|
-
isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0,
|
|
25173
|
+
isOnTargetPage && liveSections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pointer-events-auto fixed inset-0 z-[1] flex items-center justify-center bg-muted/40", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-sm text-muted-foreground", children: "No sections found on this page." }) }) : null,
|
|
24942
25174
|
isOnTargetPage ? liveSections.map((section) => {
|
|
24943
25175
|
const rect = rects.get(section.id);
|
|
24944
25176
|
if (!rect || rect.width <= 0 || rect.height <= 0) return null;
|
|
24945
25177
|
const isSelected = selectedId === section.id;
|
|
24946
25178
|
const isHovered = hoveredId === section.id;
|
|
24947
25179
|
const isLit = isSelected || isHovered;
|
|
24948
|
-
return /* @__PURE__ */ (0,
|
|
25180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
24949
25181
|
"button",
|
|
24950
25182
|
{
|
|
24951
25183
|
type: "button",
|
|
@@ -24960,7 +25192,7 @@ function SectionPickerOverlay({
|
|
|
24960
25192
|
"aria-label": `Select section ${section.label}`,
|
|
24961
25193
|
onClick: () => handleSelect(section),
|
|
24962
25194
|
children: [
|
|
24963
|
-
isLit ? /* @__PURE__ */ (0,
|
|
25195
|
+
isLit ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24964
25196
|
"span",
|
|
24965
25197
|
{
|
|
24966
25198
|
className: "pointer-events-none absolute",
|
|
@@ -24973,13 +25205,13 @@ function SectionPickerOverlay({
|
|
|
24973
25205
|
"aria-hidden": true
|
|
24974
25206
|
}
|
|
24975
25207
|
) : null,
|
|
24976
|
-
isSelected ? /* @__PURE__ */ (0,
|
|
25208
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
24977
25209
|
"span",
|
|
24978
25210
|
{
|
|
24979
25211
|
className: "absolute right-3 top-3 flex size-8 items-center justify-center rounded-full text-white",
|
|
24980
25212
|
style: { backgroundColor: "var(--ohw-primary, #0885fe)" },
|
|
24981
25213
|
"aria-hidden": true,
|
|
24982
|
-
children: /* @__PURE__ */ (0,
|
|
25214
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Check, { className: "size-5" })
|
|
24983
25215
|
}
|
|
24984
25216
|
) : null
|
|
24985
25217
|
]
|
|
@@ -25159,7 +25391,7 @@ function useLinkModalState({
|
|
|
25159
25391
|
}
|
|
25160
25392
|
|
|
25161
25393
|
// src/ui/link-modal/LinkPopover.tsx
|
|
25162
|
-
var
|
|
25394
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
25163
25395
|
function postToParent(data) {
|
|
25164
25396
|
window.parent?.postMessage(data, "*");
|
|
25165
25397
|
}
|
|
@@ -25255,15 +25487,15 @@ function LinkPopover({
|
|
|
25255
25487
|
);
|
|
25256
25488
|
};
|
|
25257
25489
|
}, [open, sectionPickerActive]);
|
|
25258
|
-
return /* @__PURE__ */ (0,
|
|
25259
|
-
/* @__PURE__ */ (0,
|
|
25490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
25491
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
25260
25492
|
Dialog2,
|
|
25261
25493
|
{
|
|
25262
25494
|
open: open && !sectionPickerActive,
|
|
25263
25495
|
onOpenChange: (next) => {
|
|
25264
25496
|
if (!next) onClose?.();
|
|
25265
25497
|
},
|
|
25266
|
-
children: /* @__PURE__ */ (0,
|
|
25498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
25267
25499
|
DialogContent,
|
|
25268
25500
|
{
|
|
25269
25501
|
ref: panelRef,
|
|
@@ -25273,12 +25505,12 @@ function LinkPopover({
|
|
|
25273
25505
|
"data-ohw-bridge": "",
|
|
25274
25506
|
showCloseButton: false,
|
|
25275
25507
|
className: "gap-0 p-0 w-full max-w-[448px] pointer-events-auto z-[2147483646] overflow-visible",
|
|
25276
|
-
children: /* @__PURE__ */ (0,
|
|
25508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LinkEditorPanel, { state, onClose })
|
|
25277
25509
|
}
|
|
25278
25510
|
)
|
|
25279
25511
|
}
|
|
25280
25512
|
),
|
|
25281
|
-
sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0,
|
|
25513
|
+
sectionPickerActive && state.selectedPage ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
25282
25514
|
SectionPickerOverlay,
|
|
25283
25515
|
{
|
|
25284
25516
|
pagePath: state.selectedPage.path,
|
|
@@ -25432,7 +25664,7 @@ function addFooterColumnWithPersist({
|
|
|
25432
25664
|
// src/ui/FloatingPanel.tsx
|
|
25433
25665
|
var import_react23 = require("react");
|
|
25434
25666
|
var import_lucide_react19 = require("lucide-react");
|
|
25435
|
-
var
|
|
25667
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
25436
25668
|
var PANEL_WIDTH = 256;
|
|
25437
25669
|
var EDGE_MARGIN = 16;
|
|
25438
25670
|
var HEADER_MIN = 56;
|
|
@@ -25604,7 +25836,7 @@ function FloatingPanel({
|
|
|
25604
25836
|
}, [open]);
|
|
25605
25837
|
(0, import_react23.useEffect)(() => () => document.documentElement.removeAttribute("data-ohw-panel-dragging"), []);
|
|
25606
25838
|
if (!open) return null;
|
|
25607
|
-
return /* @__PURE__ */ (0,
|
|
25839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
25608
25840
|
"div",
|
|
25609
25841
|
{
|
|
25610
25842
|
ref: panelRef,
|
|
@@ -25621,7 +25853,7 @@ function FloatingPanel({
|
|
|
25621
25853
|
onPointerDown: (e) => e.stopPropagation(),
|
|
25622
25854
|
onClick: (e) => e.stopPropagation(),
|
|
25623
25855
|
children: [
|
|
25624
|
-
/* @__PURE__ */ (0,
|
|
25856
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
25625
25857
|
"div",
|
|
25626
25858
|
{
|
|
25627
25859
|
"data-ohw-floating-panel-header": "",
|
|
@@ -25631,14 +25863,14 @@ function FloatingPanel({
|
|
|
25631
25863
|
onPointerUp: endDrag,
|
|
25632
25864
|
onPointerCancel: endDrag,
|
|
25633
25865
|
children: [
|
|
25634
|
-
/* @__PURE__ */ (0,
|
|
25635
|
-
/* @__PURE__ */ (0,
|
|
25636
|
-
icon ? /* @__PURE__ */ (0,
|
|
25637
|
-
/* @__PURE__ */ (0,
|
|
25866
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
25867
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
25868
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "shrink-0 text-foreground", children: icon }) : null,
|
|
25869
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "min-w-0 flex-1 text-lg font-semibold leading-7 text-foreground", children: title })
|
|
25638
25870
|
] }),
|
|
25639
|
-
context ? /* @__PURE__ */ (0,
|
|
25871
|
+
context ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "w-full text-sm leading-5 text-muted-foreground", children: context }) : null
|
|
25640
25872
|
] }),
|
|
25641
|
-
/* @__PURE__ */ (0,
|
|
25873
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
25642
25874
|
"button",
|
|
25643
25875
|
{
|
|
25644
25876
|
type: "button",
|
|
@@ -25650,13 +25882,13 @@ function FloatingPanel({
|
|
|
25650
25882
|
onClose();
|
|
25651
25883
|
},
|
|
25652
25884
|
onPointerDown: (e) => e.stopPropagation(),
|
|
25653
|
-
children: /* @__PURE__ */ (0,
|
|
25885
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.X, { size: 16, "aria-hidden": true })
|
|
25654
25886
|
}
|
|
25655
25887
|
)
|
|
25656
25888
|
]
|
|
25657
25889
|
}
|
|
25658
25890
|
),
|
|
25659
|
-
/* @__PURE__ */ (0,
|
|
25891
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
25660
25892
|
"div",
|
|
25661
25893
|
{
|
|
25662
25894
|
"data-ohw-floating-panel-body": "",
|
|
@@ -25674,15 +25906,15 @@ function FloatingPanel({
|
|
|
25674
25906
|
}
|
|
25675
25907
|
|
|
25676
25908
|
// src/ui/socials-display-panel.tsx
|
|
25677
|
-
var
|
|
25909
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
25678
25910
|
function DisplaySwitch({
|
|
25679
25911
|
label,
|
|
25680
25912
|
checked,
|
|
25681
25913
|
disabled,
|
|
25682
25914
|
onChange
|
|
25683
25915
|
}) {
|
|
25684
|
-
return /* @__PURE__ */ (0,
|
|
25685
|
-
/* @__PURE__ */ (0,
|
|
25916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
|
|
25917
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
25686
25918
|
"span",
|
|
25687
25919
|
{
|
|
25688
25920
|
className: cn(
|
|
@@ -25692,7 +25924,7 @@ function DisplaySwitch({
|
|
|
25692
25924
|
children: label
|
|
25693
25925
|
}
|
|
25694
25926
|
),
|
|
25695
|
-
/* @__PURE__ */ (0,
|
|
25927
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
25696
25928
|
"button",
|
|
25697
25929
|
{
|
|
25698
25930
|
type: "button",
|
|
@@ -25706,7 +25938,7 @@ function DisplaySwitch({
|
|
|
25706
25938
|
checked ? "bg-bridge-primary" : "bg-primary-50",
|
|
25707
25939
|
disabled ? "cursor-default opacity-50" : "cursor-pointer"
|
|
25708
25940
|
),
|
|
25709
|
-
children: /* @__PURE__ */ (0,
|
|
25941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
25710
25942
|
"span",
|
|
25711
25943
|
{
|
|
25712
25944
|
className: cn(
|
|
@@ -25720,8 +25952,8 @@ function DisplaySwitch({
|
|
|
25720
25952
|
] });
|
|
25721
25953
|
}
|
|
25722
25954
|
function SocialsDisplayPanel({ display, onChange, className }) {
|
|
25723
|
-
return /* @__PURE__ */ (0,
|
|
25724
|
-
/* @__PURE__ */ (0,
|
|
25955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
|
|
25956
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
25725
25957
|
DisplaySwitch,
|
|
25726
25958
|
{
|
|
25727
25959
|
label: "Text",
|
|
@@ -25730,7 +25962,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
|
|
|
25730
25962
|
onChange: (text) => onChange({ ...display, text })
|
|
25731
25963
|
}
|
|
25732
25964
|
),
|
|
25733
|
-
/* @__PURE__ */ (0,
|
|
25965
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
25734
25966
|
DisplaySwitch,
|
|
25735
25967
|
{
|
|
25736
25968
|
label: "Icon",
|
|
@@ -25744,7 +25976,7 @@ function SocialsDisplayPanel({ display, onChange, className }) {
|
|
|
25744
25976
|
|
|
25745
25977
|
// src/ui/button-style-panel.tsx
|
|
25746
25978
|
var import_lucide_react20 = require("lucide-react");
|
|
25747
|
-
var
|
|
25979
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
25748
25980
|
var SIZE_LABEL = { s: "S", m: "M", l: "L" };
|
|
25749
25981
|
function ButtonStylePanel({
|
|
25750
25982
|
variants,
|
|
@@ -25758,15 +25990,15 @@ function ButtonStylePanel({
|
|
|
25758
25990
|
}) {
|
|
25759
25991
|
const preview = scaleGeometry(sizes.m, 0.75);
|
|
25760
25992
|
const label = previewLabel.trim() || "Book Now";
|
|
25761
|
-
return /* @__PURE__ */ (0,
|
|
25762
|
-
/* @__PURE__ */ (0,
|
|
25763
|
-
/* @__PURE__ */ (0,
|
|
25764
|
-
/* @__PURE__ */ (0,
|
|
25993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex w-full flex-col gap-5", children: [
|
|
25994
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
|
|
25995
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500 font-sans", children: "Variants" }),
|
|
25996
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex w-full flex-col gap-2.5", children: BUTTON_VARIANT_IDS.map((id) => {
|
|
25765
25997
|
const chrome = variants[id];
|
|
25766
25998
|
const selected = id === variant;
|
|
25767
25999
|
const hasBorder = parseFloat(chrome.borderWidth) > 0;
|
|
25768
26000
|
const cardSlot = previewSlotForChrome(chrome, slotBackground);
|
|
25769
|
-
return /* @__PURE__ */ (0,
|
|
26001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
25770
26002
|
"button",
|
|
25771
26003
|
{
|
|
25772
26004
|
type: "button",
|
|
@@ -25782,12 +26014,12 @@ function ButtonStylePanel({
|
|
|
25782
26014
|
selected ? "border-2 border-primary" : "border border-border"
|
|
25783
26015
|
),
|
|
25784
26016
|
children: [
|
|
25785
|
-
/* @__PURE__ */ (0,
|
|
26017
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
25786
26018
|
"div",
|
|
25787
26019
|
{
|
|
25788
26020
|
className: "flex w-full items-center justify-center py-4",
|
|
25789
26021
|
style: { background: cardSlot },
|
|
25790
|
-
children: /* @__PURE__ */ (0,
|
|
26022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
25791
26023
|
"span",
|
|
25792
26024
|
{
|
|
25793
26025
|
className: "inline-flex items-center justify-center whitespace-nowrap font-semibold uppercase leading-none",
|
|
@@ -25809,12 +26041,12 @@ function ButtonStylePanel({
|
|
|
25809
26041
|
)
|
|
25810
26042
|
}
|
|
25811
26043
|
),
|
|
25812
|
-
selected ? /* @__PURE__ */ (0,
|
|
26044
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
25813
26045
|
"span",
|
|
25814
26046
|
{
|
|
25815
26047
|
className: "absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-primary text-primary-foreground",
|
|
25816
26048
|
"aria-hidden": true,
|
|
25817
|
-
children: /* @__PURE__ */ (0,
|
|
26049
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react20.Check, { className: "size-3", strokeWidth: 3 })
|
|
25818
26050
|
}
|
|
25819
26051
|
) : null
|
|
25820
26052
|
]
|
|
@@ -25823,9 +26055,9 @@ function ButtonStylePanel({
|
|
|
25823
26055
|
);
|
|
25824
26056
|
}) })
|
|
25825
26057
|
] }),
|
|
25826
|
-
/* @__PURE__ */ (0,
|
|
25827
|
-
/* @__PURE__ */ (0,
|
|
25828
|
-
/* @__PURE__ */ (0,
|
|
26058
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { className: "flex w-full flex-col gap-2.5", children: [
|
|
26059
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-xs font-semibold uppercase leading-4 tracking-[0.6px] text-stone-500 font-sans", children: "Size" }),
|
|
26060
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
25829
26061
|
"div",
|
|
25830
26062
|
{
|
|
25831
26063
|
className: "flex w-full items-start rounded-lg bg-stone-100 p-1",
|
|
@@ -25833,7 +26065,7 @@ function ButtonStylePanel({
|
|
|
25833
26065
|
"aria-label": "Size",
|
|
25834
26066
|
children: BUTTON_SIZE_IDS.map((id) => {
|
|
25835
26067
|
const selected = id === size;
|
|
25836
|
-
return /* @__PURE__ */ (0,
|
|
26068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
25837
26069
|
"button",
|
|
25838
26070
|
{
|
|
25839
26071
|
type: "button",
|
|
@@ -26847,7 +27079,7 @@ function useSectionDrag({
|
|
|
26847
27079
|
|
|
26848
27080
|
// src/ui/footer-container-chrome.tsx
|
|
26849
27081
|
var import_lucide_react21 = require("lucide-react");
|
|
26850
|
-
var
|
|
27082
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
26851
27083
|
function FooterContainerChrome({
|
|
26852
27084
|
rect,
|
|
26853
27085
|
onAdd,
|
|
@@ -26855,7 +27087,7 @@ function FooterContainerChrome({
|
|
|
26855
27087
|
}) {
|
|
26856
27088
|
const chromeGap = 6;
|
|
26857
27089
|
const buttonMargin = 7;
|
|
26858
|
-
return /* @__PURE__ */ (0,
|
|
27090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
26859
27091
|
"div",
|
|
26860
27092
|
{
|
|
26861
27093
|
"data-ohw-footer-container-chrome": "",
|
|
@@ -26867,8 +27099,8 @@ function FooterContainerChrome({
|
|
|
26867
27099
|
width: rect.width + chromeGap * 2,
|
|
26868
27100
|
height: rect.height + chromeGap * 2
|
|
26869
27101
|
},
|
|
26870
|
-
children: /* @__PURE__ */ (0,
|
|
26871
|
-
/* @__PURE__ */ (0,
|
|
27102
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Tooltip, { children: [
|
|
27103
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
26872
27104
|
"button",
|
|
26873
27105
|
{
|
|
26874
27106
|
type: "button",
|
|
@@ -26887,10 +27119,10 @@ function FooterContainerChrome({
|
|
|
26887
27119
|
if (addDisabled) return;
|
|
26888
27120
|
onAdd();
|
|
26889
27121
|
},
|
|
26890
|
-
children: /* @__PURE__ */ (0,
|
|
27122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
26891
27123
|
}
|
|
26892
27124
|
) }),
|
|
26893
|
-
/* @__PURE__ */ (0,
|
|
27125
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
|
|
26894
27126
|
] })
|
|
26895
27127
|
}
|
|
26896
27128
|
) });
|
|
@@ -27295,13 +27527,13 @@ function retargetPageLinks(change, deps) {
|
|
|
27295
27527
|
|
|
27296
27528
|
// src/ui/navbar-container-chrome.tsx
|
|
27297
27529
|
var import_lucide_react22 = require("lucide-react");
|
|
27298
|
-
var
|
|
27530
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
27299
27531
|
function NavbarContainerChrome({
|
|
27300
27532
|
rect,
|
|
27301
27533
|
onAdd
|
|
27302
27534
|
}) {
|
|
27303
27535
|
const chromeGap = 6;
|
|
27304
|
-
return /* @__PURE__ */ (0,
|
|
27536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
27305
27537
|
"div",
|
|
27306
27538
|
{
|
|
27307
27539
|
"data-ohw-navbar-container-chrome": "",
|
|
@@ -27313,7 +27545,7 @@ function NavbarContainerChrome({
|
|
|
27313
27545
|
width: rect.width + chromeGap * 2,
|
|
27314
27546
|
height: rect.height + chromeGap * 2
|
|
27315
27547
|
},
|
|
27316
|
-
children: /* @__PURE__ */ (0,
|
|
27548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
27317
27549
|
"button",
|
|
27318
27550
|
{
|
|
27319
27551
|
type: "button",
|
|
@@ -27330,7 +27562,7 @@ function NavbarContainerChrome({
|
|
|
27330
27562
|
e.stopPropagation();
|
|
27331
27563
|
onAdd();
|
|
27332
27564
|
},
|
|
27333
|
-
children: /* @__PURE__ */ (0,
|
|
27565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react22.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
27334
27566
|
}
|
|
27335
27567
|
)
|
|
27336
27568
|
}
|
|
@@ -27339,7 +27571,7 @@ function NavbarContainerChrome({
|
|
|
27339
27571
|
|
|
27340
27572
|
// src/ui/drop-indicator.tsx
|
|
27341
27573
|
var React12 = __toESM(require("react"), 1);
|
|
27342
|
-
var
|
|
27574
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
27343
27575
|
var dropIndicatorVariants = cva(
|
|
27344
27576
|
"ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
|
|
27345
27577
|
{
|
|
@@ -27363,7 +27595,7 @@ var dropIndicatorVariants = cva(
|
|
|
27363
27595
|
);
|
|
27364
27596
|
var DropIndicator = React12.forwardRef(
|
|
27365
27597
|
({ className, direction, state, ...props }, ref) => {
|
|
27366
|
-
return /* @__PURE__ */ (0,
|
|
27598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
27367
27599
|
"div",
|
|
27368
27600
|
{
|
|
27369
27601
|
ref,
|
|
@@ -27380,7 +27612,7 @@ var DropIndicator = React12.forwardRef(
|
|
|
27380
27612
|
DropIndicator.displayName = "DropIndicator";
|
|
27381
27613
|
|
|
27382
27614
|
// src/ui/badge.tsx
|
|
27383
|
-
var
|
|
27615
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
27384
27616
|
var badgeVariants = cva(
|
|
27385
27617
|
"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",
|
|
27386
27618
|
{
|
|
@@ -27398,12 +27630,12 @@ var badgeVariants = cva(
|
|
|
27398
27630
|
}
|
|
27399
27631
|
);
|
|
27400
27632
|
function Badge({ className, variant, ...props }) {
|
|
27401
|
-
return /* @__PURE__ */ (0,
|
|
27633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
27402
27634
|
}
|
|
27403
27635
|
|
|
27404
27636
|
// src/OhhwellsBridge.tsx
|
|
27405
27637
|
var import_lucide_react23 = require("lucide-react");
|
|
27406
|
-
var
|
|
27638
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
27407
27639
|
var PRIMARY7 = "#0885FE";
|
|
27408
27640
|
var IMAGE_FADE_MS = 300;
|
|
27409
27641
|
var MEDIA_SETTLE_TIMEOUT_MS = 2500;
|
|
@@ -27522,11 +27754,11 @@ function duplicateSchedulingWidget(instanceId, scheduleId) {
|
|
|
27522
27754
|
container.dataset.ohwInstance = sectionId;
|
|
27523
27755
|
sourceWrapper.insertAdjacentElement("afterend", container);
|
|
27524
27756
|
try {
|
|
27525
|
-
const root = (0,
|
|
27757
|
+
const root = (0, import_client4.createRoot)(container);
|
|
27526
27758
|
schedulingRoots.set(container, root);
|
|
27527
|
-
(0,
|
|
27759
|
+
(0, import_react_dom6.flushSync)(() => {
|
|
27528
27760
|
root.render(
|
|
27529
|
-
/* @__PURE__ */ (0,
|
|
27761
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
27530
27762
|
SchedulingWidget,
|
|
27531
27763
|
{
|
|
27532
27764
|
notifyOnConnect: false,
|
|
@@ -27650,11 +27882,11 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
|
|
|
27650
27882
|
tail.insertAdjacentElement("afterend", container);
|
|
27651
27883
|
}
|
|
27652
27884
|
try {
|
|
27653
|
-
const root = (0,
|
|
27885
|
+
const root = (0, import_client4.createRoot)(container);
|
|
27654
27886
|
schedulingRoots.set(container, root);
|
|
27655
|
-
(0,
|
|
27887
|
+
(0, import_react_dom6.flushSync)(() => {
|
|
27656
27888
|
root.render(
|
|
27657
|
-
/* @__PURE__ */ (0,
|
|
27889
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
27658
27890
|
SchedulingWidget,
|
|
27659
27891
|
{
|
|
27660
27892
|
notifyOnConnect,
|
|
@@ -28433,7 +28665,7 @@ function EditGlowChrome({
|
|
|
28433
28665
|
hideHandle = false
|
|
28434
28666
|
}) {
|
|
28435
28667
|
const GAP = SELECTION_CHROME_GAP2;
|
|
28436
|
-
return /* @__PURE__ */ (0,
|
|
28668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
28437
28669
|
"div",
|
|
28438
28670
|
{
|
|
28439
28671
|
ref: elRef,
|
|
@@ -28448,7 +28680,7 @@ function EditGlowChrome({
|
|
|
28448
28680
|
zIndex: 2147483646
|
|
28449
28681
|
},
|
|
28450
28682
|
children: [
|
|
28451
|
-
/* @__PURE__ */ (0,
|
|
28683
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28452
28684
|
"div",
|
|
28453
28685
|
{
|
|
28454
28686
|
style: {
|
|
@@ -28462,7 +28694,7 @@ function EditGlowChrome({
|
|
|
28462
28694
|
}
|
|
28463
28695
|
}
|
|
28464
28696
|
),
|
|
28465
|
-
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0,
|
|
28697
|
+
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28466
28698
|
"div",
|
|
28467
28699
|
{
|
|
28468
28700
|
"data-ohw-drag-handle-container": "",
|
|
@@ -28474,7 +28706,7 @@ function EditGlowChrome({
|
|
|
28474
28706
|
transform: "translate(calc(-100% - 7px), -50%)",
|
|
28475
28707
|
pointerEvents: dragDisabled ? "none" : "auto"
|
|
28476
28708
|
},
|
|
28477
|
-
children: /* @__PURE__ */ (0,
|
|
28709
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28478
28710
|
DragHandle,
|
|
28479
28711
|
{
|
|
28480
28712
|
"aria-label": `Reorder ${reorderHrefKey}`,
|
|
@@ -28681,7 +28913,7 @@ function FloatingToolbar({
|
|
|
28681
28913
|
return () => ro.disconnect();
|
|
28682
28914
|
}, [showEditLink, showDelete, activeCommands]);
|
|
28683
28915
|
const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
|
|
28684
|
-
return /* @__PURE__ */ (0,
|
|
28916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28685
28917
|
"div",
|
|
28686
28918
|
{
|
|
28687
28919
|
ref: setRefs,
|
|
@@ -28693,12 +28925,12 @@ function FloatingToolbar({
|
|
|
28693
28925
|
zIndex: 2147483647,
|
|
28694
28926
|
pointerEvents: "auto"
|
|
28695
28927
|
},
|
|
28696
|
-
children: /* @__PURE__ */ (0,
|
|
28697
|
-
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0,
|
|
28698
|
-
gi > 0 && /* @__PURE__ */ (0,
|
|
28928
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(CustomToolbar, { children: [
|
|
28929
|
+
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react27.default.Fragment, { children: [
|
|
28930
|
+
gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CustomToolbarDivider, {}),
|
|
28699
28931
|
btns.map((btn) => {
|
|
28700
28932
|
const isActive = activeCommands.has(btn.cmd);
|
|
28701
|
-
return /* @__PURE__ */ (0,
|
|
28933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28702
28934
|
CustomToolbarButton,
|
|
28703
28935
|
{
|
|
28704
28936
|
title: btn.title,
|
|
@@ -28707,7 +28939,7 @@ function FloatingToolbar({
|
|
|
28707
28939
|
e.preventDefault();
|
|
28708
28940
|
onCommand(btn.cmd);
|
|
28709
28941
|
},
|
|
28710
|
-
children: /* @__PURE__ */ (0,
|
|
28942
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28711
28943
|
"svg",
|
|
28712
28944
|
{
|
|
28713
28945
|
width: "16",
|
|
@@ -28728,7 +28960,7 @@ function FloatingToolbar({
|
|
|
28728
28960
|
);
|
|
28729
28961
|
})
|
|
28730
28962
|
] }, gi)),
|
|
28731
|
-
showEditLink ? /* @__PURE__ */ (0,
|
|
28963
|
+
showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28732
28964
|
CustomToolbarButton,
|
|
28733
28965
|
{
|
|
28734
28966
|
type: "button",
|
|
@@ -28742,12 +28974,12 @@ function FloatingToolbar({
|
|
|
28742
28974
|
e.preventDefault();
|
|
28743
28975
|
e.stopPropagation();
|
|
28744
28976
|
},
|
|
28745
|
-
children: /* @__PURE__ */ (0,
|
|
28977
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react23.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
28746
28978
|
}
|
|
28747
28979
|
) : null,
|
|
28748
|
-
showDelete ? /* @__PURE__ */ (0,
|
|
28749
|
-
/* @__PURE__ */ (0,
|
|
28750
|
-
/* @__PURE__ */ (0,
|
|
28980
|
+
showDelete ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
28981
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CustomToolbarDivider, {}),
|
|
28982
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28751
28983
|
CustomToolbarButton,
|
|
28752
28984
|
{
|
|
28753
28985
|
type: "button",
|
|
@@ -28762,7 +28994,7 @@ function FloatingToolbar({
|
|
|
28762
28994
|
e.preventDefault();
|
|
28763
28995
|
e.stopPropagation();
|
|
28764
28996
|
},
|
|
28765
|
-
children: /* @__PURE__ */ (0,
|
|
28997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react23.Trash2, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
28766
28998
|
}
|
|
28767
28999
|
)
|
|
28768
29000
|
] }) : null
|
|
@@ -28780,7 +29012,7 @@ function StateToggle({
|
|
|
28780
29012
|
states,
|
|
28781
29013
|
onStateChange
|
|
28782
29014
|
}) {
|
|
28783
|
-
return /* @__PURE__ */ (0,
|
|
29015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28784
29016
|
ToggleGroup,
|
|
28785
29017
|
{
|
|
28786
29018
|
"data-ohw-state-toggle": "",
|
|
@@ -28794,7 +29026,7 @@ function StateToggle({
|
|
|
28794
29026
|
left: rect.right - 8,
|
|
28795
29027
|
transform: "translateX(-100%)"
|
|
28796
29028
|
},
|
|
28797
|
-
children: states.map((state) => /* @__PURE__ */ (0,
|
|
29029
|
+
children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
|
|
28798
29030
|
}
|
|
28799
29031
|
);
|
|
28800
29032
|
}
|
|
@@ -28802,7 +29034,7 @@ var contentCache = /* @__PURE__ */ new Map();
|
|
|
28802
29034
|
var fetchedContentPaths = /* @__PURE__ */ new Set();
|
|
28803
29035
|
var brandingCache = /* @__PURE__ */ new Map();
|
|
28804
29036
|
function OhwBrandMark() {
|
|
28805
|
-
return /* @__PURE__ */ (0,
|
|
29037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
28806
29038
|
"svg",
|
|
28807
29039
|
{
|
|
28808
29040
|
width: "16",
|
|
@@ -28813,7 +29045,7 @@ function OhwBrandMark() {
|
|
|
28813
29045
|
style: { display: "block", flexShrink: 0 },
|
|
28814
29046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28815
29047
|
children: [
|
|
28816
|
-
/* @__PURE__ */ (0,
|
|
29048
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
28817
29049
|
"mask",
|
|
28818
29050
|
{
|
|
28819
29051
|
id: "ohw-badge-mark",
|
|
@@ -28823,15 +29055,15 @@ function OhwBrandMark() {
|
|
|
28823
29055
|
y: "0",
|
|
28824
29056
|
width: "48",
|
|
28825
29057
|
height: "48",
|
|
28826
|
-
children: /* @__PURE__ */ (0,
|
|
29058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.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" })
|
|
28827
29059
|
}
|
|
28828
29060
|
),
|
|
28829
|
-
/* @__PURE__ */ (0,
|
|
28830
|
-
/* @__PURE__ */ (0,
|
|
28831
|
-
/* @__PURE__ */ (0,
|
|
28832
|
-
/* @__PURE__ */ (0,
|
|
28833
|
-
/* @__PURE__ */ (0,
|
|
28834
|
-
/* @__PURE__ */ (0,
|
|
29061
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("g", { mask: "url(#ohw-badge-mark)", children: [
|
|
29062
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.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" }),
|
|
29063
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.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" }),
|
|
29064
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.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" }),
|
|
29065
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.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" }),
|
|
29066
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.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" })
|
|
28835
29067
|
] })
|
|
28836
29068
|
]
|
|
28837
29069
|
}
|
|
@@ -28868,7 +29100,7 @@ var OHW_BADGE_LABEL_STYLE = {
|
|
|
28868
29100
|
whiteSpace: "nowrap"
|
|
28869
29101
|
};
|
|
28870
29102
|
function MadeWithOhhWells() {
|
|
28871
|
-
return /* @__PURE__ */ (0,
|
|
29103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
28872
29104
|
"a",
|
|
28873
29105
|
{
|
|
28874
29106
|
href: "https://ohhwells.com",
|
|
@@ -28878,8 +29110,8 @@ function MadeWithOhhWells() {
|
|
|
28878
29110
|
"data-ohw-badge": "",
|
|
28879
29111
|
style: OHW_BADGE_STYLE,
|
|
28880
29112
|
children: [
|
|
28881
|
-
/* @__PURE__ */ (0,
|
|
28882
|
-
/* @__PURE__ */ (0,
|
|
29113
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(OhwBrandMark, {}),
|
|
29114
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { style: OHW_BADGE_LABEL_STYLE, children: "Made with OhhWells" })
|
|
28883
29115
|
]
|
|
28884
29116
|
}
|
|
28885
29117
|
);
|
|
@@ -31504,11 +31736,38 @@ function OhhwellsBridge() {
|
|
|
31504
31736
|
}, [buildFieldDropSlots, isEditMode, persistFields, selectField]);
|
|
31505
31737
|
(0, import_react27.useEffect)(() => {
|
|
31506
31738
|
if (!isEditMode) return;
|
|
31507
|
-
|
|
31508
|
-
|
|
31739
|
+
let applying = false;
|
|
31740
|
+
const syncForms = () => {
|
|
31741
|
+
if (applying) return;
|
|
31742
|
+
applying = true;
|
|
31743
|
+
try {
|
|
31744
|
+
document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
|
|
31745
|
+
const key = formKeyOf(form);
|
|
31746
|
+
if (key && editContentRef.current[fieldsKey(key)]) {
|
|
31747
|
+
reconcileFieldsFromContent(form, editContentRef.current);
|
|
31748
|
+
} else {
|
|
31749
|
+
markFormFields(form);
|
|
31750
|
+
}
|
|
31751
|
+
});
|
|
31752
|
+
} finally {
|
|
31753
|
+
queueMicrotask(() => {
|
|
31754
|
+
applying = false;
|
|
31755
|
+
});
|
|
31756
|
+
}
|
|
31757
|
+
};
|
|
31758
|
+
syncForms();
|
|
31759
|
+
const observer = new MutationObserver((mutations) => {
|
|
31760
|
+
const structural = mutations.some(
|
|
31761
|
+
(m) => m.type === "childList" && (m.addedNodes.length > 0 || m.removedNodes.length > 0)
|
|
31762
|
+
);
|
|
31763
|
+
if (!structural) {
|
|
31764
|
+
document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
|
|
31765
|
+
markFormFields(form);
|
|
31766
|
+
});
|
|
31767
|
+
return;
|
|
31768
|
+
}
|
|
31769
|
+
syncForms();
|
|
31509
31770
|
});
|
|
31510
|
-
mark();
|
|
31511
|
-
const observer = new MutationObserver(() => mark());
|
|
31512
31771
|
document.querySelectorAll('[data-ohw-editable="form"]').forEach((form) => {
|
|
31513
31772
|
observer.observe(form, { childList: true, subtree: true, characterData: true });
|
|
31514
31773
|
});
|
|
@@ -34208,6 +34467,8 @@ function OhhwellsBridge() {
|
|
|
34208
34467
|
applyTreeToLocalState(payload);
|
|
34209
34468
|
};
|
|
34210
34469
|
window.addEventListener("message", handleAiApplyTree);
|
|
34470
|
+
const handleAiLayoutPreviews = createLayoutPreviewsListener((data) => postToParentRef.current(data));
|
|
34471
|
+
window.addEventListener("message", handleAiLayoutPreviews);
|
|
34211
34472
|
const handleAiDeleteSection = (e) => {
|
|
34212
34473
|
if (e.data?.type !== "ow:ai-delete-section") return;
|
|
34213
34474
|
const sectionId = typeof e.data.sectionId === "string" ? e.data.sectionId : "";
|
|
@@ -35455,6 +35716,7 @@ function OhhwellsBridge() {
|
|
|
35455
35716
|
window.removeEventListener("message", handleViewMode);
|
|
35456
35717
|
window.removeEventListener("message", handleHydrate);
|
|
35457
35718
|
window.removeEventListener("message", handleAiApplyTree);
|
|
35719
|
+
window.removeEventListener("message", handleAiLayoutPreviews);
|
|
35458
35720
|
window.removeEventListener("message", handleAiApplyFooter);
|
|
35459
35721
|
window.removeEventListener("message", handleAiDeleteSection);
|
|
35460
35722
|
window.removeEventListener("message", handleAiMoveSection);
|
|
@@ -35771,7 +36033,7 @@ function OhhwellsBridge() {
|
|
|
35771
36033
|
postToParent2({
|
|
35772
36034
|
type: "ow:ready",
|
|
35773
36035
|
version: "1",
|
|
35774
|
-
bridgeVersion: "0.1.179-next.
|
|
36036
|
+
bridgeVersion: "0.1.179-next.480",
|
|
35775
36037
|
path: pathname,
|
|
35776
36038
|
nodes: collectEditableNodes(editContentRef.current),
|
|
35777
36039
|
sections
|
|
@@ -36457,13 +36719,13 @@ function OhhwellsBridge() {
|
|
|
36457
36719
|
},
|
|
36458
36720
|
[postToParent2]
|
|
36459
36721
|
);
|
|
36460
|
-
return /* @__PURE__ */ (0,
|
|
36461
|
-
/* @__PURE__ */ (0,
|
|
36462
|
-
subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0,
|
|
36463
|
-
bridgeRoot ? (0,
|
|
36464
|
-
/* @__PURE__ */ (0,
|
|
36465
|
-
/* @__PURE__ */ (0,
|
|
36466
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
36722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
36723
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(OhwLoaderSurface, {}),
|
|
36724
|
+
subdomain && !isEditMode && showBranding && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MadeWithOhhWells, {}),
|
|
36725
|
+
bridgeRoot ? (0, import_react_dom7.createPortal)(
|
|
36726
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
36727
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
|
|
36728
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36467
36729
|
AiSectionOverlay,
|
|
36468
36730
|
{
|
|
36469
36731
|
postToParent: postToParent2,
|
|
@@ -36471,7 +36733,7 @@ function OhhwellsBridge() {
|
|
|
36471
36733
|
onSelectionChange: handleAiSectionSelectionChange
|
|
36472
36734
|
}
|
|
36473
36735
|
),
|
|
36474
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
36736
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36475
36737
|
AiMediaStripOverlay,
|
|
36476
36738
|
{
|
|
36477
36739
|
postToParent: postToParent2,
|
|
@@ -36480,7 +36742,7 @@ function OhhwellsBridge() {
|
|
|
36480
36742
|
clearInteractionChromeRef
|
|
36481
36743
|
}
|
|
36482
36744
|
),
|
|
36483
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
36745
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36484
36746
|
AiPricingCardOverlay,
|
|
36485
36747
|
{
|
|
36486
36748
|
postToParent: postToParent2,
|
|
@@ -36488,7 +36750,7 @@ function OhhwellsBridge() {
|
|
|
36488
36750
|
applyTreeLocalRef
|
|
36489
36751
|
}
|
|
36490
36752
|
),
|
|
36491
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
36753
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36492
36754
|
AiVideoOverlay,
|
|
36493
36755
|
{
|
|
36494
36756
|
postToParent: postToParent2,
|
|
@@ -36497,7 +36759,7 @@ function OhhwellsBridge() {
|
|
|
36497
36759
|
clearInteractionChromeRef
|
|
36498
36760
|
}
|
|
36499
36761
|
),
|
|
36500
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
36762
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36501
36763
|
AiFadeCarouselOverlay,
|
|
36502
36764
|
{
|
|
36503
36765
|
postToParent: postToParent2,
|
|
@@ -36506,12 +36768,12 @@ function OhhwellsBridge() {
|
|
|
36506
36768
|
clearInteractionChromeRef
|
|
36507
36769
|
}
|
|
36508
36770
|
),
|
|
36509
|
-
isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
36771
|
+
isSectionDragging && sectionDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36510
36772
|
"div",
|
|
36511
36773
|
{
|
|
36512
36774
|
className: "pointer-events-none fixed z-2147483646",
|
|
36513
36775
|
style: { left: slot.left, top: slot.y, width: slot.width, height: 3, transform: "translateY(-50%)" },
|
|
36514
|
-
children: /* @__PURE__ */ (0,
|
|
36776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36515
36777
|
DropIndicator,
|
|
36516
36778
|
{
|
|
36517
36779
|
direction: "horizontal",
|
|
@@ -36522,7 +36784,7 @@ function OhhwellsBridge() {
|
|
|
36522
36784
|
},
|
|
36523
36785
|
`section-drop-${slot.insertIndex}-${i}`
|
|
36524
36786
|
)),
|
|
36525
|
-
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0,
|
|
36787
|
+
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36526
36788
|
MediaOverlay,
|
|
36527
36789
|
{
|
|
36528
36790
|
hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
|
|
@@ -36533,7 +36795,7 @@ function OhhwellsBridge() {
|
|
|
36533
36795
|
},
|
|
36534
36796
|
`uploading-${key}`
|
|
36535
36797
|
)),
|
|
36536
|
-
mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0,
|
|
36798
|
+
mediaHover && !(mediaHover.key in uploadingRects) && mediaHover.key !== selectedMedia?.key && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36537
36799
|
MediaOverlay,
|
|
36538
36800
|
{
|
|
36539
36801
|
hover: mediaHover,
|
|
@@ -36544,7 +36806,7 @@ function OhhwellsBridge() {
|
|
|
36544
36806
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
36545
36807
|
}
|
|
36546
36808
|
),
|
|
36547
|
-
selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0,
|
|
36809
|
+
selectedMedia && !(selectedMedia.key in uploadingRects) && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36548
36810
|
MediaOverlay,
|
|
36549
36811
|
{
|
|
36550
36812
|
hover: selectedMedia,
|
|
@@ -36563,7 +36825,7 @@ function OhhwellsBridge() {
|
|
|
36563
36825
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
36564
36826
|
}
|
|
36565
36827
|
),
|
|
36566
|
-
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
36828
|
+
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36567
36829
|
CarouselOverlay,
|
|
36568
36830
|
{
|
|
36569
36831
|
hover: carouselHover,
|
|
@@ -36571,10 +36833,10 @@ function OhhwellsBridge() {
|
|
|
36571
36833
|
cueOnly: !!carouselHover.fullBleedSectionId && carouselHover.fullBleedSectionId !== selectedAiSectionId
|
|
36572
36834
|
}
|
|
36573
36835
|
),
|
|
36574
|
-
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0,
|
|
36575
|
-
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0,
|
|
36576
|
-
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && selectedElRef.current !== buttonCollectionDragRef.current && /* @__PURE__ */ (0,
|
|
36577
|
-
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
36836
|
+
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
|
|
36837
|
+
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
|
|
36838
|
+
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && selectedElRef.current !== buttonCollectionDragRef.current && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
|
|
36839
|
+
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36578
36840
|
"div",
|
|
36579
36841
|
{
|
|
36580
36842
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -36584,7 +36846,7 @@ function OhhwellsBridge() {
|
|
|
36584
36846
|
width: slot.width,
|
|
36585
36847
|
height: slot.height
|
|
36586
36848
|
},
|
|
36587
|
-
children: /* @__PURE__ */ (0,
|
|
36849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36588
36850
|
DropIndicator,
|
|
36589
36851
|
{
|
|
36590
36852
|
direction: slot.direction,
|
|
@@ -36595,7 +36857,7 @@ function OhhwellsBridge() {
|
|
|
36595
36857
|
},
|
|
36596
36858
|
`footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
|
|
36597
36859
|
)),
|
|
36598
|
-
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
36860
|
+
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36599
36861
|
"div",
|
|
36600
36862
|
{
|
|
36601
36863
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -36605,7 +36867,7 @@ function OhhwellsBridge() {
|
|
|
36605
36867
|
width: slot.width,
|
|
36606
36868
|
height: slot.height
|
|
36607
36869
|
},
|
|
36608
|
-
children: /* @__PURE__ */ (0,
|
|
36870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36609
36871
|
DropIndicator,
|
|
36610
36872
|
{
|
|
36611
36873
|
direction: slot.direction,
|
|
@@ -36616,7 +36878,7 @@ function OhhwellsBridge() {
|
|
|
36616
36878
|
},
|
|
36617
36879
|
`nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
|
|
36618
36880
|
)),
|
|
36619
|
-
isItemDragging && buttonDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
36881
|
+
isItemDragging && buttonDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36620
36882
|
"div",
|
|
36621
36883
|
{
|
|
36622
36884
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -36626,7 +36888,7 @@ function OhhwellsBridge() {
|
|
|
36626
36888
|
width: slot.width,
|
|
36627
36889
|
height: slot.height
|
|
36628
36890
|
},
|
|
36629
|
-
children: /* @__PURE__ */ (0,
|
|
36891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36630
36892
|
DropIndicator,
|
|
36631
36893
|
{
|
|
36632
36894
|
direction: slot.direction,
|
|
@@ -36637,10 +36899,10 @@ function OhhwellsBridge() {
|
|
|
36637
36899
|
},
|
|
36638
36900
|
`button-drop-${slot.direction}-${slot.insertIndex}-${i}`
|
|
36639
36901
|
)),
|
|
36640
|
-
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
36641
|
-
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0,
|
|
36642
|
-
hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0,
|
|
36643
|
-
formPickRect && !isItemDragging && /* @__PURE__ */ (0,
|
|
36902
|
+
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
36903
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
36904
|
+
hoveredTextRect && !hoveredNavContainerRect && !hoveredItemRect && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ItemInteractionLayer, { rect: hoveredTextRect, state: "hover" }),
|
|
36905
|
+
formPickRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36644
36906
|
ItemInteractionLayer,
|
|
36645
36907
|
{
|
|
36646
36908
|
rect: formPickRect,
|
|
@@ -36648,13 +36910,13 @@ function OhhwellsBridge() {
|
|
|
36648
36910
|
itemDragSurface: false,
|
|
36649
36911
|
toolbarAlign: "left",
|
|
36650
36912
|
chromeGap: 24,
|
|
36651
|
-
toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0,
|
|
36913
|
+
toolbar: fieldPickRect ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
36652
36914
|
"div",
|
|
36653
36915
|
{
|
|
36654
36916
|
"data-ohw-form-toolbar": "",
|
|
36655
36917
|
className: "pointer-events-auto flex items-center gap-0.5 whitespace-nowrap rounded-lg border border-border bg-background p-1 shadow-md",
|
|
36656
36918
|
children: [
|
|
36657
|
-
/* @__PURE__ */ (0,
|
|
36919
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36658
36920
|
"button",
|
|
36659
36921
|
{
|
|
36660
36922
|
type: "button",
|
|
@@ -36662,11 +36924,11 @@ function OhhwellsBridge() {
|
|
|
36662
36924
|
className: "flex h-7 w-7 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted/80",
|
|
36663
36925
|
onClick: () => setFieldTypePickerOpen((open) => !open),
|
|
36664
36926
|
"data-ohw-add-field": "",
|
|
36665
|
-
children: /* @__PURE__ */ (0,
|
|
36927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react23.Plus, { size: 15, "aria-hidden": true })
|
|
36666
36928
|
}
|
|
36667
36929
|
),
|
|
36668
|
-
/* @__PURE__ */ (0,
|
|
36669
|
-
/* @__PURE__ */ (0,
|
|
36930
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
36931
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
36670
36932
|
"button",
|
|
36671
36933
|
{
|
|
36672
36934
|
type: "button",
|
|
@@ -36682,11 +36944,11 @@ function OhhwellsBridge() {
|
|
|
36682
36944
|
});
|
|
36683
36945
|
},
|
|
36684
36946
|
children: [
|
|
36685
|
-
/* @__PURE__ */ (0,
|
|
36947
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react23.Settings, { size: 14, "aria-hidden": true }),
|
|
36686
36948
|
"Form settings",
|
|
36687
36949
|
formPickCount ? (
|
|
36688
36950
|
// Counter pill, per the design — not a text suffix.
|
|
36689
|
-
/* @__PURE__ */ (0,
|
|
36951
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36690
36952
|
"span",
|
|
36691
36953
|
{
|
|
36692
36954
|
"data-ohw-form-count": "",
|
|
@@ -36698,8 +36960,8 @@ function OhhwellsBridge() {
|
|
|
36698
36960
|
]
|
|
36699
36961
|
}
|
|
36700
36962
|
),
|
|
36701
|
-
/* @__PURE__ */ (0,
|
|
36702
|
-
/* @__PURE__ */ (0,
|
|
36963
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
36964
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex items-center rounded-md bg-muted/70 p-0.5", children: ["default", "success"].map((state) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36703
36965
|
"button",
|
|
36704
36966
|
{
|
|
36705
36967
|
type: "button",
|
|
@@ -36725,8 +36987,8 @@ function OhhwellsBridge() {
|
|
|
36725
36987
|
},
|
|
36726
36988
|
state
|
|
36727
36989
|
)) }),
|
|
36728
|
-
/* @__PURE__ */ (0,
|
|
36729
|
-
/* @__PURE__ */ (0,
|
|
36990
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mx-0.5 h-5 w-px bg-border" }),
|
|
36991
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36730
36992
|
"button",
|
|
36731
36993
|
{
|
|
36732
36994
|
type: "button",
|
|
@@ -36739,7 +37001,7 @@ function OhhwellsBridge() {
|
|
|
36739
37001
|
if (!form) return;
|
|
36740
37002
|
softHideTemplateEditable(form, { fromToolbar: true });
|
|
36741
37003
|
},
|
|
36742
|
-
children: /* @__PURE__ */ (0,
|
|
37004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react23.Trash2, { size: 15, "aria-hidden": true })
|
|
36743
37005
|
}
|
|
36744
37006
|
)
|
|
36745
37007
|
]
|
|
@@ -36747,7 +37009,7 @@ function OhhwellsBridge() {
|
|
|
36747
37009
|
)
|
|
36748
37010
|
}
|
|
36749
37011
|
),
|
|
36750
|
-
formHoverRect && !isItemDragging && /* @__PURE__ */ (0,
|
|
37012
|
+
formHoverRect && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36751
37013
|
ItemInteractionLayer,
|
|
36752
37014
|
{
|
|
36753
37015
|
rect: formHoverRect,
|
|
@@ -36755,7 +37017,7 @@ function OhhwellsBridge() {
|
|
|
36755
37017
|
chromeGap: formHoverElRef.current && getFieldWrapper(formHoverElRef.current) ? 8 : 24
|
|
36756
37018
|
}
|
|
36757
37019
|
),
|
|
36758
|
-
fieldPickRect && fieldPickState && !dropdownOptionPick && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0,
|
|
37020
|
+
fieldPickRect && fieldPickState && !dropdownOptionPick && !isItemDragging && toolbarVariant !== "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36759
37021
|
ItemInteractionLayer,
|
|
36760
37022
|
{
|
|
36761
37023
|
rect: fieldPickRect,
|
|
@@ -36767,7 +37029,7 @@ function OhhwellsBridge() {
|
|
|
36767
37029
|
dragHandleLabel: "Reorder field",
|
|
36768
37030
|
onDragHandleDragStart: handleFieldDragStart,
|
|
36769
37031
|
onDragHandleDragEnd: handleFieldDragEnd,
|
|
36770
|
-
toolbar: /* @__PURE__ */ (0,
|
|
37032
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36771
37033
|
FormFieldToolbar,
|
|
36772
37034
|
{
|
|
36773
37035
|
type: fieldPickState.type,
|
|
@@ -36782,7 +37044,7 @@ function OhhwellsBridge() {
|
|
|
36782
37044
|
)
|
|
36783
37045
|
}
|
|
36784
37046
|
),
|
|
36785
|
-
dropdownOptionPick && !isItemDragging && /* @__PURE__ */ (0,
|
|
37047
|
+
dropdownOptionPick && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36786
37048
|
ItemInteractionLayer,
|
|
36787
37049
|
{
|
|
36788
37050
|
rect: dropdownOptionPick.rect,
|
|
@@ -36791,7 +37053,7 @@ function OhhwellsBridge() {
|
|
|
36791
37053
|
toolbarAlign: "center",
|
|
36792
37054
|
chromeGap: 0,
|
|
36793
37055
|
showHandle: false,
|
|
36794
|
-
toolbar: /* @__PURE__ */ (0,
|
|
37056
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36795
37057
|
DropdownOptionToolbar,
|
|
36796
37058
|
{
|
|
36797
37059
|
canDelete: dropdownOptionPick.canDelete,
|
|
@@ -36801,12 +37063,12 @@ function OhhwellsBridge() {
|
|
|
36801
37063
|
)
|
|
36802
37064
|
}
|
|
36803
37065
|
),
|
|
36804
|
-
fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
37066
|
+
fieldDragging ? fieldDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36805
37067
|
"div",
|
|
36806
37068
|
{
|
|
36807
37069
|
className: "pointer-events-none fixed z-[2147483644]",
|
|
36808
37070
|
style: { top: slot.top, left: slot.left, width: slot.width },
|
|
36809
|
-
children: /* @__PURE__ */ (0,
|
|
37071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36810
37072
|
DropIndicator,
|
|
36811
37073
|
{
|
|
36812
37074
|
direction: "horizontal",
|
|
@@ -36819,7 +37081,7 @@ function OhhwellsBridge() {
|
|
|
36819
37081
|
)) : null,
|
|
36820
37082
|
fieldTypePickerOpen && formPickRect ? (() => {
|
|
36821
37083
|
const toolbar = document.querySelector("[data-ohw-form-toolbar]")?.getBoundingClientRect();
|
|
36822
|
-
return /* @__PURE__ */ (0,
|
|
37084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36823
37085
|
"div",
|
|
36824
37086
|
{
|
|
36825
37087
|
className: "pointer-events-none fixed z-[2147483645]",
|
|
@@ -36827,12 +37089,12 @@ function OhhwellsBridge() {
|
|
|
36827
37089
|
top: toolbar ? toolbar.bottom + 6 : formPickRect.top + 16,
|
|
36828
37090
|
left: toolbar ? toolbar.left : formPickRect.left + 24
|
|
36829
37091
|
},
|
|
36830
|
-
children: /* @__PURE__ */ (0,
|
|
37092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldTypePicker, { onPick: handleAddField })
|
|
36831
37093
|
}
|
|
36832
37094
|
);
|
|
36833
37095
|
})() : null,
|
|
36834
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
36835
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
37096
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
37097
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36836
37098
|
FooterContainerChrome,
|
|
36837
37099
|
{
|
|
36838
37100
|
rect: toolbarRect,
|
|
@@ -36840,7 +37102,7 @@ function OhhwellsBridge() {
|
|
|
36840
37102
|
addDisabled: !canAddFooterColumn()
|
|
36841
37103
|
}
|
|
36842
37104
|
),
|
|
36843
|
-
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0,
|
|
37105
|
+
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36844
37106
|
ItemInteractionLayer,
|
|
36845
37107
|
{
|
|
36846
37108
|
rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected || selectedElRef.current === buttonCollectionDragRef.current) ? draggedItemRect : toolbarRect,
|
|
@@ -36860,7 +37122,7 @@ function OhhwellsBridge() {
|
|
|
36860
37122
|
onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
|
|
36861
37123
|
onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
|
|
36862
37124
|
itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection && !selectedIsSocialsRow,
|
|
36863
|
-
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0,
|
|
37125
|
+
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36864
37126
|
ItemActionToolbar,
|
|
36865
37127
|
{
|
|
36866
37128
|
onEditLink: openLinkPopoverForSelected,
|
|
@@ -36911,8 +37173,8 @@ function OhhwellsBridge() {
|
|
|
36911
37173
|
) : void 0
|
|
36912
37174
|
}
|
|
36913
37175
|
),
|
|
36914
|
-
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0,
|
|
36915
|
-
/* @__PURE__ */ (0,
|
|
37176
|
+
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && !isRectOutsideClip(toolbarRect, getIframeVisibleClip(parentScrollRef.current)) && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
37177
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36916
37178
|
EditGlowChrome,
|
|
36917
37179
|
{
|
|
36918
37180
|
rect: toolbarRect,
|
|
@@ -36922,7 +37184,7 @@ function OhhwellsBridge() {
|
|
|
36922
37184
|
hideHandle: isItemDragging
|
|
36923
37185
|
}
|
|
36924
37186
|
),
|
|
36925
|
-
/* @__PURE__ */ (0,
|
|
37187
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36926
37188
|
FloatingToolbar,
|
|
36927
37189
|
{
|
|
36928
37190
|
rect: toolbarRect,
|
|
@@ -36943,7 +37205,7 @@ function OhhwellsBridge() {
|
|
|
36943
37205
|
}
|
|
36944
37206
|
)
|
|
36945
37207
|
] }),
|
|
36946
|
-
maxBadge && /* @__PURE__ */ (0,
|
|
37208
|
+
maxBadge && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
36947
37209
|
"div",
|
|
36948
37210
|
{
|
|
36949
37211
|
"data-ohw-max-badge": "",
|
|
@@ -36969,7 +37231,7 @@ function OhhwellsBridge() {
|
|
|
36969
37231
|
]
|
|
36970
37232
|
}
|
|
36971
37233
|
),
|
|
36972
|
-
toggleState && !linkPopover && /* @__PURE__ */ (0,
|
|
37234
|
+
toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36973
37235
|
StateToggle,
|
|
36974
37236
|
{
|
|
36975
37237
|
rect: toggleState.rect,
|
|
@@ -36978,15 +37240,15 @@ function OhhwellsBridge() {
|
|
|
36978
37240
|
onStateChange: handleStateChange
|
|
36979
37241
|
}
|
|
36980
37242
|
),
|
|
36981
|
-
sectionGap && !linkPopover && /* @__PURE__ */ (0,
|
|
37243
|
+
sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
36982
37244
|
"div",
|
|
36983
37245
|
{
|
|
36984
37246
|
"data-ohw-section-insert-line": "",
|
|
36985
37247
|
className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
|
|
36986
37248
|
style: { top: sectionGap.y, transform: "translateY(-50%)" },
|
|
36987
37249
|
children: [
|
|
36988
|
-
/* @__PURE__ */ (0,
|
|
36989
|
-
/* @__PURE__ */ (0,
|
|
37250
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } }),
|
|
37251
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
36990
37252
|
Badge,
|
|
36991
37253
|
{
|
|
36992
37254
|
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",
|
|
@@ -37003,11 +37265,11 @@ function OhhwellsBridge() {
|
|
|
37003
37265
|
children: "Add Section"
|
|
37004
37266
|
}
|
|
37005
37267
|
),
|
|
37006
|
-
/* @__PURE__ */ (0,
|
|
37268
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1 bg-bridge-primary", style: { height: 3 } })
|
|
37007
37269
|
]
|
|
37008
37270
|
}
|
|
37009
37271
|
),
|
|
37010
|
-
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0,
|
|
37272
|
+
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
37011
37273
|
LinkPopover,
|
|
37012
37274
|
{
|
|
37013
37275
|
panelRef: linkPopoverPanelRef,
|
|
@@ -37024,7 +37286,7 @@ function OhhwellsBridge() {
|
|
|
37024
37286
|
},
|
|
37025
37287
|
linkPopover.key
|
|
37026
37288
|
) : null,
|
|
37027
|
-
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0,
|
|
37289
|
+
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
37028
37290
|
FloatingPanel,
|
|
37029
37291
|
{
|
|
37030
37292
|
open: true,
|
|
@@ -37034,7 +37296,7 @@ function OhhwellsBridge() {
|
|
|
37034
37296
|
onPositionChange: setFloatingPanelPos,
|
|
37035
37297
|
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
37036
37298
|
onClose: closeFloatingPanelOnly,
|
|
37037
|
-
children: /* @__PURE__ */ (0,
|
|
37299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
37038
37300
|
SocialsDisplayPanel,
|
|
37039
37301
|
{
|
|
37040
37302
|
display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
|
|
@@ -37055,19 +37317,19 @@ function OhhwellsBridge() {
|
|
|
37055
37317
|
const tokens = tokensFromButton(button);
|
|
37056
37318
|
const current = assignmentFor(button, editContentRef.current, tokens);
|
|
37057
37319
|
void buttonStyleTick;
|
|
37058
|
-
return /* @__PURE__ */ (0,
|
|
37320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
37059
37321
|
FloatingPanel,
|
|
37060
37322
|
{
|
|
37061
37323
|
open: true,
|
|
37062
37324
|
title: floatingPanel.title,
|
|
37063
37325
|
context: floatingPanel.context,
|
|
37064
|
-
icon: /* @__PURE__ */ (0,
|
|
37326
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react23.Brush, { className: "size-4 shrink-0", "aria-hidden": true }),
|
|
37065
37327
|
position: floatingPanelPos,
|
|
37066
37328
|
onPositionChange: setFloatingPanelPos,
|
|
37067
37329
|
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
37068
37330
|
onClose: closeFloatingPanelOnly,
|
|
37069
37331
|
bodyClassName: "gap-5",
|
|
37070
|
-
children: /* @__PURE__ */ (0,
|
|
37332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
37071
37333
|
ButtonStylePanel,
|
|
37072
37334
|
{
|
|
37073
37335
|
variants: tokens.variants,
|
|
@@ -37095,10 +37357,10 @@ function OhhwellsBridge() {
|
|
|
37095
37357
|
|
|
37096
37358
|
// src/ui/EmptySection.tsx
|
|
37097
37359
|
var import_link = __toESM(require("next/link"), 1);
|
|
37098
|
-
var
|
|
37360
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
37099
37361
|
function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
|
|
37100
|
-
return /* @__PURE__ */ (0,
|
|
37101
|
-
/* @__PURE__ */ (0,
|
|
37362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
37363
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
37102
37364
|
"p",
|
|
37103
37365
|
{
|
|
37104
37366
|
style: {
|
|
@@ -37110,10 +37372,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
37110
37372
|
color: "var(--brand-accent)",
|
|
37111
37373
|
marginBottom: "1.5rem"
|
|
37112
37374
|
},
|
|
37113
|
-
children: /* @__PURE__ */ (0,
|
|
37375
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
|
|
37114
37376
|
}
|
|
37115
37377
|
),
|
|
37116
|
-
/* @__PURE__ */ (0,
|
|
37378
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
37117
37379
|
"h1",
|
|
37118
37380
|
{
|
|
37119
37381
|
style: {
|
|
@@ -37128,7 +37390,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
37128
37390
|
children: title
|
|
37129
37391
|
}
|
|
37130
37392
|
),
|
|
37131
|
-
/* @__PURE__ */ (0,
|
|
37393
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
37132
37394
|
"p",
|
|
37133
37395
|
{
|
|
37134
37396
|
style: {
|
|
@@ -37172,6 +37434,8 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
37172
37434
|
HIDDEN_EDITABLES_KEY,
|
|
37173
37435
|
ItemActionToolbar,
|
|
37174
37436
|
ItemInteractionLayer,
|
|
37437
|
+
LAYOUT_PREVIEWS_REQUEST,
|
|
37438
|
+
LAYOUT_PREVIEW_REPLY,
|
|
37175
37439
|
LOGO_ON_DARK_KEY,
|
|
37176
37440
|
LOGO_ON_LIGHT_KEY,
|
|
37177
37441
|
LOGO_PRIMARY_ATTR,
|
|
@@ -37208,6 +37472,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
37208
37472
|
blockPathFromEditKey,
|
|
37209
37473
|
brandColorVars,
|
|
37210
37474
|
buildDefaultFooterTree,
|
|
37475
|
+
buildLayoutPreviewDoc,
|
|
37211
37476
|
buildTarget,
|
|
37212
37477
|
canRemoveAiBlock,
|
|
37213
37478
|
canRemoveAiTextBlock,
|
|
@@ -37230,11 +37495,13 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
37230
37495
|
isDeadPageHref,
|
|
37231
37496
|
isEditSessionActive,
|
|
37232
37497
|
isEditableKeyHidden,
|
|
37498
|
+
isLayoutPreviewRequest,
|
|
37233
37499
|
isPlainLeftClick,
|
|
37234
37500
|
isRenderableFooterTree,
|
|
37235
37501
|
isRenderableTree,
|
|
37236
37502
|
isStickySearchParam,
|
|
37237
37503
|
isValidUrl,
|
|
37504
|
+
layoutPreviewBackground,
|
|
37238
37505
|
linearGradientColourAt,
|
|
37239
37506
|
logoVersionNodesFromMessage,
|
|
37240
37507
|
mapRegionToImage,
|