@react-native-ama/core 1.1.1 → 1.1.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/scripts/create-config.d.ts +1 -0
- package/dist/scripts/create-config.js +23 -0
- package/package.json +11 -9
- package/src/postinstall.js +18 -0
- /package/dist/{components → src/components}/AMAProvider.d.ts +0 -0
- /package/dist/{components → src/components}/AMAProvider.js +0 -0
- /package/dist/{components → src/components}/AutofocusContainer.d.ts +0 -0
- /package/dist/{components → src/components}/AutofocusContainer.js +0 -0
- /package/dist/{components → src/components}/HideChildrenFromAccessibilityTree.d.ts +0 -0
- /package/dist/{components → src/components}/HideChildrenFromAccessibilityTree.js +0 -0
- /package/dist/{hooks → src/hooks}/useButtonChecks.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useButtonChecks.js +0 -0
- /package/dist/{hooks → src/hooks}/useChecks.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useChecks.js +0 -0
- /package/dist/{hooks → src/hooks}/useFocus.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useFocus.js +0 -0
- /package/dist/{hooks → src/hooks}/useTimedAction.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useTimedAction.js +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{utils → src/utils}/numerify.d.ts +0 -0
- /package/dist/{utils → src/utils}/numerify.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const projectRoot = path_1.default.resolve(process.cwd(), '..', '..', '..');
|
|
9
|
+
const configFileName = 'ama.rules.json';
|
|
10
|
+
const configFilePath = path_1.default.join(projectRoot, configFileName);
|
|
11
|
+
const defaultConfig = {
|
|
12
|
+
rules: {},
|
|
13
|
+
accessibilityLabelExceptions: [],
|
|
14
|
+
};
|
|
15
|
+
if (!fs_1.default.existsSync(configFilePath)) {
|
|
16
|
+
try {
|
|
17
|
+
fs_1.default.writeFileSync(configFilePath, JSON.stringify(defaultConfig, null, 2));
|
|
18
|
+
console.log(`[AMA]: Rules file created at ${configFilePath}`);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error('[AMA]: Error creating rules file:', error);
|
|
22
|
+
}
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-ama/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Accessible Mobile App Library for React Native",
|
|
5
5
|
"react-native": "src/index",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": [
|
|
10
10
|
{
|
|
11
|
-
"imports": "./dist/index.js",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
11
|
+
"imports": "./dist/src/index.js",
|
|
12
|
+
"types": "./dist/src/index.d.ts"
|
|
13
13
|
},
|
|
14
|
-
"./dist/index.js"
|
|
14
|
+
"./dist/src/index.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"src",
|
|
19
|
-
"dist"
|
|
19
|
+
"dist",
|
|
20
|
+
"dist/scripts"
|
|
20
21
|
],
|
|
21
22
|
"scripts": {
|
|
22
23
|
"build": "rm -rf dist && tsc -p ./tsconfig.build.json",
|
|
23
24
|
"typecheck": "tsc --noEmit",
|
|
24
|
-
"test": "jest"
|
|
25
|
+
"test": "jest",
|
|
26
|
+
"postinstall": "node ./src/postinstall.js"
|
|
25
27
|
},
|
|
26
28
|
"dependencies": {
|
|
27
|
-
"@react-native-ama/internal": "~1.1.
|
|
29
|
+
"@react-native-ama/internal": "~1.1.3"
|
|
28
30
|
},
|
|
29
31
|
"peerDependencies": {
|
|
30
32
|
"react": "*",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
// INIT_CWD points to where `npm install` or `yarn install` was invoked
|
|
4
|
+
const initCwd = process.env.INIT_CWD || '';
|
|
5
|
+
const packageRoot = __dirname;
|
|
6
|
+
|
|
7
|
+
// Detect if this is running as part of the monorepo installation
|
|
8
|
+
const isMonorepo = initCwd.includes(path.join(packageRoot, '..', '..', '..'));
|
|
9
|
+
|
|
10
|
+
// If running in the monorepo context, skip the postinstall script
|
|
11
|
+
if (isMonorepo) {
|
|
12
|
+
console.log('[AMA] Skipping postinstall: Running within monorepo');
|
|
13
|
+
process.exit(0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// If installed as a standalone dependency, run the postinstall logic
|
|
17
|
+
console.log('[AMA] Running postinstall: User installation');
|
|
18
|
+
require('./../dist/scripts/create-config.js');
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|