@dcloudio/uni-app-x 0.7.81 → 0.7.83

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 (159) hide show
  1. package/package.json +1 -1
  2. package/types/{dom2 → dom2-internal}/UniCSSTransition.d.ts +1 -0
  3. package/types/dom2-internal/UniElement.d.ts +42 -6
  4. package/types/{dom2 → dom2-internal}/UniImageElement.d.ts +2 -0
  5. package/types/{dom2 → dom2-internal}/UniNativeBaseView.d.ts +1 -0
  6. package/types/dom2-internal/UniNativeScrollView.d.ts +49 -0
  7. package/types/dom2-internal/UniNestedScrollBodyElement.d.ts +14 -0
  8. package/types/dom2-internal/UniNestedScrollHeaderElement.d.ts +14 -0
  9. package/types/{dom2 → dom2-internal}/UniPage.d.ts +30 -81
  10. package/types/dom2-internal/global.d.ts +280 -1
  11. package/types/dom2-internal/index.d.ts +44 -1
  12. package/types/{dom2 → dom2-internal}/sharedData.d.ts +2 -0
  13. package/types/index.d.ts +0 -1
  14. package/types/native/UniElement.d.ts +3 -0
  15. package/types/native/UniPage.d.ts +150 -0
  16. package/types/node_modules/.package-lock.json +20 -0
  17. package/types/node_modules/typescript/LICENSE.txt +55 -0
  18. package/types/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  19. package/types/node_modules/typescript/bin/tsc +2 -0
  20. package/types/node_modules/typescript/bin/tsserver +2 -0
  21. package/types/node_modules/typescript/lib/cancellationToken.js +90 -0
  22. package/types/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +1880 -0
  23. package/types/node_modules/typescript/lib/de/diagnosticMessages.generated.json +1880 -0
  24. package/types/node_modules/typescript/lib/es/diagnosticMessages.generated.json +1880 -0
  25. package/types/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +1880 -0
  26. package/types/node_modules/typescript/lib/it/diagnosticMessages.generated.json +1880 -0
  27. package/types/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +1880 -0
  28. package/types/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +1880 -0
  29. package/types/node_modules/typescript/lib/lib.d.ts +22 -0
  30. package/types/node_modules/typescript/lib/lib.decorators.d.ts +386 -0
  31. package/types/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  32. package/types/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +33 -0
  33. package/types/node_modules/typescript/lib/lib.dom.d.ts +28596 -0
  34. package/types/node_modules/typescript/lib/lib.dom.iterable.d.ts +475 -0
  35. package/types/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  36. package/types/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  37. package/types/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  38. package/types/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  39. package/types/node_modules/typescript/lib/lib.es2015.iterable.d.ts +495 -0
  40. package/types/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  41. package/types/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  42. package/types/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  43. package/types/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  44. package/types/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  45. package/types/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  46. package/types/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  47. package/types/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  48. package/types/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  49. package/types/node_modules/typescript/lib/lib.es2017.d.ts +25 -0
  50. package/types/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  51. package/types/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  52. package/types/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  53. package/types/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  54. package/types/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  55. package/types/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  56. package/types/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  57. package/types/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  58. package/types/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +43 -0
  59. package/types/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  60. package/types/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  61. package/types/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  62. package/types/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  63. package/types/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  64. package/types/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  65. package/types/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  66. package/types/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  67. package/types/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  68. package/types/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  69. package/types/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  70. package/types/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  71. package/types/node_modules/typescript/lib/lib.es2020.bigint.d.ts +727 -0
  72. package/types/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  73. package/types/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  74. package/types/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  75. package/types/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  76. package/types/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  77. package/types/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  78. package/types/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  79. package/types/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
  80. package/types/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +37 -0
  81. package/types/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  82. package/types/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  83. package/types/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  84. package/types/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  85. package/types/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  86. package/types/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  87. package/types/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  88. package/types/node_modules/typescript/lib/lib.es2022.d.ts +26 -0
  89. package/types/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
  90. package/types/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  91. package/types/node_modules/typescript/lib/lib.es2022.intl.d.ts +117 -0
  92. package/types/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  93. package/types/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  94. package/types/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +39 -0
  95. package/types/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  96. package/types/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  97. package/types/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  98. package/types/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  99. package/types/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  100. package/types/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  101. package/types/node_modules/typescript/lib/lib.es5.d.ts +4585 -0
  102. package/types/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  103. package/types/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  104. package/types/node_modules/typescript/lib/lib.esnext.collection.d.ts +106 -0
  105. package/types/node_modules/typescript/lib/lib.esnext.d.ts +28 -0
  106. package/types/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  107. package/types/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
  108. package/types/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  109. package/types/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  110. package/types/node_modules/typescript/lib/lib.esnext.object.d.ts +29 -0
  111. package/types/node_modules/typescript/lib/lib.esnext.promise.d.ts +35 -0
  112. package/types/node_modules/typescript/lib/lib.esnext.regexp.d.ts +25 -0
  113. package/types/node_modules/typescript/lib/lib.esnext.string.d.ts +29 -0
  114. package/types/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  115. package/types/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +33 -0
  116. package/types/node_modules/typescript/lib/lib.webworker.d.ts +9431 -0
  117. package/types/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  118. package/types/node_modules/typescript/lib/lib.webworker.iterable.d.ts +276 -0
  119. package/types/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +1880 -0
  120. package/types/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +1880 -0
  121. package/types/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +1880 -0
  122. package/types/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +1880 -0
  123. package/types/node_modules/typescript/lib/tsc.js +129741 -0
  124. package/types/node_modules/typescript/lib/tsserver.js +621 -0
  125. package/types/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  126. package/types/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  127. package/types/node_modules/typescript/lib/typesMap.json +497 -0
  128. package/types/node_modules/typescript/lib/typescript.d.ts +11240 -0
  129. package/types/node_modules/typescript/lib/typescript.js +194910 -0
  130. package/types/node_modules/typescript/lib/typingsInstaller.js +236 -0
  131. package/types/node_modules/typescript/lib/watchGuard.js +53 -0
  132. package/types/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +1880 -0
  133. package/types/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +1880 -0
  134. package/types/node_modules/typescript/package.json +116 -0
  135. package/types/uni/uts-plugin-component/global.d.ts +1 -0
  136. package/types/uni/uts-plugin-component/index.d.ts +1 -0
  137. package/types/uni/uts-plugin-component/lib/uni-textarea/utssdk/global.d.ts +9 -0
  138. package/types/uni/uts-plugin-component/lib/uni-textarea/utssdk/index.d.ts +5 -0
  139. package/types/uni/uts-plugin-component/lib/uni-textarea/utssdk/interface.d.ts +0 -0
  140. package/types/dom2/UniElement.d.ts +0 -340
  141. package/types/dom2/UniNativeViewElement.d.ts +0 -72
  142. package/types/dom2/global.d.ts +0 -301
  143. package/types/dom2/index.d.ts +0 -41
  144. /package/types/{dom2 → dom2-internal}/UniCSSProperty.d.ts +0 -0
  145. /package/types/{dom2 → dom2-internal}/UniCSSTransform.d.ts +0 -0
  146. /package/types/{dom2 → dom2-internal}/UniCSSType.d.ts +0 -0
  147. /package/types/{dom2 → dom2-internal}/UniCommon.d.ts +0 -0
  148. /package/types/{dom2 → dom2-internal}/UniElementType.d.ts +0 -0
  149. /package/types/{dom2 → dom2-internal}/UniNativeCustomView.d.ts +0 -0
  150. /package/types/{dom2 → dom2-internal}/UniNativeDefines.d.ts +0 -0
  151. /package/types/{dom2 → dom2-internal}/UniNativeImageView.d.ts +0 -0
  152. /package/types/{dom2/UniNativeScrollView.d.ts → dom2-internal/UniNativeNestedScrollView.d.ts} +0 -0
  153. /package/types/{dom2 → dom2-internal}/UniNativeTextView.d.ts +0 -0
  154. /package/types/{dom2 → dom2-internal}/UniNativeView.d.ts +0 -0
  155. /package/types/{dom2 → dom2-internal}/UniNativeViewType.d.ts +0 -0
  156. /package/types/{dom2 → dom2-internal}/UniScrollViewElement.d.ts +0 -0
  157. /package/types/{dom2 → dom2-internal}/UniTextElement.d.ts +0 -0
  158. /package/types/{dom2 → dom2-internal}/UniTextLayout.d.ts +0 -0
  159. /package/types/{dom2 → dom2-internal}/UniViewElement.d.ts +0 -0
@@ -0,0 +1,116 @@
1
+ {
2
+ "name": "typescript",
3
+ "author": "Microsoft Corp.",
4
+ "homepage": "https://www.typescriptlang.org/",
5
+ "version": "5.5.2",
6
+ "license": "Apache-2.0",
7
+ "description": "TypeScript is a language for application scale JavaScript development",
8
+ "keywords": [
9
+ "TypeScript",
10
+ "Microsoft",
11
+ "compiler",
12
+ "language",
13
+ "javascript"
14
+ ],
15
+ "bugs": {
16
+ "url": "https://github.com/Microsoft/TypeScript/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/Microsoft/TypeScript.git"
21
+ },
22
+ "main": "./lib/typescript.js",
23
+ "typings": "./lib/typescript.d.ts",
24
+ "bin": {
25
+ "tsc": "./bin/tsc",
26
+ "tsserver": "./bin/tsserver"
27
+ },
28
+ "engines": {
29
+ "node": ">=14.17"
30
+ },
31
+ "files": [
32
+ "bin",
33
+ "lib",
34
+ "!lib/enu",
35
+ "LICENSE.txt",
36
+ "README.md",
37
+ "SECURITY.md",
38
+ "ThirdPartyNoticeText.txt",
39
+ "!**/.gitattributes"
40
+ ],
41
+ "devDependencies": {
42
+ "@dprint/formatter": "^0.3.0",
43
+ "@dprint/typescript": "0.91.0",
44
+ "@esfx/canceltoken": "^1.0.0",
45
+ "@octokit/rest": "^20.1.1",
46
+ "@types/chai": "^4.3.16",
47
+ "@types/microsoft__typescript-etw": "^0.1.3",
48
+ "@types/minimist": "^1.2.5",
49
+ "@types/mocha": "^10.0.6",
50
+ "@types/ms": "^0.7.34",
51
+ "@types/node": "latest",
52
+ "@types/source-map-support": "^0.5.10",
53
+ "@types/which": "^3.0.3",
54
+ "@typescript-eslint/eslint-plugin": "^7.11.0",
55
+ "@typescript-eslint/parser": "^7.11.0",
56
+ "@typescript-eslint/utils": "^7.11.0",
57
+ "azure-devops-node-api": "^13.0.0",
58
+ "c8": "^9.1.0",
59
+ "chai": "^4.4.1",
60
+ "chalk": "^4.1.2",
61
+ "chokidar": "^3.6.0",
62
+ "diff": "^5.2.0",
63
+ "dprint": "^0.46.1",
64
+ "esbuild": "^0.21.4",
65
+ "eslint": "^8.57.0",
66
+ "eslint-formatter-autolinkable-stylish": "^1.3.0",
67
+ "eslint-plugin-local": "^4.2.2",
68
+ "fast-xml-parser": "^4.4.0",
69
+ "glob": "^10.4.1",
70
+ "hereby": "^1.8.9",
71
+ "jsonc-parser": "^3.2.1",
72
+ "minimist": "^1.2.8",
73
+ "mocha": "^10.4.0",
74
+ "mocha-fivemat-progress-reporter": "^0.1.0",
75
+ "ms": "^2.1.3",
76
+ "node-fetch": "^3.3.2",
77
+ "playwright": "^1.44.1",
78
+ "source-map-support": "^0.5.21",
79
+ "tslib": "^2.6.2",
80
+ "typescript": "^5.4.5",
81
+ "which": "^3.0.1"
82
+ },
83
+ "overrides": {
84
+ "typescript@*": "$typescript"
85
+ },
86
+ "scripts": {
87
+ "test": "hereby runtests-parallel --light=false",
88
+ "test:eslint-rules": "hereby run-eslint-rules-tests",
89
+ "build": "npm run build:compiler && npm run build:tests",
90
+ "build:compiler": "hereby local",
91
+ "build:tests": "hereby tests",
92
+ "build:tests:notypecheck": "hereby tests --no-typecheck",
93
+ "clean": "hereby clean",
94
+ "gulp": "hereby",
95
+ "lint": "hereby lint",
96
+ "format": "dprint fmt",
97
+ "setup-hooks": "node scripts/link-hooks.mjs"
98
+ },
99
+ "browser": {
100
+ "fs": false,
101
+ "os": false,
102
+ "path": false,
103
+ "crypto": false,
104
+ "buffer": false,
105
+ "@microsoft/typescript-etw": false,
106
+ "source-map-support": false,
107
+ "inspector": false,
108
+ "perf_hooks": false
109
+ },
110
+ "packageManager": "npm@8.19.4",
111
+ "volta": {
112
+ "node": "20.1.0",
113
+ "npm": "8.19.4"
114
+ },
115
+ "gitHead": "ce2e60e4ea15a65992e54a9e8877d16be9d42abb"
116
+ }
@@ -5,5 +5,6 @@
5
5
  /// <reference path='./lib/uni-camera/utssdk/global.d.ts' />
6
6
  /// <reference path='./lib/uni-canvas/utssdk/global.d.ts' />
7
7
  /// <reference path='./lib/uni-input/utssdk/global.d.ts' />
8
+ /// <reference path='./lib/uni-textarea/utssdk/global.d.ts' />
8
9
  /// <reference path='./lib/uni-video/utssdk/global.d.ts' />
9
10
  /// <reference path='./lib/uni-web-view/utssdk/global.d.ts' />
@@ -5,5 +5,6 @@ export * from './lib/uni-map-tencent-global/utssdk'
5
5
  export * from './lib/uni-camera/utssdk'
6
6
  export * from './lib/uni-canvas/utssdk'
7
7
  export * from './lib/uni-input/utssdk'
8
+ export * from './lib/uni-textarea/utssdk'
8
9
  export * from './lib/uni-video/utssdk'
9
10
  export * from './lib/uni-web-view/utssdk'
@@ -0,0 +1,9 @@
1
+ // 本文件为自动构建生成
2
+ import {
3
+
4
+ } from './interface'
5
+
6
+ declare global {
7
+
8
+ }
9
+
@@ -0,0 +1,5 @@
1
+ // 本文件为自动构建生成
2
+ export {
3
+
4
+ } from './interface'
5
+
@@ -1,340 +0,0 @@
1
- import { UniPage } from './index'
2
- import { UniElementStyles } from './UniElementType'
3
- import { UniCSSPropertyID, UniCSSPropertyName, UniCSSPropertyValue } from './UniCSSProperty'
4
- import { UniCSSUnitType, UniCSSUnitValue } from './UniCSSType'
5
- import { UniCSSBoxSizingType, UniCSSDisplayType, UniCSSPositionType, UniCSSBorderStyleType, UniCSSBorderWidthType } from './UniCSSProperty'
6
- import { UniCSSFlexDirectionType, UniCSSFlexWrapType, UniCSSJustifyContentType, UniCSSAlignItemsType, UniCSSAlignSelfType, UniCSSAlignContentType, UniCSSFlexBasisType } from './UniCSSProperty'
7
-
8
- declare global {
9
- /**
10
- * UniElement
11
- */
12
- interface UniElement {
13
-
14
- /**
15
- * 以下属性在FlexNode和DOM层封装
16
- * - Android平台:c层和kt层都需要封装
17
- * - iOS平台:oc层实现
18
- * - 鸿蒙平台:c层实现
19
- */
20
- /**
21
- * 元素的标签名
22
- */
23
- readonly tagName: string
24
- readonly nodeName: string //用于向下兼容
25
- /**
26
- * 元素的父元素对象
27
- */
28
- readonly parentElement: UniElement | null
29
- /**
30
- * 元素包含的子元素的集合
31
- */
32
- readonly children: UniElement[]
33
- /**
34
- * 元素包含的第一个子元素
35
- */
36
- readonly firstElementChild: UniElement | null
37
- readonly firstChild: UniElement | null //用于向下兼容
38
- /**
39
- * 元素包含的最后一个子元素
40
- */
41
- readonly lastElementChild: UniElement | null
42
- readonly lastChild: UniElement | null //用于向下兼容
43
- /**
44
- * 元素在其父元素的子元素节点中的前一个元素节点
45
- */
46
- readonly previousElementSibling: UniElement | null
47
- readonly previousSibling: UniElement | null //用于向下兼容
48
- /**
49
- * 元素在其父元素的子元素节点中的后一个元素节点
50
- */
51
- readonly nextElementSibling: UniElement | null
52
- readonly nextSibling: UniElement | null //用于向下兼容
53
-
54
- /**
55
- * 以下属性在DOM层封装实现
56
- * - Android平台:kotlin层实现
57
- * - iOS平台:oc层实现
58
- * - 鸿蒙平台:c层实现
59
- */
60
- /**
61
- * 元素的标识符,对应组件上的id属性
62
- * 默认值为空字符串
63
- */
64
- id: string
65
- /**
66
- * class属性值的集合
67
- * 提供给VUE框架保存class name信息
68
- */
69
- classList: string[]
70
- /**
71
- * 元素是否与DOM树连接
72
- */
73
- readonly isConnected: boolean
74
- /**
75
- * 元素所属页面对象
76
- */
77
- readonly uniPage: UniPage
78
- /**
79
- * 元素相对于父元素的位置信息
80
- */
81
- readonly offsetLeft: number
82
- readonly offsetTop: number
83
- /**
84
- * 元素的布局信息
85
- */
86
- readonly offsetWidth: number
87
- readonly offsetHeight: number
88
- /**
89
- * 获取或修改元素滚动条到元素左边的距离
90
- */
91
- scrollLeft: number
92
- /**
93
- * 获取或修改元素滚动条到元素顶部的距离
94
- */
95
- scrollTop: number
96
- /**
97
- * 元素内容宽度
98
- */
99
- readonly scrollWidth: number
100
- /**
101
- * 元素内容高度
102
- */
103
- readonly scrollHeight: number
104
- /**
105
- * 元素的CSS样式对象
106
- */
107
- // 复用DOM1中定义,暂时注释
108
- // readonly style: UniCSSStyleDeclaration
109
- /**
110
- * 元素的所有属性集合
111
- */
112
- readonly attributes: Map<string, any | null>
113
- /**
114
- * 自定义数据属性(data-*)的集合
115
- */
116
- readonly dataset: Map<string, any | null>
117
-
118
- /**
119
- * - 所有平台在c层实现
120
- */
121
- /**
122
- * 扩展数据
123
- * 提供给vue框架使用
124
- */
125
- readonly ext: Map<string, any | null>
126
- /**
127
- * 插槽名称
128
- */
129
- slot: UniSlotType
130
- /**
131
- * 获取内部ID值,用于框架调用,不对外公开
132
- * Android平台在c/kotlin层分别实现
133
- * 鸿蒙/iOS平台在c层实现
134
- */
135
- // 复用DOM1中定义,暂时注释
136
- // getNodeId(): number
137
-
138
- /**
139
- * 查找离当前元素最近可竖向滚动的祖先元素
140
- */
141
- closestVerticalScrollElement(): UniScrollViewElement | null
142
-
143
- /**
144
- * 以下方法在FlexNode和DOM层封装
145
- * - Android平台:c层和kt层都需要封装
146
- * - iOS平台:oc层实现
147
- * - 鸿蒙平台:c层实现
148
- */
149
- /**
150
- * 添加子元素
151
- */
152
- appendChild(child: UniElement): void
153
- /**
154
- * 插入子元素
155
- */
156
- insertBefore(child: UniElement, ref?: UniElement | null): UniElement | null
157
- /**
158
- * 删除子元素
159
- */
160
- removeChild(child: UniElement): UniElement | null
161
- /**
162
- * 从元素所属的DOM树中删除
163
- */
164
- remove(): void
165
- /**
166
- * 更新元素样式
167
- * UniCSSPropertyValue类型可为null,为null值时表示删除此样式
168
- * 仅内部使用
169
- */
170
- updateStyle(style: UniElementStyles): void
171
- updateStyle(key: UniCSSPropertyID | UniCSSPropertyName, value?: UniCSSPropertyValue | null): void
172
-
173
- /**
174
- * 以下方法在DOM层封装实现
175
- * - Android平台:kotlin层实现
176
- * - iOS平台:oc层实现
177
- * - 鸿蒙平台:c层实现
178
- */
179
- /**
180
- * 元素是否包含有指定的属性
181
- * 属性存在则返回true,否则返回false。
182
- */
183
- hasAttribute(key: string): boolean
184
- /**
185
- * 获取元素的属性值
186
- */
187
- getAttribute(key: string): string | null
188
- /**
189
- * 获取元素的属性值,返回真实属性值类型
190
- */
191
- getAnyAttribute(key: string): any | null
192
- /**
193
- * 设置元素的属性值
194
- */
195
- setAttribute(key: string, value: string): void
196
- /**
197
- * 设置元素的属性值,通过真实属性值类型设置
198
- */
199
- setAnyAttribute(key: string, value: any): void
200
- /**
201
- * 删除元素的指定属性
202
- * 如果指定的属性不存在,则不做任何操作,也不会产生错误。
203
- */
204
- removeAttribute(key: string): void
205
- /**
206
- * 更新或设置dataset,支持属性名称转换
207
- * 非公开API,仅对框架开放。开发者调用setAttribute设置/获取,也可通过dataset属性获取(dataset属性直接操作不支持属性名称转换)
208
- */
209
- // 复用DOM1中定义,暂时注释
210
- // setAttributeDataset(key: string, value: any): void
211
-
212
- /**
213
- * 添加事件监听
214
- */
215
- // 复用DOM1中定义,暂时注释
216
- // addEventListener<T extends UniEvent, R>(type: string, callback: (event: T) => R): UniCallbackWrapper
217
- /**
218
- * 移除事件监听
219
- */
220
- // 复用DOM1中定义,暂时注释
221
- // removeEventListener(type: string, callbackWrapper: UniCallbackWrapper): void
222
- /**
223
- * 分发事件
224
- */
225
- // 复用DOM1中定义,暂时注释
226
- // dispatchEvent(type: string, value: UniEvent): void
227
-
228
- /**
229
- * 返回与指定的选择器组匹配的元素的后代的第一个元素
230
- */
231
- querySelector(selector: string): UniElement | null
232
- /**
233
- * 返回与指定的选择器组匹配的所有元素
234
- */
235
- querySelectorAll(selector: string): UniElement[] | null
236
-
237
- /**
238
- * 滚动指定距离
239
- */
240
- scrollBy(x: number, y: number): void
241
- /**
242
- * 滚动指定坐标位置
243
- */
244
- scrollTo(x: number, y: number): void
245
-
246
- /**
247
- * 元素丢失焦点
248
- * 仅支持焦点的元素生效
249
- */
250
- blur(): void
251
- /**
252
- * 元素获取焦点
253
- * 仅支持焦点的元素生效
254
- */
255
- focus(): void
256
-
257
- /**
258
- * 获取元素的大小及其相对于窗口的位置信息
259
- */
260
- getBoundingClientRect(): DOMRect
261
-
262
- /**
263
- * 获取组件的绘制对象
264
- * 废弃,迁移到UniViewElement
265
- */
266
- // getDrawableContext(): DrawableContext | null
267
-
268
- /**
269
- * 创建一个新的动画并应用于元素
270
- */
271
- // 复用DOM1中定义,暂时注释
272
- // animate(keyframes : UniAnimationKeyframe|UniAnimationKeyframe[], options : UniAnimationOption|number) : UniAnimation | null
273
- /**
274
- * 对元素截图
275
- */
276
- // 复用DOM1中定义,暂时注释
277
- // takeSnapshot(options: TakeSnapshotOptions): void
278
- /**
279
- * 请求使元素进入全屏模式
280
- */
281
- // 复用DOM1中定义,暂时注释
282
- // requestFullscreen(options?: RequestFullscreenOptions|null) : void
283
- }
284
-
285
- // 以下暂时复用DOM1中定义,暂时注释
286
- // /**
287
- // * 事件对象
288
- // */
289
- // export type UniEvent = {
290
- // //Todo...
291
- // }
292
- // /**
293
- // * 回调对象
294
- // */
295
- // export type UniCallbackWrapper = {
296
- // //Todo...
297
- // }
298
-
299
- // /**
300
- // *
301
- // */
302
- // export type DOMRect = {
303
- // //Todo...
304
- // }
305
-
306
- // /**
307
- // * 动画对象
308
- // */
309
- // export type UniAnimation = {
310
- // //Todo...
311
- // }
312
- // /**
313
- // * 动画帧参数
314
- // */
315
- // export type UniAnimationKeyframe = {
316
- // //Todo...
317
- // }
318
- // /**
319
- // * 动画参数
320
- // */
321
- // export type UniAnimationOption = {
322
- // //Todo...
323
- // }
324
-
325
- // /**
326
- // * 截图参数
327
- // */
328
- // export type TakeSnapshotOptions = {
329
- // //Todo...
330
- // }
331
-
332
- // /**
333
- // * 元素请求全屏参数
334
- // */
335
- // export type RequestFullscreenOptions = {
336
- // //Todo...
337
- // }
338
-
339
-
340
- }
@@ -1,72 +0,0 @@
1
- import { UniElement } from './index'
2
-
3
-
4
-
5
- /**
6
- * UniNativeViewElement
7
- */
8
- export interface UniNativeViewElement extends UniElement {
9
-
10
- /**
11
- * 设置组件需要重新触发测量排版
12
- */
13
- setDirty(): void
14
-
15
- /**
16
- * 设置测量回调,多次调用会覆盖之前设置的测量回调
17
- * @param callback 测量回调方法
18
- * 注意:此回调方法运行在子线程中,需处理线程安全问题
19
- */
20
- setMeasureCallback(callback: UniNativeMeasureCallback): void
21
- }
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
- }