@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.d.cts CHANGED
@@ -273,7 +273,7 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
273
273
  notifyOnConnect?: boolean;
274
274
  initialScheduleId?: string | null;
275
275
  insertAfter?: string;
276
- }): react_jsx_runtime.JSX.Element | null;
276
+ }): react_jsx_runtime.JSX.Element;
277
277
 
278
278
  declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
279
279
 
package/dist/index.d.ts CHANGED
@@ -273,7 +273,7 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
273
273
  notifyOnConnect?: boolean;
274
274
  initialScheduleId?: string | null;
275
275
  insertAfter?: string;
276
- }): react_jsx_runtime.JSX.Element | null;
276
+ }): react_jsx_runtime.JSX.Element;
277
277
 
278
278
  declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
279
279
 
package/dist/index.js CHANGED
@@ -2177,6 +2177,7 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
2177
2177
  /* @__PURE__ */ jsx3(
2178
2178
  Dialog.Overlay,
2179
2179
  {
2180
+ "data-ohw-scheduling-modal": "",
2180
2181
  className: "fixed inset-0 z-50",
2181
2182
  style: { background: "rgba(0,0,0,0.45)" }
2182
2183
  }
@@ -2184,6 +2185,7 @@ function EmailCaptureModal({ title, subtitle, onSubmit, onClose }) {
2184
2185
  /* @__PURE__ */ jsxs2(
2185
2186
  Dialog.Content,
2186
2187
  {
2188
+ "data-ohw-scheduling-modal": "",
2187
2189
  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",
2188
2190
  style: { maxWidth: 400 },
2189
2191
  children: [
@@ -2657,7 +2659,7 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
2657
2659
  const autoId = useId();
2658
2660
  const insertAfter = insertAfterProp ?? autoId;
2659
2661
  const [schedule, setSchedule] = useState2(null);
2660
- const [loading, setLoading] = useState2(true);
2662
+ const [loading, setLoading] = useState2(initialScheduleId !== null);
2661
2663
  const [inEditor, setInEditor] = useState2(false);
2662
2664
  const [isHovered, setIsHovered] = useState2(false);
2663
2665
  const [modalState, setModalState] = useState2(null);
@@ -2831,8 +2833,10 @@ function SchedulingWidget({ notifyOnConnect = false, initialScheduleId, insertAf
2831
2833
  "*"
2832
2834
  );
2833
2835
  };
2834
- if (!inEditor && !loading && !schedule) return null;
2835
2836
  const sectionId = `scheduling-${insertAfter}`;
2837
+ if (!inEditor && !loading && !schedule) {
2838
+ return /* @__PURE__ */ jsx4("section", { "data-ohw-section": sectionId, "data-ohw-scheduling-anchor": insertAfter, style: { display: "none" } });
2839
+ }
2836
2840
  return /* @__PURE__ */ jsxs3(
2837
2841
  "section",
2838
2842
  {
@@ -14932,7 +14936,7 @@ function mountSchedulingEntries(entries, notifyOnConnect = false) {
14932
14936
  for (let i = pending.length - 1; i >= 0; i--) {
14933
14937
  const entry = pending[i];
14934
14938
  const shouldNotify = typeof notifyOnConnect === "function" ? notifyOnConnect(entry) : notifyOnConnect;
14935
- if (mountSchedulingWidget(entry.insertAfter, shouldNotify, entry.scheduleId)) {
14939
+ if (mountSchedulingWidget(entry.insertAfter, shouldNotify, entry.scheduleId ?? null)) {
14936
14940
  pending.splice(i, 1);
14937
14941
  }
14938
14942
  }
@@ -21020,7 +21024,7 @@ function OhhwellsBridge() {
21020
21024
  postToParent2({
21021
21025
  type: "ow:ready",
21022
21026
  version: "1",
21023
- bridgeVersion: "0.1.79",
21027
+ bridgeVersion: "0.1.81",
21024
21028
  path: pathname,
21025
21029
  nodes: collectEditableNodes(editContentRef.current),
21026
21030
  sections