native-document 1.0.78 → 1.0.79

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.
@@ -256,16 +256,16 @@ var NativeComponents = (function (exports) {
256
256
  return this.$build();
257
257
  };
258
258
 
259
- let DebugManager$1 = {};
259
+ let DebugManager = {};
260
260
  {
261
- DebugManager$1 = {
261
+ DebugManager = {
262
262
  log() {},
263
263
  warn() {},
264
264
  error() {},
265
265
  disable() {}
266
266
  };
267
267
  }
268
- var DebugManager = DebugManager$1;
268
+ var DebugManager$1 = DebugManager;
269
269
 
270
270
  const MemoryManager = (function() {
271
271
 
@@ -314,7 +314,7 @@ var NativeComponents = (function (exports) {
314
314
  }
315
315
  }
316
316
  if (cleanedCount > 0) {
317
- DebugManager.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
317
+ DebugManager$1.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
318
318
  }
319
319
  }
320
320
  };
@@ -428,7 +428,7 @@ var NativeComponents = (function (exports) {
428
428
  try{
429
429
  callback.call(plugin, ...data);
430
430
  } catch (error) {
431
- DebugManager.error('Plugin Manager', `Error in plugin ${plugin.$name} for event ${eventName}`, error);
431
+ DebugManager$1.error('Plugin Manager', `Error in plugin ${plugin.$name} for event ${eventName}`, error);
432
432
  }
433
433
  }
434
434
  }
@@ -732,7 +732,7 @@ var NativeComponents = (function (exports) {
732
732
  ObservableItem.prototype.subscribe = function(callback, target = null) {
733
733
  this.$listeners = this.$listeners ?? [];
734
734
  if (this.$isCleanedUp) {
735
- DebugManager.warn('Observable subscription', '⚠️ Attempted to subscribe to a cleaned up observable.');
735
+ DebugManager$1.warn('Observable subscription', '⚠️ Attempted to subscribe to a cleaned up observable.');
736
736
  return () => {};
737
737
  }
738
738
  if (typeof callback !== 'function') {
@@ -1108,17 +1108,17 @@ var NativeComponents = (function (exports) {
1108
1108
  const method = methods[name];
1109
1109
 
1110
1110
  if (typeof method !== 'function') {
1111
- DebugManager.warn('NDElement.extend', `"${name}" is not a function, skipping`);
1111
+ DebugManager$1.warn('NDElement.extend', `"${name}" is not a function, skipping`);
1112
1112
  continue;
1113
1113
  }
1114
1114
 
1115
1115
  if (protectedMethods.has(name)) {
1116
- DebugManager.error('NDElement.extend', `Cannot override protected method "${name}"`);
1116
+ DebugManager$1.error('NDElement.extend', `Cannot override protected method "${name}"`);
1117
1117
  throw new NativeDocumentError(`Cannot override protected method "${name}"`);
1118
1118
  }
1119
1119
 
1120
1120
  if (NDElement.prototype[name]) {
1121
- DebugManager.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
1121
+ DebugManager$1.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
1122
1122
  }
1123
1123
 
1124
1124
  NDElement.prototype[name] = method;
@@ -1308,7 +1308,7 @@ var NativeComponents = (function (exports) {
1308
1308
  anchorFragment.appendChild = function(child, before = null) {
1309
1309
  const parent = anchorEnd.parentNode;
1310
1310
  if(!parent) {
1311
- DebugManager.error('Anchor', 'Anchor : parent not found', child);
1311
+ DebugManager$1.error('Anchor', 'Anchor : parent not found', child);
1312
1312
  return;
1313
1313
  }
1314
1314
  before = before ?? anchorEnd;
@@ -2168,8 +2168,6 @@ var NativeComponents = (function (exports) {
2168
2168
  return createHtmlElement.bind(null, name.toLowerCase(), customWrapper);
2169
2169
  }
2170
2170
 
2171
- w;
2172
-
2173
2171
  Function.prototype.args = function(...args) {
2174
2172
  return withValidation(this);
2175
2173
  };
@@ -1,10 +1,10 @@
1
1
  var NativeDocument = (function (exports) {
2
2
  'use strict';
3
3
 
4
- let DebugManager = {};
4
+ let DebugManager$1 = {};
5
5
 
6
6
  {
7
- DebugManager = {
7
+ DebugManager$1 = {
8
8
  enabled: false,
9
9
 
10
10
  enable() {
@@ -35,7 +35,7 @@ var NativeDocument = (function (exports) {
35
35
  };
36
36
 
37
37
  }
38
- var DebugManager$1 = DebugManager;
38
+ var DebugManager = DebugManager$1;
39
39
 
40
40
  const MemoryManager = (function() {
41
41
 
@@ -84,7 +84,7 @@ var NativeDocument = (function (exports) {
84
84
  }
85
85
  }
86
86
  if (cleanedCount > 0) {
87
- DebugManager$1.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
87
+ DebugManager.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
88
88
  }
89
89
  }
90
90
  };
@@ -207,7 +207,7 @@ var NativeDocument = (function (exports) {
207
207
  try{
208
208
  callback.call(plugin, ...data);
209
209
  } catch (error) {
210
- DebugManager$1.error('Plugin Manager', `Error in plugin ${plugin.$name} for event ${eventName}`, error);
210
+ DebugManager.error('Plugin Manager', `Error in plugin ${plugin.$name} for event ${eventName}`, error);
211
211
  }
212
212
  }
213
213
  }
@@ -506,7 +506,7 @@ var NativeDocument = (function (exports) {
506
506
  ObservableItem.prototype.subscribe = function(callback, target = null) {
507
507
  this.$listeners = this.$listeners ?? [];
508
508
  if (this.$isCleanedUp) {
509
- DebugManager$1.warn('Observable subscription', '⚠️ Attempted to subscribe to a cleaned up observable.');
509
+ DebugManager.warn('Observable subscription', '⚠️ Attempted to subscribe to a cleaned up observable.');
510
510
  return () => {};
511
511
  }
512
512
  if (typeof callback !== 'function') {
@@ -859,7 +859,7 @@ var NativeDocument = (function (exports) {
859
859
  }
860
860
  {
861
861
  if (this[name] && !this.$localExtensions.has(name)) {
862
- DebugManager$1.warn('NDElement.extend', `Method "${name}" already exists and will be overwritten`);
862
+ DebugManager.warn('NDElement.extend', `Method "${name}" already exists and will be overwritten`);
863
863
  }
864
864
  this.$localExtensions.set(name, method);
865
865
  }
@@ -893,17 +893,17 @@ var NativeDocument = (function (exports) {
893
893
  const method = methods[name];
894
894
 
895
895
  if (typeof method !== 'function') {
896
- DebugManager$1.warn('NDElement.extend', `"${name}" is not a function, skipping`);
896
+ DebugManager.warn('NDElement.extend', `"${name}" is not a function, skipping`);
897
897
  continue;
898
898
  }
899
899
 
900
900
  if (protectedMethods.has(name)) {
901
- DebugManager$1.error('NDElement.extend', `Cannot override protected method "${name}"`);
901
+ DebugManager.error('NDElement.extend', `Cannot override protected method "${name}"`);
902
902
  throw new NativeDocumentError(`Cannot override protected method "${name}"`);
903
903
  }
904
904
 
905
905
  if (NDElement.prototype[name]) {
906
- DebugManager$1.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
906
+ DebugManager.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
907
907
  }
908
908
 
909
909
  NDElement.prototype[name] = method;
@@ -1062,7 +1062,7 @@ var NativeDocument = (function (exports) {
1062
1062
  const foundReserved = Object.keys(attributes).filter(key => reserved.includes(key));
1063
1063
 
1064
1064
  if (foundReserved.length > 0) {
1065
- DebugManager$1.warn('Validator', `Reserved attributes found: ${foundReserved.join(', ')}`);
1065
+ DebugManager.warn('Validator', `Reserved attributes found: ${foundReserved.join(', ')}`);
1066
1066
  }
1067
1067
 
1068
1068
  return attributes;
@@ -1110,7 +1110,7 @@ var NativeDocument = (function (exports) {
1110
1110
  anchorFragment.appendChild = function(child, before = null) {
1111
1111
  const parent = anchorEnd.parentNode;
1112
1112
  if(!parent) {
1113
- DebugManager$1.error('Anchor', 'Anchor : parent not found', child);
1113
+ DebugManager.error('Anchor', 'Anchor : parent not found', child);
1114
1114
  return;
1115
1115
  }
1116
1116
  before = before ?? anchorEnd;
@@ -2310,7 +2310,6 @@ var NativeDocument = (function (exports) {
2310
2310
  return wrapper([_, __, ...args]);
2311
2311
  };
2312
2312
  }
2313
- w;
2314
2313
 
2315
2314
  function SingletonView($viewCreator) {
2316
2315
  let $cacheNode = null;
@@ -3435,7 +3434,7 @@ var NativeDocument = (function (exports) {
3435
3434
  }
3436
3435
  cache.set(keyId, { keyId, isNew: true, child: new WeakRef(child), indexObserver});
3437
3436
  } catch (e) {
3438
- DebugManager$1.error('ForEach', `Error creating element for key ${keyId}` , e);
3437
+ DebugManager.error('ForEach', `Error creating element for key ${keyId}` , e);
3439
3438
  throw e;
3440
3439
  }
3441
3440
  return keyId;
@@ -3781,7 +3780,7 @@ var NativeDocument = (function (exports) {
3781
3780
  */
3782
3781
  const ShowIf = function(condition, child, { comment = null, shouldKeepInCache = true} = {}) {
3783
3782
  if(!(Validator.isObservable(condition)) && !Validator.isObservableWhenResult(condition)) {
3784
- return DebugManager$1.warn('ShowIf', "ShowIf : condition must be an Observable / "+comment, condition);
3783
+ return DebugManager.warn('ShowIf', "ShowIf : condition must be an Observable / "+comment, condition);
3785
3784
  }
3786
3785
  const element = Anchor('Show if : '+(comment || ''));
3787
3786
 
@@ -4568,7 +4567,7 @@ var NativeDocument = (function (exports) {
4568
4567
  window.history.pushState({ name: route.name(), params, path}, route.name() || path , path);
4569
4568
  this.handleRouteChange(route, params, query, path);
4570
4569
  } catch (e) {
4571
- DebugManager$1.error('HistoryRouter', 'Error in pushState', e);
4570
+ DebugManager.error('HistoryRouter', 'Error in pushState', e);
4572
4571
  }
4573
4572
  };
4574
4573
  /**
@@ -4581,7 +4580,7 @@ var NativeDocument = (function (exports) {
4581
4580
  window.history.replaceState({ name: route.name(), params, path}, route.name() || path , path);
4582
4581
  this.handleRouteChange(route, params, {}, path);
4583
4582
  } catch(e) {
4584
- DebugManager$1.error('HistoryRouter', 'Error in replaceState', e);
4583
+ DebugManager.error('HistoryRouter', 'Error in replaceState', e);
4585
4584
  }
4586
4585
  };
4587
4586
  this.forward = function() {
@@ -4608,7 +4607,7 @@ var NativeDocument = (function (exports) {
4608
4607
  }
4609
4608
  this.handleRouteChange(route, params, query, path);
4610
4609
  } catch(e) {
4611
- DebugManager$1.error('HistoryRouter', 'Error in popstate event', e);
4610
+ DebugManager.error('HistoryRouter', 'Error in popstate event', e);
4612
4611
  }
4613
4612
  });
4614
4613
  const { route, params, query, path } = this.resolve(defaultPath || (window.location.pathname+window.location.search));
@@ -4771,7 +4770,7 @@ var NativeDocument = (function (exports) {
4771
4770
  listener(request);
4772
4771
  next && next(request);
4773
4772
  } catch (e) {
4774
- DebugManager$1.warn('Route Listener', 'Error in listener:', e);
4773
+ DebugManager.warn('Route Listener', 'Error in listener:', e);
4775
4774
  }
4776
4775
  }
4777
4776
  };
@@ -4930,7 +4929,7 @@ var NativeDocument = (function (exports) {
4930
4929
  */
4931
4930
  Router.create = function(options, callback) {
4932
4931
  if(!Validator.isFunction(callback)) {
4933
- DebugManager$1.error('Router', 'Callback must be a function', e);
4932
+ DebugManager.error('Router', 'Callback must be a function', e);
4934
4933
  throw new RouterError('Callback must be a function');
4935
4934
  }
4936
4935
  const router = new Router(options);