@ohhwells/bridge 0.1.80 → 0.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2250,6 +2250,7 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
2250
2250
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2251
2251
  import_radix_ui.Dialog.Overlay,
2252
2252
  {
2253
+ "data-ohw-scheduling-modal": "",
2253
2254
  className: "fixed inset-0 z-50",
2254
2255
  style: { background: "rgba(0,0,0,0.45)" }
2255
2256
  }
@@ -2257,6 +2258,7 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
2257
2258
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2258
2259
  import_radix_ui.Dialog.Content,
2259
2260
  {
2261
+ "data-ohw-scheduling-modal": "",
2260
2262
  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",
2261
2263
  style: { maxWidth: 400 },
2262
2264
  children: [
@@ -2730,7 +2732,7 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
2730
2732
  const autoId = (0, import_react5.useId)();
2731
2733
  const insertAfter = insertAfterProp ?? autoId;
2732
2734
  const [schedule, setSchedule] = (0, import_react5.useState)(null);
2733
- const [loading, setLoading] = (0, import_react5.useState)(true);
2735
+ const [loading, setLoading] = (0, import_react5.useState)(initialScheduleId !== null);
2734
2736
  const [inEditor, setInEditor] = (0, import_react5.useState)(false);
2735
2737
  const [isHovered, setIsHovered] = (0, import_react5.useState)(false);
2736
2738
  const [modalState, setModalState] = (0, import_react5.useState)(null);
@@ -2904,8 +2906,10 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
2904
2906
  "*"
2905
2907
  );
2906
2908
  };
2907
- if (!inEditor && !loading && !schedule) return null;
2908
2909
  const sectionId = `scheduling-${insertAfter}`;
2910
+ if (!inEditor && !loading && !schedule) {
2911
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("section", { "data-ohw-section": sectionId, "data-ohw-scheduling-anchor": insertAfter, style: { display: "none" } });
2912
+ }
2909
2913
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2910
2914
  "section",
2911
2915
  {
@@ -14999,7 +15003,7 @@ function mountSchedulingEntries(entries, notifyOnConnect = false) {
14999
15003
  for (let i = pending.length - 1; i >= 0; i--) {
15000
15004
  const entry = pending[i];
15001
15005
  const shouldNotify = typeof notifyOnConnect === "function" ? notifyOnConnect(entry) : notifyOnConnect;
15002
- if (mountSchedulingWidget(entry.insertAfter, shouldNotify, entry.scheduleId)) {
15006
+ if (mountSchedulingWidget(entry.insertAfter, shouldNotify, entry.scheduleId ?? null)) {
15003
15007
  pending.splice(i, 1);
15004
15008
  }
15005
15009
  }
@@ -21087,7 +21091,7 @@ function OhhwellsBridge() {
21087
21091
  postToParent2({
21088
21092
  type: "ow:ready",
21089
21093
  version: "1",
21090
- bridgeVersion: "0.1.79",
21094
+ bridgeVersion: "0.1.81",
21091
21095
  path: pathname,
21092
21096
  nodes: collectEditableNodes(editContentRef.current),
21093
21097
  sections