@cloudtower/eagle 0.32.18 → 0.32.20

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.
@@ -59,8 +59,9 @@ var __spreadValues = (a, b) => {
59
59
  return a;
60
60
  };
61
61
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
62
+ const DEFAULT_DURATION = 3;
62
63
  let messageInstance;
63
- let defaultDuration = 3;
64
+ let defaultDuration = DEFAULT_DURATION;
64
65
  let defaultTop;
65
66
  let key = 1;
66
67
  let localPrefixCls = "ant-message";
@@ -168,7 +169,10 @@ function notice(args) {
168
169
  }
169
170
  getRCNotificationInstance(args, ({ prefixCls, instance }) => {
170
171
  instance.notice(
171
- getRCNoticeProps(__spreadProps(__spreadValues({}, args), { key: target, onClose: callback }), prefixCls)
172
+ getRCNoticeProps(
173
+ __spreadProps(__spreadValues({}, args), { key: target, onClose: callback }),
174
+ prefixCls
175
+ )
172
176
  );
173
177
  });
174
178
  });
@@ -212,6 +216,7 @@ function attachTypeApi(originalApi, type) {
212
216
  api.warn = api.warning;
213
217
  var _message = api;
214
218
 
219
+ exports.DEFAULT_DURATION = DEFAULT_DURATION;
215
220
  exports.attachTypeApi = attachTypeApi;
216
221
  exports.default = _message;
217
222
  exports.getKeyThenIncreaseKey = getKeyThenIncreaseKey;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var index = require('../message/index.js');
4
+
3
5
  var __defProp = Object.defineProperty;
4
6
  var __defProps = Object.defineProperties;
5
7
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -137,7 +139,7 @@ function normalizeContent(args, type) {
137
139
  }
138
140
  return {
139
141
  content: c,
140
- duration: typeof args[1] === "number" ? args[1] : 6,
142
+ duration: typeof args[1] === "number" ? args[1] : index.DEFAULT_DURATION,
141
143
  type: type === "warn" ? "warning" : type
142
144
  };
143
145
  }
package/dist/cjs/index.js CHANGED
@@ -223,6 +223,7 @@ exports.usePushModal = index$E.usePushModal;
223
223
  exports.LegacySelect = index$F;
224
224
  exports.Link = index$G;
225
225
  exports.Loading = index$H;
226
+ exports.DEFAULT_DURATION = index$I.DEFAULT_DURATION;
226
227
  exports.attachTypeApi = index$I.attachTypeApi;
227
228
  exports.getKeyThenIncreaseKey = index$I.getKeyThenIncreaseKey;
228
229
  exports.message = index$I.default;