myio-js-library 0.1.95 → 0.1.97

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
@@ -2289,6 +2289,37 @@ var MyIOSelectionStore;
2289
2289
  var _singletonInstance = null;
2290
2290
  if (typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined") {
2291
2291
  console.log("[SelectionStore] \u{1F527} Module initialization - checking for existing instance...");
2292
+ if (!globalThis.window.__MyIOLibrary_PROTECTED__) {
2293
+ console.log("[SelectionStore] \u{1F6E1}\uFE0F Protecting window.MyIOLibrary object from UMD overwrites...");
2294
+ const existingLib = globalThis.window.MyIOLibrary;
2295
+ Object.defineProperty(globalThis.window, "MyIOLibrary", {
2296
+ get: function() {
2297
+ if (!globalThis.window.__MyIOLibrary_INSTANCE__) {
2298
+ console.log("[SelectionStore] \u{1F4E6} Creating protected MyIOLibrary container object");
2299
+ globalThis.window.__MyIOLibrary_INSTANCE__ = existingLib || {};
2300
+ }
2301
+ return globalThis.window.__MyIOLibrary_INSTANCE__;
2302
+ },
2303
+ set: function(value) {
2304
+ console.log("[SelectionStore] \u{1F504} UMD tried to overwrite MyIOLibrary - merging properties instead");
2305
+ if (value && typeof value === "object") {
2306
+ const currentLib = globalThis.window.__MyIOLibrary_INSTANCE__ || {};
2307
+ Object.keys(value).forEach((key) => {
2308
+ if (key === "MyIOSelectionStore" && currentLib.MyIOSelectionStore) {
2309
+ console.log("[SelectionStore] \u23ED\uFE0F Skipping MyIOSelectionStore - already set");
2310
+ return;
2311
+ }
2312
+ currentLib[key] = value[key];
2313
+ });
2314
+ globalThis.window.__MyIOLibrary_INSTANCE__ = currentLib;
2315
+ }
2316
+ },
2317
+ configurable: false,
2318
+ enumerable: true
2319
+ });
2320
+ globalThis.window.__MyIOLibrary_PROTECTED__ = true;
2321
+ console.log("[SelectionStore] \u2705 window.MyIOLibrary protected!");
2322
+ }
2292
2323
  let existingInstance = null;
2293
2324
  try {
2294
2325
  const targetWindow = globalThis.window.top ? globalThis.window.top : globalThis.window;
package/dist/index.js CHANGED
@@ -2201,6 +2201,37 @@ var MyIOSelectionStore;
2201
2201
  var _singletonInstance = null;
2202
2202
  if (typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined") {
2203
2203
  console.log("[SelectionStore] \u{1F527} Module initialization - checking for existing instance...");
2204
+ if (!globalThis.window.__MyIOLibrary_PROTECTED__) {
2205
+ console.log("[SelectionStore] \u{1F6E1}\uFE0F Protecting window.MyIOLibrary object from UMD overwrites...");
2206
+ const existingLib = globalThis.window.MyIOLibrary;
2207
+ Object.defineProperty(globalThis.window, "MyIOLibrary", {
2208
+ get: function() {
2209
+ if (!globalThis.window.__MyIOLibrary_INSTANCE__) {
2210
+ console.log("[SelectionStore] \u{1F4E6} Creating protected MyIOLibrary container object");
2211
+ globalThis.window.__MyIOLibrary_INSTANCE__ = existingLib || {};
2212
+ }
2213
+ return globalThis.window.__MyIOLibrary_INSTANCE__;
2214
+ },
2215
+ set: function(value) {
2216
+ console.log("[SelectionStore] \u{1F504} UMD tried to overwrite MyIOLibrary - merging properties instead");
2217
+ if (value && typeof value === "object") {
2218
+ const currentLib = globalThis.window.__MyIOLibrary_INSTANCE__ || {};
2219
+ Object.keys(value).forEach((key) => {
2220
+ if (key === "MyIOSelectionStore" && currentLib.MyIOSelectionStore) {
2221
+ console.log("[SelectionStore] \u23ED\uFE0F Skipping MyIOSelectionStore - already set");
2222
+ return;
2223
+ }
2224
+ currentLib[key] = value[key];
2225
+ });
2226
+ globalThis.window.__MyIOLibrary_INSTANCE__ = currentLib;
2227
+ }
2228
+ },
2229
+ configurable: false,
2230
+ enumerable: true
2231
+ });
2232
+ globalThis.window.__MyIOLibrary_PROTECTED__ = true;
2233
+ console.log("[SelectionStore] \u2705 window.MyIOLibrary protected!");
2234
+ }
2204
2235
  let existingInstance = null;
2205
2236
  try {
2206
2237
  const targetWindow = globalThis.window.top ? globalThis.window.top : globalThis.window;
@@ -2207,6 +2207,37 @@
2207
2207
  var _singletonInstance = null;
2208
2208
  if (typeof globalThis !== "undefined" && typeof globalThis.window !== "undefined") {
2209
2209
  console.log("[SelectionStore] \u{1F527} Module initialization - checking for existing instance...");
2210
+ if (!globalThis.window.__MyIOLibrary_PROTECTED__) {
2211
+ console.log("[SelectionStore] \u{1F6E1}\uFE0F Protecting window.MyIOLibrary object from UMD overwrites...");
2212
+ const existingLib = globalThis.window.MyIOLibrary;
2213
+ Object.defineProperty(globalThis.window, "MyIOLibrary", {
2214
+ get: function() {
2215
+ if (!globalThis.window.__MyIOLibrary_INSTANCE__) {
2216
+ console.log("[SelectionStore] \u{1F4E6} Creating protected MyIOLibrary container object");
2217
+ globalThis.window.__MyIOLibrary_INSTANCE__ = existingLib || {};
2218
+ }
2219
+ return globalThis.window.__MyIOLibrary_INSTANCE__;
2220
+ },
2221
+ set: function(value) {
2222
+ console.log("[SelectionStore] \u{1F504} UMD tried to overwrite MyIOLibrary - merging properties instead");
2223
+ if (value && typeof value === "object") {
2224
+ const currentLib = globalThis.window.__MyIOLibrary_INSTANCE__ || {};
2225
+ Object.keys(value).forEach((key) => {
2226
+ if (key === "MyIOSelectionStore" && currentLib.MyIOSelectionStore) {
2227
+ console.log("[SelectionStore] \u23ED\uFE0F Skipping MyIOSelectionStore - already set");
2228
+ return;
2229
+ }
2230
+ currentLib[key] = value[key];
2231
+ });
2232
+ globalThis.window.__MyIOLibrary_INSTANCE__ = currentLib;
2233
+ }
2234
+ },
2235
+ configurable: false,
2236
+ enumerable: true
2237
+ });
2238
+ globalThis.window.__MyIOLibrary_PROTECTED__ = true;
2239
+ console.log("[SelectionStore] \u2705 window.MyIOLibrary protected!");
2240
+ }
2210
2241
  let existingInstance = null;
2211
2242
  try {
2212
2243
  const targetWindow = globalThis.window.top ? globalThis.window.top : globalThis.window;