@yh-ui/components 1.0.44 → 1.0.45

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.
@@ -128,12 +128,12 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
128
128
  readonly error: string;
129
129
  readonly required: boolean;
130
130
  readonly rules: FormRule | FormRule[];
131
+ readonly validateStatus: ValidateStatus;
131
132
  readonly labelWidth: string | number;
132
133
  readonly showMessage: boolean;
133
134
  readonly prop: string;
134
135
  readonly validateTrigger: string | string[];
135
136
  readonly errorPosition: "left" | "center" | "right";
136
- readonly validateStatus: ValidateStatus;
137
137
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
138
138
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
139
139
  export default _default;
@@ -128,12 +128,12 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
128
128
  readonly error: string;
129
129
  readonly required: boolean;
130
130
  readonly rules: FormRule | FormRule[];
131
+ readonly validateStatus: ValidateStatus;
131
132
  readonly labelWidth: string | number;
132
133
  readonly showMessage: boolean;
133
134
  readonly prop: string;
134
135
  readonly validateTrigger: string | string[];
135
136
  readonly errorPosition: "left" | "center" | "right";
136
- readonly validateStatus: ValidateStatus;
137
137
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
138
138
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
139
139
  export default _default;
@@ -21,6 +21,18 @@ Object.keys(_message).forEach(function (key) {
21
21
  }
22
22
  });
23
23
  });
24
+ var _useMessage = require("./src/use-message.cjs");
25
+ Object.keys(_useMessage).forEach(function (key) {
26
+ if (key === "default" || key === "__esModule") return;
27
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
28
+ if (key in exports && exports[key] === _useMessage[key]) return;
29
+ Object.defineProperty(exports, key, {
30
+ enumerable: true,
31
+ get: function () {
32
+ return _useMessage[key];
33
+ }
34
+ });
35
+ });
24
36
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
25
37
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
38
  const YhMessage = exports.YhMessage = (0, _utils.withInstallFunction)(_method.default, "$message");
@@ -1,6 +1,7 @@
1
1
  export declare const YhMessage: import("@yh-ui/utils").SFCWithInstall<import("./src/message").MessageFn>;
2
2
  export default YhMessage;
3
3
  export * from './src/message';
4
+ export * from './src/use-message';
4
5
  export type YhMessageProps = import('./src/message').MessageProps;
5
6
  export type YhMessageEmits = import('./src/message').MessageEmits;
6
7
  export type YhMessageSlots = import('./src/message').MessageSlots;
@@ -7,3 +7,4 @@ YhMessage.install = (app) => {
7
7
  };
8
8
  export default YhMessage;
9
9
  export * from "./src/message.mjs";
10
+ export * from "./src/use-message.mjs";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMessage = useMessage;
7
+ var _index = _interopRequireDefault(require("../index.cjs"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ function useMessage() {
10
+ return _index.default;
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { MessageFn } from './message';
2
+ /**
3
+ * 获取全局 Message 服务实例。
4
+ * 无需注入,直接返回全局单例 API,与 `YhMessage` 完全等价。
5
+ */
6
+ export declare function useMessage(): MessageFn;
@@ -0,0 +1,4 @@
1
+ import YhMessage from "../index.mjs";
2
+ export function useMessage() {
3
+ return YhMessage;
4
+ }
@@ -22,6 +22,18 @@ Object.keys(_messageBox2).forEach(function (key) {
22
22
  }
23
23
  });
24
24
  });
25
+ var _useMessageBox = require("./src/use-message-box.cjs");
26
+ Object.keys(_useMessageBox).forEach(function (key) {
27
+ if (key === "default" || key === "__esModule") return;
28
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
29
+ if (key in exports && exports[key] === _useMessageBox[key]) return;
30
+ Object.defineProperty(exports, key, {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _useMessageBox[key];
34
+ }
35
+ });
36
+ });
25
37
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
26
38
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
39
  const YhMessageBox = exports.YhMessageBox = (0, _utils.withInstallFunction)(_method.default, "$msgbox");
@@ -2,6 +2,7 @@ import './src/message-box.css';
2
2
  export declare const YhMessageBox: import("@yh-ui/utils").SFCWithInstall<import("./src/message-box").MessageBoxHandler>;
3
3
  export default YhMessageBox;
4
4
  export * from './src/message-box';
5
+ export * from './src/use-message-box';
5
6
  export type YhMessageBoxType = import('./src/message-box').MessageBoxType;
6
7
  export type YhMessageBoxData = import('./src/message-box').MessageBoxData;
7
8
  export type YhMessageBoxAction = import('./src/message-box').MessageBoxAction;
@@ -14,3 +14,4 @@ YhMessageBox.install = (app) => {
14
14
  };
15
15
  export default YhMessageBox;
16
16
  export * from "./src/message-box.mjs";
17
+ export * from "./src/use-message-box.mjs";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMessageBox = useMessageBox;
7
+ var _index = _interopRequireDefault(require("../index.cjs"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ function useMessageBox() {
10
+ return _index.default;
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { MessageBoxHandler } from './message-box';
2
+ /**
3
+ * 获取全局 MessageBox 服务实例。
4
+ * 无需注入,直接返回全局单例 API,与 `YhMessageBox` 完全等价。
5
+ */
6
+ export declare function useMessageBox(): MessageBoxHandler;
@@ -0,0 +1,4 @@
1
+ import YhMessageBox from "../index.mjs";
2
+ export function useMessageBox() {
3
+ return YhMessageBox;
4
+ }
@@ -21,6 +21,18 @@ Object.keys(_notification).forEach(function (key) {
21
21
  }
22
22
  });
23
23
  });
24
+ var _useNotification = require("./src/use-notification.cjs");
25
+ Object.keys(_useNotification).forEach(function (key) {
26
+ if (key === "default" || key === "__esModule") return;
27
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
28
+ if (key in exports && exports[key] === _useNotification[key]) return;
29
+ Object.defineProperty(exports, key, {
30
+ enumerable: true,
31
+ get: function () {
32
+ return _useNotification[key];
33
+ }
34
+ });
35
+ });
24
36
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
25
37
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
38
  const YhNotification = exports.YhNotification = (0, _utils.withInstallFunction)(_method.default, "$notify");
@@ -1,6 +1,7 @@
1
1
  export declare const YhNotification: import("@yh-ui/utils").SFCWithInstall<import("./src/notification").NotificationFn>;
2
2
  export default YhNotification;
3
3
  export * from './src/notification';
4
+ export * from './src/use-notification';
4
5
  export type YhNotificationProps = import('./src/notification').NotificationProps;
5
6
  export type YhNotificationEmits = import('./src/notification').NotificationEmits;
6
7
  export type YhNotificationSlots = import('./src/notification').NotificationSlots;
@@ -7,3 +7,4 @@ YhNotification.install = (app) => {
7
7
  };
8
8
  export default YhNotification;
9
9
  export * from "./src/notification.mjs";
10
+ export * from "./src/use-notification.mjs";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useNotification = useNotification;
7
+ var _index = _interopRequireDefault(require("../index.cjs"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ function useNotification() {
10
+ return _index.default;
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { NotificationFn } from './notification';
2
+ /**
3
+ * 获取全局 Notification 服务实例。
4
+ * 无需注入,直接返回全局单例 API,与 `YhNotification` 完全等价。
5
+ */
6
+ export declare function useNotification(): NotificationFn;
@@ -0,0 +1,4 @@
1
+ import YhNotification from "../index.mjs";
2
+ export function useNotification() {
3
+ return YhNotification;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yh-ui/components",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "YH-UI Vue 3 Components",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -50,10 +50,10 @@
50
50
  "dependencies": {
51
51
  "@webcontainer/api": "^1.6.1",
52
52
  "@floating-ui/dom": "^1.7.4",
53
- "@yh-ui/hooks": "^1.0.44",
54
- "@yh-ui/locale": "^1.0.44",
55
- "@yh-ui/theme": "^1.0.44",
56
- "@yh-ui/utils": "^1.0.44",
53
+ "@yh-ui/hooks": "^1.0.45",
54
+ "@yh-ui/locale": "^1.0.45",
55
+ "@yh-ui/theme": "^1.0.45",
56
+ "@yh-ui/utils": "^1.0.45",
57
57
  "async-validator": "^4.2.5",
58
58
  "dayjs": "^1.11.19",
59
59
  "dompurify": "^3.3.3"