@cloudtower/eagle 0.32.19 → 0.32.21

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.
@@ -26,8 +26,9 @@ var __spreadValues = (a, b) => {
26
26
  return a;
27
27
  };
28
28
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
29
+ const DEFAULT_DURATION = 3;
29
30
  let messageInstance;
30
- let defaultDuration = 3;
31
+ let defaultDuration = DEFAULT_DURATION;
31
32
  let defaultTop;
32
33
  let key = 1;
33
34
  let localPrefixCls = "ant-message";
@@ -135,7 +136,10 @@ function notice(args) {
135
136
  }
136
137
  getRCNotificationInstance(args, ({ prefixCls, instance }) => {
137
138
  instance.notice(
138
- getRCNoticeProps(__spreadProps(__spreadValues({}, args), { key: target, onClose: callback }), prefixCls)
139
+ getRCNoticeProps(
140
+ __spreadProps(__spreadValues({}, args), { key: target, onClose: callback }),
141
+ prefixCls
142
+ )
139
143
  );
140
144
  });
141
145
  });
@@ -179,4 +183,4 @@ function attachTypeApi(originalApi, type) {
179
183
  api.warn = api.warning;
180
184
  var _message = api;
181
185
 
182
- export { attachTypeApi, _message as default, getKeyThenIncreaseKey };
186
+ export { DEFAULT_DURATION, attachTypeApi, _message as default, getKeyThenIncreaseKey };
@@ -1,3 +1,5 @@
1
+ import { DEFAULT_DURATION } from '../message/index.js';
2
+
1
3
  var __defProp = Object.defineProperty;
2
4
  var __defProps = Object.defineProperties;
3
5
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -135,7 +137,7 @@ function normalizeContent(args, type) {
135
137
  }
136
138
  return {
137
139
  content: c,
138
- duration: typeof args[1] === "number" ? args[1] : 6,
140
+ duration: typeof args[1] === "number" ? args[1] : DEFAULT_DURATION,
139
141
  type: type === "warn" ? "warning" : type
140
142
  };
141
143
  }
package/dist/esm/index.js CHANGED
@@ -47,7 +47,7 @@ export { default as KitStoreProvider, useCloseModal, useKitDispatch, useKitSelec
47
47
  export { default as LegacySelect } from './core/LegacySelect/index.js';
48
48
  export { default as Link } from './core/Link/index.js';
49
49
  export { default as Loading } from './core/Loading/index.js';
50
- export { attachTypeApi, getKeyThenIncreaseKey, default as message } from './core/message/index.js';
50
+ export { DEFAULT_DURATION, attachTypeApi, getKeyThenIncreaseKey, default as message } from './core/message/index.js';
51
51
  export { default as Metric } from './core/Metric/index.js';
52
52
  export { default as Modal } from './core/Modal/index.js';
53
53
  export { default as ModalStack } from './core/ModalStack/index.js';