vite-plugin-taro-runtime 0.7.12-beta.0 → 0.7.12

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 (72) hide show
  1. package/dist/api/dist/tools.d.ts +1 -1
  2. package/dist/api/dist/tools.js +1 -1
  3. package/dist/api/dist/tools.js.map +1 -1
  4. package/dist/components/dist/components/taro-image-core.js +13 -12
  5. package/dist/components/dist/components/taro-scroll-view-core.js +8 -3
  6. package/dist/components/dist/components/taro-web-view-core.js +48 -1
  7. package/dist/components/types/Button.d.ts +7 -0
  8. package/dist/components/types/Image.d.ts +6 -0
  9. package/dist/components/types/Input.d.ts +1 -1
  10. package/dist/components/types/ScrollView.d.ts +5 -0
  11. package/dist/components/types/Textarea.d.ts +1 -1
  12. package/dist/components/types/common.d.ts +24 -1
  13. package/dist/plugin-framework-react/runtime.js +29 -67
  14. package/dist/plugin-framework-react/runtime.js.map +1 -1
  15. package/dist/plugin-platform-h5/definition.json +3 -5
  16. package/dist/plugin-platform-weapp/runtime-utils.js +1 -0
  17. package/dist/plugin-platform-weapp/runtime-utils.js.map +1 -1
  18. package/dist/plugin-platform-weapp/runtime.js +1 -0
  19. package/dist/plugin-platform-weapp/runtime.js.map +1 -1
  20. package/dist/plugin-platform-weapp/types/components.d.ts +1 -0
  21. package/dist/react/index.d.ts +1 -0
  22. package/dist/react/react.esm.js +12 -113
  23. package/dist/react/renderer-host.d.ts +8 -0
  24. package/dist/runtime/bom/document.js +1 -1
  25. package/dist/runtime/dom/element.d.ts +4 -0
  26. package/dist/runtime/dom/element.js +9 -1
  27. package/dist/runtime/dom/element.js.map +1 -1
  28. package/dist/runtime/dom/nearest-ctx.d.ts +9 -0
  29. package/dist/runtime/dom/nearest-ctx.js +49 -0
  30. package/dist/runtime/dom/nearest-ctx.js.map +1 -0
  31. package/dist/runtime/dom/node.d.ts +15 -2
  32. package/dist/runtime/dom/node.js +71 -59
  33. package/dist/runtime/dom/node.js.map +1 -1
  34. package/dist/runtime/dom/root.d.ts +2 -0
  35. package/dist/runtime/dom/root.js +12 -14
  36. package/dist/runtime/dom/root.js.map +1 -1
  37. package/dist/runtime/dom/style.d.ts +2 -0
  38. package/dist/runtime/dom/style.js +15 -14
  39. package/dist/runtime/dom/style.js.map +1 -1
  40. package/dist/runtime/dom/text.d.ts +5 -0
  41. package/dist/runtime/dom/text.js +8 -4
  42. package/dist/runtime/dsl/common.d.ts +1 -1
  43. package/dist/runtime/dsl/common.js +18 -9
  44. package/dist/runtime/dsl/common.js.map +1 -1
  45. package/dist/runtime/index.d.ts +1 -0
  46. package/dist/runtime/index.js +1 -0
  47. package/dist/runtime/index.js.map +1 -1
  48. package/dist/runtime/runtime.esm.d.ts +9 -2
  49. package/dist/runtime/runtime.esm.js +81 -13
  50. package/dist/runtime/runtime.esm.js.map +1 -1
  51. package/dist/taro/package.json +9 -9
  52. package/dist/taro/types/api/device/clipboard.d.ts +5 -0
  53. package/dist/taro/types/api/network/request.d.ts +7 -3
  54. package/dist/taro/types/api/network/upload.d.ts +21 -1
  55. package/dist/taro/types/api/payment/index.d.ts +58 -0
  56. package/dist/taro/types/compile/compiler.d.ts +13 -0
  57. package/dist/taro/types/compile/hooks.d.ts +1 -0
  58. package/dist/taro/types/taro.config.d.ts +64 -0
  59. package/dist/taro-h5/dist/api/base/weapp/app-event.js +15 -5
  60. package/dist/taro-h5/dist/api/base/weapp/app-event.js.map +1 -1
  61. package/dist/taro-h5/dist/api/device/clipboard.js +10 -6
  62. package/dist/taro-h5/dist/api/device/clipboard.js.map +1 -1
  63. package/dist/taro-h5/dist/api/media/map.d.ts +14 -1
  64. package/dist/taro-h5/dist/api/media/map.js +72 -2
  65. package/dist/taro-h5/dist/api/media/map.js.map +1 -1
  66. package/dist/taro-h5/dist/api/taro.d.ts +1 -1
  67. package/dist/taro-h5/dist/api/taro.js +3 -3
  68. package/dist/taro-h5/dist/api/taro.js.map +1 -1
  69. package/dist/taro-h5/dist/api/wxml/IntersectionObserver.js +3 -0
  70. package/dist/taro-h5/dist/api/wxml/IntersectionObserver.js.map +1 -1
  71. package/package.json +22 -16
  72. package/types/tt-document.d.ts +38 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-taro-runtime",
3
- "version": "0.7.12-beta.0",
3
+ "version": "0.7.12",
4
4
  "description": "Taro runtime, React, and platform support for vite-plugin-taro.",
5
5
  "author": "sep2",
6
6
  "license": "MIT",
@@ -11,6 +11,11 @@
11
11
  "import": "./dist/runtime/index.js",
12
12
  "default": "./dist/runtime/index.js"
13
13
  },
14
+ "./runtime/tt-document": {
15
+ "types": "./types/tt-document.d.ts",
16
+ "import": "./dist/runtime/bom/document.js",
17
+ "default": "./dist/runtime/bom/document.js"
18
+ },
14
19
  "./runtime/h5": {
15
20
  "types": "./dist/runtime/runtime.esm.d.ts",
16
21
  "import": "./dist/runtime/runtime.esm.js",
@@ -109,6 +114,7 @@
109
114
  },
110
115
  "files": [
111
116
  "dist",
117
+ "types",
112
118
  "LICENSE",
113
119
  "README.md"
114
120
  ],
@@ -139,7 +145,7 @@
139
145
  },
140
146
  "dependencies": {
141
147
  "@stencil/core": "2.22.3",
142
- "@tarojs/shared": "4.2.1",
148
+ "@tarojs/shared": "4.3.0",
143
149
  "abortcontroller-polyfill": "^1.7.5",
144
150
  "base64-js": "^1.5.1",
145
151
  "hammerjs": "^2.0.8",
@@ -153,7 +159,7 @@
153
159
  "query-string": "^9.5.1",
154
160
  "react-reconciler": "0.34.0",
155
161
  "resolve-pathname": "^3.0.0",
156
- "swiper": "11.1.15",
162
+ "swiper": "12.1.2",
157
163
  "tslib": "^2.8.1",
158
164
  "universal-router": "^9.2.0",
159
165
  "whatwg-fetch": "^3.6.20"
@@ -163,19 +169,19 @@
163
169
  "react-dom": "^19.3.0"
164
170
  },
165
171
  "devDependencies": {
166
- "@tarojs/api": "4.2.1",
167
- "@tarojs/components": "4.2.1",
168
- "@tarojs/plugin-framework-react": "4.2.1",
169
- "@tarojs/plugin-html": "4.2.1",
170
- "@tarojs/plugin-platform-alipay": "4.2.1",
171
- "@tarojs/plugin-platform-h5": "4.2.1",
172
- "@tarojs/plugin-platform-tt": "4.2.1",
173
- "@tarojs/plugin-platform-weapp": "4.2.1",
174
- "@tarojs/react": "4.2.1",
175
- "@tarojs/router": "4.2.1",
176
- "@tarojs/runtime": "4.2.1",
177
- "@tarojs/taro": "4.2.1",
178
- "@tarojs/taro-h5": "4.2.1",
172
+ "@tarojs/api": "4.3.0",
173
+ "@tarojs/components": "4.3.0",
174
+ "@tarojs/plugin-framework-react": "4.3.0",
175
+ "@tarojs/plugin-html": "4.3.0",
176
+ "@tarojs/plugin-platform-alipay": "4.3.0",
177
+ "@tarojs/plugin-platform-h5": "4.3.0",
178
+ "@tarojs/plugin-platform-tt": "4.3.0",
179
+ "@tarojs/plugin-platform-weapp": "4.3.0",
180
+ "@tarojs/react": "4.3.0",
181
+ "@tarojs/router": "4.3.0",
182
+ "@tarojs/runtime": "4.3.0",
183
+ "@tarojs/taro": "4.3.0",
184
+ "@tarojs/taro-h5": "4.3.0",
179
185
  "@types/node": "^26.6.3",
180
186
  "@types/react": "^19.3.0",
181
187
  "typescript": "^7.0.2"
@@ -0,0 +1,38 @@
1
+ import type { MpEvent } from 'vite-plugin-taro-runtime/runtime/mini'
2
+
3
+ /** TT SDK nodes are Page-local presentation instances; React refs retain TaroNode identities. */
4
+ export interface TTNativeNode {
5
+ readonly nodeType: number
6
+ readonly childNodes: readonly TTNativeNode[]
7
+ readonly firstChild: TTNativeNode | null
8
+ readonly nextSibling: TTNativeNode | null
9
+ readonly parentNode: TTNativeNode | null
10
+ nodeValue: string
11
+ appendChild(child: TTNativeNode): void
12
+ insertBefore(child: TTNativeNode, before: TTNativeNode | null): void
13
+ removeChild(child: TTNativeNode): void
14
+ }
15
+
16
+ export interface TTNativeElement extends TTNativeNode {
17
+ id: string
18
+ readonly attributes: Readonly<Record<string, unknown>>
19
+ setAttribute(name: string, value: unknown): void
20
+ removeAttribute(name: string): void
21
+ addEventListener(name: string, listener: (event: MpEvent) => unknown): void
22
+ removeEventListener(name: string, listener: (event: MpEvent) => unknown): void
23
+ }
24
+
25
+ export interface TTNativeComponent extends TTNativeElement {
26
+ readonly componentName: string
27
+ /** SDK native components accept their default-slot value as one node or an array of nodes. */
28
+ appendChild(children: TTNativeNode | readonly TTNativeNode[]): void
29
+ }
30
+
31
+ export interface TTNativeDocument {
32
+ getPageDocumentById(id: number): TTNativeElement | undefined
33
+ createElement(name: string): TTNativeElement
34
+ createTextNode(text: string): TTNativeNode
35
+ }
36
+
37
+ /** Adapts the current TT appDocument through Taro's existing native document factory. */
38
+ export declare function createTTDomDocument(): TTNativeDocument