@ohhwells/bridge 0.1.54-next.153 → 0.1.54-next.156
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 +413 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +414 -107
- package/dist/index.js.map +1 -1
- package/dist/styles.css +21 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -192,6 +192,59 @@ function deleteSectionFromState(state, sectionId) {
|
|
|
192
192
|
return { ...state, v: 1, sections: state.sections, removed: [...removed, sectionId] };
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
// src/lib/brand-chrome.ts
|
|
196
|
+
var BRAND_NAME_KEY = "__ohw_brand_name";
|
|
197
|
+
var BRAND_TITLE_KEY = "__ohw_site_title";
|
|
198
|
+
var BRAND_FAVICON_LETTER_KEY = "__ohw_favicon_letter";
|
|
199
|
+
var BRAND_CHROME_KEYS = /* @__PURE__ */ new Set([
|
|
200
|
+
BRAND_NAME_KEY,
|
|
201
|
+
BRAND_TITLE_KEY,
|
|
202
|
+
BRAND_FAVICON_LETTER_KEY
|
|
203
|
+
]);
|
|
204
|
+
function upsertMeta(selector, attr, token, value) {
|
|
205
|
+
let el = document.head.querySelector(selector);
|
|
206
|
+
if (!el) {
|
|
207
|
+
el = document.createElement("meta");
|
|
208
|
+
el.setAttribute(attr, token);
|
|
209
|
+
document.head.appendChild(el);
|
|
210
|
+
}
|
|
211
|
+
if (el.getAttribute("content") !== value) el.setAttribute("content", value);
|
|
212
|
+
}
|
|
213
|
+
function escapeXml(value) {
|
|
214
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
215
|
+
}
|
|
216
|
+
function applyLetterFavicon(letter) {
|
|
217
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="12" fill="#111827"/><text x="32" y="46" font-family="system-ui,-apple-system,Segoe UI,sans-serif" font-size="40" font-weight="700" text-anchor="middle" fill="#ffffff">${escapeXml(letter)}</text></svg>`;
|
|
218
|
+
const href = `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
219
|
+
let link = document.head.querySelector('link[rel="icon"]');
|
|
220
|
+
if (!link) {
|
|
221
|
+
link = document.createElement("link");
|
|
222
|
+
link.rel = "icon";
|
|
223
|
+
document.head.appendChild(link);
|
|
224
|
+
}
|
|
225
|
+
link.type = "image/svg+xml";
|
|
226
|
+
if (link.href !== href) link.href = href;
|
|
227
|
+
}
|
|
228
|
+
function applyBrandChrome(content) {
|
|
229
|
+
const name = content[BRAND_NAME_KEY];
|
|
230
|
+
if (typeof name === "string" && name.length > 0) {
|
|
231
|
+
document.querySelectorAll("[data-ohw-wordmark]").forEach((el) => {
|
|
232
|
+
if (el.textContent !== name) el.textContent = name;
|
|
233
|
+
if (el.getAttribute("title") !== name) el.setAttribute("title", name);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
const title = content[BRAND_TITLE_KEY];
|
|
237
|
+
if (typeof title === "string" && title.length > 0) {
|
|
238
|
+
if (document.title !== title) document.title = title;
|
|
239
|
+
upsertMeta('meta[property="og:title"]', "property", "og:title", title);
|
|
240
|
+
upsertMeta('meta[name="twitter:title"]', "name", "twitter:title", title);
|
|
241
|
+
}
|
|
242
|
+
const letter = content[BRAND_FAVICON_LETTER_KEY];
|
|
243
|
+
if (typeof letter === "string" && letter.length > 0) {
|
|
244
|
+
applyLetterFavicon(letter);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
195
248
|
// src/ui/ai-tree/aiSectionsManager.tsx
|
|
196
249
|
var import_react_dom = require("react-dom");
|
|
197
250
|
var import_client = require("react-dom/client");
|
|
@@ -5942,6 +5995,7 @@ function ToolbarActionTooltip({
|
|
|
5942
5995
|
function ItemActionToolbar({
|
|
5943
5996
|
onEditLink,
|
|
5944
5997
|
onAddItem,
|
|
5998
|
+
onStyle,
|
|
5945
5999
|
onSelectParent,
|
|
5946
6000
|
onDuplicate,
|
|
5947
6001
|
onDelete,
|
|
@@ -5953,6 +6007,8 @@ function ItemActionToolbar({
|
|
|
5953
6007
|
deleteDisabled = false,
|
|
5954
6008
|
showEditLink = true,
|
|
5955
6009
|
showAddItem = true,
|
|
6010
|
+
showStyle = false,
|
|
6011
|
+
styleActive = false,
|
|
5956
6012
|
showMore = true,
|
|
5957
6013
|
tooltipSide = "bottom",
|
|
5958
6014
|
dropdownOpen = null,
|
|
@@ -6026,6 +6082,22 @@ function ItemActionToolbar({
|
|
|
6026
6082
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
6027
6083
|
}
|
|
6028
6084
|
) : null,
|
|
6085
|
+
showStyle ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
6086
|
+
ToolbarActionTooltip,
|
|
6087
|
+
{
|
|
6088
|
+
label: "Style",
|
|
6089
|
+
side: tooltipSide,
|
|
6090
|
+
buttonProps: {
|
|
6091
|
+
active: styleActive,
|
|
6092
|
+
onMouseDown: (e) => {
|
|
6093
|
+
e.preventDefault();
|
|
6094
|
+
e.stopPropagation();
|
|
6095
|
+
onStyle?.();
|
|
6096
|
+
}
|
|
6097
|
+
},
|
|
6098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Brush, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
6099
|
+
}
|
|
6100
|
+
) : null,
|
|
6029
6101
|
showAddItem ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
6030
6102
|
ToolbarActionTooltip,
|
|
6031
6103
|
{
|
|
@@ -9591,12 +9663,14 @@ function iconMarkupInheritingColour(markup) {
|
|
|
9591
9663
|
|
|
9592
9664
|
// src/lib/socials-items.ts
|
|
9593
9665
|
var ICON_SELECTOR = '[data-ohw-editable="icon"]';
|
|
9666
|
+
var SOCIAL_KEY_RE = /(^|-)social(s)?(-|$)/i;
|
|
9594
9667
|
var SOCIALS_ROW_ATTR = "data-ohw-socials-row";
|
|
9595
9668
|
var SOCIALS_ITEM_ATTR = "data-ohw-social-item";
|
|
9596
9669
|
function isSocialItem(el) {
|
|
9597
9670
|
if (!el) return false;
|
|
9598
9671
|
const anchor = el instanceof HTMLAnchorElement ? el : el.closest("a");
|
|
9599
9672
|
if (!anchor) return false;
|
|
9673
|
+
if (SOCIAL_KEY_RE.test(anchor.getAttribute("data-ohw-href-key") ?? "")) return true;
|
|
9600
9674
|
return anchor.querySelectorAll(ICON_SELECTOR).length === 1;
|
|
9601
9675
|
}
|
|
9602
9676
|
function getSocialItem(el) {
|
|
@@ -9606,7 +9680,8 @@ function getSocialItem(el) {
|
|
|
9606
9680
|
function findSocialsRow(el) {
|
|
9607
9681
|
const item = getSocialItem(el);
|
|
9608
9682
|
if (!item) return null;
|
|
9609
|
-
const
|
|
9683
|
+
const wrapper = item.parentElement;
|
|
9684
|
+
const row = wrapper && wrapper.querySelectorAll("a").length === 1 && wrapper.matches("li, div, span") ? wrapper.parentElement : wrapper;
|
|
9610
9685
|
if (!row) return null;
|
|
9611
9686
|
const anchors = Array.from(row.querySelectorAll("a"));
|
|
9612
9687
|
if (!anchors.length || !anchors.every((anchor) => isSocialItem(anchor))) return null;
|
|
@@ -9617,14 +9692,24 @@ function isSocialsRow(el) {
|
|
|
9617
9692
|
return anchors.length > 0 && anchors.every((anchor) => isSocialItem(anchor));
|
|
9618
9693
|
}
|
|
9619
9694
|
function listSocialItems(row) {
|
|
9620
|
-
return Array.from(row.children).
|
|
9621
|
-
|
|
9622
|
-
|
|
9695
|
+
return Array.from(row.children).map((child) => {
|
|
9696
|
+
if (!(child instanceof HTMLElement)) return null;
|
|
9697
|
+
const anchor = child.matches("a") ? child : child.querySelector("a");
|
|
9698
|
+
return isSocialItem(anchor) ? anchor : null;
|
|
9699
|
+
}).filter((item) => item !== null);
|
|
9700
|
+
}
|
|
9701
|
+
function socialRowUnit(item) {
|
|
9702
|
+
const row = findSocialsRow(item);
|
|
9703
|
+
let node = item;
|
|
9704
|
+
while (node.parentElement && node.parentElement !== row) {
|
|
9705
|
+
node = node.parentElement;
|
|
9706
|
+
}
|
|
9707
|
+
return node;
|
|
9623
9708
|
}
|
|
9624
9709
|
function listSocialsRows(root = document) {
|
|
9625
9710
|
const rows = /* @__PURE__ */ new Set();
|
|
9626
|
-
root.querySelectorAll(ICON_SELECTOR).forEach((
|
|
9627
|
-
const row = findSocialsRow(
|
|
9711
|
+
root.querySelectorAll(`${ICON_SELECTOR}, a[data-ohw-href-key]`).forEach((el) => {
|
|
9712
|
+
const row = findSocialsRow(el);
|
|
9628
9713
|
if (row) rows.add(row);
|
|
9629
9714
|
});
|
|
9630
9715
|
root.querySelectorAll(`[${SOCIALS_ROW_ATTR}]`).forEach((row) => rows.add(row));
|
|
@@ -9638,7 +9723,7 @@ function markSocialsRows(root = document) {
|
|
|
9638
9723
|
listSocialsRows(root).forEach((row) => {
|
|
9639
9724
|
row.setAttribute(SOCIALS_ROW_ATTR, "");
|
|
9640
9725
|
const items = listSocialItems(row);
|
|
9641
|
-
if (items[0]) rowTemplates.set(rowKeyOf(row), items[0].outerHTML);
|
|
9726
|
+
if (items[0]) rowTemplates.set(rowKeyOf(row), socialRowUnit(items[0]).outerHTML);
|
|
9642
9727
|
items.forEach((item, index) => {
|
|
9643
9728
|
item.setAttribute(SOCIALS_ITEM_ATTR, String(index));
|
|
9644
9729
|
const iconKey = socialIconKey(item);
|
|
@@ -9648,7 +9733,7 @@ function markSocialsRows(root = document) {
|
|
|
9648
9733
|
}
|
|
9649
9734
|
var SOCIALS_LABEL_ATTR = "data-ohw-social-label";
|
|
9650
9735
|
function ensureLabelSlot(item, iconKey) {
|
|
9651
|
-
if (item
|
|
9736
|
+
if (socialLabelElement(item)) return;
|
|
9652
9737
|
const label = document.createElement("span");
|
|
9653
9738
|
label.setAttribute("data-ohw-key", `${iconKey}-label`);
|
|
9654
9739
|
label.setAttribute("data-ohw-editable", "text");
|
|
@@ -9657,6 +9742,11 @@ function ensureLabelSlot(item, iconKey) {
|
|
|
9657
9742
|
label.textContent = item.getAttribute("aria-label") ?? "";
|
|
9658
9743
|
item.appendChild(label);
|
|
9659
9744
|
}
|
|
9745
|
+
function socialLabelElement(item) {
|
|
9746
|
+
return item.querySelector(
|
|
9747
|
+
`[${SOCIALS_LABEL_ATTR}], [data-ohw-editable="text"], [data-ohw-editable="plain"]`
|
|
9748
|
+
);
|
|
9749
|
+
}
|
|
9660
9750
|
function socialLabelKey(iconKey) {
|
|
9661
9751
|
return `${iconKey}-label`;
|
|
9662
9752
|
}
|
|
@@ -9691,7 +9781,8 @@ function fromMarkup(markup) {
|
|
|
9691
9781
|
var rowKeys = /* @__PURE__ */ new WeakMap();
|
|
9692
9782
|
function rowKeyOf(row) {
|
|
9693
9783
|
const first = listSocialItems(row)[0];
|
|
9694
|
-
const
|
|
9784
|
+
const itemKey = first ? socialIconKey(first) ?? socialHrefKey(first)?.replace(/-href$/, "") : null;
|
|
9785
|
+
const derived = itemKey?.replace(/-[^-]+$/, "") || null;
|
|
9695
9786
|
if (derived) rowKeys.set(row, derived);
|
|
9696
9787
|
return derived ?? rowKeys.get(row) ?? "social";
|
|
9697
9788
|
}
|
|
@@ -9727,8 +9818,10 @@ function insertSocialItem(row, after, content = {}) {
|
|
|
9727
9818
|
const index = nextSocialIndex(row, rowKey, content);
|
|
9728
9819
|
const iconKey = `${rowKey}-${index}`;
|
|
9729
9820
|
const hrefKey = `${iconKey}-href`;
|
|
9730
|
-
const
|
|
9731
|
-
|
|
9821
|
+
const templateUnit = template ? socialRowUnit(template) : null;
|
|
9822
|
+
const unit = templateUnit ? templateUnit.cloneNode(true) : fromMarkup(remembered);
|
|
9823
|
+
const item = unit && (unit.matches("a") ? unit : unit.querySelector("a"));
|
|
9824
|
+
if (!unit || !item) return null;
|
|
9732
9825
|
item.setAttribute("data-ohw-href-key", hrefKey);
|
|
9733
9826
|
item.setAttribute("href", "");
|
|
9734
9827
|
item.removeAttribute("aria-label");
|
|
@@ -9739,8 +9832,9 @@ function insertSocialItem(row, after, content = {}) {
|
|
|
9739
9832
|
const icon = item.querySelector(ICON_SELECTOR);
|
|
9740
9833
|
icon?.setAttribute("data-ohw-key", iconKey);
|
|
9741
9834
|
item.querySelector(`[${SOCIALS_LABEL_ATTR}]`)?.remove();
|
|
9742
|
-
|
|
9743
|
-
|
|
9835
|
+
const afterUnit = after ? socialRowUnit(after) : null;
|
|
9836
|
+
if (afterUnit && afterUnit.parentElement === row) afterUnit.insertAdjacentElement("afterend", unit);
|
|
9837
|
+
else row.appendChild(unit);
|
|
9744
9838
|
markSocialsRows(row.ownerDocument);
|
|
9745
9839
|
return { item, hrefKey, iconKey, order: getSocialsOrderFromDom(row.ownerDocument) };
|
|
9746
9840
|
}
|
|
@@ -9773,8 +9867,9 @@ function removeSocialItem(item, content) {
|
|
|
9773
9867
|
const previousContent = Object.fromEntries(
|
|
9774
9868
|
removedKeys.filter((key) => key in content).map((key) => [key, content[key]])
|
|
9775
9869
|
);
|
|
9776
|
-
const
|
|
9777
|
-
|
|
9870
|
+
const unit = socialRowUnit(item);
|
|
9871
|
+
const nextSibling = unit.nextElementSibling;
|
|
9872
|
+
unit.remove();
|
|
9778
9873
|
markSocialsRows(row.ownerDocument);
|
|
9779
9874
|
return {
|
|
9780
9875
|
removedKeys,
|
|
@@ -9782,8 +9877,8 @@ function removeSocialItem(item, content) {
|
|
|
9782
9877
|
order: getSocialsOrderFromDom(row.ownerDocument),
|
|
9783
9878
|
previousOrder,
|
|
9784
9879
|
undo: () => {
|
|
9785
|
-
if (nextSibling) nextSibling.before(
|
|
9786
|
-
else row.appendChild(
|
|
9880
|
+
if (nextSibling) nextSibling.before(unit);
|
|
9881
|
+
else row.appendChild(unit);
|
|
9787
9882
|
markSocialsRows(row.ownerDocument);
|
|
9788
9883
|
}
|
|
9789
9884
|
};
|
|
@@ -9795,7 +9890,7 @@ function applySocialsOrder(order, root = document) {
|
|
|
9795
9890
|
const byKey = new Map(listSocialItems(row).map((item) => [socialHrefKey(item), item]));
|
|
9796
9891
|
wanted.forEach((key) => {
|
|
9797
9892
|
const item = byKey.get(key);
|
|
9798
|
-
if (item) row.appendChild(item);
|
|
9893
|
+
if (item) row.appendChild(socialRowUnit(item));
|
|
9799
9894
|
});
|
|
9800
9895
|
});
|
|
9801
9896
|
markSocialsRows(root);
|
|
@@ -9825,7 +9920,7 @@ function reconcileSocialsFromContent(content, root = document) {
|
|
|
9825
9920
|
});
|
|
9826
9921
|
if (surviving.length) {
|
|
9827
9922
|
present.forEach((item) => {
|
|
9828
|
-
if (!surviving.includes(item)) item.remove();
|
|
9923
|
+
if (!surviving.includes(item)) socialRowUnit(item).remove();
|
|
9829
9924
|
});
|
|
9830
9925
|
}
|
|
9831
9926
|
});
|
|
@@ -9883,6 +9978,70 @@ function planSocialMove(hrefKey, insertIndex, root = document) {
|
|
|
9883
9978
|
next.splice(insertIndex > from ? insertIndex - 1 : insertIndex, 0, hrefKey);
|
|
9884
9979
|
return { ...order, [key]: next };
|
|
9885
9980
|
}
|
|
9981
|
+
var SOCIALS_DISPLAY_KEY = "__ohw_socials_display";
|
|
9982
|
+
function readSocialsDisplay(row) {
|
|
9983
|
+
const items = listSocialItems(row);
|
|
9984
|
+
const visible = (el) => Boolean(el) && el.style.display !== "none" && el.getAttribute("data-ohw-hidden") === null;
|
|
9985
|
+
return {
|
|
9986
|
+
text: items.some((item) => visible(socialLabelElement(item))),
|
|
9987
|
+
icon: items.some((item) => visible(item.querySelector(ICON_SELECTOR)))
|
|
9988
|
+
};
|
|
9989
|
+
}
|
|
9990
|
+
function parseSocialsDisplay(raw) {
|
|
9991
|
+
if (!raw) return null;
|
|
9992
|
+
try {
|
|
9993
|
+
const parsed = JSON.parse(raw);
|
|
9994
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
|
|
9995
|
+
} catch {
|
|
9996
|
+
return null;
|
|
9997
|
+
}
|
|
9998
|
+
}
|
|
9999
|
+
function socialsDisplayFor(row, content) {
|
|
10000
|
+
return parseSocialsDisplay(content[SOCIALS_DISPLAY_KEY])?.[rowKeyOf(row)] ?? readSocialsDisplay(row);
|
|
10001
|
+
}
|
|
10002
|
+
function socialsDisplayWith(row, display, content) {
|
|
10003
|
+
return { ...parseSocialsDisplay(content[SOCIALS_DISPLAY_KEY]) ?? {}, [rowKeyOf(row)]: display };
|
|
10004
|
+
}
|
|
10005
|
+
function applySocialsDisplayToRow(row, display) {
|
|
10006
|
+
listSocialItems(row).forEach((item) => {
|
|
10007
|
+
const label = socialLabelElement(item);
|
|
10008
|
+
const icon = item.querySelector(ICON_SELECTOR);
|
|
10009
|
+
if (label) label.style.display = display.text ? "" : "none";
|
|
10010
|
+
if (icon) icon.style.display = display.icon ? "" : "none";
|
|
10011
|
+
});
|
|
10012
|
+
}
|
|
10013
|
+
function applySocialsDisplayFromContent(content, root = document) {
|
|
10014
|
+
const stored = parseSocialsDisplay(content[SOCIALS_DISPLAY_KEY]);
|
|
10015
|
+
if (!stored) return;
|
|
10016
|
+
listSocialsRows(root).forEach((row) => {
|
|
10017
|
+
const display = stored[rowKeyOf(row)];
|
|
10018
|
+
if (!display) return;
|
|
10019
|
+
if (display.icon) {
|
|
10020
|
+
listSocialItems(row).forEach((item) => {
|
|
10021
|
+
const iconKey = ensureIconSlot(item);
|
|
10022
|
+
const slot = item.querySelector(ICON_SELECTOR);
|
|
10023
|
+
if (iconKey && slot && content[iconKey]) applyIconMarkup(slot, content[iconKey]);
|
|
10024
|
+
});
|
|
10025
|
+
}
|
|
10026
|
+
applySocialsDisplayToRow(row, display);
|
|
10027
|
+
});
|
|
10028
|
+
}
|
|
10029
|
+
function socialsMissingIcons(row) {
|
|
10030
|
+
return listSocialItems(row).filter((item) => !item.querySelector(ICON_SELECTOR)).map((item) => ({ hrefKey: socialHrefKey(item) ?? "", url: item.getAttribute("href") ?? "" })).filter((entry) => Boolean(entry.hrefKey));
|
|
10031
|
+
}
|
|
10032
|
+
function ensureIconSlot(item) {
|
|
10033
|
+
const existing = item.querySelector(ICON_SELECTOR);
|
|
10034
|
+
if (existing) return existing.dataset.ohwKey ?? null;
|
|
10035
|
+
const hrefKey = socialHrefKey(item);
|
|
10036
|
+
if (!hrefKey) return null;
|
|
10037
|
+
const iconKey = hrefKey.replace(/-href$/, "");
|
|
10038
|
+
const slot = document.createElement("span");
|
|
10039
|
+
slot.setAttribute("data-ohw-key", iconKey);
|
|
10040
|
+
slot.setAttribute("data-ohw-editable", "icon");
|
|
10041
|
+
slot.style.display = "inline-flex";
|
|
10042
|
+
item.prepend(slot);
|
|
10043
|
+
return iconKey;
|
|
10044
|
+
}
|
|
9886
10045
|
|
|
9887
10046
|
// src/lib/footer-items.ts
|
|
9888
10047
|
var FOOTER_ORDER_KEY = "__ohw_footer_order";
|
|
@@ -11370,6 +11529,75 @@ function LogoSizePanel({
|
|
|
11370
11529
|
] });
|
|
11371
11530
|
}
|
|
11372
11531
|
|
|
11532
|
+
// src/ui/socials-display-panel.tsx
|
|
11533
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
11534
|
+
function DisplaySwitch({
|
|
11535
|
+
label,
|
|
11536
|
+
checked,
|
|
11537
|
+
disabled,
|
|
11538
|
+
onChange
|
|
11539
|
+
}) {
|
|
11540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center gap-2", children: [
|
|
11541
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11542
|
+
"span",
|
|
11543
|
+
{
|
|
11544
|
+
className: cn(
|
|
11545
|
+
"min-w-0 flex-1 text-sm font-medium leading-5",
|
|
11546
|
+
disabled ? "text-muted-foreground" : "text-foreground"
|
|
11547
|
+
),
|
|
11548
|
+
children: label
|
|
11549
|
+
}
|
|
11550
|
+
),
|
|
11551
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11552
|
+
"button",
|
|
11553
|
+
{
|
|
11554
|
+
type: "button",
|
|
11555
|
+
role: "switch",
|
|
11556
|
+
"aria-checked": checked,
|
|
11557
|
+
"aria-label": label,
|
|
11558
|
+
disabled,
|
|
11559
|
+
onClick: () => onChange(!checked),
|
|
11560
|
+
className: cn(
|
|
11561
|
+
"relative h-5 w-9 shrink-0 rounded-full transition-colors",
|
|
11562
|
+
checked ? "bg-primary" : "bg-primary-50",
|
|
11563
|
+
disabled ? "cursor-default opacity-50" : "cursor-pointer"
|
|
11564
|
+
),
|
|
11565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11566
|
+
"span",
|
|
11567
|
+
{
|
|
11568
|
+
className: cn(
|
|
11569
|
+
"absolute top-0.5 h-4 w-4 rounded-full bg-white transition-all",
|
|
11570
|
+
checked ? "left-[1.125rem]" : "left-0.5"
|
|
11571
|
+
)
|
|
11572
|
+
}
|
|
11573
|
+
)
|
|
11574
|
+
}
|
|
11575
|
+
)
|
|
11576
|
+
] });
|
|
11577
|
+
}
|
|
11578
|
+
function SocialsDisplayPanel({ display, onChange, className }) {
|
|
11579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), children: [
|
|
11580
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11581
|
+
DisplaySwitch,
|
|
11582
|
+
{
|
|
11583
|
+
label: "Text",
|
|
11584
|
+
checked: display.text,
|
|
11585
|
+
disabled: display.text && !display.icon,
|
|
11586
|
+
onChange: (text) => onChange({ ...display, text })
|
|
11587
|
+
}
|
|
11588
|
+
),
|
|
11589
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11590
|
+
DisplaySwitch,
|
|
11591
|
+
{
|
|
11592
|
+
label: "Icon",
|
|
11593
|
+
checked: display.icon,
|
|
11594
|
+
disabled: display.icon && !display.text,
|
|
11595
|
+
onChange: (icon) => onChange({ ...display, icon })
|
|
11596
|
+
}
|
|
11597
|
+
)
|
|
11598
|
+
] });
|
|
11599
|
+
}
|
|
11600
|
+
|
|
11373
11601
|
// src/lib/item-drag-interaction.ts
|
|
11374
11602
|
function disableNativeHrefDrag(el) {
|
|
11375
11603
|
if (el.draggable) el.draggable = false;
|
|
@@ -11919,7 +12147,7 @@ function useNavItemDrag({
|
|
|
11919
12147
|
|
|
11920
12148
|
// src/ui/footer-container-chrome.tsx
|
|
11921
12149
|
var import_lucide_react15 = require("lucide-react");
|
|
11922
|
-
var
|
|
12150
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
11923
12151
|
function FooterContainerChrome({
|
|
11924
12152
|
rect,
|
|
11925
12153
|
onAdd,
|
|
@@ -11927,7 +12155,7 @@ function FooterContainerChrome({
|
|
|
11927
12155
|
}) {
|
|
11928
12156
|
const chromeGap = 6;
|
|
11929
12157
|
const buttonMargin = 7;
|
|
11930
|
-
return /* @__PURE__ */ (0,
|
|
12158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11931
12159
|
"div",
|
|
11932
12160
|
{
|
|
11933
12161
|
"data-ohw-footer-container-chrome": "",
|
|
@@ -11939,8 +12167,8 @@ function FooterContainerChrome({
|
|
|
11939
12167
|
width: rect.width + chromeGap * 2,
|
|
11940
12168
|
height: rect.height + chromeGap * 2
|
|
11941
12169
|
},
|
|
11942
|
-
children: /* @__PURE__ */ (0,
|
|
11943
|
-
/* @__PURE__ */ (0,
|
|
12170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { children: [
|
|
12171
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11944
12172
|
"button",
|
|
11945
12173
|
{
|
|
11946
12174
|
type: "button",
|
|
@@ -11959,10 +12187,10 @@ function FooterContainerChrome({
|
|
|
11959
12187
|
if (addDisabled) return;
|
|
11960
12188
|
onAdd();
|
|
11961
12189
|
},
|
|
11962
|
-
children: /* @__PURE__ */ (0,
|
|
12190
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
11963
12191
|
}
|
|
11964
12192
|
) }),
|
|
11965
|
-
/* @__PURE__ */ (0,
|
|
12193
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipContent, { side: "bottom", sideOffset: 9, children: addDisabled ? "Maximum columns reached" : "Add item" })
|
|
11966
12194
|
] })
|
|
11967
12195
|
}
|
|
11968
12196
|
) });
|
|
@@ -12423,13 +12651,13 @@ function deleteSelectedNavFooterItem(deps) {
|
|
|
12423
12651
|
|
|
12424
12652
|
// src/ui/navbar-container-chrome.tsx
|
|
12425
12653
|
var import_lucide_react16 = require("lucide-react");
|
|
12426
|
-
var
|
|
12654
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
12427
12655
|
function NavbarContainerChrome({
|
|
12428
12656
|
rect,
|
|
12429
12657
|
onAdd
|
|
12430
12658
|
}) {
|
|
12431
12659
|
const chromeGap = 6;
|
|
12432
|
-
return /* @__PURE__ */ (0,
|
|
12660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12433
12661
|
"div",
|
|
12434
12662
|
{
|
|
12435
12663
|
"data-ohw-navbar-container-chrome": "",
|
|
@@ -12441,7 +12669,7 @@ function NavbarContainerChrome({
|
|
|
12441
12669
|
width: rect.width + chromeGap * 2,
|
|
12442
12670
|
height: rect.height + chromeGap * 2
|
|
12443
12671
|
},
|
|
12444
|
-
children: /* @__PURE__ */ (0,
|
|
12672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
12445
12673
|
"button",
|
|
12446
12674
|
{
|
|
12447
12675
|
type: "button",
|
|
@@ -12458,7 +12686,7 @@ function NavbarContainerChrome({
|
|
|
12458
12686
|
e.stopPropagation();
|
|
12459
12687
|
onAdd();
|
|
12460
12688
|
},
|
|
12461
|
-
children: /* @__PURE__ */ (0,
|
|
12689
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react16.Plus, { className: "size-4 shrink-0 text-foreground", "aria-hidden": true })
|
|
12462
12690
|
}
|
|
12463
12691
|
)
|
|
12464
12692
|
}
|
|
@@ -12467,7 +12695,7 @@ function NavbarContainerChrome({
|
|
|
12467
12695
|
|
|
12468
12696
|
// src/ui/drop-indicator.tsx
|
|
12469
12697
|
var React10 = __toESM(require("react"), 1);
|
|
12470
|
-
var
|
|
12698
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
12471
12699
|
var dropIndicatorVariants = cva(
|
|
12472
12700
|
"ov-gap-line pointer-events-none shrink-0 transition-opacity duration-150",
|
|
12473
12701
|
{
|
|
@@ -12491,7 +12719,7 @@ var dropIndicatorVariants = cva(
|
|
|
12491
12719
|
);
|
|
12492
12720
|
var DropIndicator = React10.forwardRef(
|
|
12493
12721
|
({ className, direction, state, ...props }, ref) => {
|
|
12494
|
-
return /* @__PURE__ */ (0,
|
|
12722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
12495
12723
|
"div",
|
|
12496
12724
|
{
|
|
12497
12725
|
ref,
|
|
@@ -12508,7 +12736,7 @@ var DropIndicator = React10.forwardRef(
|
|
|
12508
12736
|
DropIndicator.displayName = "DropIndicator";
|
|
12509
12737
|
|
|
12510
12738
|
// src/ui/badge.tsx
|
|
12511
|
-
var
|
|
12739
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
12512
12740
|
var badgeVariants = cva(
|
|
12513
12741
|
"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",
|
|
12514
12742
|
{
|
|
@@ -12526,12 +12754,12 @@ var badgeVariants = cva(
|
|
|
12526
12754
|
}
|
|
12527
12755
|
);
|
|
12528
12756
|
function Badge({ className, variant, ...props }) {
|
|
12529
|
-
return /* @__PURE__ */ (0,
|
|
12757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
12530
12758
|
}
|
|
12531
12759
|
|
|
12532
12760
|
// src/OhhwellsBridge.tsx
|
|
12533
12761
|
var import_lucide_react17 = require("lucide-react");
|
|
12534
|
-
var
|
|
12762
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
12535
12763
|
var PRIMARY3 = "#0885FE";
|
|
12536
12764
|
var IMAGE_FADE_MS = 300;
|
|
12537
12765
|
function runOpacityFade(el, onDone) {
|
|
@@ -12700,7 +12928,7 @@ function mountSchedulingWidget(anchorId, notifyOnConnect = false, scheduleId, be
|
|
|
12700
12928
|
const root = (0, import_client2.createRoot)(container);
|
|
12701
12929
|
(0, import_react_dom3.flushSync)(() => {
|
|
12702
12930
|
root.render(
|
|
12703
|
-
/* @__PURE__ */ (0,
|
|
12931
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
12704
12932
|
SchedulingWidget,
|
|
12705
12933
|
{
|
|
12706
12934
|
notifyOnConnect,
|
|
@@ -13368,7 +13596,7 @@ function EditGlowChrome({
|
|
|
13368
13596
|
hideHandle = false
|
|
13369
13597
|
}) {
|
|
13370
13598
|
const GAP = SELECTION_CHROME_GAP2;
|
|
13371
|
-
return /* @__PURE__ */ (0,
|
|
13599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
13372
13600
|
"div",
|
|
13373
13601
|
{
|
|
13374
13602
|
ref: elRef,
|
|
@@ -13383,7 +13611,7 @@ function EditGlowChrome({
|
|
|
13383
13611
|
zIndex: 2147483646
|
|
13384
13612
|
},
|
|
13385
13613
|
children: [
|
|
13386
|
-
/* @__PURE__ */ (0,
|
|
13614
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13387
13615
|
"div",
|
|
13388
13616
|
{
|
|
13389
13617
|
style: {
|
|
@@ -13396,7 +13624,7 @@ function EditGlowChrome({
|
|
|
13396
13624
|
}
|
|
13397
13625
|
}
|
|
13398
13626
|
),
|
|
13399
|
-
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0,
|
|
13627
|
+
reorderHrefKey && !hideHandle && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13400
13628
|
"div",
|
|
13401
13629
|
{
|
|
13402
13630
|
"data-ohw-drag-handle-container": "",
|
|
@@ -13408,7 +13636,7 @@ function EditGlowChrome({
|
|
|
13408
13636
|
transform: "translate(calc(-100% - 7px), -50%)",
|
|
13409
13637
|
pointerEvents: dragDisabled ? "none" : "auto"
|
|
13410
13638
|
},
|
|
13411
|
-
children: /* @__PURE__ */ (0,
|
|
13639
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13412
13640
|
DragHandle,
|
|
13413
13641
|
{
|
|
13414
13642
|
"aria-label": `Reorder ${reorderHrefKey}`,
|
|
@@ -13618,7 +13846,7 @@ function FloatingToolbar({
|
|
|
13618
13846
|
return () => ro.disconnect();
|
|
13619
13847
|
}, [showEditLink, activeCommands]);
|
|
13620
13848
|
const { top, left, transform } = calcToolbarPos(rect, parentScroll, measuredW);
|
|
13621
|
-
return /* @__PURE__ */ (0,
|
|
13849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13622
13850
|
"div",
|
|
13623
13851
|
{
|
|
13624
13852
|
ref: setRefs,
|
|
@@ -13630,12 +13858,12 @@ function FloatingToolbar({
|
|
|
13630
13858
|
zIndex: 2147483647,
|
|
13631
13859
|
pointerEvents: "auto"
|
|
13632
13860
|
},
|
|
13633
|
-
children: /* @__PURE__ */ (0,
|
|
13634
|
-
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0,
|
|
13635
|
-
gi > 0 && /* @__PURE__ */ (0,
|
|
13861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(CustomToolbar, { children: [
|
|
13862
|
+
TOOLBAR_GROUPS.map((btns, gi) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react16.default.Fragment, { children: [
|
|
13863
|
+
gi > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomToolbarDivider, {}),
|
|
13636
13864
|
btns.map((btn) => {
|
|
13637
13865
|
const isActive = activeCommands.has(btn.cmd);
|
|
13638
|
-
return /* @__PURE__ */ (0,
|
|
13866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13639
13867
|
CustomToolbarButton,
|
|
13640
13868
|
{
|
|
13641
13869
|
title: btn.title,
|
|
@@ -13644,7 +13872,7 @@ function FloatingToolbar({
|
|
|
13644
13872
|
e.preventDefault();
|
|
13645
13873
|
onCommand(btn.cmd);
|
|
13646
13874
|
},
|
|
13647
|
-
children: /* @__PURE__ */ (0,
|
|
13875
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13648
13876
|
"svg",
|
|
13649
13877
|
{
|
|
13650
13878
|
width: "16",
|
|
@@ -13665,7 +13893,7 @@ function FloatingToolbar({
|
|
|
13665
13893
|
);
|
|
13666
13894
|
})
|
|
13667
13895
|
] }, gi)),
|
|
13668
|
-
showEditLink ? /* @__PURE__ */ (0,
|
|
13896
|
+
showEditLink ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13669
13897
|
CustomToolbarButton,
|
|
13670
13898
|
{
|
|
13671
13899
|
type: "button",
|
|
@@ -13679,7 +13907,7 @@ function FloatingToolbar({
|
|
|
13679
13907
|
e.preventDefault();
|
|
13680
13908
|
e.stopPropagation();
|
|
13681
13909
|
},
|
|
13682
|
-
children: /* @__PURE__ */ (0,
|
|
13910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.Link, { className: "size-4 shrink-0", "aria-hidden": true })
|
|
13683
13911
|
}
|
|
13684
13912
|
) : null
|
|
13685
13913
|
] })
|
|
@@ -13696,7 +13924,7 @@ function StateToggle({
|
|
|
13696
13924
|
states,
|
|
13697
13925
|
onStateChange
|
|
13698
13926
|
}) {
|
|
13699
|
-
return /* @__PURE__ */ (0,
|
|
13927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13700
13928
|
ToggleGroup,
|
|
13701
13929
|
{
|
|
13702
13930
|
"data-ohw-state-toggle": "",
|
|
@@ -13710,7 +13938,7 @@ function StateToggle({
|
|
|
13710
13938
|
left: rect.right - 8,
|
|
13711
13939
|
transform: "translateX(-100%)"
|
|
13712
13940
|
},
|
|
13713
|
-
children: states.map((state) => /* @__PURE__ */ (0,
|
|
13941
|
+
children: states.map((state) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ToggleGroupItem, { value: state, size: "sm", children: state }, state))
|
|
13714
13942
|
}
|
|
13715
13943
|
);
|
|
13716
13944
|
}
|
|
@@ -14324,6 +14552,7 @@ function OhhwellsBridge() {
|
|
|
14324
14552
|
const result2 = insertSocialItem(socialsRow, after, editContentRef.current);
|
|
14325
14553
|
if (!result2) return;
|
|
14326
14554
|
const orderJson = JSON.stringify(result2.order);
|
|
14555
|
+
applySocialsDisplayToRow(socialsRow, socialsDisplayFor(socialsRow, editContentRef.current));
|
|
14327
14556
|
editContentRef.current = { ...editContentRef.current, [SOCIALS_ORDER_KEY]: orderJson };
|
|
14328
14557
|
postToParent2({ type: "ow:change", nodes: [{ key: SOCIALS_ORDER_KEY, text: orderJson }] });
|
|
14329
14558
|
postToParentRef.current({
|
|
@@ -14911,6 +15140,39 @@ function OhhwellsBridge() {
|
|
|
14911
15140
|
placement
|
|
14912
15141
|
});
|
|
14913
15142
|
}, []);
|
|
15143
|
+
const openSocialsDisplayPanel = (0, import_react16.useCallback)((row) => {
|
|
15144
|
+
setParentScrollSnap(parentScrollRef.current);
|
|
15145
|
+
setFloatingPanel({
|
|
15146
|
+
key: "socials-display",
|
|
15147
|
+
title: "Style",
|
|
15148
|
+
context: "Socials \xB7 Footer",
|
|
15149
|
+
kind: "socials-display",
|
|
15150
|
+
row
|
|
15151
|
+
});
|
|
15152
|
+
}, []);
|
|
15153
|
+
const changeSocialsDisplay = (0, import_react16.useCallback)(
|
|
15154
|
+
(row, next) => {
|
|
15155
|
+
if (next.icon) {
|
|
15156
|
+
const missing = socialsMissingIcons(row);
|
|
15157
|
+
listSocialItems(row).forEach((item) => ensureIconSlot(item));
|
|
15158
|
+
if (missing.length) {
|
|
15159
|
+
postToParentRef.current({ type: "ow:social-icons-needed", items: missing });
|
|
15160
|
+
}
|
|
15161
|
+
}
|
|
15162
|
+
applySocialsDisplayToRow(row, next);
|
|
15163
|
+
requestAnimationFrame(() => {
|
|
15164
|
+
if (selectedElRef.current === row && row.isConnected) setToolbarRect(row.getBoundingClientRect());
|
|
15165
|
+
});
|
|
15166
|
+
const displayJson = JSON.stringify(socialsDisplayWith(row, next, editContentRef.current));
|
|
15167
|
+
editContentRef.current = { ...editContentRef.current, [SOCIALS_DISPLAY_KEY]: displayJson };
|
|
15168
|
+
postToParentRef.current({
|
|
15169
|
+
type: "ow:change",
|
|
15170
|
+
nodes: [{ key: SOCIALS_DISPLAY_KEY, text: displayJson }],
|
|
15171
|
+
flush: true
|
|
15172
|
+
});
|
|
15173
|
+
},
|
|
15174
|
+
[]
|
|
15175
|
+
);
|
|
14914
15176
|
const closeFloatingPanelOnly = (0, import_react16.useCallback)(() => {
|
|
14915
15177
|
setFloatingPanel(null);
|
|
14916
15178
|
setLogoSizeDraft(null);
|
|
@@ -15082,11 +15344,13 @@ function OhhwellsBridge() {
|
|
|
15082
15344
|
aiSectionsRef.current = content[AI_SECTIONS_KEY];
|
|
15083
15345
|
applyAiSectionsToDom(parseAiSectionsState(content[AI_SECTIONS_KEY]));
|
|
15084
15346
|
}
|
|
15347
|
+
applyBrandChrome(content);
|
|
15085
15348
|
for (const [key, val] of Object.entries(content)) {
|
|
15086
15349
|
if (key === "__ohw_sections") continue;
|
|
15087
15350
|
if (key === AI_SECTIONS_KEY) continue;
|
|
15088
15351
|
if (key === LOGO_PLACEHOLDER_KEY) continue;
|
|
15089
15352
|
if (LOGO_IMAGE_KEYS.includes(key)) continue;
|
|
15353
|
+
if (BRAND_CHROME_KEYS.has(key)) continue;
|
|
15090
15354
|
if (applyVideoSettingNode(key, val)) continue;
|
|
15091
15355
|
if (applyCarouselNode(key, val)) continue;
|
|
15092
15356
|
document.querySelectorAll(`[data-ohw-key="${key}"]`).forEach((el) => {
|
|
@@ -15126,6 +15390,7 @@ function OhhwellsBridge() {
|
|
|
15126
15390
|
reconcileNavbarItemsFromContent(content);
|
|
15127
15391
|
reconcileFooterOrderFromContent(content);
|
|
15128
15392
|
reconcileSocialsFromContent(content);
|
|
15393
|
+
applySocialsDisplayFromContent(content);
|
|
15129
15394
|
enforceLinkHrefs();
|
|
15130
15395
|
initSectionsFromContent(content, true);
|
|
15131
15396
|
sectionsLoadedRef.current = true;
|
|
@@ -15166,10 +15431,12 @@ function OhhwellsBridge() {
|
|
|
15166
15431
|
retryMissingSchedulingMounts(getPageSchedulingEntries(content["__ohw_sections"]), false);
|
|
15167
15432
|
observer?.disconnect();
|
|
15168
15433
|
try {
|
|
15434
|
+
applyBrandChrome(content);
|
|
15169
15435
|
for (const [key, val] of Object.entries(content)) {
|
|
15170
15436
|
if (key === "__ohw_sections") continue;
|
|
15171
15437
|
if (key === LOGO_PLACEHOLDER_KEY) continue;
|
|
15172
15438
|
if (LOGO_IMAGE_KEYS.includes(key)) continue;
|
|
15439
|
+
if (BRAND_CHROME_KEYS.has(key)) continue;
|
|
15173
15440
|
if (applyVideoSettingNode(key, val)) continue;
|
|
15174
15441
|
if (applyCarouselNode(key, val)) continue;
|
|
15175
15442
|
document.querySelectorAll(`[data-ohw-key="${key}"]`).forEach((el) => {
|
|
@@ -15194,6 +15461,8 @@ function OhhwellsBridge() {
|
|
|
15194
15461
|
reconcileNavbarItemsFromContent(content);
|
|
15195
15462
|
reconcileFooterOrderFromContent(content);
|
|
15196
15463
|
reconcileSocialsFromContent(content);
|
|
15464
|
+
applySocialsDisplayFromContent(content);
|
|
15465
|
+
applySocialsDisplayFromContent(content);
|
|
15197
15466
|
} finally {
|
|
15198
15467
|
observer?.observe(document.body, { childList: true, subtree: true });
|
|
15199
15468
|
}
|
|
@@ -15272,6 +15541,8 @@ function OhhwellsBridge() {
|
|
|
15272
15541
|
reconcileNavbarItemsFromContent(content);
|
|
15273
15542
|
reconcileFooterOrderFromContent(content);
|
|
15274
15543
|
reconcileSocialsFromContent(content);
|
|
15544
|
+
applySocialsDisplayFromContent(content);
|
|
15545
|
+
applySocialsDisplayFromContent(content);
|
|
15275
15546
|
document.querySelectorAll("footer [data-ohw-href-key]").forEach((el) => {
|
|
15276
15547
|
if (isFooterHrefKey(el.getAttribute("data-ohw-href-key"))) {
|
|
15277
15548
|
disableNativeHrefDrag(el);
|
|
@@ -16549,32 +16820,34 @@ function OhhwellsBridge() {
|
|
|
16549
16820
|
};
|
|
16550
16821
|
const handleSocialUpdate = (e) => {
|
|
16551
16822
|
if (e.data?.type !== "ow:social-update") return;
|
|
16552
|
-
const
|
|
16823
|
+
const updates = Array.isArray(e.data.items) ? e.data.items : [e.data];
|
|
16553
16824
|
const nodes = [];
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
|
|
16559
|
-
|
|
16560
|
-
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16825
|
+
for (const { hrefKey, iconKey, url, iconMarkup, platformId, label } of updates) {
|
|
16826
|
+
if (hrefKey) {
|
|
16827
|
+
document.querySelectorAll(`[data-ohw-href-key="${hrefKey}"]`).forEach((el) => applyLinkHref(el, url));
|
|
16828
|
+
nodes.push({ key: hrefKey, text: url });
|
|
16829
|
+
}
|
|
16830
|
+
if (iconKey && typeof iconMarkup === "string" && iconMarkup) {
|
|
16831
|
+
document.querySelectorAll(`[data-ohw-key="${iconKey}"][data-ohw-editable="icon"]`).forEach((el) => {
|
|
16832
|
+
applyIconMarkup(el, iconMarkup);
|
|
16833
|
+
});
|
|
16834
|
+
nodes.push({ key: iconKey, text: iconMarkup });
|
|
16835
|
+
}
|
|
16836
|
+
if (iconKey && platformId) nodes.push({ key: socialPlatformKey(iconKey), text: platformId });
|
|
16837
|
+
if (iconKey && label) {
|
|
16838
|
+
const labelKey = socialLabelKey(iconKey);
|
|
16839
|
+
document.querySelectorAll(`[data-ohw-key="${labelKey}"]`).forEach((el) => {
|
|
16840
|
+
el.textContent = label;
|
|
16841
|
+
});
|
|
16842
|
+
nodes.push({ key: labelKey, text: label });
|
|
16843
|
+
}
|
|
16571
16844
|
}
|
|
16572
16845
|
if (!nodes.length) return;
|
|
16573
16846
|
editContentRef.current = {
|
|
16574
16847
|
...editContentRef.current,
|
|
16575
16848
|
...Object.fromEntries(nodes.map((node) => [node.key, node.text]))
|
|
16576
16849
|
};
|
|
16577
|
-
postToParentRef.current({ type: "ow:change", nodes });
|
|
16850
|
+
postToParentRef.current({ type: "ow:change", nodes, flush: true });
|
|
16578
16851
|
};
|
|
16579
16852
|
const handleIconMarkup = (e) => {
|
|
16580
16853
|
if (e.data?.type !== "ow:icon-markup") return;
|
|
@@ -16587,7 +16860,7 @@ function OhhwellsBridge() {
|
|
|
16587
16860
|
targets.forEach((el) => {
|
|
16588
16861
|
applyIconMarkup(el, markup);
|
|
16589
16862
|
});
|
|
16590
|
-
postToParentRef.current({ type: "ow:change", nodes: [{ key, text: markup }] });
|
|
16863
|
+
postToParentRef.current({ type: "ow:change", nodes: [{ key, text: markup }], flush: true });
|
|
16591
16864
|
};
|
|
16592
16865
|
const handleImageUrl = (e) => {
|
|
16593
16866
|
if (e.data?.type !== "ow:image-url") return;
|
|
@@ -16721,6 +16994,7 @@ function OhhwellsBridge() {
|
|
|
16721
16994
|
aiSectionsRef.current = content[AI_SECTIONS_KEY];
|
|
16722
16995
|
applyAiSectionsToDom(parseAiSectionsState(content[AI_SECTIONS_KEY]));
|
|
16723
16996
|
}
|
|
16997
|
+
applyBrandChrome(content);
|
|
16724
16998
|
let sectionsJson = null;
|
|
16725
16999
|
for (const [key, val] of Object.entries(content)) {
|
|
16726
17000
|
if (key === "__ohw_sections") {
|
|
@@ -16730,6 +17004,7 @@ function OhhwellsBridge() {
|
|
|
16730
17004
|
if (key === AI_SECTIONS_KEY) continue;
|
|
16731
17005
|
if (key === LOGO_PLACEHOLDER_KEY) continue;
|
|
16732
17006
|
if (LOGO_IMAGE_KEYS.includes(key) && !String(val ?? "").trim()) continue;
|
|
17007
|
+
if (BRAND_CHROME_KEYS.has(key)) continue;
|
|
16733
17008
|
if (applyVideoSettingNode(key, val)) continue;
|
|
16734
17009
|
if (applyCarouselNode(key, val)) continue;
|
|
16735
17010
|
document.querySelectorAll(`[data-ohw-key="${key}"]`).forEach((el) => {
|
|
@@ -17893,6 +18168,8 @@ function OhhwellsBridge() {
|
|
|
17893
18168
|
};
|
|
17894
18169
|
postToParent2({ type: "ow:change", nodes });
|
|
17895
18170
|
enforceLinkHrefs();
|
|
18171
|
+
const copyRow = findSocialsRow(result.item);
|
|
18172
|
+
if (copyRow) applySocialsDisplayToRow(copyRow, socialsDisplayFor(copyRow, editContentRef.current));
|
|
17896
18173
|
requestAnimationFrame(() => selectRef.current(result.item));
|
|
17897
18174
|
return;
|
|
17898
18175
|
}
|
|
@@ -18119,10 +18396,10 @@ function OhhwellsBridge() {
|
|
|
18119
18396
|
[postToParent2]
|
|
18120
18397
|
);
|
|
18121
18398
|
return bridgeRoot ? (0, import_react_dom4.createPortal)(
|
|
18122
|
-
/* @__PURE__ */ (0,
|
|
18123
|
-
/* @__PURE__ */ (0,
|
|
18124
|
-
isEditMode && /* @__PURE__ */ (0,
|
|
18125
|
-
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0,
|
|
18399
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
18400
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: attachVisibleViewport, "data-ohw-visible-viewport": "", "aria-hidden": true }),
|
|
18401
|
+
isEditMode && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AiSectionOverlay, { postToParent: postToParent2, apiRef: aiSectionApiRef }),
|
|
18402
|
+
Object.entries(uploadingRects).map(([key, { rect, fadingOut }]) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18126
18403
|
MediaOverlay,
|
|
18127
18404
|
{
|
|
18128
18405
|
hover: { key, rect, elementType: "image", isDragOver: false, hasTextOverlap: false },
|
|
@@ -18133,7 +18410,7 @@ function OhhwellsBridge() {
|
|
|
18133
18410
|
},
|
|
18134
18411
|
`uploading-${key}`
|
|
18135
18412
|
)),
|
|
18136
|
-
mediaHover && !(mediaHover.key in uploadingRects) && /* @__PURE__ */ (0,
|
|
18413
|
+
mediaHover && !(mediaHover.key in uploadingRects) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18137
18414
|
MediaOverlay,
|
|
18138
18415
|
{
|
|
18139
18416
|
hover: mediaHover,
|
|
@@ -18142,11 +18419,11 @@ function OhhwellsBridge() {
|
|
|
18142
18419
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
18143
18420
|
}
|
|
18144
18421
|
),
|
|
18145
|
-
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
18146
|
-
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0,
|
|
18147
|
-
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0,
|
|
18148
|
-
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0,
|
|
18149
|
-
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
18422
|
+
carouselHover && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CarouselOverlay, { hover: carouselHover, onEdit: handleEditCarousel }),
|
|
18423
|
+
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
|
|
18424
|
+
siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
|
|
18425
|
+
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
|
|
18426
|
+
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18150
18427
|
"div",
|
|
18151
18428
|
{
|
|
18152
18429
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -18156,7 +18433,7 @@ function OhhwellsBridge() {
|
|
|
18156
18433
|
width: slot.width,
|
|
18157
18434
|
height: slot.height
|
|
18158
18435
|
},
|
|
18159
|
-
children: /* @__PURE__ */ (0,
|
|
18436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18160
18437
|
DropIndicator,
|
|
18161
18438
|
{
|
|
18162
18439
|
direction: slot.direction,
|
|
@@ -18167,7 +18444,7 @@ function OhhwellsBridge() {
|
|
|
18167
18444
|
},
|
|
18168
18445
|
`footer-drop-${slot.direction}-${slot.columnIndex}-${slot.insertIndex}-${i}`
|
|
18169
18446
|
)),
|
|
18170
|
-
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0,
|
|
18447
|
+
isItemDragging && navDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18171
18448
|
"div",
|
|
18172
18449
|
{
|
|
18173
18450
|
className: "pointer-events-none fixed z-2147483646",
|
|
@@ -18177,7 +18454,7 @@ function OhhwellsBridge() {
|
|
|
18177
18454
|
width: slot.width,
|
|
18178
18455
|
height: slot.height
|
|
18179
18456
|
},
|
|
18180
|
-
children: /* @__PURE__ */ (0,
|
|
18457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18181
18458
|
DropIndicator,
|
|
18182
18459
|
{
|
|
18183
18460
|
direction: slot.direction,
|
|
@@ -18188,10 +18465,10 @@ function OhhwellsBridge() {
|
|
|
18188
18465
|
},
|
|
18189
18466
|
`nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
|
|
18190
18467
|
)),
|
|
18191
|
-
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0,
|
|
18192
|
-
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0,
|
|
18193
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
18194
|
-
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0,
|
|
18468
|
+
hoveredNavContainerRect && (toolbarVariant !== "select-frame" || isFooterFrameSelection) && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
18469
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
18470
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer2(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
18471
|
+
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isFooterLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18195
18472
|
FooterContainerChrome,
|
|
18196
18473
|
{
|
|
18197
18474
|
rect: toolbarRect,
|
|
@@ -18199,7 +18476,7 @@ function OhhwellsBridge() {
|
|
|
18199
18476
|
addDisabled: !canAddFooterColumn()
|
|
18200
18477
|
}
|
|
18201
18478
|
),
|
|
18202
|
-
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0,
|
|
18479
|
+
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame" || toolbarVariant === "logo") && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18203
18480
|
ItemInteractionLayer,
|
|
18204
18481
|
{
|
|
18205
18482
|
rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected) ? draggedItemRect : toolbarRect,
|
|
@@ -18214,10 +18491,18 @@ function OhhwellsBridge() {
|
|
|
18214
18491
|
onItemPointerDown: toolbarVariant === "logo" ? void 0 : handleItemChromePointerDown,
|
|
18215
18492
|
onItemClick: toolbarVariant === "logo" ? void 0 : handleItemChromeClick,
|
|
18216
18493
|
itemDragSurface: toolbarVariant !== "logo" && !isFooterFrameSelection,
|
|
18217
|
-
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0,
|
|
18494
|
+
toolbar: toolbarVariant === "link-action" && !isItemDragging || toolbarVariant === "select-frame" && (isFooterFrameSelection || selectedIsSocialsRow) && !isItemDragging ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18218
18495
|
ItemActionToolbar,
|
|
18219
18496
|
{
|
|
18220
18497
|
onEditLink: openLinkPopoverForSelected,
|
|
18498
|
+
onStyle: () => {
|
|
18499
|
+
const row = selectedElRef.current;
|
|
18500
|
+
if (!row) return;
|
|
18501
|
+
if (floatingPanel?.kind === "socials-display") closeFloatingPanelOnly();
|
|
18502
|
+
else openSocialsDisplayPanel(row);
|
|
18503
|
+
},
|
|
18504
|
+
showStyle: selectedIsSocialsRow,
|
|
18505
|
+
styleActive: floatingPanel?.kind === "socials-display",
|
|
18221
18506
|
onAddItem: handleAddChildItem,
|
|
18222
18507
|
onSelectParent: handleSelectParent,
|
|
18223
18508
|
onDuplicate: handleDuplicateSelected,
|
|
@@ -18239,8 +18524,8 @@ function OhhwellsBridge() {
|
|
|
18239
18524
|
) : void 0
|
|
18240
18525
|
}
|
|
18241
18526
|
),
|
|
18242
|
-
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0,
|
|
18243
|
-
/* @__PURE__ */ (0,
|
|
18527
|
+
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
18528
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18244
18529
|
EditGlowChrome,
|
|
18245
18530
|
{
|
|
18246
18531
|
rect: toolbarRect,
|
|
@@ -18250,7 +18535,7 @@ function OhhwellsBridge() {
|
|
|
18250
18535
|
hideHandle: isItemDragging
|
|
18251
18536
|
}
|
|
18252
18537
|
),
|
|
18253
|
-
/* @__PURE__ */ (0,
|
|
18538
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18254
18539
|
FloatingToolbar,
|
|
18255
18540
|
{
|
|
18256
18541
|
rect: toolbarRect,
|
|
@@ -18263,7 +18548,7 @@ function OhhwellsBridge() {
|
|
|
18263
18548
|
}
|
|
18264
18549
|
)
|
|
18265
18550
|
] }),
|
|
18266
|
-
maxBadge && /* @__PURE__ */ (0,
|
|
18551
|
+
maxBadge && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
18267
18552
|
"div",
|
|
18268
18553
|
{
|
|
18269
18554
|
"data-ohw-max-badge": "",
|
|
@@ -18289,7 +18574,7 @@ function OhhwellsBridge() {
|
|
|
18289
18574
|
]
|
|
18290
18575
|
}
|
|
18291
18576
|
),
|
|
18292
|
-
toggleState && !linkPopover && /* @__PURE__ */ (0,
|
|
18577
|
+
toggleState && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18293
18578
|
StateToggle,
|
|
18294
18579
|
{
|
|
18295
18580
|
rect: toggleState.rect,
|
|
@@ -18298,15 +18583,15 @@ function OhhwellsBridge() {
|
|
|
18298
18583
|
onStateChange: handleStateChange
|
|
18299
18584
|
}
|
|
18300
18585
|
),
|
|
18301
|
-
sectionGap && !linkPopover && /* @__PURE__ */ (0,
|
|
18586
|
+
sectionGap && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
18302
18587
|
"div",
|
|
18303
18588
|
{
|
|
18304
18589
|
"data-ohw-section-insert-line": "",
|
|
18305
18590
|
className: "fixed left-0 w-full z-2147483646 flex items-center pointer-events-none",
|
|
18306
18591
|
style: { top: sectionGap.y, transform: "translateY(-50%)" },
|
|
18307
18592
|
children: [
|
|
18308
|
-
/* @__PURE__ */ (0,
|
|
18309
|
-
/* @__PURE__ */ (0,
|
|
18593
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } }),
|
|
18594
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18310
18595
|
Badge,
|
|
18311
18596
|
{
|
|
18312
18597
|
className: "px-8 py-1 bg-primary hover:bg-primary text-primary-foreground text-xs font-medium shrink-0 rounded-full cursor-pointer pointer-events-auto",
|
|
@@ -18323,11 +18608,11 @@ function OhhwellsBridge() {
|
|
|
18323
18608
|
children: "Add Section"
|
|
18324
18609
|
}
|
|
18325
18610
|
),
|
|
18326
|
-
/* @__PURE__ */ (0,
|
|
18611
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex-1 bg-primary", style: { height: 3 } })
|
|
18327
18612
|
]
|
|
18328
18613
|
}
|
|
18329
18614
|
),
|
|
18330
|
-
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0,
|
|
18615
|
+
linkPopover && dialogPortalContainer ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18331
18616
|
LinkPopover,
|
|
18332
18617
|
{
|
|
18333
18618
|
panelRef: linkPopoverPanelRef,
|
|
@@ -18344,7 +18629,29 @@ function OhhwellsBridge() {
|
|
|
18344
18629
|
},
|
|
18345
18630
|
linkPopover.key
|
|
18346
18631
|
) : null,
|
|
18347
|
-
floatingPanel && floatingPanel.kind === "
|
|
18632
|
+
floatingPanel && floatingPanel.kind === "socials-display" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18633
|
+
FloatingPanel,
|
|
18634
|
+
{
|
|
18635
|
+
open: true,
|
|
18636
|
+
title: floatingPanel.title,
|
|
18637
|
+
context: floatingPanel.context,
|
|
18638
|
+
position: floatingPanelPos,
|
|
18639
|
+
onPositionChange: setFloatingPanelPos,
|
|
18640
|
+
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
18641
|
+
onClose: closeFloatingPanelOnly,
|
|
18642
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18643
|
+
SocialsDisplayPanel,
|
|
18644
|
+
{
|
|
18645
|
+
display: socialsDisplayFor(floatingPanel.row, editContentRef.current),
|
|
18646
|
+
onChange: (next) => {
|
|
18647
|
+
changeSocialsDisplay(floatingPanel.row, next);
|
|
18648
|
+
setFloatingPanel({ ...floatingPanel });
|
|
18649
|
+
}
|
|
18650
|
+
}
|
|
18651
|
+
)
|
|
18652
|
+
}
|
|
18653
|
+
) : null,
|
|
18654
|
+
floatingPanel && floatingPanel.kind === "logo-size" && logoSizeDraft ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18348
18655
|
FloatingPanel,
|
|
18349
18656
|
{
|
|
18350
18657
|
open: true,
|
|
@@ -18354,7 +18661,7 @@ function OhhwellsBridge() {
|
|
|
18354
18661
|
onPositionChange: setFloatingPanelPos,
|
|
18355
18662
|
parentScroll: parentScrollSnap ?? parentScrollRef.current,
|
|
18356
18663
|
onClose: closeFloatingPanelAndDeselect,
|
|
18357
|
-
children: /* @__PURE__ */ (0,
|
|
18664
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
18358
18665
|
LogoSizePanel,
|
|
18359
18666
|
{
|
|
18360
18667
|
viewport: editorViewport,
|
|
@@ -18402,10 +18709,10 @@ function OhhwellsBridge() {
|
|
|
18402
18709
|
|
|
18403
18710
|
// src/ui/EmptySection.tsx
|
|
18404
18711
|
var import_link = __toESM(require("next/link"), 1);
|
|
18405
|
-
var
|
|
18712
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
18406
18713
|
function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey }) {
|
|
18407
|
-
return /* @__PURE__ */ (0,
|
|
18408
|
-
/* @__PURE__ */ (0,
|
|
18714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
18715
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
18409
18716
|
"p",
|
|
18410
18717
|
{
|
|
18411
18718
|
style: {
|
|
@@ -18417,10 +18724,10 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
18417
18724
|
color: "var(--brand-accent)",
|
|
18418
18725
|
marginBottom: "1.5rem"
|
|
18419
18726
|
},
|
|
18420
|
-
children: /* @__PURE__ */ (0,
|
|
18727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_link.default, { href: homeHref, style: { color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { ...eyebrowKey ? { "data-ohw-editable": "text", "data-ohw-key": eyebrowKey } : {}, children: "Home" }) })
|
|
18421
18728
|
}
|
|
18422
18729
|
),
|
|
18423
|
-
/* @__PURE__ */ (0,
|
|
18730
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
18424
18731
|
"h1",
|
|
18425
18732
|
{
|
|
18426
18733
|
style: {
|
|
@@ -18435,7 +18742,7 @@ function EmptySection({ title, homeHref = "/", eyebrowKey, titleKey, subtitleKey
|
|
|
18435
18742
|
children: title
|
|
18436
18743
|
}
|
|
18437
18744
|
),
|
|
18438
|
-
/* @__PURE__ */ (0,
|
|
18745
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
18439
18746
|
"p",
|
|
18440
18747
|
{
|
|
18441
18748
|
style: {
|