@hlw-uni-mp/use 1.1.4 → 1.1.5

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
@@ -134,26 +134,6 @@ declare function useTheme(): {
134
134
  }, {}, {}>;
135
135
  };
136
136
 
137
- /**
138
- * 分享卡片配置项
139
- */
140
- interface ShareConfig {
141
- /** 分享标题 */
142
- title?: string;
143
- /** 分享页面路径 */
144
- path?: string;
145
- /** 分享卡片封面图 */
146
- imageUrl?: string;
147
- }
148
- /**
149
- * 显式调起分享菜单
150
- */
151
- declare function showShareMenu(): void;
152
- /**
153
- * 分享组合式函数
154
- */
155
- declare function useShare(config?: ShareConfig): void;
156
-
157
137
  /**
158
138
  * useRefs - 模板 Ref 批量管理
159
139
  *
@@ -186,4 +166,4 @@ interface UseRefsReturn<T = unknown> {
186
166
  */
187
167
  declare function useRefs<T = unknown>(): UseRefsReturn<T>;
188
168
 
189
- export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type InitThemeOptions, type ShareConfig, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, initTheme, showShareMenu, useRefs, useShare, useTheme, useThemeStore };
169
+ export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type InitThemeOptions, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, initTheme, useRefs, useTheme, useThemeStore };
package/dist/index.d.ts CHANGED
@@ -134,26 +134,6 @@ declare function useTheme(): {
134
134
  }, {}, {}>;
135
135
  };
136
136
 
137
- /**
138
- * 分享卡片配置项
139
- */
140
- interface ShareConfig {
141
- /** 分享标题 */
142
- title?: string;
143
- /** 分享页面路径 */
144
- path?: string;
145
- /** 分享卡片封面图 */
146
- imageUrl?: string;
147
- }
148
- /**
149
- * 显式调起分享菜单
150
- */
151
- declare function showShareMenu(): void;
152
- /**
153
- * 分享组合式函数
154
- */
155
- declare function useShare(config?: ShareConfig): void;
156
-
157
137
  /**
158
138
  * useRefs - 模板 Ref 批量管理
159
139
  *
@@ -186,4 +166,4 @@ interface UseRefsReturn<T = unknown> {
186
166
  */
187
167
  declare function useRefs<T = unknown>(): UseRefsReturn<T>;
188
168
 
189
- export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type InitThemeOptions, type ShareConfig, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, initTheme, showShareMenu, useRefs, useShare, useTheme, useThemeStore };
169
+ export { DEFAULT_THEME, type FontFamily, type FontFamilyPreset, type FontSize, type FontSizePreset, type InitThemeOptions, THEME_COLORS, type ThemeColor, type ThemeMode, type ThemeState, type UseRefsReturn, applyTheme, fontFamilyPresets, fontSizePresets, getTheme, initTheme, useRefs, useTheme, useThemeStore };
package/dist/index.js CHANGED
@@ -27,9 +27,7 @@ __export(index_exports, {
27
27
  fontSizePresets: () => fontSizePresets,
28
28
  getTheme: () => getTheme,
29
29
  initTheme: () => initTheme,
30
- showShareMenu: () => showShareMenu,
31
30
  useRefs: () => useRefs,
32
- useShare: () => useShare,
33
31
  useTheme: () => useTheme,
34
32
  useThemeStore: () => useThemeStore
35
33
  });
@@ -201,24 +199,6 @@ function useTheme() {
201
199
  };
202
200
  }
203
201
 
204
- // src/share/index.ts
205
- var import_uni_app = require("@dcloudio/uni-app");
206
- function showShareMenu() {
207
- uni.showShareMenu({
208
- withShareTicket: true,
209
- menus: ["shareAppMessage", "shareTimeline"]
210
- });
211
- }
212
- function useShare(config = {}) {
213
- showShareMenu();
214
- (0, import_uni_app.onShareAppMessage)(() => ({ ...config }));
215
- (0, import_uni_app.onShareTimeline)(() => ({
216
- title: config.title,
217
- query: config.path?.split("?")[1],
218
- imageUrl: config.imageUrl
219
- }));
220
- }
221
-
222
202
  // src/refs/index.ts
223
203
  var import_vue2 = require("vue");
224
204
  function useRefs() {
@@ -243,9 +223,7 @@ function useRefs() {
243
223
  fontSizePresets,
244
224
  getTheme,
245
225
  initTheme,
246
- showShareMenu,
247
226
  useRefs,
248
- useShare,
249
227
  useTheme,
250
228
  useThemeStore
251
229
  });
package/dist/index.mjs CHANGED
@@ -164,24 +164,6 @@ function useTheme() {
164
164
  };
165
165
  }
166
166
 
167
- // src/share/index.ts
168
- import { onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
169
- function showShareMenu() {
170
- uni.showShareMenu({
171
- withShareTicket: true,
172
- menus: ["shareAppMessage", "shareTimeline"]
173
- });
174
- }
175
- function useShare(config = {}) {
176
- showShareMenu();
177
- onShareAppMessage(() => ({ ...config }));
178
- onShareTimeline(() => ({
179
- title: config.title,
180
- query: config.path?.split("?")[1],
181
- imageUrl: config.imageUrl
182
- }));
183
- }
184
-
185
167
  // src/refs/index.ts
186
168
  import { ref, onBeforeUpdate, onUnmounted } from "vue";
187
169
  function useRefs() {
@@ -205,9 +187,7 @@ export {
205
187
  fontSizePresets,
206
188
  getTheme,
207
189
  initTheme,
208
- showShareMenu,
209
190
  useRefs,
210
- useShare,
211
191
  useTheme,
212
192
  useThemeStore
213
193
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni-mp/use",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Universal Uni-App Vue 3 stateful composables library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",