zcw-shared 1.20.0 → 1.21.0
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/functions/array-object/deepClone.d.ts +12 -0
- package/dist/functions/array-object/deepClone.js +131 -0
- package/dist/functions/array-object/deepClone.js.map +1 -0
- package/dist/functions/array-object/flatten.d.ts +7 -0
- package/dist/functions/array-object/flatten.js +60 -0
- package/dist/functions/array-object/flatten.js.map +1 -0
- package/dist/functions/array-object/unique.d.ts +10 -0
- package/dist/functions/array-object/unique.js +85 -0
- package/dist/functions/array-object/unique.js.map +1 -0
- package/dist/functions/data-structures/Heap.d.ts +11 -0
- package/dist/functions/data-structures/Heap.js +91 -0
- package/dist/functions/data-structures/Heap.js.map +1 -0
- package/dist/functions/data-structures/LinkedList.d.ts +18 -0
- package/dist/functions/data-structures/LinkedList.js +135 -0
- package/dist/functions/data-structures/LinkedList.js.map +1 -0
- package/dist/functions/data-structures/PriorityQueue.d.ts +14 -0
- package/dist/functions/data-structures/PriorityQueue.js +77 -0
- package/dist/functions/data-structures/PriorityQueue.js.map +1 -0
- package/dist/functions/data-structures/Queue.d.ts +10 -0
- package/dist/functions/data-structures/Queue.js +27 -0
- package/dist/functions/data-structures/Queue.js.map +1 -0
- package/dist/functions/data-structures/Stack.d.ts +10 -0
- package/dist/functions/data-structures/Stack.js +27 -0
- package/dist/functions/data-structures/Stack.js.map +1 -0
- package/dist/functions/design-tokens/buildTokens.d.ts +76 -0
- package/dist/functions/design-tokens/buildTokens.js +183 -0
- package/dist/functions/design-tokens/buildTokens.js.map +1 -0
- package/dist/functions/design-tokens/generateVariables.d.ts +7 -0
- package/dist/functions/design-tokens/generateVariables.js +135 -0
- package/dist/functions/design-tokens/generateVariables.js.map +1 -0
- package/dist/functions/design-tokens/mixColors.d.ts +1 -0
- package/dist/functions/design-tokens/mixColors.js +38 -0
- package/dist/functions/design-tokens/mixColors.js.map +1 -0
- package/dist/functions/design-tokens/parseDesignTokens.d.ts +10 -0
- package/dist/functions/design-tokens/parseDesignTokens.js +216 -0
- package/dist/functions/design-tokens/parseDesignTokens.js.map +1 -0
- package/dist/functions/functional/compose.d.ts +1 -0
- package/dist/functions/functional/compose.js +10 -0
- package/dist/functions/functional/compose.js.map +1 -0
- package/dist/functions/functional/curry.d.ts +1 -0
- package/dist/functions/functional/curry.js +13 -0
- package/dist/functions/functional/curry.js.map +1 -0
- package/dist/functions/functional/pipe.d.ts +1 -0
- package/dist/functions/functional/pipe.js +10 -0
- package/dist/functions/functional/pipe.js.map +1 -0
- package/dist/functions/performance/debounce.d.ts +5 -0
- package/dist/functions/performance/debounce.js +12 -0
- package/dist/functions/performance/debounce.js.map +1 -0
- package/dist/functions/performance/memoize.d.ts +1 -0
- package/dist/functions/performance/memoize.js +13 -0
- package/dist/functions/performance/memoize.js.map +1 -0
- package/dist/functions/performance/throttle.d.ts +1 -0
- package/dist/functions/performance/throttle.js +11 -0
- package/dist/functions/performance/throttle.js.map +1 -0
- package/dist/functions/platform/tencent-cloud/deploy.tcb.d.ts +13 -0
- package/dist/functions/platform/tencent-cloud/deploy.tcb.js +46 -0
- package/dist/functions/platform/tencent-cloud/deploy.tcb.js.map +1 -0
- package/dist/functions/platform/tencent-cloud/getSecret.d.ts +4 -0
- package/dist/functions/platform/tencent-cloud/getSecret.js +19 -0
- package/dist/functions/platform/tencent-cloud/getSecret.js.map +1 -0
- package/dist/functions/platform/uniapp/app-plus/buildAndroidApp.d.ts +27 -0
- package/dist/functions/platform/uniapp/app-plus/buildAndroidApp.js +287 -0
- package/dist/functions/platform/uniapp/app-plus/buildAndroidApp.js.map +1 -0
- package/dist/functions/platform/uniapp/build.d.ts +21 -0
- package/dist/functions/platform/uniapp/build.js +83 -0
- package/dist/functions/platform/uniapp/build.js.map +1 -0
- package/dist/functions/platform/uniapp/detectAndroidProjectStructure.d.ts +11 -0
- package/dist/functions/platform/uniapp/detectAndroidProjectStructure.js +30 -0
- package/dist/functions/platform/uniapp/detectAndroidProjectStructure.js.map +1 -0
- package/dist/functions/platform/uniapp/detectProjectType.d.ts +20 -0
- package/dist/functions/platform/uniapp/detectProjectType.js +68 -0
- package/dist/functions/platform/uniapp/detectProjectType.js.map +1 -0
- package/dist/functions/platform/uniapp/parseManifest.d.ts +18 -0
- package/dist/functions/platform/uniapp/parseManifest.js +49 -0
- package/dist/functions/platform/uniapp/parseManifest.js.map +1 -0
- package/dist/functions/platform/uniapp/waitForPages.d.ts +7 -0
- package/dist/functions/platform/uniapp/waitForPages.js +20 -0
- package/dist/functions/platform/uniapp/waitForPages.js.map +1 -0
- package/dist/functions/principles/functionBind.d.ts +4 -0
- package/dist/functions/principles/functionBind.js +33 -0
- package/dist/functions/principles/functionBind.js.map +1 -0
- package/dist/functions/principles/myInstanceof.d.ts +5 -0
- package/dist/functions/principles/myInstanceof.js +56 -0
- package/dist/functions/principles/myInstanceof.js.map +1 -0
- package/dist/functions/principles/myNew.d.ts +3 -0
- package/dist/functions/principles/myNew.js +19 -0
- package/dist/functions/principles/myNew.js.map +1 -0
- package/dist/functions/utils/createI18n.d.ts +2 -0
- package/dist/functions/utils/createI18n.js +97 -0
- package/dist/functions/utils/createI18n.js.map +1 -0
- package/dist/functions/utils/createReactive.d.ts +10 -0
- package/dist/functions/utils/createReactive.js +50 -0
- package/dist/functions/utils/createReactive.js.map +1 -0
- package/dist/functions/utils/diff.d.ts +25 -0
- package/dist/functions/utils/diff.js +316 -0
- package/dist/functions/utils/diff.js.map +1 -0
- package/dist/functions/utils/formatString.d.ts +5 -0
- package/dist/functions/utils/formatString.js +9 -0
- package/dist/functions/utils/formatString.js.map +1 -0
- package/dist/functions/utils/i18n.d.ts +27 -0
- package/dist/functions/utils/i18n.js +119 -0
- package/dist/functions/utils/i18n.js.map +1 -0
- package/dist/functions/utils/permission.d.ts +40 -0
- package/dist/functions/utils/permission.js +189 -0
- package/dist/functions/utils/permission.js.map +1 -0
- package/dist/functions/utils/pinia.d.ts +52 -0
- package/dist/functions/utils/pinia.js +183 -0
- package/dist/functions/utils/pinia.js.map +1 -0
- package/dist/hooks/usePermission.d.ts +7 -0
- package/dist/hooks/usePermission.js +123 -0
- package/dist/hooks/usePermission.js.map +1 -0
- package/package.json +12 -2
- package/references/xlsx.d.ts +51 -0
- package/types/reactive.d.ts +67 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XLSX 库类型声明
|
|
3
|
+
* 用于 Excel 文件读取和解析
|
|
4
|
+
* 与 import type { XLSXLibrary } from '...' 兼容
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface WorkBook {
|
|
8
|
+
/** 工作表名称数组 */
|
|
9
|
+
SheetNames: string[]
|
|
10
|
+
/** 工作表对象映射 */
|
|
11
|
+
Sheets: { [sheetName: string]: WorkSheet }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface WorkSheet {
|
|
15
|
+
[cellRef: string]: CellObject
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CellObject {
|
|
19
|
+
/** 单元格值 */
|
|
20
|
+
v?: string | number | boolean | Date
|
|
21
|
+
/** 值类型 */
|
|
22
|
+
t?: 's' | 'n' | 'b' | 'd'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface XLSXUtils {
|
|
26
|
+
/** 将工作表转换为 JSON 数组 */
|
|
27
|
+
sheet_to_json(sheet: WorkSheet, options?: { header: number }): any[][]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface XLSXLibrary {
|
|
31
|
+
/** 读取 Excel 文件 */
|
|
32
|
+
readFile(filePath: string): WorkBook
|
|
33
|
+
/** 读取文件缓冲区 */
|
|
34
|
+
read(buffer: Buffer, options?: any): WorkBook
|
|
35
|
+
/** 全局工具对象 */
|
|
36
|
+
utils: XLSXUtils
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* XLSX 库默认导出
|
|
41
|
+
* 兼容 import * as XLSX from 'xlsx' 的使用
|
|
42
|
+
*/
|
|
43
|
+
declare module 'xlsx' {
|
|
44
|
+
export = XLSXLibrary
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 全局类型声明
|
|
49
|
+
* 兼容 import type { XLSXLibrary } from '../../../references/xlsx.d'
|
|
50
|
+
*/
|
|
51
|
+
export type XLSX = XLSXLibrary
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 响应式依赖接口
|
|
3
|
+
* 定义响应式对象支持的订阅和通知方法
|
|
4
|
+
*/
|
|
5
|
+
export interface ReactiveDeps {
|
|
6
|
+
/** 订阅者管理:存储所有监听器 */
|
|
7
|
+
subscribers: Set<(...args: any[]) => void>
|
|
8
|
+
|
|
9
|
+
/** 通知所有订阅者 */
|
|
10
|
+
notify: () => void
|
|
11
|
+
|
|
12
|
+
/** 订阅变化监听器 */
|
|
13
|
+
subscribe: (listener: () => void) => () => void
|
|
14
|
+
|
|
15
|
+
/** 取消所有订阅 */
|
|
16
|
+
dispose: () => void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 响应式对象类型
|
|
21
|
+
* 扩展原始对象类型,添加响应式方法
|
|
22
|
+
*/
|
|
23
|
+
export type Reactive<T> = T & ReactiveDeps
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 创建响应式对象的函数类型
|
|
27
|
+
*/
|
|
28
|
+
export type CreateReactive = <T extends Record<string, any>>(
|
|
29
|
+
target: T,
|
|
30
|
+
deps: CreateReactiveDeps
|
|
31
|
+
) => Reactive<T>
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 创建响应式对象的依赖接口
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateReactiveDeps {
|
|
37
|
+
/** 订阅者管理:存储所有监听器 */
|
|
38
|
+
subscribers: Set<(...args: any[]) => void>
|
|
39
|
+
|
|
40
|
+
/** 通知所有订阅者 */
|
|
41
|
+
notify: () => void
|
|
42
|
+
|
|
43
|
+
/** 订阅变化监听器 */
|
|
44
|
+
subscribe: (listener: () => void) => () => void
|
|
45
|
+
|
|
46
|
+
/** 取消所有订阅 */
|
|
47
|
+
dispose: () => void
|
|
48
|
+
|
|
49
|
+
/** 创建代理对象 */
|
|
50
|
+
createProxy: <T extends Record<string, any>>(target: T, deps: ReactiveDeps) => T
|
|
51
|
+
/** 获取变化路径 */
|
|
52
|
+
getChangePath: (target: any, property: string | symbol) => string[]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 响应式状态更新事件
|
|
57
|
+
*/
|
|
58
|
+
export interface ReactiveChangeEvent {
|
|
59
|
+
/** 变化的属性路径 */
|
|
60
|
+
path: string[]
|
|
61
|
+
/** 旧值 */
|
|
62
|
+
oldValue: any
|
|
63
|
+
/** 新值 */
|
|
64
|
+
newValue: any
|
|
65
|
+
/** 变化类型 */
|
|
66
|
+
type: 'set' | 'delete'
|
|
67
|
+
}
|