miaoda-expo-devkit 0.1.1-beta.11 → 0.1.1-beta.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.
- package/dist/metro.d.mts +6 -0
- package/dist/metro.d.ts +6 -0
- package/dist/metro.js +15 -0
- package/dist/metro.mjs +15 -0
- package/dist/stubs/expo-blur-stub.js +29 -0
- package/dist/stubs/expo-linear-gradient-stub.js +28 -0
- package/dist/stubs/react-native-reanimated-stub.js +32 -0
- package/package.json +1 -1
package/dist/metro.d.mts
CHANGED
|
@@ -229,6 +229,12 @@ declare function withWorkspaceNodeModules(config: MetroConfig): MetroConfig;
|
|
|
229
229
|
* 当前支持的包:
|
|
230
230
|
* - expo-image:Image 组件(className → style)
|
|
231
231
|
* - expo-camera:CameraView 组件(className → style)
|
|
232
|
+
* - expo-linear-gradient:LinearGradient 组件(className → style)
|
|
233
|
+
* - expo-blur:BlurView / BlurTargetView 组件(className → style)
|
|
234
|
+
* - react-native-reanimated:Animated.View / ScrollView / Text / Image / FlatList(className → style)
|
|
235
|
+
*
|
|
236
|
+
* 注意:expo-video 的 VideoView 在 web 上直接渲染 DOM <video> 元素,不经过 RN 样式系统,
|
|
237
|
+
* cssInterop/remapProps 均无效,不做拦截。需要 className 时请用 View 包裹 VideoView。
|
|
232
238
|
*
|
|
233
239
|
* 此函数在开发和生产环境均需启用(cssInterop 注册与环境无关)。
|
|
234
240
|
* 支持与其他 Metro wrapper 链式组合。
|
package/dist/metro.d.ts
CHANGED
|
@@ -229,6 +229,12 @@ declare function withWorkspaceNodeModules(config: MetroConfig): MetroConfig;
|
|
|
229
229
|
* 当前支持的包:
|
|
230
230
|
* - expo-image:Image 组件(className → style)
|
|
231
231
|
* - expo-camera:CameraView 组件(className → style)
|
|
232
|
+
* - expo-linear-gradient:LinearGradient 组件(className → style)
|
|
233
|
+
* - expo-blur:BlurView / BlurTargetView 组件(className → style)
|
|
234
|
+
* - react-native-reanimated:Animated.View / ScrollView / Text / Image / FlatList(className → style)
|
|
235
|
+
*
|
|
236
|
+
* 注意:expo-video 的 VideoView 在 web 上直接渲染 DOM <video> 元素,不经过 RN 样式系统,
|
|
237
|
+
* cssInterop/remapProps 均无效,不做拦截。需要 className 时请用 View 包裹 VideoView。
|
|
232
238
|
*
|
|
233
239
|
* 此函数在开发和生产环境均需启用(cssInterop 注册与环境无关)。
|
|
234
240
|
* 支持与其他 Metro wrapper 链式组合。
|
package/dist/metro.js
CHANGED
|
@@ -251,6 +251,12 @@ var EXPO_IMAGE_STUB_FILENAME = "expo-image-stub.js";
|
|
|
251
251
|
var EXPO_IMAGE_STUB_PATH = import_path6.default.resolve(__dirname, "stubs", EXPO_IMAGE_STUB_FILENAME);
|
|
252
252
|
var EXPO_CAMERA_STUB_FILENAME = "expo-camera-stub.js";
|
|
253
253
|
var EXPO_CAMERA_STUB_PATH = import_path6.default.resolve(__dirname, "stubs", EXPO_CAMERA_STUB_FILENAME);
|
|
254
|
+
var EXPO_LINEAR_GRADIENT_STUB_FILENAME = "expo-linear-gradient-stub.js";
|
|
255
|
+
var EXPO_LINEAR_GRADIENT_STUB_PATH = import_path6.default.resolve(__dirname, "stubs", EXPO_LINEAR_GRADIENT_STUB_FILENAME);
|
|
256
|
+
var REANIMATED_STUB_FILENAME = "react-native-reanimated-stub.js";
|
|
257
|
+
var REANIMATED_STUB_PATH = import_path6.default.resolve(__dirname, "stubs", REANIMATED_STUB_FILENAME);
|
|
258
|
+
var EXPO_BLUR_STUB_FILENAME = "expo-blur-stub.js";
|
|
259
|
+
var EXPO_BLUR_STUB_PATH = import_path6.default.resolve(__dirname, "stubs", EXPO_BLUR_STUB_FILENAME);
|
|
254
260
|
function withCssInterop(config) {
|
|
255
261
|
const upstream = config.resolver?.resolveRequest ?? null;
|
|
256
262
|
const resolveRequest = (context, moduleName, platform) => {
|
|
@@ -260,6 +266,15 @@ function withCssInterop(config) {
|
|
|
260
266
|
if (moduleName === "expo-camera" && !context.originModulePath.includes(EXPO_CAMERA_STUB_FILENAME)) {
|
|
261
267
|
return { filePath: EXPO_CAMERA_STUB_PATH, type: "sourceFile" };
|
|
262
268
|
}
|
|
269
|
+
if (moduleName === "expo-linear-gradient" && !context.originModulePath.includes(EXPO_LINEAR_GRADIENT_STUB_FILENAME)) {
|
|
270
|
+
return { filePath: EXPO_LINEAR_GRADIENT_STUB_PATH, type: "sourceFile" };
|
|
271
|
+
}
|
|
272
|
+
if (moduleName === "react-native-reanimated" && !context.originModulePath.includes(REANIMATED_STUB_FILENAME)) {
|
|
273
|
+
return { filePath: REANIMATED_STUB_PATH, type: "sourceFile" };
|
|
274
|
+
}
|
|
275
|
+
if (moduleName === "expo-blur" && !context.originModulePath.includes(EXPO_BLUR_STUB_FILENAME)) {
|
|
276
|
+
return { filePath: EXPO_BLUR_STUB_PATH, type: "sourceFile" };
|
|
277
|
+
}
|
|
263
278
|
if (upstream) {
|
|
264
279
|
return upstream(context, moduleName, platform);
|
|
265
280
|
}
|
package/dist/metro.mjs
CHANGED
|
@@ -214,6 +214,12 @@ var EXPO_IMAGE_STUB_FILENAME = "expo-image-stub.js";
|
|
|
214
214
|
var EXPO_IMAGE_STUB_PATH = path6.resolve(__dirname, "stubs", EXPO_IMAGE_STUB_FILENAME);
|
|
215
215
|
var EXPO_CAMERA_STUB_FILENAME = "expo-camera-stub.js";
|
|
216
216
|
var EXPO_CAMERA_STUB_PATH = path6.resolve(__dirname, "stubs", EXPO_CAMERA_STUB_FILENAME);
|
|
217
|
+
var EXPO_LINEAR_GRADIENT_STUB_FILENAME = "expo-linear-gradient-stub.js";
|
|
218
|
+
var EXPO_LINEAR_GRADIENT_STUB_PATH = path6.resolve(__dirname, "stubs", EXPO_LINEAR_GRADIENT_STUB_FILENAME);
|
|
219
|
+
var REANIMATED_STUB_FILENAME = "react-native-reanimated-stub.js";
|
|
220
|
+
var REANIMATED_STUB_PATH = path6.resolve(__dirname, "stubs", REANIMATED_STUB_FILENAME);
|
|
221
|
+
var EXPO_BLUR_STUB_FILENAME = "expo-blur-stub.js";
|
|
222
|
+
var EXPO_BLUR_STUB_PATH = path6.resolve(__dirname, "stubs", EXPO_BLUR_STUB_FILENAME);
|
|
217
223
|
function withCssInterop(config) {
|
|
218
224
|
const upstream = config.resolver?.resolveRequest ?? null;
|
|
219
225
|
const resolveRequest = (context, moduleName, platform) => {
|
|
@@ -223,6 +229,15 @@ function withCssInterop(config) {
|
|
|
223
229
|
if (moduleName === "expo-camera" && !context.originModulePath.includes(EXPO_CAMERA_STUB_FILENAME)) {
|
|
224
230
|
return { filePath: EXPO_CAMERA_STUB_PATH, type: "sourceFile" };
|
|
225
231
|
}
|
|
232
|
+
if (moduleName === "expo-linear-gradient" && !context.originModulePath.includes(EXPO_LINEAR_GRADIENT_STUB_FILENAME)) {
|
|
233
|
+
return { filePath: EXPO_LINEAR_GRADIENT_STUB_PATH, type: "sourceFile" };
|
|
234
|
+
}
|
|
235
|
+
if (moduleName === "react-native-reanimated" && !context.originModulePath.includes(REANIMATED_STUB_FILENAME)) {
|
|
236
|
+
return { filePath: REANIMATED_STUB_PATH, type: "sourceFile" };
|
|
237
|
+
}
|
|
238
|
+
if (moduleName === "expo-blur" && !context.originModulePath.includes(EXPO_BLUR_STUB_FILENAME)) {
|
|
239
|
+
return { filePath: EXPO_BLUR_STUB_PATH, type: "sourceFile" };
|
|
240
|
+
}
|
|
226
241
|
if (upstream) {
|
|
227
242
|
return upstream(context, moduleName, platform);
|
|
228
243
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var ExpoBlur = __toESM(require("expo-blur"));
|
|
25
|
+
var import_nativewind = require("nativewind");
|
|
26
|
+
if (ExpoBlur.BlurView) (0, import_nativewind.cssInterop)(ExpoBlur.BlurView, { className: "style" });
|
|
27
|
+
if (ExpoBlur.BlurTargetView) (0, import_nativewind.cssInterop)(ExpoBlur.BlurTargetView, { className: "style" });
|
|
28
|
+
module.exports = ExpoBlur;
|
|
29
|
+
//# sourceMappingURL=expo-blur-stub.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var ExpoLinearGradient = __toESM(require("expo-linear-gradient"));
|
|
25
|
+
var import_nativewind = require("nativewind");
|
|
26
|
+
(0, import_nativewind.cssInterop)(ExpoLinearGradient.LinearGradient, { className: "style" });
|
|
27
|
+
module.exports = ExpoLinearGradient;
|
|
28
|
+
//# sourceMappingURL=expo-linear-gradient-stub.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var Reanimated = __toESM(require("react-native-reanimated"));
|
|
25
|
+
var import_nativewind = require("nativewind");
|
|
26
|
+
(0, import_nativewind.cssInterop)(Reanimated.default.View, { className: "style" });
|
|
27
|
+
(0, import_nativewind.cssInterop)(Reanimated.default.ScrollView, { className: "style" });
|
|
28
|
+
(0, import_nativewind.cssInterop)(Reanimated.default.Text, { className: "style" });
|
|
29
|
+
(0, import_nativewind.cssInterop)(Reanimated.default.Image, { className: "style" });
|
|
30
|
+
(0, import_nativewind.cssInterop)(Reanimated.default.FlatList, { className: "style" });
|
|
31
|
+
module.exports = Reanimated;
|
|
32
|
+
//# sourceMappingURL=react-native-reanimated-stub.js.map
|