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.
Files changed (114) hide show
  1. package/dist/functions/array-object/deepClone.d.ts +12 -0
  2. package/dist/functions/array-object/deepClone.js +131 -0
  3. package/dist/functions/array-object/deepClone.js.map +1 -0
  4. package/dist/functions/array-object/flatten.d.ts +7 -0
  5. package/dist/functions/array-object/flatten.js +60 -0
  6. package/dist/functions/array-object/flatten.js.map +1 -0
  7. package/dist/functions/array-object/unique.d.ts +10 -0
  8. package/dist/functions/array-object/unique.js +85 -0
  9. package/dist/functions/array-object/unique.js.map +1 -0
  10. package/dist/functions/data-structures/Heap.d.ts +11 -0
  11. package/dist/functions/data-structures/Heap.js +91 -0
  12. package/dist/functions/data-structures/Heap.js.map +1 -0
  13. package/dist/functions/data-structures/LinkedList.d.ts +18 -0
  14. package/dist/functions/data-structures/LinkedList.js +135 -0
  15. package/dist/functions/data-structures/LinkedList.js.map +1 -0
  16. package/dist/functions/data-structures/PriorityQueue.d.ts +14 -0
  17. package/dist/functions/data-structures/PriorityQueue.js +77 -0
  18. package/dist/functions/data-structures/PriorityQueue.js.map +1 -0
  19. package/dist/functions/data-structures/Queue.d.ts +10 -0
  20. package/dist/functions/data-structures/Queue.js +27 -0
  21. package/dist/functions/data-structures/Queue.js.map +1 -0
  22. package/dist/functions/data-structures/Stack.d.ts +10 -0
  23. package/dist/functions/data-structures/Stack.js +27 -0
  24. package/dist/functions/data-structures/Stack.js.map +1 -0
  25. package/dist/functions/design-tokens/buildTokens.d.ts +76 -0
  26. package/dist/functions/design-tokens/buildTokens.js +183 -0
  27. package/dist/functions/design-tokens/buildTokens.js.map +1 -0
  28. package/dist/functions/design-tokens/generateVariables.d.ts +7 -0
  29. package/dist/functions/design-tokens/generateVariables.js +135 -0
  30. package/dist/functions/design-tokens/generateVariables.js.map +1 -0
  31. package/dist/functions/design-tokens/mixColors.d.ts +1 -0
  32. package/dist/functions/design-tokens/mixColors.js +38 -0
  33. package/dist/functions/design-tokens/mixColors.js.map +1 -0
  34. package/dist/functions/design-tokens/parseDesignTokens.d.ts +10 -0
  35. package/dist/functions/design-tokens/parseDesignTokens.js +216 -0
  36. package/dist/functions/design-tokens/parseDesignTokens.js.map +1 -0
  37. package/dist/functions/functional/compose.d.ts +1 -0
  38. package/dist/functions/functional/compose.js +10 -0
  39. package/dist/functions/functional/compose.js.map +1 -0
  40. package/dist/functions/functional/curry.d.ts +1 -0
  41. package/dist/functions/functional/curry.js +13 -0
  42. package/dist/functions/functional/curry.js.map +1 -0
  43. package/dist/functions/functional/pipe.d.ts +1 -0
  44. package/dist/functions/functional/pipe.js +10 -0
  45. package/dist/functions/functional/pipe.js.map +1 -0
  46. package/dist/functions/performance/debounce.d.ts +5 -0
  47. package/dist/functions/performance/debounce.js +12 -0
  48. package/dist/functions/performance/debounce.js.map +1 -0
  49. package/dist/functions/performance/memoize.d.ts +1 -0
  50. package/dist/functions/performance/memoize.js +13 -0
  51. package/dist/functions/performance/memoize.js.map +1 -0
  52. package/dist/functions/performance/throttle.d.ts +1 -0
  53. package/dist/functions/performance/throttle.js +11 -0
  54. package/dist/functions/performance/throttle.js.map +1 -0
  55. package/dist/functions/platform/tencent-cloud/deploy.tcb.d.ts +13 -0
  56. package/dist/functions/platform/tencent-cloud/deploy.tcb.js +46 -0
  57. package/dist/functions/platform/tencent-cloud/deploy.tcb.js.map +1 -0
  58. package/dist/functions/platform/tencent-cloud/getSecret.d.ts +4 -0
  59. package/dist/functions/platform/tencent-cloud/getSecret.js +19 -0
  60. package/dist/functions/platform/tencent-cloud/getSecret.js.map +1 -0
  61. package/dist/functions/platform/uniapp/app-plus/buildAndroidApp.d.ts +27 -0
  62. package/dist/functions/platform/uniapp/app-plus/buildAndroidApp.js +287 -0
  63. package/dist/functions/platform/uniapp/app-plus/buildAndroidApp.js.map +1 -0
  64. package/dist/functions/platform/uniapp/build.d.ts +21 -0
  65. package/dist/functions/platform/uniapp/build.js +83 -0
  66. package/dist/functions/platform/uniapp/build.js.map +1 -0
  67. package/dist/functions/platform/uniapp/detectAndroidProjectStructure.d.ts +11 -0
  68. package/dist/functions/platform/uniapp/detectAndroidProjectStructure.js +30 -0
  69. package/dist/functions/platform/uniapp/detectAndroidProjectStructure.js.map +1 -0
  70. package/dist/functions/platform/uniapp/detectProjectType.d.ts +20 -0
  71. package/dist/functions/platform/uniapp/detectProjectType.js +68 -0
  72. package/dist/functions/platform/uniapp/detectProjectType.js.map +1 -0
  73. package/dist/functions/platform/uniapp/parseManifest.d.ts +18 -0
  74. package/dist/functions/platform/uniapp/parseManifest.js +49 -0
  75. package/dist/functions/platform/uniapp/parseManifest.js.map +1 -0
  76. package/dist/functions/platform/uniapp/waitForPages.d.ts +7 -0
  77. package/dist/functions/platform/uniapp/waitForPages.js +20 -0
  78. package/dist/functions/platform/uniapp/waitForPages.js.map +1 -0
  79. package/dist/functions/principles/functionBind.d.ts +4 -0
  80. package/dist/functions/principles/functionBind.js +33 -0
  81. package/dist/functions/principles/functionBind.js.map +1 -0
  82. package/dist/functions/principles/myInstanceof.d.ts +5 -0
  83. package/dist/functions/principles/myInstanceof.js +56 -0
  84. package/dist/functions/principles/myInstanceof.js.map +1 -0
  85. package/dist/functions/principles/myNew.d.ts +3 -0
  86. package/dist/functions/principles/myNew.js +19 -0
  87. package/dist/functions/principles/myNew.js.map +1 -0
  88. package/dist/functions/utils/createI18n.d.ts +2 -0
  89. package/dist/functions/utils/createI18n.js +97 -0
  90. package/dist/functions/utils/createI18n.js.map +1 -0
  91. package/dist/functions/utils/createReactive.d.ts +10 -0
  92. package/dist/functions/utils/createReactive.js +50 -0
  93. package/dist/functions/utils/createReactive.js.map +1 -0
  94. package/dist/functions/utils/diff.d.ts +25 -0
  95. package/dist/functions/utils/diff.js +316 -0
  96. package/dist/functions/utils/diff.js.map +1 -0
  97. package/dist/functions/utils/formatString.d.ts +5 -0
  98. package/dist/functions/utils/formatString.js +9 -0
  99. package/dist/functions/utils/formatString.js.map +1 -0
  100. package/dist/functions/utils/i18n.d.ts +27 -0
  101. package/dist/functions/utils/i18n.js +119 -0
  102. package/dist/functions/utils/i18n.js.map +1 -0
  103. package/dist/functions/utils/permission.d.ts +40 -0
  104. package/dist/functions/utils/permission.js +189 -0
  105. package/dist/functions/utils/permission.js.map +1 -0
  106. package/dist/functions/utils/pinia.d.ts +52 -0
  107. package/dist/functions/utils/pinia.js +183 -0
  108. package/dist/functions/utils/pinia.js.map +1 -0
  109. package/dist/hooks/usePermission.d.ts +7 -0
  110. package/dist/hooks/usePermission.js +123 -0
  111. package/dist/hooks/usePermission.js.map +1 -0
  112. package/package.json +12 -2
  113. package/references/xlsx.d.ts +51 -0
  114. 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
+ }