scribe-widget 1.0.4 → 1.0.5

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.
@@ -64459,15 +64459,7 @@ class ScribeWidget {
64459
64459
  }
64460
64460
  render() {
64461
64461
  if (!this.root || !this.visible) return;
64462
- this.root.render(
64463
- /* @__PURE__ */ jsxRuntimeExports.jsx(
64464
- App,
64465
- {
64466
- config: this.config,
64467
- onClose: () => this.hide()
64468
- }
64469
- )
64470
- );
64462
+ this.root.render(/* @__PURE__ */ jsxRuntimeExports.jsx(App, { config: this.config, onClose: () => this.hide() }));
64471
64463
  }
64472
64464
  mount(target) {
64473
64465
  const targetEl = typeof target === "string" ? document.querySelector(target) : target || document.body;
@@ -64501,6 +64493,7 @@ function init(config = {}) {
64501
64493
  if (widgetInstance) {
64502
64494
  widgetInstance.unmount();
64503
64495
  }
64496
+ console.log(config, "config - WIDGET");
64504
64497
  widgetInstance = new ScribeWidget(config);
64505
64498
  widgetInstance.mount();
64506
64499
  return widgetInstance;
@@ -64519,13 +64512,15 @@ if (typeof window !== "undefined" && typeof document !== "undefined") {
64519
64512
  if (scriptTag == null ? void 0 : scriptTag.hasAttribute("data-no-auto-init")) {
64520
64513
  return;
64521
64514
  }
64515
+ console.log(widgetInstance, "widget instance");
64522
64516
  if (!widgetInstance) {
64523
64517
  init({});
64524
64518
  }
64525
64519
  };
64526
64520
  if (document.readyState === "loading") {
64527
- document.addEventListener("DOMContentLoaded", autoInit);
64521
+ document.addEventListener("DOMContentLoaded - WIDGET", autoInit);
64528
64522
  } else {
64523
+ console.log("load document - WIDGET");
64529
64524
  autoInit();
64530
64525
  }
64531
64526
  }