@hlw-uni-mp/use 1.1.1 → 1.1.3

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.
package/dist/index.d.mts CHANGED
@@ -12,12 +12,10 @@ interface ToastRes {
12
12
  /** 模态弹窗配置 */
13
13
  modalOptions?: UniApp.ShowModalOptions;
14
14
  }
15
-
16
15
  /**
17
16
  * 提示回调函数类型 (confirm 为 true 表示确定,false 为取消)
18
17
  */
19
18
  type ToastCallback = (confirm: boolean) => void;
20
-
21
19
  /**
22
20
  * 消息门面体
23
21
  */
@@ -37,7 +35,6 @@ interface HlwMsg {
37
35
  /** 标题进度条 */
38
36
  setLoadingBar(progress: number): void;
39
37
  }
40
-
41
38
  /**
42
39
  * 统一的消息提示与弹窗能力 hook。
43
40
  *
@@ -206,15 +203,6 @@ interface ShareConfig {
206
203
  /** 分享卡片封面图 */
207
204
  imageUrl?: string;
208
205
  }
209
-
210
- /**
211
- * 分享操作句柄
212
- */
213
- interface ShareHandlers {
214
- /** 显式调起分享菜单 */
215
- showShareMenu: () => void;
216
- }
217
-
218
206
  /**
219
207
  * 显式调起分享菜单
220
208
  */
@@ -222,7 +210,7 @@ declare function showShareMenu(): void;
222
210
  /**
223
211
  * 分享组合式函数
224
212
  */
225
- declare function useShare(config?: ShareConfig): ShareHandlers;
213
+ declare function useShare(config?: ShareConfig): void;
226
214
 
227
215
  /**
228
216
  * useRefs - 模板 Ref 批量管理
@@ -256,4 +244,4 @@ interface UseRefsReturn<T = unknown> {
256
244
  */
257
245
  declare function useRefs<T = unknown>(): UseRefsReturn<T>;
258
246
 
259
- export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, type ShareHandlers, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type ToastRes, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, hlw, initTheme, showShareMenu, useMsg, useRefs, useShare, useTheme, useThemeStore };
247
+ export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type ToastRes, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, hlw, initTheme, showShareMenu, useMsg, useRefs, useShare, useTheme, useThemeStore };
package/dist/index.d.ts CHANGED
@@ -12,12 +12,10 @@ interface ToastRes {
12
12
  /** 模态弹窗配置 */
13
13
  modalOptions?: UniApp.ShowModalOptions;
14
14
  }
15
-
16
15
  /**
17
16
  * 提示回调函数类型 (confirm 为 true 表示确定,false 为取消)
18
17
  */
19
18
  type ToastCallback = (confirm: boolean) => void;
20
-
21
19
  /**
22
20
  * 消息门面体
23
21
  */
@@ -37,7 +35,6 @@ interface HlwMsg {
37
35
  /** 标题进度条 */
38
36
  setLoadingBar(progress: number): void;
39
37
  }
40
-
41
38
  /**
42
39
  * 统一的消息提示与弹窗能力 hook。
43
40
  *
@@ -206,15 +203,6 @@ interface ShareConfig {
206
203
  /** 分享卡片封面图 */
207
204
  imageUrl?: string;
208
205
  }
209
-
210
- /**
211
- * 分享操作句柄
212
- */
213
- interface ShareHandlers {
214
- /** 显式调起分享菜单 */
215
- showShareMenu: () => void;
216
- }
217
-
218
206
  /**
219
207
  * 显式调起分享菜单
220
208
  */
@@ -222,7 +210,7 @@ declare function showShareMenu(): void;
222
210
  /**
223
211
  * 分享组合式函数
224
212
  */
225
- declare function useShare(config?: ShareConfig): ShareHandlers;
213
+ declare function useShare(config?: ShareConfig): void;
226
214
 
227
215
  /**
228
216
  * useRefs - 模板 Ref 批量管理
@@ -256,4 +244,4 @@ interface UseRefsReturn<T = unknown> {
256
244
  */
257
245
  declare function useRefs<T = unknown>(): UseRefsReturn<T>;
258
246
 
259
- export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, type ShareHandlers, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type ToastRes, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, hlw, initTheme, showShareMenu, useMsg, useRefs, useShare, useTheme, useThemeStore };
247
+ export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type HlwInstance, type HlwMsg, type InitThemeOptions, type ShareConfig, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type ToastCallback, type ToastRes, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, hlw, initTheme, showShareMenu, useMsg, useRefs, useShare, useTheme, useThemeStore };
package/dist/index.js CHANGED
@@ -318,16 +318,11 @@ function showShareMenu() {
318
318
  function useShare(config = {}) {
319
319
  showShareMenu();
320
320
  (0, import_uni_app.onShareAppMessage)(() => ({ ...config }));
321
- (0, import_uni_app.onShareTimeline)(() => {
322
- return {
323
- title: config.title,
324
- query: config.path?.split("?")[1],
325
- imageUrl: config.imageUrl
326
- };
327
- });
328
- return {
329
- showShareMenu
330
- };
321
+ (0, import_uni_app.onShareTimeline)(() => ({
322
+ title: config.title,
323
+ query: config.path?.split("?")[1],
324
+ imageUrl: config.imageUrl
325
+ }));
331
326
  }
332
327
 
333
328
  // src/refs/index.ts
package/dist/index.mjs CHANGED
@@ -279,16 +279,11 @@ function showShareMenu() {
279
279
  function useShare(config = {}) {
280
280
  showShareMenu();
281
281
  onShareAppMessage(() => ({ ...config }));
282
- onShareTimeline(() => {
283
- return {
284
- title: config.title,
285
- query: config.path?.split("?")[1],
286
- imageUrl: config.imageUrl
287
- };
288
- });
289
- return {
290
- showShareMenu
291
- };
282
+ onShareTimeline(() => ({
283
+ title: config.title,
284
+ query: config.path?.split("?")[1],
285
+ imageUrl: config.imageUrl
286
+ }));
292
287
  }
293
288
 
294
289
  // src/refs/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni-mp/use",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Universal Uni-App Vue 3 stateful composables library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",