@dcloudio/uni-app-x 0.7.78 → 0.7.79

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 (156) hide show
  1. package/package.json +3 -2
  2. package/types/dom2/UniCSSTransform.d.ts +1 -1
  3. package/types/dom2/UniNativeBaseView.d.ts +11 -15
  4. package/types/dom2/UniNativeDefines.d.ts +2 -44
  5. package/types/dom2/UniNativeViewElement.d.ts +60 -0
  6. package/types/dom2/UniTextElement.d.ts +7 -0
  7. package/types/dom2/UniTextLayout.d.ts +7 -0
  8. package/types/dom2/global.d.ts +3 -6
  9. package/types/dom2/sharedData.d.ts +13 -5
  10. package/types/native/UniPage.d.ts +9 -0
  11. package/types/node_modules/.package-lock.json +20 -0
  12. package/types/node_modules/typescript/LICENSE.txt +55 -0
  13. package/types/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  14. package/types/node_modules/typescript/bin/tsc +2 -0
  15. package/types/node_modules/typescript/bin/tsserver +2 -0
  16. package/types/node_modules/typescript/lib/cancellationToken.js +90 -0
  17. package/types/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +1880 -0
  18. package/types/node_modules/typescript/lib/de/diagnosticMessages.generated.json +1880 -0
  19. package/types/node_modules/typescript/lib/es/diagnosticMessages.generated.json +1880 -0
  20. package/types/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +1880 -0
  21. package/types/node_modules/typescript/lib/it/diagnosticMessages.generated.json +1880 -0
  22. package/types/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +1880 -0
  23. package/types/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +1880 -0
  24. package/types/node_modules/typescript/lib/lib.d.ts +22 -0
  25. package/types/node_modules/typescript/lib/lib.decorators.d.ts +386 -0
  26. package/types/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  27. package/types/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +33 -0
  28. package/types/node_modules/typescript/lib/lib.dom.d.ts +28596 -0
  29. package/types/node_modules/typescript/lib/lib.dom.iterable.d.ts +475 -0
  30. package/types/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  31. package/types/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  32. package/types/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  33. package/types/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  34. package/types/node_modules/typescript/lib/lib.es2015.iterable.d.ts +495 -0
  35. package/types/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  36. package/types/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  37. package/types/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  38. package/types/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  39. package/types/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  40. package/types/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  41. package/types/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  42. package/types/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  43. package/types/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  44. package/types/node_modules/typescript/lib/lib.es2017.d.ts +25 -0
  45. package/types/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  46. package/types/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  47. package/types/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  48. package/types/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  49. package/types/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  50. package/types/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  51. package/types/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  52. package/types/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  53. package/types/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +43 -0
  54. package/types/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  55. package/types/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  56. package/types/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  57. package/types/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  58. package/types/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  59. package/types/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  60. package/types/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  61. package/types/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  62. package/types/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  63. package/types/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  64. package/types/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  65. package/types/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  66. package/types/node_modules/typescript/lib/lib.es2020.bigint.d.ts +727 -0
  67. package/types/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  68. package/types/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  69. package/types/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  70. package/types/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  71. package/types/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  72. package/types/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  73. package/types/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  74. package/types/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
  75. package/types/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +37 -0
  76. package/types/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  77. package/types/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  78. package/types/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  79. package/types/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  80. package/types/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  81. package/types/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  82. package/types/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  83. package/types/node_modules/typescript/lib/lib.es2022.d.ts +26 -0
  84. package/types/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
  85. package/types/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  86. package/types/node_modules/typescript/lib/lib.es2022.intl.d.ts +117 -0
  87. package/types/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  88. package/types/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  89. package/types/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +39 -0
  90. package/types/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  91. package/types/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  92. package/types/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  93. package/types/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  94. package/types/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  95. package/types/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  96. package/types/node_modules/typescript/lib/lib.es5.d.ts +4585 -0
  97. package/types/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  98. package/types/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  99. package/types/node_modules/typescript/lib/lib.esnext.collection.d.ts +106 -0
  100. package/types/node_modules/typescript/lib/lib.esnext.d.ts +28 -0
  101. package/types/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  102. package/types/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
  103. package/types/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  104. package/types/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  105. package/types/node_modules/typescript/lib/lib.esnext.object.d.ts +29 -0
  106. package/types/node_modules/typescript/lib/lib.esnext.promise.d.ts +35 -0
  107. package/types/node_modules/typescript/lib/lib.esnext.regexp.d.ts +25 -0
  108. package/types/node_modules/typescript/lib/lib.esnext.string.d.ts +29 -0
  109. package/types/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  110. package/types/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +33 -0
  111. package/types/node_modules/typescript/lib/lib.webworker.d.ts +9431 -0
  112. package/types/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  113. package/types/node_modules/typescript/lib/lib.webworker.iterable.d.ts +276 -0
  114. package/types/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +1880 -0
  115. package/types/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +1880 -0
  116. package/types/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +1880 -0
  117. package/types/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +1880 -0
  118. package/types/node_modules/typescript/lib/tsc.js +129741 -0
  119. package/types/node_modules/typescript/lib/tsserver.js +621 -0
  120. package/types/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  121. package/types/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  122. package/types/node_modules/typescript/lib/typesMap.json +497 -0
  123. package/types/node_modules/typescript/lib/typescript.d.ts +11240 -0
  124. package/types/node_modules/typescript/lib/typescript.js +194910 -0
  125. package/types/node_modules/typescript/lib/typingsInstaller.js +236 -0
  126. package/types/node_modules/typescript/lib/watchGuard.js +53 -0
  127. package/types/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +1880 -0
  128. package/types/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +1880 -0
  129. package/types/node_modules/typescript/package.json +116 -0
  130. package/types/uni/global.d.ts +0 -2
  131. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +2 -2
  132. package/types/uni/uts-plugin-biz/global.d.ts +1 -0
  133. package/types/uni/uts-plugin-biz/index.d.ts +1 -0
  134. package/types/uni/uts-plugin-biz/lib/uni-map-amap/utssdk/global.d.ts +14 -0
  135. package/types/uni/uts-plugin-biz/lib/uni-map-amap/utssdk/index.d.ts +7 -0
  136. package/types/uni/uts-plugin-biz/lib/uni-map-amap/utssdk/interface.d.ts +101 -0
  137. package/types/uni/uts-plugin-component/global.d.ts +5 -0
  138. package/types/uni/uts-plugin-component/index.d.ts +5 -0
  139. package/types/uni/uts-plugin-component/lib/uni-camera-global/utssdk/global.d.ts +23 -0
  140. package/types/uni/uts-plugin-component/lib/uni-camera-global/utssdk/index.d.ts +12 -0
  141. package/types/uni/uts-plugin-component/lib/uni-camera-global/utssdk/interface.d.ts +38 -0
  142. package/types/uni/{uni-map-tencent-global.d.ts → uts-plugin-component/lib/uni-map-tencent-global/utssdk/global.d.ts} +22 -20
  143. package/types/uni/uts-plugin-component/lib/uni-map-tencent-global/utssdk/index.d.ts +20 -0
  144. package/types/uni/uts-plugin-component/lib/uni-map-tencent-global/utssdk/interface.d.ts +56 -0
  145. package/types/uni/uts-plugin-component/lib/uni-video-global/utssdk/global.d.ts +39 -0
  146. package/types/uni/uts-plugin-component/lib/uni-video-global/utssdk/index.d.ts +20 -0
  147. package/types/uni/uts-plugin-component/lib/uni-video-global/utssdk/interface.d.ts +94 -0
  148. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/global.d.ts +19 -0
  149. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/index.d.ts +9 -0
  150. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/interface.d.ts +243 -0
  151. package/types/uni/uts-plugin-component/lib/uni-web-view-global/utssdk/global.d.ts +31 -0
  152. package/types/uni/uts-plugin-component/lib/uni-web-view-global/utssdk/index.d.ts +16 -0
  153. package/types/uni/uts-plugin-component/lib/uni-web-view-global/utssdk/interface.d.ts +46 -0
  154. package/types/uni/uni-camera-global.d.ts +0 -23
  155. package/types/uni/uni-camera.d.ts +0 -35
  156. package/types/uni/uni-map-tencent-map.d.ts +0 -63
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.78",
3
+ "version": "0.7.79",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "main": "index.d.ts",
@@ -30,6 +30,7 @@
30
30
  "glob": "^10.3.3",
31
31
  "minimist": "^1.2.8",
32
32
  "miniprogram-api-typings": "^4.0.7",
33
- "ts-morph": "^23.0.0"
33
+ "ts-morph": "^23.0.0",
34
+ "typescript": "^5.9.3"
34
35
  }
35
36
  }
@@ -1,4 +1,4 @@
1
- import { UniCSSUnitValue } from './UniCSSType'
1
+ import { UniCSSUnitValue, UniCSSUnitType } from './UniCSSType'
2
2
 
3
3
  /**
4
4
  * transform类型
@@ -1,8 +1,8 @@
1
1
  import { UniNativeColor } from './UniNativeDefines'
2
- import { UniCSSPropertyID, UniCSSPropertyName } from './UniCSSProperty'
3
- import { UniNativeLayout, UniNativePaddings, UniNativePadding } from './UniNativeDefines'
2
+ import { UniCSSPropertyID } from './UniCSSProperty'
3
+ import { UniNativeLayout, UniNativePadding } from './UniNativeDefines'
4
4
  import { UniNativeBackgroundClip, UniNativeBackgroundImage } from './UniNativeDefines'
5
- import { UniNativeBorders, UniNativeBorder, UniNativeBorderStyles, UniNativeBorderStyle, UniNativeBorderWidths, UniNativeBorderWidth, UniNativeBorderColors, UniNativeBorderColor, UniNativeBorderRadiuses, UniNativeBorderRadius } from './UniNativeDefines'
5
+ import { UniNativeBorderWidths, UniNativeBorderWidth, UniNativeBorderStyles, UniNativeBorderStyle, UniNativeBorderColors, UniNativeBorderColor, UniNativeBorderRadiuses, UniNativeBorderRadius } from './UniNativeDefines'
6
6
  import { UniNativeBoxShadow, UniNativeOverflowType, UniNativeDisplayType, UniNativePointerEventType, UniNativePositionType, UniNativeVisibilityType } from './UniNativeDefines'
7
7
  import { UniNativeSlotType, UniNativeTransform, UniNativeTransformOrigin } from './UniNativeDefines'
8
8
  import { UniNativeTransition, UniNativeTransitions, UniNativeTransitionProperty, UniNativeTransitionPropertys, UniNativeTransitionDuration, UniNativeTransitionDurations, UniNativeTransitionDelay, UniNativeTransitionDelays, UniNativeTransitionTimingFunction, UniNativeTransitionTimingFunctions } from './UniNativeDefines'
@@ -22,7 +22,7 @@ export interface UniNativeBaseView {
22
22
 
23
23
  /**
24
24
  * 插槽名称
25
- * 默认为UniNativeSlotType.none,提供给特定场景(如自定义下拉刷新)使用
25
+ * 默认为UniNativeSlotType.None,提供给特定场景(如自定义下拉刷新)使用
26
26
  */
27
27
  slot: UniNativeSlotType
28
28
 
@@ -60,9 +60,11 @@ export interface UniNativeBaseView {
60
60
 
61
61
  /**
62
62
  * 设置内边距
63
+ * 只有排版完成后操作,vue框架不需要操作此API
63
64
  * value为UniNativePadding类型表示设置所有内边距值都相同
64
65
  */
65
- padding(value: UniNativePaddings | UniNativePadding): UniNativeBaseView
66
+ padding(value: UniNativePadding): UniNativeBaseView
67
+ padding(left: number, top: number, right: number, bottom: number): UniNativeBaseView
66
68
  // 废弃单独设置内边距:排版引擎每次都是全值更新,不需要单独更新
67
69
  // paddingTop(value: UniNativePadding): UniNativeBaseView
68
70
  // paddingRight(value: UniNativePadding): UniNativeBaseView
@@ -71,16 +73,8 @@ export interface UniNativeBaseView {
71
73
 
72
74
  /**
73
75
  * 边框相关
76
+ * - 去掉简写border数据结构及相关API,DOM API实现时在UniElement中分拆样式设置
74
77
  */
75
- /**
76
- * 设置完整边框
77
- * value - null表示无边框,默认无边框
78
- */
79
- border(value: UniNativeBorders | null): UniNativeBaseView
80
- borderTop(value: UniNativeBorder | null): UniNativeBaseView
81
- borderRight(value: UniNativeBorder | null): UniNativeBaseView
82
- borderBottom(value: UniNativeBorder | null): UniNativeBaseView
83
- borderLeft(value: UniNativeBorder | null): UniNativeBaseView
84
78
  /**
85
79
  * 设置边框样式
86
80
  */
@@ -93,7 +87,8 @@ export interface UniNativeBaseView {
93
87
  * 设置边框宽度
94
88
  * 只有排版完成后操作,vue框架不需要操作此API
95
89
  */
96
- borderWidth(value: UniNativeBorderWidths | UniNativeBorderWidth): UniNativeBaseView
90
+ borderWidth(value: UniNativeBorderWidths): UniNativeBaseView
91
+ borderWidth(left: number, top: number, right: number, bottom: number): UniNativeBaseView
97
92
  // 废弃单独设置边框:排版引擎每次都是全值更新,不需要单独更新
98
93
  // borderWidthTop(value: UniNativeBorderWidth): UniNativeBaseView
99
94
  // borderWidthRight(value: UniNativeBorderWidth): UniNativeBaseView
@@ -107,6 +102,7 @@ export interface UniNativeBaseView {
107
102
  borderColorRight(value: UniNativeBorderColor): UniNativeBaseView
108
103
  borderColorBottom(value: UniNativeBorderColor): UniNativeBaseView
109
104
  borderColorLeft(value: UniNativeBorderColor): UniNativeBaseView
105
+
110
106
  /**
111
107
  * 设置边框圆角
112
108
  */
@@ -125,14 +125,11 @@ export type UniNativeLayoutSize = UniSize
125
125
  */
126
126
  export type UniNativeLayoutPosition = UniPosition
127
127
 
128
- /**
129
- * 内边距
130
- */
131
- export type UniNativePadding = number
128
+
132
129
  /**
133
130
  * 内边距信息
134
131
  */
135
- export type UniNativePaddings = UniLTRB
132
+ export type UniNativePadding = UniLTRB
136
133
 
137
134
  /**
138
135
  * 外边距
@@ -146,45 +143,6 @@ export type UniNativeMargins = UniLTRB
146
143
  /**
147
144
  * 边框信息
148
145
  */
149
- export type UniNativeBorders = {
150
- /**
151
- * 边框宽度
152
- */
153
- width: UniNativeBorderWidths
154
- /**
155
- * 边框颜色
156
- */
157
- color: UniNativeBorderColors
158
- /**
159
- * 边框圆角半径
160
- * 与Web规范保持一致,不再需要radius属性
161
- */
162
- // radius: UniNativeBorderRadiuses
163
- /**
164
- * 比那款样式
165
- */
166
- style: UniNativeBorderStyles
167
- }
168
- export type UniNativeBorder = {
169
- /**
170
- * 边框宽度
171
- */
172
- width: UniNativeBorderWidth
173
- /**
174
- * 边框颜色
175
- */
176
- color: UniNativeBorderColor
177
- /**
178
- * 边框圆角半径
179
- * Web规范保持一致,不再需要radius属性
180
- */
181
- // radius: UniNativeBorderRadius
182
- /**
183
- * 比那款样式
184
- */
185
- style: UniNativeBorderStyle
186
- }
187
-
188
146
  /**
189
147
  * 边框宽度类型
190
148
  */
@@ -7,6 +7,66 @@ import { UniElement } from './index'
7
7
  */
8
8
  export interface UniNativeViewElement extends UniElement {
9
9
 
10
+ /**
11
+ * 设置组件需要重新触发测量排版
12
+ */
13
+ setDirty(): void
10
14
 
15
+ /**
16
+ * 设置测量回调,多次调用会覆盖之前设置的测量回调
17
+ * @param callback 测量回调方法
18
+ * 注意:此回调方法运行在子线程中,需处理线程安全问题
19
+ */
20
+ setMeasureCallback(callback: UniNativeMeasureCallback): void
11
21
  }
12
22
 
23
+ /**
24
+ * 测量回调方法
25
+ * @param - res
26
+ */
27
+ type UniNativeMeasureCallback = (res: UniNativeMeasureSpecification) => UniNativeMeasureSize
28
+ /**
29
+ * 测量约束对象
30
+ */
31
+ interface UniNativeMeasureSpecification {
32
+ /**
33
+ * 宽度约束值
34
+ * 不同平台单位存在差异:
35
+ * - Android平台为物理像素
36
+ * - iOS/鸿蒙平台为逻辑像素
37
+ */
38
+ width: number,
39
+ /**
40
+ * 宽度约束模式
41
+ */
42
+ widthMode: UniNativeMeasureMode,
43
+ /**
44
+ * 高度约束值
45
+ * 不同平台单位存在差异:
46
+ * - Android平台为物理像素
47
+ * - iOS/鸿蒙平台为逻辑像素
48
+ */
49
+ height: number,
50
+ /**
51
+ * 高度约束模式
52
+ */
53
+ heightMode: UniNativeMeasureMode,
54
+ }
55
+ type UniNativeMeasureSize = UniLayoutSize
56
+ /**
57
+ * 测量约束模式
58
+ */
59
+ export enum UniNativeMeasureMode {
60
+ /**
61
+ * 父元素对测量的子元素无任何限制,子元素可以是它想要的任意大小
62
+ */
63
+ Undefined,
64
+ /**
65
+ * 父元素对测量的子元素确定了一个精确的尺寸,子元素必须使用这个尺寸
66
+ */
67
+ Exactly,
68
+ /**
69
+ * 父元素对测量的子元素限定的最大尺寸,子元素不能超过此尺寸
70
+ */
71
+ AtMost,
72
+ }
@@ -58,6 +58,13 @@ declare global {
58
58
  */
59
59
  setColor(color: UniNativeColor): void
60
60
 
61
+ /**
62
+ * 设置背景颜色
63
+ * @param color
64
+ * UniNativeColor - 平台颜色类型
65
+ */
66
+ setBackgroundColor(color: UniNativeColor): void
67
+
61
68
  /**
62
69
  * 设置字体名称
63
70
  */
@@ -16,6 +16,13 @@ declare global {
16
16
  */
17
17
  setText(text: string): void
18
18
 
19
+ /**
20
+ * 设置背景颜色
21
+ * @param color
22
+ * UniNativeColor - 平台颜色类型
23
+ */
24
+ setBackgroundColor(color: UniNativeColor): void
25
+
19
26
  /**
20
27
  * 设置文本颜色
21
28
  * @param color
@@ -1,6 +1,7 @@
1
1
  // 本文件为自动构建生成
2
2
  import {
3
3
  UniNativeViewType as UniNativeViewTypeOrigin,
4
+ UniNativeMeasureMode as UniNativeMeasureModeOrigin,
4
5
  UniNativeViewElement as UniNativeViewElementOrigin,
5
6
  UniNativeView as UniNativeViewOrigin,
6
7
  UniNativeViewStyles as UniNativeViewStylesOrigin,
@@ -26,11 +27,8 @@ import {
26
27
  UniNativeLayoutSize as UniNativeLayoutSizeOrigin,
27
28
  UniNativeLayoutPosition as UniNativeLayoutPositionOrigin,
28
29
  UniNativePadding as UniNativePaddingOrigin,
29
- UniNativePaddings as UniNativePaddingsOrigin,
30
30
  UniNativeMargin as UniNativeMarginOrigin,
31
31
  UniNativeMargins as UniNativeMarginsOrigin,
32
- UniNativeBorders as UniNativeBordersOrigin,
33
- UniNativeBorder as UniNativeBorderOrigin,
34
32
  UniNativeBorderWidth as UniNativeBorderWidthOrigin,
35
33
  UniNativeBorderWidths as UniNativeBorderWidthsOrigin,
36
34
  UniNativeBorderColor as UniNativeBorderColorOrigin,
@@ -125,6 +123,8 @@ import {
125
123
  declare global {
126
124
  const UniNativeViewType: typeof UniNativeViewTypeOrigin
127
125
  type UniNativeViewType = UniNativeViewTypeOrigin
126
+ const UniNativeMeasureMode: typeof UniNativeMeasureModeOrigin
127
+ type UniNativeMeasureMode = UniNativeMeasureModeOrigin
128
128
  type UniNativeViewElement = UniNativeViewElementOrigin
129
129
  type UniNativeView = UniNativeViewOrigin
130
130
  type UniNativeViewStyles = UniNativeViewStylesOrigin
@@ -160,11 +160,8 @@ declare global {
160
160
  type UniNativeLayoutSize = UniNativeLayoutSizeOrigin
161
161
  type UniNativeLayoutPosition = UniNativeLayoutPositionOrigin
162
162
  type UniNativePadding = UniNativePaddingOrigin
163
- type UniNativePaddings = UniNativePaddingsOrigin
164
163
  type UniNativeMargin = UniNativeMarginOrigin
165
164
  type UniNativeMargins = UniNativeMarginsOrigin
166
- type UniNativeBorders = UniNativeBordersOrigin
167
- type UniNativeBorder = UniNativeBorderOrigin
168
165
  type UniNativeBorderWidth = UniNativeBorderWidthOrigin
169
166
  type UniNativeBorderWidths = UniNativeBorderWidthsOrigin
170
167
  type UniNativeBorderColor = UniNativeBorderColorOrigin
@@ -103,15 +103,15 @@ declare global {
103
103
  */
104
104
  static className: string
105
105
  /**
106
- * 当前页面或组件关联的 UniPage 对象
106
+ * 当前页面或组件的样式表
107
107
  * @internal
108
108
  */
109
- _page: UniPage
109
+ static _styleSheet: Map<string, Map<string, Map<number, any>>>
110
110
  /**
111
- * 当前页面或组件的样式表
111
+ * 当前页面或组件关联的 UniPage 对象
112
112
  * @internal
113
113
  */
114
- _styleSheet: Map<string, Map<string, Map<number, any>>>
114
+ _page: UniPage
115
115
  /**
116
116
  * 当前组件所在的上下文,主要用于查找上下文组件的样式表
117
117
  * @internal
@@ -139,7 +139,7 @@ declare global {
139
139
  * key 是组件class名称
140
140
  * @internal
141
141
  */
142
- _styleSheets: Map<string, Map<string, Map<string, Map<string, unknown>>>>
142
+ _styleSheetCache: Map<string, Map<string, Map<string, Map<string, unknown>>>>
143
143
  /**
144
144
  * 本次更新收集到的 Jobs,用于批量执行响应式变更
145
145
  * @internal
@@ -160,6 +160,14 @@ declare global {
160
160
  _render: () => Promise<void>
161
161
  }
162
162
 
163
+ abstract class UniSharedDataApp extends UniSharedData {
164
+ /**
165
+ * 当前应用全局样式
166
+ * @internal
167
+ */
168
+ static _styleSheet: Map<string, Map<string, Map<number, any>>>
169
+ }
170
+
163
171
  enum UniSharedDataVForDirty {
164
172
  /**
165
173
  * 无变更
@@ -890,6 +890,15 @@ declare global {
890
890
  * ios 获取当前页面 dialogPage 创建的 API 弹框集合
891
891
  */
892
892
  __$$getSystemDialogPages(): UniPage[]
893
+ /**
894
+ * 监听页面渲染变化更新事件
895
+ * 前端封装为页面的生命周期 onLayout
896
+ */
897
+ onRenderChange(callback: UniPageOnRenderChangeCallback): number
898
+ /**
899
+ * 取消监听页面渲染变化更新事件
900
+ */
901
+ offRenderChange(id: number): void
893
902
  }
894
903
  }
895
904
 
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "types",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "node_modules/typescript": {
8
+ "version": "5.5.2",
9
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
10
+ "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
11
+ "bin": {
12
+ "tsc": "bin/tsc",
13
+ "tsserver": "bin/tsserver"
14
+ },
15
+ "engines": {
16
+ "node": ">=14.17"
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,55 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS