@talex-touch/utils 1.0.31 → 1.0.32

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 (112) hide show
  1. package/animation/window-node.ts +15 -12
  2. package/animation/window.ts +19 -15
  3. package/auth/clerk-types.ts +1 -1
  4. package/auth/index.ts +1 -1
  5. package/auth/useAuthState.ts +6 -5
  6. package/auth/useClerkConfig.ts +4 -4
  7. package/auth/useClerkProvider.ts +3 -2
  8. package/channel/index.ts +23 -22
  9. package/common/file-scan-constants.ts +137 -121
  10. package/common/file-scan-utils.ts +48 -27
  11. package/common/index.ts +3 -3
  12. package/common/search/gather.ts +1 -1
  13. package/common/search/index.ts +5 -6
  14. package/common/storage/constants.ts +3 -2
  15. package/common/storage/entity/app-settings.ts +5 -3
  16. package/common/storage/entity/shortcut-settings.ts +10 -10
  17. package/common/storage/shortcut-storage.ts +6 -4
  18. package/common/utils/file.ts +14 -6
  19. package/common/utils/index.ts +62 -52
  20. package/common/utils/polling.ts +87 -84
  21. package/common/utils/task-queue.ts +11 -10
  22. package/common/utils/time.ts +50 -47
  23. package/common/utils/timing.ts +41 -37
  24. package/core-box/builder/index.ts +1 -1
  25. package/core-box/builder/tuff-builder.ts +254 -229
  26. package/core-box/index.ts +3 -6
  27. package/core-box/preview/index.ts +1 -0
  28. package/core-box/preview/types.ts +43 -0
  29. package/core-box/tuff/index.ts +1 -1
  30. package/core-box/tuff/tuff-dsl.ts +328 -266
  31. package/electron/clipboard-helper.ts +20 -12
  32. package/electron/download-manager.ts +43 -42
  33. package/electron/env-tool.ts +19 -18
  34. package/electron/file-parsers/index.ts +2 -2
  35. package/electron/file-parsers/parsers/text-parser.ts +15 -14
  36. package/electron/file-parsers/registry.ts +9 -7
  37. package/electron/file-parsers/types.ts +4 -4
  38. package/electron/index.ts +1 -1
  39. package/eventbus/index.ts +11 -11
  40. package/index.ts +5 -4
  41. package/intelligence/client.ts +87 -0
  42. package/intelligence/index.ts +1 -0
  43. package/package.json +14 -14
  44. package/permission/index.ts +8 -8
  45. package/plugin/channel.ts +77 -68
  46. package/plugin/index.ts +96 -82
  47. package/plugin/install.ts +8 -8
  48. package/plugin/log/types.ts +5 -5
  49. package/plugin/node/index.ts +1 -1
  50. package/plugin/node/logger-manager.ts +14 -11
  51. package/plugin/node/logger.ts +8 -8
  52. package/plugin/plugin-source.ts +11 -11
  53. package/plugin/preload.ts +1 -1
  54. package/plugin/providers/registry.ts +8 -7
  55. package/plugin/providers/types.ts +6 -6
  56. package/plugin/sdk/channel.ts +20 -20
  57. package/plugin/sdk/clipboard.ts +8 -6
  58. package/plugin/sdk/common.ts +10 -6
  59. package/plugin/sdk/core-box.ts +2 -3
  60. package/plugin/sdk/division-box.ts +266 -0
  61. package/plugin/sdk/enum/bridge-event.ts +1 -1
  62. package/plugin/sdk/examples/storage-onDidChange-example.js +1 -1
  63. package/plugin/sdk/features.ts +34 -26
  64. package/plugin/sdk/hooks/bridge.ts +3 -6
  65. package/plugin/sdk/hooks/index.ts +1 -1
  66. package/plugin/sdk/hooks/life-cycle.ts +4 -10
  67. package/plugin/sdk/index.ts +8 -7
  68. package/plugin/sdk/service/index.ts +3 -3
  69. package/plugin/sdk/storage.ts +4 -4
  70. package/plugin/sdk/system.ts +1 -1
  71. package/plugin/sdk/types.ts +147 -141
  72. package/plugin/sdk/window/index.ts +8 -5
  73. package/preload/loading.ts +6 -6
  74. package/preload/renderer.ts +4 -2
  75. package/renderer/hooks/arg-mapper.ts +1 -2
  76. package/renderer/hooks/index.ts +2 -0
  77. package/renderer/hooks/initialize.ts +10 -8
  78. package/renderer/hooks/performance.ts +4 -4
  79. package/renderer/hooks/use-channel.ts +150 -0
  80. package/renderer/hooks/use-intelligence.ts +236 -0
  81. package/renderer/index.ts +6 -2
  82. package/renderer/ref.ts +32 -36
  83. package/renderer/slots.ts +29 -26
  84. package/renderer/storage/app-settings.ts +16 -6
  85. package/renderer/storage/base-storage.ts +222 -114
  86. package/renderer/storage/index.ts +3 -0
  87. package/renderer/storage/intelligence-storage.ts +215 -0
  88. package/renderer/storage/openers.ts +13 -3
  89. package/renderer/touch-sdk/env.ts +41 -41
  90. package/renderer/touch-sdk/index.ts +1 -1
  91. package/renderer/touch-sdk/terminal.ts +5 -5
  92. package/renderer/touch-sdk/utils.ts +4 -3
  93. package/search/levenshtein-utils.ts +11 -11
  94. package/search/types.ts +102 -102
  95. package/service/index.ts +11 -11
  96. package/service/protocol/index.ts +217 -14
  97. package/types/division-box.ts +248 -0
  98. package/types/download.ts +72 -34
  99. package/types/index.ts +3 -1
  100. package/types/intelligence.ts +413 -0
  101. package/types/modules/base.ts +16 -16
  102. package/types/modules/index.ts +1 -1
  103. package/types/modules/module-lifecycle.ts +21 -21
  104. package/types/modules/module-manager.ts +11 -11
  105. package/types/modules/module.ts +16 -16
  106. package/types/storage.ts +0 -1
  107. package/types/touch-app-core.ts +32 -32
  108. package/types/update.ts +79 -21
  109. package/core-box/README.md +0 -218
  110. package/core-box/builder/tuff-builder.example.ts.bak +0 -258
  111. package/core-box/run-tests.sh +0 -7
  112. package/core-box/search.ts +0 -1
package/core-box/index.ts CHANGED
@@ -1,10 +1,7 @@
1
+ export * from './builder/index'
2
+ export * from './preview/index'
1
3
  /**
2
4
  * Core Box Package
3
5
  * Search box core functionality package
4
6
  */
5
-
6
- // 导出 TUFF DSL 相关内容
7
- export * from './tuff/index.js';
8
-
9
- // 导出 TUFF Builder 相关内容
10
- export * from './builder/index.js';
7
+ export * from './tuff/index'
@@ -0,0 +1 @@
1
+ export * from './types'
@@ -0,0 +1,43 @@
1
+ export interface PreviewCardRow {
2
+ label: string
3
+ value: string
4
+ description?: string
5
+ copyable?: boolean
6
+ emphasize?: boolean
7
+ }
8
+
9
+ export interface PreviewCardSection {
10
+ title?: string
11
+ rows: PreviewCardRow[]
12
+ }
13
+
14
+ export interface PreviewCardChip {
15
+ label: string
16
+ value: string
17
+ }
18
+
19
+ export interface PreviewCardPayload {
20
+ abilityId: string
21
+ title: string
22
+ subtitle?: string
23
+ primaryValue: string
24
+ primaryLabel?: string
25
+ primaryUnit?: string
26
+ secondaryValue?: string
27
+ secondaryLabel?: string
28
+ description?: string
29
+ accentColor?: string
30
+ badges?: string[]
31
+ chips?: PreviewCardChip[]
32
+ sections?: PreviewCardSection[]
33
+ warnings?: string[]
34
+ meta?: Record<string, any>
35
+ confidence?: number
36
+ }
37
+
38
+ export interface PreviewAbilityResult {
39
+ abilityId: string
40
+ confidence: number
41
+ payload: PreviewCardPayload
42
+ durationMs?: number
43
+ }
@@ -3,4 +3,4 @@
3
3
  * Typed Unified Flex Format 数据结构定义
4
4
  */
5
5
 
6
- export * from './tuff-dsl';
6
+ export * from './tuff-dsl'