native-document 1.0.132 → 1.0.134

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.
@@ -367,16 +367,16 @@ var NativeComponents = (function (exports) {
367
367
  // });
368
368
  };
369
369
 
370
- let DebugManager$2 = {};
370
+ let DebugManager$1 = {};
371
371
  {
372
- DebugManager$2 = {
372
+ DebugManager$1 = {
373
373
  log() {},
374
374
  warn() {},
375
375
  error() {},
376
376
  disable() {}
377
377
  };
378
378
  }
379
- var DebugManager$1 = DebugManager$2;
379
+ var DebugManager$2 = DebugManager$1;
380
380
 
381
381
  /**
382
382
  *
@@ -858,17 +858,17 @@ var NativeComponents = (function (exports) {
858
858
  const method = methods[name];
859
859
 
860
860
  if (typeof method !== 'function') {
861
- DebugManager$1.warn('NDElement.extend', `"${name}" is not a function, skipping`);
861
+ DebugManager$2.warn('NDElement.extend', `"${name}" is not a function, skipping`);
862
862
  continue;
863
863
  }
864
864
 
865
865
  if (protectedMethods.has(name)) {
866
- DebugManager$1.error('NDElement.extend', `Cannot override protected method "${name}"`);
866
+ DebugManager$2.error('NDElement.extend', `Cannot override protected method "${name}"`);
867
867
  throw new NativeDocumentError(`Cannot override protected method "${name}"`);
868
868
  }
869
869
 
870
870
  if (NDElement.prototype[name]) {
871
- DebugManager$1.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
871
+ DebugManager$2.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
872
872
  }
873
873
 
874
874
  NDElement.prototype[name] = method;
@@ -1093,7 +1093,7 @@ var NativeComponents = (function (exports) {
1093
1093
  }
1094
1094
  }
1095
1095
  if (cleanedCount > 0) {
1096
- DebugManager$1.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
1096
+ DebugManager$2.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
1097
1097
  }
1098
1098
  }
1099
1099
  };
@@ -3949,7 +3949,7 @@ var NativeComponents = (function (exports) {
3949
3949
  const $getStoreOrThrow = (method, name) => {
3950
3950
  const item = $stores.get(name);
3951
3951
  if (!item) {
3952
- DebugManager$1.error('Store', `Store.${method}('${name}') : store not found. Did you call Store.create('${name}') first?`);
3952
+ DebugManager$2.error('Store', `Store.${method}('${name}') : store not found. Did you call Store.create('${name}') first?`);
3953
3953
  throw new NativeDocumentError(
3954
3954
  `Store.${method}('${name}') : store not found.`
3955
3955
  );
@@ -3962,7 +3962,7 @@ var NativeComponents = (function (exports) {
3962
3962
  */
3963
3963
  const $applyReadOnly = (observer, name, context) => {
3964
3964
  const readOnlyError = (method) => () => {
3965
- DebugManager$1.error('Store', `Store.${context}('${name}') is read-only. '${method}()' is not allowed.`);
3965
+ DebugManager$2.error('Store', `Store.${context}('${name}') is read-only. '${method}()' is not allowed.`);
3966
3966
  throw new NativeDocumentError(
3967
3967
  `Store.${context}('${name}') is read-only.`
3968
3968
  );
@@ -3993,7 +3993,7 @@ var NativeComponents = (function (exports) {
3993
3993
  */
3994
3994
  create(name, value) {
3995
3995
  if ($stores.has(name)) {
3996
- DebugManager$1.warn('Store', `Store.create('${name}') : a store with this name already exists. Use Store.get('${name}') to retrieve it.`);
3996
+ DebugManager$2.warn('Store', `Store.create('${name}') : a store with this name already exists. Use Store.get('${name}') to retrieve it.`);
3997
3997
  throw new NativeDocumentError(
3998
3998
  `Store.create('${name}') : a store with this name already exists.`
3999
3999
  );
@@ -4014,7 +4014,7 @@ var NativeComponents = (function (exports) {
4014
4014
  */
4015
4015
  createResettable(name, value) {
4016
4016
  if ($stores.has(name)) {
4017
- DebugManager$1.warn('Store', `Store.createResettable('${name}') : a store with this name already exists.`);
4017
+ DebugManager$2.warn('Store', `Store.createResettable('${name}') : a store with this name already exists.`);
4018
4018
  throw new NativeDocumentError(
4019
4019
  `Store.createResettable('${name}') : a store with this name already exists.`
4020
4020
  );
@@ -4050,7 +4050,7 @@ var NativeComponents = (function (exports) {
4050
4050
  */
4051
4051
  createComposed(name, computation, dependencies) {
4052
4052
  if ($stores.has(name)) {
4053
- DebugManager$1.warn('Store', `Store.createComposed('${name}') : a store with this name already exists.`);
4053
+ DebugManager$2.warn('Store', `Store.createComposed('${name}') : a store with this name already exists.`);
4054
4054
  throw new NativeDocumentError(
4055
4055
  `Store.createComposed('${name}') : a store with this name already exists.`
4056
4056
  );
@@ -4073,7 +4073,7 @@ var NativeComponents = (function (exports) {
4073
4073
  }
4074
4074
  const depItem = $stores.get(depName);
4075
4075
  if (!depItem) {
4076
- DebugManager$1.error('Store', `Store.createComposed('${name}') : dependency '${depName}' not found. Create it first.`);
4076
+ DebugManager$2.error('Store', `Store.createComposed('${name}') : dependency '${depName}' not found. Create it first.`);
4077
4077
  throw new NativeDocumentError(
4078
4078
  `Store.createComposed('${name}') : dependency store '${depName}' not found.`
4079
4079
  );
@@ -4107,13 +4107,13 @@ var NativeComponents = (function (exports) {
4107
4107
  reset(name) {
4108
4108
  const item = $getStoreOrThrow('reset', name);
4109
4109
  if (item.composed) {
4110
- DebugManager$1.error('Store', `Store.reset('${name}') : composed stores cannot be reset. Their value is derived from dependencies.`);
4110
+ DebugManager$2.error('Store', `Store.reset('${name}') : composed stores cannot be reset. Their value is derived from dependencies.`);
4111
4111
  throw new NativeDocumentError(
4112
4112
  `Store.reset('${name}') : composed stores cannot be reset.`
4113
4113
  );
4114
4114
  }
4115
4115
  if (!item.resettable) {
4116
- DebugManager$1.error('Store', `Store.reset('${name}') : this store is not resettable. Use Store.createResettable('${name}', value) instead of Store.create().`);
4116
+ DebugManager$2.error('Store', `Store.reset('${name}') : this store is not resettable. Use Store.createResettable('${name}', value) instead of Store.create().`);
4117
4117
  throw new NativeDocumentError(
4118
4118
  `Store.reset('${name}') : this store is not resettable. Use Store.createResettable('${name}', value) instead of Store.create().`
4119
4119
  );
@@ -4134,7 +4134,7 @@ var NativeComponents = (function (exports) {
4134
4134
  const item = $getStoreOrThrow('use', name);
4135
4135
 
4136
4136
  if (item.composed) {
4137
- DebugManager$1.error('Store', `Store.use('${name}') : composed stores are read-only. Use Store.follow('${name}') instead.`);
4137
+ DebugManager$2.error('Store', `Store.use('${name}') : composed stores are read-only. Use Store.follow('${name}') instead.`);
4138
4138
  throw new NativeDocumentError(
4139
4139
  `Store.use('${name}') : composed stores are read-only. Use Store.follow('${name}') instead.`
4140
4140
  );
@@ -4201,7 +4201,7 @@ var NativeComponents = (function (exports) {
4201
4201
  get(name) {
4202
4202
  const item = $stores.get(name);
4203
4203
  if (!item) {
4204
- DebugManager$1.warn('Store', `Store.get('${name}') : store not found.`);
4204
+ DebugManager$2.warn('Store', `Store.get('${name}') : store not found.`);
4205
4205
  return null;
4206
4206
  }
4207
4207
  return item.observer;
@@ -4223,7 +4223,7 @@ var NativeComponents = (function (exports) {
4223
4223
  delete(name) {
4224
4224
  const item = $stores.get(name);
4225
4225
  if (!item) {
4226
- DebugManager$1.warn('Store', `Store.delete('${name}') : store not found, nothing to delete.`);
4226
+ DebugManager$2.warn('Store', `Store.delete('${name}') : store not found, nothing to delete.`);
4227
4227
  return;
4228
4228
  }
4229
4229
  item.subscribers.forEach(follower => follower.destroy());
@@ -4325,7 +4325,7 @@ var NativeComponents = (function (exports) {
4325
4325
  return undefined;
4326
4326
  },
4327
4327
  set(target, prop, value) {
4328
- DebugManager$1.error('Store', `Forbidden: You cannot overwrite the store key '${String(prop)}'. Use .use('${String(prop)}').set(value) instead.`);
4328
+ DebugManager$2.error('Store', `Forbidden: You cannot overwrite the store key '${String(prop)}'. Use .use('${String(prop)}').set(value) instead.`);
4329
4329
  throw new NativeDocumentError(`Store structure is immutable. Use .set() on the observable.`);
4330
4330
  },
4331
4331
  deleteProperty(target, prop) {
@@ -5515,7 +5515,7 @@ var NativeComponents = (function (exports) {
5515
5515
 
5516
5516
  Badge.preset = function(name, callback) {
5517
5517
  if (Badge.prototype[name] || Badge[name]) {
5518
- DebugManager$1.warn(`Warning: the ${name} method already exists in Badge.`);
5518
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Badge.`);
5519
5519
  return;
5520
5520
  }
5521
5521
  Badge[name] = (content, props) => callback(new Badge(content, props));
@@ -6279,7 +6279,7 @@ var NativeComponents = (function (exports) {
6279
6279
 
6280
6280
  Divider.preset = function(name, callback) {
6281
6281
  if (Divider.prototype[name] || Divider[name]) {
6282
- DebugManager$1.warn(`Warning: the ${name} method already exists in Divider.`);
6282
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Divider.`);
6283
6283
  return;
6284
6284
  }
6285
6285
  Divider[name] = (label, props) => callback(new Divider(label, props));
@@ -10265,7 +10265,7 @@ var NativeComponents = (function (exports) {
10265
10265
 
10266
10266
  Progress.preset = function(name, callback) {
10267
10267
  if (Progress.prototype[name] || Progress[name]) {
10268
- DebugManager$1.warn(`Warning: the ${name} method already exists in Progress.`);
10268
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Progress.`);
10269
10269
  return;
10270
10270
  }
10271
10271
  Progress[name] = (props) => callback(new Progress(props));
@@ -10497,7 +10497,7 @@ var NativeComponents = (function (exports) {
10497
10497
 
10498
10498
  Skeleton.preset = function(name, callback) {
10499
10499
  if (Skeleton.prototype[name] || Skeleton[name]) {
10500
- DebugManager$1.warn(`Warning: the ${name} method already exists in Skeleton.`);
10500
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Skeleton.`);
10501
10501
  return;
10502
10502
  }
10503
10503
  Skeleton[name] = (props) => callback(new Skeleton(props));
@@ -10783,9 +10783,9 @@ var NativeComponents = (function (exports) {
10783
10783
  return this.$build();
10784
10784
  };
10785
10785
 
10786
- function Spinner$1(props = {}) {
10787
- if (!(this instanceof Spinner$1)) {
10788
- return new Spinner$1(props);
10786
+ function Spinner(props = {}) {
10787
+ if (!(this instanceof Spinner)) {
10788
+ return new Spinner(props);
10789
10789
  }
10790
10790
 
10791
10791
  this.$description = {
@@ -10804,43 +10804,45 @@ var NativeComponents = (function (exports) {
10804
10804
  };
10805
10805
  }
10806
10806
 
10807
- Spinner$1.defaultTemplate = null;
10808
- Spinner$1.use = function(template) {
10809
- Spinner$1.defaultTemplate = template.spinner;
10807
+ Spinner.defaultTemplate = null;
10808
+ Spinner.use = function(template) {
10809
+ Spinner.defaultTemplate = template.spinner;
10810
10810
  };
10811
10811
 
10812
- Spinner$1.preset = function(name, callback) {
10813
- if (Spinner$1.prototype[name] || Spinner$1[name]) {
10814
- DebugManager$1.warn(`Warning: the ${name} method already exists in Spinner.`);
10812
+ BaseComponent.extends(Spinner);
10813
+
10814
+ Spinner.preset = function(name, callback) {
10815
+ if (Spinner.prototype[name] || Spinner[name]) {
10816
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Spinner.`);
10815
10817
  return;
10816
10818
  }
10817
- Spinner$1[name] = (props) => callback(new Spinner$1(props));
10819
+ Spinner[name] = (props) => callback(new Spinner(props));
10818
10820
  };
10819
10821
 
10820
- Spinner$1.presets = function(presets) {
10822
+ Spinner.presets = function(presets) {
10821
10823
  for (const name in presets) {
10822
- Spinner$1.preset(name, presets[name]);
10824
+ Spinner.preset(name, presets[name]);
10823
10825
  }
10824
10826
  };
10825
10827
 
10826
- Spinner$1.prototype.type = function(type) {
10828
+ Spinner.prototype.type = function(type) {
10827
10829
  this.$description.type = type;
10828
10830
  return this;
10829
10831
  };
10830
10832
 
10831
- Spinner$1.prototype.circle = function() {
10833
+ Spinner.prototype.circle = function() {
10832
10834
  return this.type('circle');
10833
10835
  };
10834
- Spinner$1.prototype.dots = function() {
10836
+ Spinner.prototype.dots = function() {
10835
10837
  return this.type('dots');
10836
10838
  };
10837
- Spinner$1.prototype.bars = function() {
10839
+ Spinner.prototype.bars = function() {
10838
10840
  return this.type('bars');
10839
10841
  };
10840
- Spinner$1.prototype.pulse = function() {
10842
+ Spinner.prototype.pulse = function() {
10841
10843
  return this.type('pulse');
10842
10844
  };
10843
- Spinner$1.prototype.ring = function() {
10845
+ Spinner.prototype.ring = function() {
10844
10846
  return this.type('ring');
10845
10847
  };
10846
10848
 
@@ -10848,79 +10850,79 @@ var NativeComponents = (function (exports) {
10848
10850
  * @param {string|int} size
10849
10851
  * @returns {Spinner}
10850
10852
  */
10851
- Spinner$1.prototype.size = function(size) {
10853
+ Spinner.prototype.size = function(size) {
10852
10854
  this.$description.size = size;
10853
10855
  return this;
10854
10856
  };
10855
- Spinner$1.prototype.extraSmall = function() {
10857
+ Spinner.prototype.extraSmall = function() {
10856
10858
  return this.size('extra-small');
10857
10859
  };
10858
- Spinner$1.prototype.small = function() {
10860
+ Spinner.prototype.small = function() {
10859
10861
  return this.size('small');
10860
10862
  };
10861
- Spinner$1.prototype.medium = function() {
10863
+ Spinner.prototype.medium = function() {
10862
10864
  return this.size('medium');
10863
10865
  };
10864
- Spinner$1.prototype.large = function() {
10866
+ Spinner.prototype.large = function() {
10865
10867
  return this.size('large');
10866
10868
  };
10867
- Spinner$1.prototype.extraLarge = function() {
10869
+ Spinner.prototype.extraLarge = function() {
10868
10870
  return this.size('extra-large');
10869
10871
  };
10870
10872
 
10871
- Spinner$1.prototype.variant = function(name) {
10873
+ Spinner.prototype.variant = function(name) {
10872
10874
  this.$description.variant = name;
10873
10875
  return this;
10874
10876
  };
10875
- Spinner$1.prototype.primary = function() {
10877
+ Spinner.prototype.primary = function() {
10876
10878
  return this.variant('primary');
10877
10879
  };
10878
- Spinner$1.prototype.secondary = function() {
10880
+ Spinner.prototype.secondary = function() {
10879
10881
  return this.variant('secondary');
10880
10882
  };
10881
- Spinner$1.prototype.success = function() {
10883
+ Spinner.prototype.success = function() {
10882
10884
  return this.variant('success');
10883
10885
  };
10884
- Spinner$1.prototype.danger = function() {
10886
+ Spinner.prototype.danger = function() {
10885
10887
  return this.variant('danger');
10886
10888
  };
10887
- Spinner$1.prototype.warning = function() {
10889
+ Spinner.prototype.warning = function() {
10888
10890
  return this.variant('warning');
10889
10891
  };
10890
- Spinner$1.prototype.color = function(color) {
10892
+ Spinner.prototype.color = function(color) {
10891
10893
  this.$description.color = color;
10892
10894
  return this;
10893
10895
  };
10894
10896
 
10895
- Spinner$1.prototype.label = function(label) {
10897
+ Spinner.prototype.label = function(label) {
10896
10898
  this.$description.label = label;
10897
10899
  return this;
10898
10900
  };
10899
- Spinner$1.prototype.labelPosition = function(position) {
10901
+ Spinner.prototype.labelPosition = function(position) {
10900
10902
  this.$description.labelPosition = position;
10901
10903
  return this;
10902
10904
  };
10903
- Spinner$1.prototype.labelAtTop = function() {
10905
+ Spinner.prototype.labelAtTop = function() {
10904
10906
  return this.labelPosition('top');
10905
10907
  };
10906
- Spinner$1.prototype.labelAtBottom = function() {
10908
+ Spinner.prototype.labelAtBottom = function() {
10907
10909
  return this.labelPosition('bottom');
10908
10910
  };
10909
- Spinner$1.prototype.labelAtLeft = function() {
10911
+ Spinner.prototype.labelAtLeft = function() {
10910
10912
  return this.labelPosition('left');
10911
10913
  };
10912
- Spinner$1.prototype.labelAtRight = function() {
10914
+ Spinner.prototype.labelAtRight = function() {
10913
10915
  return this.labelPosition('right');
10914
10916
  };
10915
10917
 
10916
- Spinner$1.prototype.overlay = function(enabled = true) {
10918
+ Spinner.prototype.overlay = function(enabled = true) {
10917
10919
  this.$description.overlay = enabled;
10918
10920
  return this;
10919
10921
  };
10920
- Spinner$1.prototype.fullscreen = function() {
10922
+ Spinner.prototype.fullscreen = function() {
10921
10923
  return this.overlay(true);
10922
10924
  };
10923
- Spinner$1.prototype.backdrop = function(enabled = true) {
10925
+ Spinner.prototype.backdrop = function(enabled = true) {
10924
10926
  this.$description.backdrop = enabled;
10925
10927
  return this;
10926
10928
  };
@@ -10930,29 +10932,29 @@ var NativeComponents = (function (exports) {
10930
10932
  * @param {string|int} speed
10931
10933
  * @returns {Spinner}
10932
10934
  */
10933
- Spinner$1.prototype.speed = function(speed) {
10935
+ Spinner.prototype.speed = function(speed) {
10934
10936
  this.$description.speed = speed;
10935
10937
  return this;
10936
10938
  };
10937
- Spinner$1.prototype.slow = function() {
10939
+ Spinner.prototype.slow = function() {
10938
10940
  return this.speed('slow');
10939
10941
  };
10940
- Spinner$1.prototype.normal = function() {
10942
+ Spinner.prototype.normal = function() {
10941
10943
  return this.speed('normal');
10942
10944
  };
10943
- Spinner$1.prototype.fast = function() {
10945
+ Spinner.prototype.fast = function() {
10944
10946
  return this.speed('fast');
10945
10947
  };
10946
- Spinner$1.prototype.loading = function(isLoading) {
10948
+ Spinner.prototype.loading = function(isLoading) {
10947
10949
  this.$description.loading = BaseComponent.obs(isLoading);
10948
10950
  return this;
10949
10951
  };
10950
- Spinner$1.prototype.bind = Spinner$1.prototype.loading;
10952
+ Spinner.prototype.bind = Spinner.prototype.loading;
10951
10953
 
10952
- Spinner$1.prototype.show = function() {
10954
+ Spinner.prototype.show = function() {
10953
10955
  this.$description.loading?.set(true);
10954
10956
  };
10955
- Spinner$1.prototype.hide = function() {
10957
+ Spinner.prototype.hide = function() {
10956
10958
  this.$description.loading?.set(false);
10957
10959
  };
10958
10960
 
@@ -12317,9 +12319,9 @@ var NativeComponents = (function (exports) {
12317
12319
  Tooltip.prototype.$build = function() {};
12318
12320
  Tooltip.prototype.toNdElement = function() {};
12319
12321
 
12320
- function Stack(content, props = {}) {
12321
- if (!(this instanceof Stack)) {
12322
- return new Stack(content, props);
12322
+ function Stack$1(content, props = {}) {
12323
+ if (!(this instanceof Stack$1)) {
12324
+ return new Stack$1(content, props);
12323
12325
  }
12324
12326
 
12325
12327
  BaseComponent.call(this, props);
@@ -12334,73 +12336,76 @@ var NativeComponents = (function (exports) {
12334
12336
  };
12335
12337
  }
12336
12338
 
12337
- BaseComponent.extends(Stack);
12339
+ BaseComponent.extends(Stack$1);
12338
12340
 
12339
- Stack.prototype.wrap = function(enabled = true) {
12341
+ Stack$1.prototype.wrap = function(enabled = true) {
12340
12342
  this.$description.wrap = enabled;
12341
12343
  return this;
12342
12344
  };
12343
12345
 
12344
- Stack.prototype.spacing = function(value) {
12346
+ Stack$1.prototype.spacing = function(value) {
12345
12347
  this.$description.spacing = value;
12346
12348
  return this;
12347
12349
  };
12348
12350
 
12349
- Stack.prototype.alignLeading = function() {
12351
+ Stack$1.prototype.alignLeading = function() {
12350
12352
  this.$description.alignment = 'leading';
12351
12353
  return this;
12352
12354
  };
12353
- Stack.prototype.alignCenter = function() {
12355
+ Stack$1.prototype.alignCenter = function() {
12354
12356
  this.$description.alignment = 'center';
12355
12357
  return this;
12356
12358
  };
12357
- Stack.prototype.alignTrailing = function() {
12359
+ Stack$1.prototype.alignTrailing = function() {
12358
12360
  this.$description.alignment = 'trailing';
12359
12361
  return this;
12360
12362
  };
12361
- Stack.prototype.alignStretch = function() {
12363
+ Stack$1.prototype.alignStretch = function() {
12362
12364
  this.$description.alignment = 'stretch';
12363
12365
  return this;
12364
12366
  };
12365
12367
 
12366
- Stack.prototype.justifyStart = function() {
12368
+ Stack$1.prototype.justifyStart = function() {
12367
12369
  this.$description.justifyContent = 'start';
12368
12370
  return this;
12369
12371
  };
12370
- Stack.prototype.justifyCenter = function() {
12372
+ Stack$1.prototype.justifyCenter = function() {
12371
12373
  this.$description.justifyContent = 'center';
12372
12374
  return this;
12373
12375
  };
12374
- Stack.prototype.justifyEnd = function() {
12376
+ Stack$1.prototype.justifyEnd = function() {
12375
12377
  this.$description.justifyContent = 'end';
12376
12378
  return this;
12377
12379
  };
12378
- Stack.prototype.justifyBetween = function() {
12380
+ Stack$1.prototype.justifyBetween = function() {
12379
12381
  this.$description.justifyContent = 'between';
12380
12382
  return this;
12381
12383
  };
12382
- Stack.prototype.justifyAround = function() {
12384
+ Stack$1.prototype.justifyAround = function() {
12383
12385
  this.$description.justifyContent = 'around';
12384
12386
  return this;
12385
12387
  };
12386
12388
 
12387
- Stack.prototype.center = function() {
12389
+ Stack$1.prototype.center = function() {
12388
12390
  this.alignCenter().justifyCenter();
12389
12391
  return this;
12390
12392
  };
12391
12393
 
12392
12394
  function VStack(content, props = {}) {
12393
- if (!(this instanceof VStack)) return new VStack(content, props);
12395
+ if (!(this instanceof VStack)) {
12396
+ return new VStack(content, props);
12397
+ }
12398
+
12399
+ Stack$1.apply(this, [content, props]);
12394
12400
 
12395
- Stack.call(this, content, props);
12396
12401
  this.$description.orientation = 'vertical';
12397
12402
  this.$description.alignment = 'leading';
12398
12403
  }
12399
- Stack.extends(VStack);
12404
+ BaseComponent.extends(VStack, Stack$1);
12400
12405
 
12401
12406
  VStack.preset = function(name, callback) {
12402
12407
  if (VStack.prototype[name] || VStack[name]) {
12403
- DebugManager$1.warn(`Warning: the ${name} method already exists in VStack.`);
12408
+ DebugManager$2.warn(`Warning: the ${name} method already exists in VStack.`);
12404
12409
  return;
12405
12410
  }
12406
12411
  VStack[name] = (content, props) => callback(new VStack(content, props));
@@ -12429,7 +12434,7 @@ var NativeComponents = (function (exports) {
12429
12434
 
12430
12435
  ZStack.preset = function(name, callback) {
12431
12436
  if (ZStack.prototype[name] || ZStack[name]) {
12432
- DebugManager$1.warn(`Warning: the ${name} method already exists in ZStack.`);
12437
+ DebugManager$2.warn(`Warning: the ${name} method already exists in ZStack.`);
12433
12438
  return;
12434
12439
  }
12435
12440
  ZStack[name] = (content, props) => callback(new ZStack(content, props));
@@ -12451,15 +12456,15 @@ var NativeComponents = (function (exports) {
12451
12456
  return new HStack(content, props);
12452
12457
  }
12453
12458
 
12454
- Stack.call(this, content, props);
12459
+ Stack$1.apply(this, [content, props]);
12455
12460
  this.$description.orientation = 'horizontal';
12456
12461
  }
12457
12462
 
12458
- Stack.extends(HStack);
12463
+ BaseComponent.extends(HStack, Stack$1);
12459
12464
 
12460
12465
  HStack.preset = function(name, callback) {
12461
12466
  if (HStack.prototype[name] || HStack[name]) {
12462
- DebugManager$1.warn(`Warning: the ${name} method already exists in HStack.`);
12467
+ DebugManager$2.warn(`Warning: the ${name} method already exists in HStack.`);
12463
12468
  return;
12464
12469
  }
12465
12470
  HStack[name] = (content, props) => callback(new HStack(content, props));
@@ -12528,10 +12533,10 @@ var NativeComponents = (function (exports) {
12528
12533
  exports.SimpleTable = SimpleTable;
12529
12534
  exports.Skeleton = Skeleton;
12530
12535
  exports.Slider = Slider;
12531
- exports.Spinner = Spinner$1;
12536
+ exports.Spinner = Spinner;
12532
12537
  exports.Splitter = Splitter;
12533
12538
  exports.SplitterPanel = SplitterPanel;
12534
- exports.Stack = Stack;
12539
+ exports.Stack = Stack$1;
12535
12540
  exports.Stepper = Stepper;
12536
12541
  exports.StepperStep = StepperStep;
12537
12542
  exports.StringField = StringField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-document",
3
- "version": "1.0.132",
3
+ "version": "1.0.134",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,16 +1,17 @@
1
1
  import Stack from "./Stack";
2
2
  import DebugManager from "../../core/utils/debug-manager";
3
+ import BaseComponent from "../BaseComponent";
3
4
 
4
5
  export default function HStack(content, props = {}) {
5
6
  if (!(this instanceof HStack)) {
6
7
  return new HStack(content, props);
7
8
  }
8
9
 
9
- Stack.call(this, content, props);
10
+ Stack.apply(this, [content, props]);
10
11
  this.$description.orientation = 'horizontal';
11
12
  }
12
13
 
13
- Stack.extends(HStack);
14
+ BaseComponent.extends(HStack, Stack);
14
15
 
15
16
  HStack.preset = function(name, callback) {
16
17
  if (HStack.prototype[name] || HStack[name]) {
@@ -1,15 +1,19 @@
1
1
  import Stack from "./Stack";
2
2
  import DebugManager from "../../core/utils/debug-manager";
3
+ import BaseComponent from "../BaseComponent";
3
4
 
4
5
 
5
6
  export default function VStack(content, props = {}) {
6
- if (!(this instanceof VStack)) return new VStack(content, props);
7
+ if (!(this instanceof VStack)) {
8
+ return new VStack(content, props);
9
+ }
10
+
11
+ Stack.apply(this, [content, props]);
7
12
 
8
- Stack.call(this, content, props);
9
13
  this.$description.orientation = 'vertical';
10
14
  this.$description.alignment = 'leading';
11
15
  }
12
- Stack.extends(VStack);
16
+ BaseComponent.extends(VStack, Stack);
13
17
 
14
18
  VStack.preset = function(name, callback) {
15
19
  if (VStack.prototype[name] || VStack[name]) {
@@ -27,6 +27,8 @@ Spinner.use = function(template) {
27
27
  Spinner.defaultTemplate = template.spinner;
28
28
  };
29
29
 
30
+ BaseComponent.extends(Spinner);
31
+
30
32
  Spinner.preset = function(name, callback) {
31
33
  if (Spinner.prototype[name] || Spinner[name]) {
32
34
  DebugManager.warn(`Warning: the ${name} method already exists in Spinner.`);