myio-js-library 0.1.91 → 0.1.92

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
@@ -1914,17 +1914,17 @@ init_template_card();
1914
1914
  var MyIOSelectionStoreClass = class {
1915
1915
  constructor() {
1916
1916
  console.log("[SelectionStore] \u{1F50D} Constructor called - checking for existing instance...");
1917
- console.log("[SelectionStore] typeof window:", typeof window);
1918
- console.log("[SelectionStore] window === globalThis.window:", typeof window !== "undefined" && window === globalThis?.window);
1919
- console.log("[SelectionStore] window.__MyIOSelectionStore_INSTANCE__:", !!window?.__MyIOSelectionStore_INSTANCE__);
1920
- if (typeof window !== "undefined") {
1921
- const myioProps = Object.getOwnPropertyNames(window).filter((key) => key.startsWith("__MyIO"));
1922
- console.log("[SelectionStore] All __MyIO* properties on window:", myioProps);
1923
- }
1924
- if (typeof window !== "undefined" && window.__MyIOSelectionStore_INSTANCE__) {
1917
+ console.log("[SelectionStore] typeof document:", typeof document);
1918
+ console.log("[SelectionStore] document.__MyIOSelectionStore_INSTANCE__:", !!document?.__MyIOSelectionStore_INSTANCE__);
1919
+ if (typeof document !== "undefined") {
1920
+ const myioProps = Object.getOwnPropertyNames(document).filter((key) => key.startsWith("__MyIO"));
1921
+ console.log("[SelectionStore] All __MyIO* properties on document:", myioProps);
1922
+ }
1923
+ const existingInstance = typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__ || typeof window !== "undefined" && window.__MyIOSelectionStore_INSTANCE__;
1924
+ if (existingInstance) {
1925
1925
  console.warn("[SelectionStore] \u26A0\uFE0F Constructor called but instance already exists! Returning existing instance.");
1926
- console.log("[SelectionStore] Existing instance has listeners:", window.__MyIOSelectionStore_INSTANCE__.eventListeners.get("selection:change")?.length || 0);
1927
- return window.__MyIOSelectionStore_INSTANCE__;
1926
+ console.log("[SelectionStore] Existing instance has listeners:", existingInstance.eventListeners.get("selection:change")?.length || 0);
1927
+ return existingInstance;
1928
1928
  }
1929
1929
  console.log("[SelectionStore] \u{1F3D7}\uFE0F NEW INSTANCE CREATED at:", (/* @__PURE__ */ new Date()).toISOString());
1930
1930
  console.trace("[SelectionStore] Constructor called from:");
@@ -1939,8 +1939,12 @@ var MyIOSelectionStoreClass = class {
1939
1939
  this.eventListeners.set("selection:totals", []);
1940
1940
  this.eventListeners.set("comparison:open", []);
1941
1941
  this.eventListeners.set("comparison:too_many", []);
1942
- if (typeof window !== "undefined") {
1943
- console.log("[SelectionStore] \u{1F4BE} Storing instance in window.__MyIOSelectionStore_INSTANCE__");
1942
+ if (typeof document !== "undefined") {
1943
+ console.log("[SelectionStore] \u{1F4BE} Storing instance in document.__MyIOSelectionStore_INSTANCE__");
1944
+ document.__MyIOSelectionStore_INSTANCE__ = this;
1945
+ console.log("[SelectionStore] \u2705 Stored! Verify:", !!document.__MyIOSelectionStore_INSTANCE__);
1946
+ } else if (typeof window !== "undefined") {
1947
+ console.log("[SelectionStore] \u{1F4BE} Storing instance in window.__MyIOSelectionStore_INSTANCE__ (fallback)");
1944
1948
  window.__MyIOSelectionStore_INSTANCE__ = this;
1945
1949
  console.log("[SelectionStore] \u2705 Stored! Verify:", !!window.__MyIOSelectionStore_INSTANCE__);
1946
1950
  }
@@ -2264,10 +2268,12 @@ var MyIOSelectionStore;
2264
2268
  var _singletonInstance = null;
2265
2269
  if (typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined") {
2266
2270
  console.log("[SelectionStore] \u{1F527} Module initialization - checking for existing instance...");
2267
- console.log("[SelectionStore] globalThis.window.__MyIOSelectionStore_INSTANCE__:", !!globalThis.window.__MyIOSelectionStore_INSTANCE__);
2268
- if (globalThis.window.__MyIOSelectionStore_INSTANCE__) {
2271
+ const existingInstance = typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__ || globalThis.window.__MyIOSelectionStore_INSTANCE__;
2272
+ console.log("[SelectionStore] document.__MyIOSelectionStore_INSTANCE__:", !!(typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__));
2273
+ console.log("[SelectionStore] window.__MyIOSelectionStore_INSTANCE__:", !!globalThis.window.__MyIOSelectionStore_INSTANCE__);
2274
+ if (existingInstance) {
2269
2275
  console.log("[SelectionStore] \u{1F504} REUSING constructor-created instance from __MyIOSelectionStore_INSTANCE__");
2270
- _singletonInstance = globalThis.window.__MyIOSelectionStore_INSTANCE__;
2276
+ _singletonInstance = existingInstance;
2271
2277
  MyIOSelectionStore = _singletonInstance;
2272
2278
  } else if (Object.getOwnPropertyDescriptor(globalThis.window, "MyIOSelectionStore")?.get) {
2273
2279
  console.log("[SelectionStore] \u{1F504} REUSING protected global instance via getter");
package/dist/index.js CHANGED
@@ -1826,17 +1826,17 @@ init_template_card();
1826
1826
  var MyIOSelectionStoreClass = class {
1827
1827
  constructor() {
1828
1828
  console.log("[SelectionStore] \u{1F50D} Constructor called - checking for existing instance...");
1829
- console.log("[SelectionStore] typeof window:", typeof window);
1830
- console.log("[SelectionStore] window === globalThis.window:", typeof window !== "undefined" && window === globalThis?.window);
1831
- console.log("[SelectionStore] window.__MyIOSelectionStore_INSTANCE__:", !!window?.__MyIOSelectionStore_INSTANCE__);
1832
- if (typeof window !== "undefined") {
1833
- const myioProps = Object.getOwnPropertyNames(window).filter((key) => key.startsWith("__MyIO"));
1834
- console.log("[SelectionStore] All __MyIO* properties on window:", myioProps);
1835
- }
1836
- if (typeof window !== "undefined" && window.__MyIOSelectionStore_INSTANCE__) {
1829
+ console.log("[SelectionStore] typeof document:", typeof document);
1830
+ console.log("[SelectionStore] document.__MyIOSelectionStore_INSTANCE__:", !!document?.__MyIOSelectionStore_INSTANCE__);
1831
+ if (typeof document !== "undefined") {
1832
+ const myioProps = Object.getOwnPropertyNames(document).filter((key) => key.startsWith("__MyIO"));
1833
+ console.log("[SelectionStore] All __MyIO* properties on document:", myioProps);
1834
+ }
1835
+ const existingInstance = typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__ || typeof window !== "undefined" && window.__MyIOSelectionStore_INSTANCE__;
1836
+ if (existingInstance) {
1837
1837
  console.warn("[SelectionStore] \u26A0\uFE0F Constructor called but instance already exists! Returning existing instance.");
1838
- console.log("[SelectionStore] Existing instance has listeners:", window.__MyIOSelectionStore_INSTANCE__.eventListeners.get("selection:change")?.length || 0);
1839
- return window.__MyIOSelectionStore_INSTANCE__;
1838
+ console.log("[SelectionStore] Existing instance has listeners:", existingInstance.eventListeners.get("selection:change")?.length || 0);
1839
+ return existingInstance;
1840
1840
  }
1841
1841
  console.log("[SelectionStore] \u{1F3D7}\uFE0F NEW INSTANCE CREATED at:", (/* @__PURE__ */ new Date()).toISOString());
1842
1842
  console.trace("[SelectionStore] Constructor called from:");
@@ -1851,8 +1851,12 @@ var MyIOSelectionStoreClass = class {
1851
1851
  this.eventListeners.set("selection:totals", []);
1852
1852
  this.eventListeners.set("comparison:open", []);
1853
1853
  this.eventListeners.set("comparison:too_many", []);
1854
- if (typeof window !== "undefined") {
1855
- console.log("[SelectionStore] \u{1F4BE} Storing instance in window.__MyIOSelectionStore_INSTANCE__");
1854
+ if (typeof document !== "undefined") {
1855
+ console.log("[SelectionStore] \u{1F4BE} Storing instance in document.__MyIOSelectionStore_INSTANCE__");
1856
+ document.__MyIOSelectionStore_INSTANCE__ = this;
1857
+ console.log("[SelectionStore] \u2705 Stored! Verify:", !!document.__MyIOSelectionStore_INSTANCE__);
1858
+ } else if (typeof window !== "undefined") {
1859
+ console.log("[SelectionStore] \u{1F4BE} Storing instance in window.__MyIOSelectionStore_INSTANCE__ (fallback)");
1856
1860
  window.__MyIOSelectionStore_INSTANCE__ = this;
1857
1861
  console.log("[SelectionStore] \u2705 Stored! Verify:", !!window.__MyIOSelectionStore_INSTANCE__);
1858
1862
  }
@@ -2176,10 +2180,12 @@ var MyIOSelectionStore;
2176
2180
  var _singletonInstance = null;
2177
2181
  if (typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined") {
2178
2182
  console.log("[SelectionStore] \u{1F527} Module initialization - checking for existing instance...");
2179
- console.log("[SelectionStore] globalThis.window.__MyIOSelectionStore_INSTANCE__:", !!globalThis.window.__MyIOSelectionStore_INSTANCE__);
2180
- if (globalThis.window.__MyIOSelectionStore_INSTANCE__) {
2183
+ const existingInstance = typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__ || globalThis.window.__MyIOSelectionStore_INSTANCE__;
2184
+ console.log("[SelectionStore] document.__MyIOSelectionStore_INSTANCE__:", !!(typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__));
2185
+ console.log("[SelectionStore] window.__MyIOSelectionStore_INSTANCE__:", !!globalThis.window.__MyIOSelectionStore_INSTANCE__);
2186
+ if (existingInstance) {
2181
2187
  console.log("[SelectionStore] \u{1F504} REUSING constructor-created instance from __MyIOSelectionStore_INSTANCE__");
2182
- _singletonInstance = globalThis.window.__MyIOSelectionStore_INSTANCE__;
2188
+ _singletonInstance = existingInstance;
2183
2189
  MyIOSelectionStore = _singletonInstance;
2184
2190
  } else if (Object.getOwnPropertyDescriptor(globalThis.window, "MyIOSelectionStore")?.get) {
2185
2191
  console.log("[SelectionStore] \u{1F504} REUSING protected global instance via getter");
@@ -1832,17 +1832,17 @@
1832
1832
  var MyIOSelectionStoreClass = class {
1833
1833
  constructor() {
1834
1834
  console.log("[SelectionStore] \u{1F50D} Constructor called - checking for existing instance...");
1835
- console.log("[SelectionStore] typeof window:", typeof window);
1836
- console.log("[SelectionStore] window === globalThis.window:", typeof window !== "undefined" && window === globalThis?.window);
1837
- console.log("[SelectionStore] window.__MyIOSelectionStore_INSTANCE__:", !!window?.__MyIOSelectionStore_INSTANCE__);
1838
- if (typeof window !== "undefined") {
1839
- const myioProps = Object.getOwnPropertyNames(window).filter((key) => key.startsWith("__MyIO"));
1840
- console.log("[SelectionStore] All __MyIO* properties on window:", myioProps);
1841
- }
1842
- if (typeof window !== "undefined" && window.__MyIOSelectionStore_INSTANCE__) {
1835
+ console.log("[SelectionStore] typeof document:", typeof document);
1836
+ console.log("[SelectionStore] document.__MyIOSelectionStore_INSTANCE__:", !!document?.__MyIOSelectionStore_INSTANCE__);
1837
+ if (typeof document !== "undefined") {
1838
+ const myioProps = Object.getOwnPropertyNames(document).filter((key) => key.startsWith("__MyIO"));
1839
+ console.log("[SelectionStore] All __MyIO* properties on document:", myioProps);
1840
+ }
1841
+ const existingInstance = typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__ || typeof window !== "undefined" && window.__MyIOSelectionStore_INSTANCE__;
1842
+ if (existingInstance) {
1843
1843
  console.warn("[SelectionStore] \u26A0\uFE0F Constructor called but instance already exists! Returning existing instance.");
1844
- console.log("[SelectionStore] Existing instance has listeners:", window.__MyIOSelectionStore_INSTANCE__.eventListeners.get("selection:change")?.length || 0);
1845
- return window.__MyIOSelectionStore_INSTANCE__;
1844
+ console.log("[SelectionStore] Existing instance has listeners:", existingInstance.eventListeners.get("selection:change")?.length || 0);
1845
+ return existingInstance;
1846
1846
  }
1847
1847
  console.log("[SelectionStore] \u{1F3D7}\uFE0F NEW INSTANCE CREATED at:", (/* @__PURE__ */ new Date()).toISOString());
1848
1848
  console.trace("[SelectionStore] Constructor called from:");
@@ -1857,8 +1857,12 @@
1857
1857
  this.eventListeners.set("selection:totals", []);
1858
1858
  this.eventListeners.set("comparison:open", []);
1859
1859
  this.eventListeners.set("comparison:too_many", []);
1860
- if (typeof window !== "undefined") {
1861
- console.log("[SelectionStore] \u{1F4BE} Storing instance in window.__MyIOSelectionStore_INSTANCE__");
1860
+ if (typeof document !== "undefined") {
1861
+ console.log("[SelectionStore] \u{1F4BE} Storing instance in document.__MyIOSelectionStore_INSTANCE__");
1862
+ document.__MyIOSelectionStore_INSTANCE__ = this;
1863
+ console.log("[SelectionStore] \u2705 Stored! Verify:", !!document.__MyIOSelectionStore_INSTANCE__);
1864
+ } else if (typeof window !== "undefined") {
1865
+ console.log("[SelectionStore] \u{1F4BE} Storing instance in window.__MyIOSelectionStore_INSTANCE__ (fallback)");
1862
1866
  window.__MyIOSelectionStore_INSTANCE__ = this;
1863
1867
  console.log("[SelectionStore] \u2705 Stored! Verify:", !!window.__MyIOSelectionStore_INSTANCE__);
1864
1868
  }
@@ -2182,10 +2186,12 @@
2182
2186
  var _singletonInstance = null;
2183
2187
  if (typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined") {
2184
2188
  console.log("[SelectionStore] \u{1F527} Module initialization - checking for existing instance...");
2185
- console.log("[SelectionStore] globalThis.window.__MyIOSelectionStore_INSTANCE__:", !!globalThis.window.__MyIOSelectionStore_INSTANCE__);
2186
- if (globalThis.window.__MyIOSelectionStore_INSTANCE__) {
2189
+ const existingInstance = typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__ || globalThis.window.__MyIOSelectionStore_INSTANCE__;
2190
+ console.log("[SelectionStore] document.__MyIOSelectionStore_INSTANCE__:", !!(typeof document !== "undefined" && document.__MyIOSelectionStore_INSTANCE__));
2191
+ console.log("[SelectionStore] window.__MyIOSelectionStore_INSTANCE__:", !!globalThis.window.__MyIOSelectionStore_INSTANCE__);
2192
+ if (existingInstance) {
2187
2193
  console.log("[SelectionStore] \u{1F504} REUSING constructor-created instance from __MyIOSelectionStore_INSTANCE__");
2188
- _singletonInstance = globalThis.window.__MyIOSelectionStore_INSTANCE__;
2194
+ _singletonInstance = existingInstance;
2189
2195
  exports.MyIOSelectionStore = _singletonInstance;
2190
2196
  } else if (Object.getOwnPropertyDescriptor(globalThis.window, "MyIOSelectionStore")?.get) {
2191
2197
  console.log("[SelectionStore] \u{1F504} REUSING protected global instance via getter");