qcobjects 2.5.113-beta → 2.5.115-beta

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.
@@ -78,6 +78,41 @@ var init_PrimaryCollections = __esm({
78
78
  }
79
79
  });
80
80
 
81
+ // src/make_global.ts
82
+ var __make_global__;
83
+ var init_make_global = __esm({
84
+ "src/make_global.ts"() {
85
+ "use strict";
86
+ init_top();
87
+ __make_global__ = /* @__PURE__ */ __name(function(f) {
88
+ if (!!f && !!f.name) {
89
+ if (typeof _top !== "undefined" && typeof f !== "undefined" && _top !== null && !Object.hasOwn(_top, f.name)) {
90
+ set(f.name, f);
91
+ } else if (typeof global !== "undefined") {
92
+ global[f.name] = f;
93
+ } else if (typeof globalThis !== "undefined") {
94
+ globalThis[f.name] = f;
95
+ }
96
+ }
97
+ }, "__make_global__");
98
+ }
99
+ });
100
+
101
+ // src/Export.ts
102
+ var Export;
103
+ var init_Export = __esm({
104
+ "src/Export.ts"() {
105
+ "use strict";
106
+ init_make_global();
107
+ Export = /* @__PURE__ */ __name(function(f) {
108
+ return __make_global__(f);
109
+ }, "Export");
110
+ Export.prototype.toString = function() {
111
+ return "Export(function or symbol) { [QCObjects native code] }";
112
+ };
113
+ }
114
+ });
115
+
81
116
  // src/_import_.ts
82
117
  async function _import_(name) {
83
118
  logger.debug(`Importing ${name}...`);
@@ -142,47 +177,6 @@ var init_platform = __esm({
142
177
  }
143
178
  });
144
179
 
145
- // src/make_global.ts
146
- var __make_global__;
147
- var init_make_global = __esm({
148
- "src/make_global.ts"() {
149
- "use strict";
150
- init_platform();
151
- init_top();
152
- __make_global__ = /* @__PURE__ */ __name(function(f) {
153
- if (typeof f !== "undefined") {
154
- if (isBrowser) {
155
- try {
156
- _top[f.name] = f;
157
- window[f.name] = f;
158
- } catch (e) {
159
- throw Error(`An error ocurred: ${e}`);
160
- }
161
- } else if (typeof global !== "undefined") {
162
- if (!Object.hasOwn(global, f.name)) {
163
- global[f.name] = f;
164
- }
165
- }
166
- }
167
- }, "__make_global__");
168
- }
169
- });
170
-
171
- // src/Export.ts
172
- var Export;
173
- var init_Export = __esm({
174
- "src/Export.ts"() {
175
- "use strict";
176
- init_make_global();
177
- Export = /* @__PURE__ */ __name(function(f) {
178
- return __make_global__(f);
179
- }, "Export");
180
- Export.prototype.toString = function() {
181
- return "Export(function or symbol) { [QCObjects native code] }";
182
- };
183
- }
184
- });
185
-
186
180
  // src/Logger.ts
187
181
  var Logger, logger;
188
182
  var init_Logger = __esm({
@@ -3771,6 +3765,17 @@ var init_globalSettings = __esm({
3771
3765
  });
3772
3766
 
3773
3767
  // src/top.ts
3768
+ var top_exports = {};
3769
+ __export(top_exports, {
3770
+ _top: () => _top,
3771
+ buildComponentsStack: () => buildComponentsStack,
3772
+ componentsStack: () => componentsStack,
3773
+ configService: () => configService,
3774
+ get: () => get,
3775
+ resetTop: () => resetTop,
3776
+ set: () => set,
3777
+ setConfigService: () => setConfigService
3778
+ });
3774
3779
  var _top, componentsStack, resetTop, buildComponentsStack, configService, setConfigService, set, get;
3775
3780
  var init_top = __esm({
3776
3781
  "src/top.ts"() {
@@ -3778,7 +3783,7 @@ var init_top = __esm({
3778
3783
  init_ComponentFactory();
3779
3784
  init_Cast();
3780
3785
  init_globalSettings();
3781
- _top = typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports || typeof global !== "undefined" && global || typeof globalThis !== "undefined" && globalThis || typeof window !== "undefined" && window || typeof self !== "undefined" && self || void 0;
3786
+ _top = typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports || typeof global !== "undefined" && global || typeof globalThis !== "undefined" && globalThis || typeof window !== "undefined" && window || typeof self !== "undefined" && self !== null && self || void 0;
3782
3787
  _top.lastCache = void 0;
3783
3788
  componentsStack = [];
3784
3789
  resetTop = /* @__PURE__ */ __name(() => {
@@ -4955,7 +4960,13 @@ var require_MainProcess = __commonJS({
4955
4960
  Class("GLOBAL", _QC_CLASSES.global);
4956
4961
  Export(ClassFactory("GLOBAL"));
4957
4962
  }
4958
- Export(global);
4963
+ if (isBrowser && typeof window !== "undefined") {
4964
+ set("global", window);
4965
+ } else if (typeof global !== "undefined") {
4966
+ set("global", global);
4967
+ } else if (typeof globalThis !== "undefined") {
4968
+ set("global", globalThis);
4969
+ }
4959
4970
  loadSDK_default();
4960
4971
  })(_top2);
4961
4972
  if (isBrowser) {
@@ -5106,6 +5117,7 @@ __export(QCObjects_exports, {
5106
5117
  __is_raw_class__: () => __is_raw_class__,
5107
5118
  __make_global__: () => __make_global__,
5108
5119
  __to_number: () => __to_number,
5120
+ __top__: () => top_exports,
5109
5121
  _buildComponentsFromElements_: () => _buildComponentsFromElements_,
5110
5122
  _fireAsyncLoad: () => _fireAsyncLoad,
5111
5123
  _methods_: () => _methods_,
@@ -5141,6 +5153,7 @@ __export(QCObjects_exports, {
5141
5153
  module.exports = __toCommonJS(QCObjects_exports);
5142
5154
  var AssignPolyfill = __toESM(require_assign());
5143
5155
  init_top();
5156
+ init_top();
5144
5157
  init_PrimaryCollections();
5145
5158
  init_DataStringify();
5146
5159
  init_DOMCreateElement();
@@ -6629,6 +6642,7 @@ var QCObjects = __toESM(require_MainProcess());
6629
6642
  __is_raw_class__,
6630
6643
  __make_global__,
6631
6644
  __to_number,
6645
+ __top__,
6632
6646
  _buildComponentsFromElements_,
6633
6647
  _fireAsyncLoad,
6634
6648
  _methods_,