@rsmax/macro 1.3.12 → 1.3.13
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/lib/createHostComponent.js +1 -1
- package/lib/macro.d.ts +1 -1
- package/lib/macro.js +4 -4
- package/lib/requirePlugin.d.ts +1 -1
- package/lib/requirePluginComponent.d.ts +1 -1
- package/lib/requirePluginComponent.js +1 -1
- package/lib/useAppEvent.d.ts +1 -1
- package/lib/useAppEvent.js +1 -1
- package/lib/usePageEvent.d.ts +1 -1
- package/lib/usePageEvent.js +1 -1
- package/package.json +17 -17
package/lib/macro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
1
|
+
import type * as React from 'react';
|
|
2
2
|
type PageEventName = 'onLoad' | 'onShow' | 'onHide' | 'onReady' | 'onPullDownRefresh' | 'onReachBottom' | 'onPageScroll' | 'onShareAppMessage' | 'onShareTimeline' | 'onTitleClick' | 'onOptionMenuClick' | 'onPopMenuClick' | 'onPullIntercept' | 'onBack' | 'onKeyboardHeight' | 'onTabItemTap' | 'beforeTabItemTap' | 'onResize' | 'onUnload';
|
|
3
3
|
type AppEventName = 'onLaunch' | 'onShow' | 'onHide' | 'onError' | 'onShareAppMessage' | 'onShareTimeline' | 'onPageNotFound' | 'onUnhandledRejection' | 'onThemeChange';
|
|
4
4
|
export declare function createHostComponent<P = any>(name: string, props: Array<string | [string, string]>): React.ComponentType<P>;
|
package/lib/macro.js
CHANGED
|
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const babel_plugin_macros_1 = require("babel-plugin-macros");
|
|
7
|
-
const shared_1 = require("@rsmax/shared");
|
|
8
6
|
const build_store_1 = __importDefault(require("@rsmax/build-store"));
|
|
7
|
+
const shared_1 = require("@rsmax/shared");
|
|
8
|
+
const babel_plugin_macros_1 = require("babel-plugin-macros");
|
|
9
9
|
const createHostComponent_1 = __importDefault(require("./createHostComponent"));
|
|
10
|
-
const requirePluginComponent_1 = __importDefault(require("./requirePluginComponent"));
|
|
11
10
|
const requirePlugin_1 = __importDefault(require("./requirePlugin"));
|
|
12
|
-
const
|
|
11
|
+
const requirePluginComponent_1 = __importDefault(require("./requirePluginComponent"));
|
|
13
12
|
const useAppEvent_1 = __importDefault(require("./useAppEvent"));
|
|
13
|
+
const usePageEvent_1 = __importDefault(require("./usePageEvent"));
|
|
14
14
|
function rsmax({ references, state }) {
|
|
15
15
|
var _a, _b, _c, _d, _e;
|
|
16
16
|
(_a = references.createHostComponent) === null || _a === void 0 ? void 0 : _a.forEach(path => (0, createHostComponent_1.default)(path, state));
|
package/lib/requirePlugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodePath } from '@babel/traverse';
|
|
1
|
+
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
export default function requirePlugin(path: NodePath): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodePath } from '@babel/traverse';
|
|
1
|
+
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
export default function requirePluginComponent(path: NodePath, state: any): void;
|
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const t = __importStar(require("@babel/types"));
|
|
30
|
-
const insertImportDeclaration_1 = __importDefault(require("./utils/insertImportDeclaration"));
|
|
31
30
|
const build_store_1 = __importDefault(require("@rsmax/build-store"));
|
|
31
|
+
const insertImportDeclaration_1 = __importDefault(require("./utils/insertImportDeclaration"));
|
|
32
32
|
const PACKAGE_NAME = '@rsmax/runtime';
|
|
33
33
|
const FUNCTION_NAME = 'createNativeComponent';
|
|
34
34
|
function getName(callExpression) {
|
package/lib/useAppEvent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodePath } from '@babel/traverse';
|
|
1
|
+
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
export default function useAppEvent(path: NodePath, state: any): void;
|
package/lib/useAppEvent.js
CHANGED
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const t = __importStar(require("@babel/types"));
|
|
30
|
-
const shared_1 = require("@rsmax/shared");
|
|
31
30
|
const build_store_1 = __importDefault(require("@rsmax/build-store"));
|
|
31
|
+
const shared_1 = require("@rsmax/shared");
|
|
32
32
|
const insertImportDeclaration_1 = __importDefault(require("./utils/insertImportDeclaration"));
|
|
33
33
|
const PACKAGE_NAME = '@rsmax/runtime';
|
|
34
34
|
const FUNCTION_NAME = 'useAppEvent';
|
package/lib/usePageEvent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodePath } from '@babel/traverse';
|
|
1
|
+
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
export default function usePageEvent(path: NodePath, state: any): void;
|
package/lib/usePageEvent.js
CHANGED
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const t = __importStar(require("@babel/types"));
|
|
30
|
-
const shared_1 = require("@rsmax/shared");
|
|
31
30
|
const build_store_1 = __importDefault(require("@rsmax/build-store"));
|
|
31
|
+
const shared_1 = require("@rsmax/shared");
|
|
32
32
|
const insertImportDeclaration_1 = __importDefault(require("./utils/insertImportDeclaration"));
|
|
33
33
|
const PACKAGE_NAME = '@rsmax/runtime';
|
|
34
34
|
const FUNCTION_NAME = 'usePageEvent';
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsmax/macro",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"types": "lib/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"clean": "rimraf lib tsconfig.tsbuildinfo",
|
|
9
|
-
"pretest": "npm run build",
|
|
10
|
-
"prebuild": "npm run clean",
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"test": "vitest run"
|
|
13
|
-
},
|
|
14
5
|
"keywords": [
|
|
15
6
|
"remax",
|
|
16
7
|
"babel-plugin-macros"
|
|
17
8
|
],
|
|
18
|
-
"author": "Caihuanyu <eterlf41@gmail.com>",
|
|
19
9
|
"license": "MIT",
|
|
10
|
+
"author": "Caihuanyu <eterlf41@gmail.com>",
|
|
11
|
+
"main": "lib/index.js",
|
|
12
|
+
"types": "lib/index.d.ts",
|
|
20
13
|
"files": [
|
|
21
14
|
"lib"
|
|
22
15
|
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"prebuild": "npm run clean",
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"clean": "rimraf lib tsconfig.tsbuildinfo",
|
|
20
|
+
"pretest": "npm run build",
|
|
21
|
+
"test": "vitest run"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@rsmax/shared": "1.3.13"
|
|
25
|
+
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@babel/core": "^7.4.3",
|
|
25
28
|
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
|
|
26
|
-
"@rsmax/build-store": "1.3.
|
|
27
|
-
"@rsmax/types": "1.3.
|
|
29
|
+
"@rsmax/build-store": "1.3.13",
|
|
30
|
+
"@rsmax/types": "1.3.13",
|
|
28
31
|
"@types/babel-plugin-macros": "^2.6.0",
|
|
29
32
|
"@types/lodash": "^4.14.149",
|
|
30
33
|
"babel-plugin-macros": "^3.1.0",
|
|
31
34
|
"babel-plugin-tester": "^8.0.1",
|
|
32
35
|
"react": "^18.3.0"
|
|
33
36
|
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@rsmax/shared": "1.3.12"
|
|
36
|
-
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "ff3656307036567c5b9d9b62dcaa599f539d56b7"
|
|
41
41
|
}
|