@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 +2 -14
- package/dist/index.d.ts +2 -14
- package/dist/index.js +5 -10
- package/dist/index.mjs +5 -10
- package/package.json +1 -1
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):
|
|
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,
|
|
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):
|
|
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,
|
|
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
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|