@cyberpunk-vue/components 1.7.4 → 1.7.6

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
- * CpNotification 赛博朋克风格通知提醒
2
+ * CpNotification 组件式用法
3
3
  *
4
- * 用于在页面角落显示全局通知消息,支持多种类型、位置和变体。
4
+ * 用于在模板中使用 v-model 控制通知显隐。
5
5
  *
6
6
  * @example
7
7
  * ```vue
@@ -13,14 +13,17 @@
13
13
  * />
14
14
  * ```
15
15
  *
16
- * @see {@link NotificationProps} 查看所有可用属性
17
- *
18
16
  * @slot default - 自定义消息内容
19
17
  * @slot title - 自定义标题
20
18
  * @slot icon - 自定义图标
19
+ * @slot actions - 操作区按钮
21
20
  */
22
21
  export declare const CpNotification: import('../utils').SFCWithInstall<{
23
22
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
23
+ readonly id: {
24
+ readonly type: StringConstructor;
25
+ readonly default: "";
26
+ };
24
27
  readonly modelValue: {
25
28
  readonly type: BooleanConstructor;
26
29
  readonly default: false;
@@ -30,7 +33,7 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
30
33
  readonly default: "";
31
34
  };
32
35
  readonly message: {
33
- readonly type: StringConstructor;
36
+ readonly type: import('vue').PropType<string | import('vue').VNode | (() => import('vue').VNode)>;
34
37
  readonly default: "";
35
38
  };
36
39
  readonly dangerouslyUseHTMLString: {
@@ -97,7 +100,20 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
97
100
  readonly type: NumberConstructor;
98
101
  readonly default: 300;
99
102
  };
103
+ readonly selectable: {
104
+ readonly type: BooleanConstructor;
105
+ readonly default: false;
106
+ };
107
+ readonly _verticalOffset: {
108
+ readonly type: NumberConstructor;
109
+ readonly default: undefined;
110
+ };
111
+ readonly onClose: {
112
+ readonly type: import('vue').PropType<() => void>;
113
+ readonly default: undefined;
114
+ };
100
115
  }>> & Readonly<{
116
+ onClick?: (() => any) | undefined;
101
117
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
102
118
  onClose?: (() => any) | undefined;
103
119
  onDestroy?: (() => any) | undefined;
@@ -105,6 +121,7 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
105
121
  close: () => void;
106
122
  visible: import('vue').Ref<boolean, boolean>;
107
123
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
124
+ click: () => void;
108
125
  "update:modelValue": (value: boolean) => void;
109
126
  close: () => void;
110
127
  destroy: () => void;
@@ -124,10 +141,16 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
124
141
  readonly borderColor: string;
125
142
  readonly offset: number;
126
143
  readonly bgColor: string;
127
- readonly message: string;
144
+ readonly selectable: boolean;
145
+ readonly onClose: () => void;
146
+ readonly message: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
147
+ [key: string]: any;
148
+ }> | (() => import('vue').VNode);
128
149
  readonly showClose: boolean;
129
150
  readonly titleColor: string;
151
+ readonly id: string;
130
152
  readonly dangerouslyUseHTMLString: boolean;
153
+ readonly _verticalOffset: number;
131
154
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
132
155
  P: {};
133
156
  B: {};
@@ -136,6 +159,10 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
136
159
  M: {};
137
160
  Defaults: {};
138
161
  }, Readonly<import('vue').ExtractPropTypes<{
162
+ readonly id: {
163
+ readonly type: StringConstructor;
164
+ readonly default: "";
165
+ };
139
166
  readonly modelValue: {
140
167
  readonly type: BooleanConstructor;
141
168
  readonly default: false;
@@ -145,7 +172,7 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
145
172
  readonly default: "";
146
173
  };
147
174
  readonly message: {
148
- readonly type: StringConstructor;
175
+ readonly type: import('vue').PropType<string | import('vue').VNode | (() => import('vue').VNode)>;
149
176
  readonly default: "";
150
177
  };
151
178
  readonly dangerouslyUseHTMLString: {
@@ -212,7 +239,20 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
212
239
  readonly type: NumberConstructor;
213
240
  readonly default: 300;
214
241
  };
242
+ readonly selectable: {
243
+ readonly type: BooleanConstructor;
244
+ readonly default: false;
245
+ };
246
+ readonly _verticalOffset: {
247
+ readonly type: NumberConstructor;
248
+ readonly default: undefined;
249
+ };
250
+ readonly onClose: {
251
+ readonly type: import('vue').PropType<() => void>;
252
+ readonly default: undefined;
253
+ };
215
254
  }>> & Readonly<{
255
+ onClick?: (() => any) | undefined;
216
256
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
217
257
  onClose?: (() => any) | undefined;
218
258
  onDestroy?: (() => any) | undefined;
@@ -235,15 +275,25 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
235
275
  readonly borderColor: string;
236
276
  readonly offset: number;
237
277
  readonly bgColor: string;
238
- readonly message: string;
278
+ readonly selectable: boolean;
279
+ readonly onClose: () => void;
280
+ readonly message: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
281
+ [key: string]: any;
282
+ }> | (() => import('vue').VNode);
239
283
  readonly showClose: boolean;
240
284
  readonly titleColor: string;
285
+ readonly id: string;
241
286
  readonly dangerouslyUseHTMLString: boolean;
287
+ readonly _verticalOffset: number;
242
288
  }>;
243
289
  __isFragment?: never;
244
290
  __isTeleport?: never;
245
291
  __isSuspense?: never;
246
292
  } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
293
+ readonly id: {
294
+ readonly type: StringConstructor;
295
+ readonly default: "";
296
+ };
247
297
  readonly modelValue: {
248
298
  readonly type: BooleanConstructor;
249
299
  readonly default: false;
@@ -253,7 +303,7 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
253
303
  readonly default: "";
254
304
  };
255
305
  readonly message: {
256
- readonly type: StringConstructor;
306
+ readonly type: import('vue').PropType<string | import('vue').VNode | (() => import('vue').VNode)>;
257
307
  readonly default: "";
258
308
  };
259
309
  readonly dangerouslyUseHTMLString: {
@@ -320,7 +370,20 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
320
370
  readonly type: NumberConstructor;
321
371
  readonly default: 300;
322
372
  };
373
+ readonly selectable: {
374
+ readonly type: BooleanConstructor;
375
+ readonly default: false;
376
+ };
377
+ readonly _verticalOffset: {
378
+ readonly type: NumberConstructor;
379
+ readonly default: undefined;
380
+ };
381
+ readonly onClose: {
382
+ readonly type: import('vue').PropType<() => void>;
383
+ readonly default: undefined;
384
+ };
323
385
  }>> & Readonly<{
386
+ onClick?: (() => any) | undefined;
324
387
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
325
388
  onClose?: (() => any) | undefined;
326
389
  onDestroy?: (() => any) | undefined;
@@ -328,6 +391,7 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
328
391
  close: () => void;
329
392
  visible: import('vue').Ref<boolean, boolean>;
330
393
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
394
+ click: () => void;
331
395
  "update:modelValue": (value: boolean) => void;
332
396
  close: () => void;
333
397
  destroy: () => void;
@@ -347,17 +411,41 @@ export declare const CpNotification: import('../utils').SFCWithInstall<{
347
411
  readonly borderColor: string;
348
412
  readonly offset: number;
349
413
  readonly bgColor: string;
350
- readonly message: string;
414
+ readonly selectable: boolean;
415
+ readonly onClose: () => void;
416
+ readonly message: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
417
+ [key: string]: any;
418
+ }> | (() => import('vue').VNode);
351
419
  readonly showClose: boolean;
352
420
  readonly titleColor: string;
421
+ readonly id: string;
353
422
  readonly dangerouslyUseHTMLString: boolean;
423
+ readonly _verticalOffset: number;
354
424
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
355
425
  $slots: {
356
426
  icon?(_: {}): any;
427
+ icon?(_: {}): any;
428
+ title?(_: {}): any;
357
429
  title?(_: {}): any;
358
430
  default?(_: {}): any;
431
+ default?(_: {}): any;
432
+ actions?(_: {}): any;
433
+ actions?(_: {}): any;
359
434
  };
360
435
  })>;
436
+ /**
437
+ * CpNotify 函数式调用
438
+ *
439
+ * @example
440
+ * ```ts
441
+ * import { CpNotify } from '@cyberpunk-vue/components'
442
+ *
443
+ * CpNotify({ title: '系统通知', message: '数据同步完成', type: 'success' })
444
+ * CpNotify.success({ title: 'Done', message: '保存成功!' })
445
+ * CpNotify.closeAll()
446
+ * ```
447
+ */
448
+ export declare const CpNotify: import('../utils').SFCWithInstall<import('.').Notify>;
361
449
  export default CpNotification;
362
450
  export * from './src/notification';
363
451
  export type { NotificationInstance } from './src/instance';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../notification/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4B,CAAA;AACvD,eAAe,cAAc,CAAA;AAE7B,cAAc,oBAAoB,CAAA;AAClC,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../notification/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4B,CAAA;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,8EAAyC,CAAA;AAE9D,eAAe,cAAc,CAAA;AAE7B,cAAc,oBAAoB,CAAA;AAClC,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ExtractPropTypes, PropType } from 'vue';
1
+ import { AppContext, ExtractPropTypes, PropType, VNode } from 'vue';
2
2
  /**
3
3
  * 通知位置
4
4
  * - `top-right` — 右上角(默认)
@@ -25,6 +25,10 @@ export type NotificationShape = 'clip' | 'no-clip' | 'round';
25
25
  * 通知主题色
26
26
  */
27
27
  export type NotificationType = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
28
+ /**
29
+ * 通知类型快捷方法列表
30
+ */
31
+ export declare const notificationTypes: readonly ["success", "warning", "error", "info", "primary"];
28
32
  /**
29
33
  * CpNotification Props 定义
30
34
  *
@@ -44,8 +48,17 @@ export type NotificationType = 'default' | 'primary' | 'success' | 'warning' | '
44
48
  * - `default` — 自定义消息内容(覆盖 message)
45
49
  * - `title` — 自定义标题内容
46
50
  * - `icon` — 自定义图标
51
+ * - `actions` — 操作区按钮
47
52
  */
48
53
  export declare const notificationProps: {
54
+ /**
55
+ * 通知实例 ID(函数式调用时自动生成)
56
+ * @internal
57
+ */
58
+ readonly id: {
59
+ readonly type: StringConstructor;
60
+ readonly default: "";
61
+ };
49
62
  /**
50
63
  * 是否显示通知 (v-model)
51
64
  * @default false
@@ -63,11 +76,11 @@ export declare const notificationProps: {
63
76
  readonly default: "";
64
77
  };
65
78
  /**
66
- * 通知消息文本
79
+ * 通知消息文本,支持字符串、VNode 或返回 VNode 的函数
67
80
  * @default ''
68
81
  */
69
82
  readonly message: {
70
- readonly type: StringConstructor;
83
+ readonly type: PropType<string | VNode | (() => VNode)>;
71
84
  readonly default: "";
72
85
  };
73
86
  /**
@@ -193,6 +206,30 @@ export declare const notificationProps: {
193
206
  readonly type: NumberConstructor;
194
207
  readonly default: 300;
195
208
  };
209
+ /**
210
+ * 是否允许选中消息文本
211
+ * @default false
212
+ */
213
+ readonly selectable: {
214
+ readonly type: BooleanConstructor;
215
+ readonly default: false;
216
+ };
217
+ /**
218
+ * 内部垂直偏移(函数式调用时由 notify.ts 管理)
219
+ * @internal
220
+ */
221
+ readonly _verticalOffset: {
222
+ readonly type: NumberConstructor;
223
+ readonly default: undefined;
224
+ };
225
+ /**
226
+ * 关闭时回调(函数式调用内部使用)
227
+ * @internal
228
+ */
229
+ readonly onClose: {
230
+ readonly type: PropType<() => void>;
231
+ readonly default: undefined;
232
+ };
196
233
  };
197
234
  export type NotificationProps = ExtractPropTypes<typeof notificationProps>;
198
235
  /**
@@ -205,6 +242,61 @@ export declare const notificationEmits: {
205
242
  close: () => boolean;
206
243
  /** 关闭动画结束后触发(DOM 即将销毁) */
207
244
  destroy: () => boolean;
245
+ /** 点击通知区域时触发(不包括关闭按钮和操作区) */
246
+ click: () => boolean;
208
247
  };
209
248
  export type NotificationEmits = typeof notificationEmits;
249
+ /**
250
+ * 函数式调用选项
251
+ */
252
+ export type NotificationOptions = Partial<Omit<NotificationProps, 'id' | 'onClose' | '_verticalOffset'>> & {
253
+ /** 挂载的目标元素 */
254
+ appendTo?: HTMLElement | string;
255
+ /** 关闭时回调 */
256
+ onClose?: (vm: VNode) => void;
257
+ /** 点击通知时触发的回调 */
258
+ onClick?: () => void;
259
+ /**
260
+ * 堆叠模式
261
+ * - `false` (默认) 不堆叠,同位置通知重叠在同一位置
262
+ * - `true` / `'vertical'` 垂直堆叠,多个通知完整排列
263
+ * - `'overlap'` 重叠堆叠,新通知覆盖上一个,仅露出一小部分
264
+ */
265
+ stacking?: boolean | 'vertical' | 'overlap';
266
+ };
267
+ /** 不含 type 的选项(用于快捷方法) */
268
+ export type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>;
269
+ /** 函数式调用返回的句柄 */
270
+ export interface NotificationHandle {
271
+ close: () => void;
272
+ }
273
+ /** 函数式调用参数 */
274
+ export type NotificationParams = Partial<NotificationOptions> | string | VNode;
275
+ export type NotificationParamsTyped = Partial<NotificationOptionsTyped> | string | VNode;
276
+ /** notify 函数签名 */
277
+ export interface NotifyFn {
278
+ (options?: NotificationParams, appContext?: null | AppContext): NotificationHandle;
279
+ closeAll(): void;
280
+ _context: AppContext | null;
281
+ }
282
+ /** 快捷方法函数签名 */
283
+ export type NotifyTypedFn = (options?: NotificationParamsTyped, appContext?: null | AppContext) => NotificationHandle;
284
+ /** 完整 Notify 接口 */
285
+ export interface Notify extends NotifyFn {
286
+ success: NotifyTypedFn;
287
+ warning: NotifyTypedFn;
288
+ error: NotifyTypedFn;
289
+ info: NotifyTypedFn;
290
+ primary: NotifyTypedFn;
291
+ }
292
+ /** 通知队列项 */
293
+ export interface NotificationQueueItem {
294
+ vm: VNode;
295
+ /** 实际 DOM 元素引用 */
296
+ el: HTMLElement;
297
+ /** 堆叠模式 */
298
+ stacking: false | 'vertical' | 'overlap';
299
+ }
300
+ /** 通知队列 */
301
+ export type NotificationQueue = NotificationQueueItem[];
210
302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B;AAED,cAAc;AACd,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG,MAAM,GAAG,KAAK,CAAA;AAC9E,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,GAAG,MAAM,GAAG,KAAK,CAAA;AAExF,kBAAkB;AAClB,MAAM,WAAW,QAAQ;IACvB,CAAC,OAAO,CAAC,EAAE,kBAAkB,EAAE,UAAU,CAAC,EAAE,IAAI,GAAG,UAAU,GAAG,kBAAkB,CAAA;IAClF,QAAQ,IAAI,IAAI,CAAA;IAChB,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAA;CAC5B;AAED,eAAe;AACf,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,CAAC,EAAE,uBAAuB,EACjC,UAAU,CAAC,EAAE,IAAI,GAAG,UAAU,KAC3B,kBAAkB,CAAA;AAEvB,mBAAmB;AACnB,MAAM,WAAW,MAAO,SAAQ,QAAQ;IACtC,OAAO,EAAE,aAAa,CAAA;IACtB,OAAO,EAAE,aAAa,CAAA;IACtB,KAAK,EAAE,aAAa,CAAA;IACpB,IAAI,EAAE,aAAa,CAAA;IACnB,OAAO,EAAE,aAAa,CAAA;CACvB;AAED,YAAY;AACZ,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,KAAK,CAAA;IACT,kBAAkB;IAClB,EAAE,EAAE,WAAW,CAAA;IACf,WAAW;IACX,QAAQ,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAA;CACzC;AAED,WAAW;AACX,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,EAAE,CAAA"}
@@ -1,15 +1,25 @@
1
+ import { VNode } from 'vue';
1
2
  declare function __VLS_template(): {
2
3
  attrs: Partial<{}>;
3
4
  slots: {
4
5
  icon?(_: {}): any;
6
+ icon?(_: {}): any;
7
+ title?(_: {}): any;
5
8
  title?(_: {}): any;
6
9
  default?(_: {}): any;
10
+ default?(_: {}): any;
11
+ actions?(_: {}): any;
12
+ actions?(_: {}): any;
7
13
  };
8
14
  refs: {};
9
15
  rootEl: any;
10
16
  };
11
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
18
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
19
+ readonly id: {
20
+ readonly type: StringConstructor;
21
+ readonly default: "";
22
+ };
13
23
  readonly modelValue: {
14
24
  readonly type: BooleanConstructor;
15
25
  readonly default: false;
@@ -19,7 +29,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
19
29
  readonly default: "";
20
30
  };
21
31
  readonly message: {
22
- readonly type: StringConstructor;
32
+ readonly type: import('vue').PropType<string | VNode | (() => VNode)>;
23
33
  readonly default: "";
24
34
  };
25
35
  readonly dangerouslyUseHTMLString: {
@@ -86,16 +96,33 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
86
96
  readonly type: NumberConstructor;
87
97
  readonly default: 300;
88
98
  };
99
+ readonly selectable: {
100
+ readonly type: BooleanConstructor;
101
+ readonly default: false;
102
+ };
103
+ readonly _verticalOffset: {
104
+ readonly type: NumberConstructor;
105
+ readonly default: undefined;
106
+ };
107
+ readonly onClose: {
108
+ readonly type: import('vue').PropType<() => void>;
109
+ readonly default: undefined;
110
+ };
89
111
  }>, {
90
112
  /** @description 关闭通知 */
91
113
  close: () => void;
92
114
  /** @description 当前是否可见 */
93
115
  visible: import('vue').Ref<boolean, boolean>;
94
116
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
117
+ click: () => void;
95
118
  "update:modelValue": (value: boolean) => void;
96
119
  close: () => void;
97
120
  destroy: () => void;
98
121
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
122
+ readonly id: {
123
+ readonly type: StringConstructor;
124
+ readonly default: "";
125
+ };
99
126
  readonly modelValue: {
100
127
  readonly type: BooleanConstructor;
101
128
  readonly default: false;
@@ -105,7 +132,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
105
132
  readonly default: "";
106
133
  };
107
134
  readonly message: {
108
- readonly type: StringConstructor;
135
+ readonly type: import('vue').PropType<string | VNode | (() => VNode)>;
109
136
  readonly default: "";
110
137
  };
111
138
  readonly dangerouslyUseHTMLString: {
@@ -172,7 +199,20 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
172
199
  readonly type: NumberConstructor;
173
200
  readonly default: 300;
174
201
  };
202
+ readonly selectable: {
203
+ readonly type: BooleanConstructor;
204
+ readonly default: false;
205
+ };
206
+ readonly _verticalOffset: {
207
+ readonly type: NumberConstructor;
208
+ readonly default: undefined;
209
+ };
210
+ readonly onClose: {
211
+ readonly type: import('vue').PropType<() => void>;
212
+ readonly default: undefined;
213
+ };
175
214
  }>> & Readonly<{
215
+ onClick?: (() => any) | undefined;
176
216
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
177
217
  onClose?: (() => any) | undefined;
178
218
  onDestroy?: (() => any) | undefined;
@@ -192,10 +232,16 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
192
232
  readonly borderColor: string;
193
233
  readonly offset: number;
194
234
  readonly bgColor: string;
195
- readonly message: string;
235
+ readonly selectable: boolean;
236
+ readonly onClose: () => void;
237
+ readonly message: string | VNode<import('vue').RendererNode, import('vue').RendererElement, {
238
+ [key: string]: any;
239
+ }> | (() => VNode);
196
240
  readonly showClose: boolean;
197
241
  readonly titleColor: string;
242
+ readonly id: string;
198
243
  readonly dangerouslyUseHTMLString: boolean;
244
+ readonly _verticalOffset: number;
199
245
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
200
246
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
201
247
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"notification.vue.d.ts","sourceRoot":"","sources":["../../../notification/src/notification.vue"],"names":[],"mappings":"AAueA,iBAAS,cAAc;WAsIT,OAAO,IAA6B;;sBAbvB,GAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAiV1B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { VNode } from 'vue';
2
+ import { NotificationPosition, Notify } from './notification';
3
+ /**
4
+ * 关闭指定通知并调整后续通知的偏移
5
+ */
6
+ export declare function close(id: string, position: NotificationPosition, userOnClose?: (vm: VNode) => void): void;
7
+ /**
8
+ * 关闭所有通知
9
+ */
10
+ export declare function closeAll(): void;
11
+ declare const _default: Notify;
12
+ export default _default;
13
+ //# sourceMappingURL=notify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../notification/src/notify.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAO,KAAK,EAAE,MAAM,KAAK,CAAA;AACrC,OAAO,KAAK,EACV,oBAAoB,EAEpB,MAAM,EAGP,MAAM,gBAAgB,CAAA;AA8IvB;;GAEG;AACH,wBAAgB,KAAK,CACnB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,oBAAoB,EAC9B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,KAAK,IAAI,GAChC,IAAI,CAmCN;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,IAAI,CAW/B;wBAKwB,MAAM;AAA/B,wBAA+B"}
@@ -4,4 +4,10 @@ export type SFCWithInstall<T> = T & Plugin;
4
4
  * 为组件添加 install 方法,使其可以通过 app.use() 注册
5
5
  */
6
6
  export declare function withInstall<T extends Component>(component: T): SFCWithInstall<T>;
7
+ /**
8
+ * 为函数式组件添加 install 方法,挂载至 app.config.globalProperties
9
+ * @param fn 函数式调用入口
10
+ * @param name globalProperties 上的属性名,如 '$notify'
11
+ */
12
+ export declare function withInstallFunction<T>(fn: T, name: string): SFCWithInstall<T>;
7
13
  //# sourceMappingURL=install.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../utils/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEjD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA;AAE1C;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAShF"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../utils/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEjD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA;AAE1C;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAShF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,CAK7E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberpunk-vue/components",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "Cyberpunk Vue components - A futuristic Vue 3 component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -23,9 +23,9 @@
23
23
  "vue": "^3.5.0"
24
24
  },
25
25
  "dependencies": {
26
- "@cyberpunk-vue/hooks": "1.7.4",
27
- "@cyberpunk-vue/constants": "1.7.4",
28
- "@cyberpunk-vue/theme-chalk": "1.7.4"
26
+ "@cyberpunk-vue/constants": "1.7.6",
27
+ "@cyberpunk-vue/hooks": "1.7.6",
28
+ "@cyberpunk-vue/theme-chalk": "1.7.6"
29
29
  },
30
30
  "author": "Juxest",
31
31
  "license": "MIT",