vite-plugin-taro-runtime 0.8.1 → 0.8.3
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.
- package/dist/react/react.esm.js +11 -1
- package/package.json +7 -7
package/dist/react/react.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PLATFORM_TYPE, isObject, isEnableTTDom, isString, isFunction, toCamelCase, UNITLESS_PROPERTIES_SET, isNumber, capitalize, internalComponents, isUndefined, noop, isBoolean, hooks, ensure } from '@tarojs/shared';
|
|
2
2
|
import { setInnerHTML, convertNumber2PX, eventHandlerTTDom } from '@tarojs/runtime';
|
|
3
3
|
import host from '\0vpt:renderer-host';
|
|
4
|
-
import { version } from 'react';
|
|
4
|
+
import { isValidElement, version } from 'react';
|
|
5
5
|
import Reconciler from 'react-reconciler';
|
|
6
6
|
import {
|
|
7
7
|
ConcurrentRoot,
|
|
@@ -577,6 +577,16 @@ function setProperty(dom, name, value, oldValue) {
|
|
|
577
577
|
if (process.env.TARO_ENV === 'tt' && isEnableTTDom() && !IS_DATASET_OR_ARIA.test(name)) {
|
|
578
578
|
name = toCamelCase(name);
|
|
579
579
|
}
|
|
580
|
+
// React elements belong in children, not host data. Keep the O(1) check entirely development-only.
|
|
581
|
+
if (process.env.NODE_ENV !== 'production' && isValidElement(value)) {
|
|
582
|
+
if (!isValidElement(oldValue)) {
|
|
583
|
+
console.warn(`[VPT] React element ignored for host attribute "${name}". Render it as a child instead.`);
|
|
584
|
+
if (oldValue != null) {
|
|
585
|
+
dom.removeAttribute(name);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
580
590
|
if (value == null) {
|
|
581
591
|
dom.removeAttribute(name);
|
|
582
592
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-taro-runtime",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Taro runtime, React, and platform support for vite-plugin-taro.",
|
|
5
5
|
"author": "sep2",
|
|
6
6
|
"license": "MIT",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"hammerjs": "^2.0.8",
|
|
158
158
|
"history": "^5.3.0",
|
|
159
159
|
"hls.js": "^1.7.3",
|
|
160
|
-
"ics": "^3.
|
|
160
|
+
"ics": "^3.12.1",
|
|
161
161
|
"is-mobile": "^4.0.0",
|
|
162
162
|
"jsonp-retry": "^1.0.3",
|
|
163
163
|
"lodash-es": "4.18.1",
|
|
@@ -165,14 +165,14 @@
|
|
|
165
165
|
"query-string": "^9.5.1",
|
|
166
166
|
"react-reconciler": "0.34.0",
|
|
167
167
|
"resolve-pathname": "^3.0.0",
|
|
168
|
-
"swiper": "12.
|
|
168
|
+
"swiper": "12.2.0",
|
|
169
169
|
"tslib": "^2.8.1",
|
|
170
|
-
"universal-router": "^9.2.
|
|
170
|
+
"universal-router": "^9.2.1",
|
|
171
171
|
"whatwg-fetch": "^3.6.20"
|
|
172
172
|
},
|
|
173
173
|
"peerDependencies": {
|
|
174
|
-
"react": "^19.3.
|
|
175
|
-
"react-dom": "^19.3.
|
|
174
|
+
"react": "^19.3.1",
|
|
175
|
+
"react-dom": "^19.3.1"
|
|
176
176
|
},
|
|
177
177
|
"devDependencies": {
|
|
178
178
|
"@tarojs/api": "4.3.1",
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"@tarojs/runtime": "4.3.1",
|
|
189
189
|
"@tarojs/taro": "4.3.1",
|
|
190
190
|
"@tarojs/taro-h5": "4.3.1",
|
|
191
|
-
"@types/node": "^26.6.
|
|
191
|
+
"@types/node": "^26.6.5",
|
|
192
192
|
"@types/react": "^19.3.0",
|
|
193
193
|
"typescript": "^7.0.2"
|
|
194
194
|
},
|