diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3ca942..bafd7c7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,9 +23,9 @@ The [example app](/example/) demonstrates usage of the library. You need to run It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app. -If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/YamapLiteExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > @atc/react-native-yamap-lite`. +If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/YamapLiteExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > @exterio/react-native-yamap-lite`. -To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `@atc/react-native-yamap-lite` under `Android`. +To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `@exterio/react-native-yamap-lite` under `Android`. You can use various commands from the root directory to work with the project. diff --git a/README.md b/README.md index 32f43fc..6e690fd 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@
-@atc/react-native-yamap-lite +@exterio/react-native-yamap-lite -# @atc/react-native-yamap-lite +# @exterio/react-native-yamap-lite **Легковесная библиотека для интеграции Yandex Maps (Яндекс Карт) в React Native.** Yandex Maps · React Native · Fabric -[![npm](https://img.shields.io/npm/v/@atc/react-native-yamap-lite.svg)](https://www.npmjs.com/package/@atc/react-native-yamap-lite) +[![npm](https://img.shields.io/npm/v/@exterio/react-native-yamap-lite.svg)](https://www.npmjs.com/package/@exterio/react-native-yamap-lite) [![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20Android-blue.svg)](#требования) [![New Architecture](https://img.shields.io/badge/New%20Architecture-Fabric-success.svg)](#требования) [![tests](https://img.shields.io/badge/tests-Jest%20%2B%20Harness-brightgreen.svg)](#тесты) -[![license](https://img.shields.io/npm/l/@atc/react-native-yamap-lite.svg)](./LICENSE) +[![license](https://img.shields.io/npm/l/@exterio/react-native-yamap-lite.svg)](./LICENSE)
@@ -47,13 +47,13 @@ Lite-обёртка над [Yandex MapKit SDK](https://yandex.ru/dev/maps/mapkit ## Установка ```sh -yarn add @atc/react-native-yamap-lite +yarn add @exterio/react-native-yamap-lite ``` или ```sh -npm install @atc/react-native-yamap-lite --save +npm install @exterio/react-native-yamap-lite --save ``` ### iOS @@ -75,7 +75,7 @@ cd ios && pod install && cd .. ```js // index.js import { AppRegistry } from 'react-native'; -import { YamapUtils } from '@atc/react-native-yamap-lite'; +import { YamapUtils } from '@exterio/react-native-yamap-lite'; import App from './App'; import { name as appName } from './app.json'; @@ -102,7 +102,7 @@ AppRegistry.registerComponent(appName, () => App); ```jsx import React from 'react'; -import { YaMap, Marker, Circle } from '@atc/react-native-yamap-lite'; +import { YaMap, Marker, Circle } from '@exterio/react-native-yamap-lite'; const Map = () => { return ( @@ -250,7 +250,7 @@ interface YaMapRef { ```jsx import React, { useRef } from 'react'; -import { YaMap } from '@atc/react-native-yamap-lite'; +import { YaMap } from '@exterio/react-native-yamap-lite'; const Map = () => { const mapRef = useRef(null); @@ -352,7 +352,7 @@ const Map = () => { Компонент для отображения кластеризованных маркеров: ```jsx -import { ClusteredYamap, Marker } from '@atc/react-native-yamap-lite'; +import { ClusteredYamap, Marker } from '@exterio/react-native-yamap-lite'; | null} */ diff --git a/example/harness/helpers.tsx b/example/harness/helpers.tsx index 53d88c5..10214aa 100644 --- a/example/harness/helpers.tsx +++ b/example/harness/helpers.tsx @@ -7,7 +7,7 @@ import { type InitialRegion, type YaMapProps, type YaMapRef, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { INITIAL_REGION, MAP_LOAD_TIMEOUT } from './constants'; import { ensureMapKitInitialized } from './ensureMapKitInit'; diff --git a/example/harness/tests/Circle.harness.tsx b/example/harness/tests/Circle.harness.tsx index 71828c1..dc4153c 100644 --- a/example/harness/tests/Circle.harness.tsx +++ b/example/harness/tests/Circle.harness.tsx @@ -1,5 +1,5 @@ import { describe, test, expect } from 'react-native-harness'; -import { Circle } from '@atc/react-native-yamap-lite'; +import { Circle } from '@exterio/react-native-yamap-lite'; import { MOSCOW } from '../constants'; import { renderMapWithOverlays, renderUpdatingOverlays } from '../helpers'; diff --git a/example/harness/tests/ClusteredYamap.harness.tsx b/example/harness/tests/ClusteredYamap.harness.tsx index ddb0d1e..0cdb891 100644 --- a/example/harness/tests/ClusteredYamap.harness.tsx +++ b/example/harness/tests/ClusteredYamap.harness.tsx @@ -12,7 +12,7 @@ import { Marker, type ClusteredYamapProps, type YaMapRef, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { CAMERA_ANIMATION_TIMEOUT, INITIAL_REGION, MOSCOW } from '../constants'; import { ensureMapKitInitialized } from '../ensureMapKitInit'; import { waitForMapReady, expectNear } from '../helpers'; diff --git a/example/harness/tests/MapEvents.harness.tsx b/example/harness/tests/MapEvents.harness.tsx index d8da6e0..f494f6b 100644 --- a/example/harness/tests/MapEvents.harness.tsx +++ b/example/harness/tests/MapEvents.harness.tsx @@ -12,7 +12,7 @@ import { type YaMapRef, type CameraPosition, type MapLoaded, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { INITIAL_REGION, MOSCOW, diff --git a/example/harness/tests/Marker.harness.tsx b/example/harness/tests/Marker.harness.tsx index 8444df9..ac5161d 100644 --- a/example/harness/tests/Marker.harness.tsx +++ b/example/harness/tests/Marker.harness.tsx @@ -4,7 +4,7 @@ import { YaMap, type MarkerRef, type YaMapRef, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { StyleSheet, View } from 'react-native'; import { INITIAL_REGION, MOSCOW } from '../constants'; import { ensureMapKitInitialized } from '../ensureMapKitInit'; diff --git a/example/harness/tests/Polygon.harness.tsx b/example/harness/tests/Polygon.harness.tsx index a2a5605..29f961f 100644 --- a/example/harness/tests/Polygon.harness.tsx +++ b/example/harness/tests/Polygon.harness.tsx @@ -1,5 +1,5 @@ import { describe, test, expect } from 'react-native-harness'; -import { Polygon } from '@atc/react-native-yamap-lite'; +import { Polygon } from '@exterio/react-native-yamap-lite'; import { MOSCOW } from '../constants'; import { renderMapWithOverlays, renderUpdatingOverlays } from '../helpers'; diff --git a/example/harness/tests/Polyline.harness.tsx b/example/harness/tests/Polyline.harness.tsx index b31b593..f480941 100644 --- a/example/harness/tests/Polyline.harness.tsx +++ b/example/harness/tests/Polyline.harness.tsx @@ -1,5 +1,5 @@ import { describe, test, expect } from 'react-native-harness'; -import { Polyline } from '@atc/react-native-yamap-lite'; +import { Polyline } from '@exterio/react-native-yamap-lite'; import { MOSCOW } from '../constants'; import { renderMapWithOverlays, renderUpdatingOverlays } from '../helpers'; diff --git a/example/harness/tests/Regression.harness.tsx b/example/harness/tests/Regression.harness.tsx index b4c9648..5560deb 100644 --- a/example/harness/tests/Regression.harness.tsx +++ b/example/harness/tests/Regression.harness.tsx @@ -17,7 +17,7 @@ import { YaMap, YamapUtils, type YaMapRef, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { CAMERA_ANIMATION_TIMEOUT, INITIAL_REGION, diff --git a/example/harness/tests/UI.harness.tsx b/example/harness/tests/UI.harness.tsx index 9ca6bdc..d9ac879 100644 --- a/example/harness/tests/UI.harness.tsx +++ b/example/harness/tests/UI.harness.tsx @@ -20,7 +20,7 @@ import { Marker, YaMap, type YaMapRef, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { INITIAL_REGION, MOSCOW } from '../constants'; import { ensureMapKitInitialized } from '../ensureMapKitInit'; import { waitForMapReady, expectNear } from '../helpers'; diff --git a/example/harness/tests/YaMap.harness.tsx b/example/harness/tests/YaMap.harness.tsx index ec8ad59..e056b23 100644 --- a/example/harness/tests/YaMap.harness.tsx +++ b/example/harness/tests/YaMap.harness.tsx @@ -7,7 +7,7 @@ import { } from 'react-native-harness'; import { useEffect, useState } from 'react'; import { StyleSheet, View } from 'react-native'; -import { YaMap, type YaMapRef } from '@atc/react-native-yamap-lite'; +import { YaMap, type YaMapRef } from '@exterio/react-native-yamap-lite'; import { CAMERA_ANIMATION_TIMEOUT, INITIAL_REGION, MOSCOW } from '../constants'; import { ensureMapKitInitialized } from '../ensureMapKitInit'; import { expectNear, renderMap, waitForMapReady } from '../helpers'; diff --git a/example/harness/tests/YamapUtils.harness.ts b/example/harness/tests/YamapUtils.harness.ts index 0b05f7f..50b89ab 100644 --- a/example/harness/tests/YamapUtils.harness.ts +++ b/example/harness/tests/YamapUtils.harness.ts @@ -6,7 +6,7 @@ import { afterEach, } from 'react-native-harness'; import { Platform } from 'react-native'; -import { YamapUtils } from '@atc/react-native-yamap-lite'; +import { YamapUtils } from '@exterio/react-native-yamap-lite'; import { YAMAP_API_KEY } from '../constants'; describe('YamapUtils', () => { diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 122c5e3..ad68255 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1679,7 +1679,7 @@ PODS: - React-perflogger (= 0.79.2) - React-utils (= 0.79.2) - SocketRocket (0.7.1) - - YamapLite (1.0.1): + - YamapLite (1.0.0): - DoubleConversion - glog - hermes-engine @@ -2004,10 +2004,10 @@ SPEC CHECKSUMS: React-timing: a90f4654cbda9c628614f9bee68967f1768bd6a5 React-utils: a612d50555b6f0f90c74b7d79954019ad47f5de6 ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584 - ReactCodegen: c63eda03ba1d94353fb97b031fc84f75a0d125ba + ReactCodegen: a204c3379029e4116b1eda5c1d3a17926db49003 ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - YamapLite: adfe00cc2559f6534024c124b76465fa7de5db51 + YamapLite: 69b4961e1f7ebf84556009927fb93bad039ce77f YandexMapsMobile: e6443bf72724581ec9f884abdbae254273bc2912 Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf diff --git a/example/package.json b/example/package.json index 7e01cd8..3c3feb1 100644 --- a/example/package.json +++ b/example/package.json @@ -13,7 +13,7 @@ "test:harness:android": "NODE_OPTIONS='--experimental-require-module' react-native-harness --harnessRunner android" }, "dependencies": { - "@atc/react-native-yamap-lite": "link:..", + "@exterio/react-native-yamap-lite": "link:..", "react": "19.0.0", "react-native": "0.79.2" }, diff --git a/example/src/App.tsx b/example/src/App.tsx index a7e1605..dfa29d5 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -7,7 +7,7 @@ import { Circle, Polygon, Polyline, -} from '@atc/react-native-yamap-lite'; +} from '@exterio/react-native-yamap-lite'; import { ensureMapKitInitialized } from '../harness/ensureMapKitInit'; import { markers } from './constants/markers'; import { diff --git a/package.json b/package.json index 5a24db9..cc1e945 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,15 @@ { - "name": "@atc/react-native-yamap-lite", + "name": "@exterio/react-native-yamap-lite", "version": "1.0.0", "description": "A lightweight wrapper for the Yandex MapKit SDK", - "main": "./src/index.tsx", - "types": "./src/index.tsx", + "main": "./lib/module/index.js", + "module": "./lib/module/index.js", + "types": "./lib/typescript/src/index.d.ts", "exports": { ".": { "source": "./src/index.tsx", - "types": "./src/index.tsx", - "default": "./src/index.tsx" + "types": "./lib/typescript/src/index.d.ts", + "default": "./lib/module/index.js" }, "./package.json": "./package.json" }, @@ -42,6 +43,7 @@ "typecheck": "tsc", "lint": "eslint \"**/*.{js,ts,tsx}\"", "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib", + "prepack": "bob build", "codegenIos": "yarn react-native codegen --path example/ --outputPath ./", "codegenAndroid": "yarn react-native codegen --path example/ --outputPath ./", "release": "release-it --only-version" @@ -59,7 +61,7 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/hydromoll/react-native-yamap-lite.git" + "url": "git+https://github.com/All-time-coding/react-native-yamap-lite.git" }, "author": "hydromoll (https://github.com/hydromoll)", "contributors": [ @@ -67,9 +69,9 @@ ], "license": "MIT", "bugs": { - "url": "https://github.com/hydromoll/react-native-yamap-lite/issues" + "url": "https://github.com/All-time-coding/react-native-yamap-lite/issues" }, - "homepage": "https://github.com/hydromoll/react-native-yamap-lite#readme", + "homepage": "https://github.com/All-time-coding/react-native-yamap-lite#readme", "publishConfig": { "registry": "https://registry.npmjs.org/", "access": "public" diff --git a/src/Utils/YamapUtils.ts b/src/Utils/YamapUtils.ts index 4ade370..0f669fe 100644 --- a/src/Utils/YamapUtils.ts +++ b/src/Utils/YamapUtils.ts @@ -1,7 +1,7 @@ import { Platform, NativeModules } from 'react-native'; const LINKING_ERROR = - `The package '@atc/react-native-yamap-lite' doesn't seem to be linked. Make sure: \n\n` + + `The package '@exterio/react-native-yamap-lite' doesn't seem to be linked. Make sure: \n\n` + Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n'; diff --git a/tsconfig.json b/tsconfig.json index 5b73023..4c9c5b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "rootDir": ".", "paths": { - "@atc/react-native-yamap-lite": ["./src/index"] + "@exterio/react-native-yamap-lite": ["./src/index"] }, "allowUnreachableCode": false, "allowUnusedLabels": false, diff --git a/yarn.lock b/yarn.lock index d295445..16911aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -30,48 +30,6 @@ __metadata: languageName: node linkType: hard -"@atc/react-native-yamap-lite@link:..::locator=react-native-yamap-lite-example%40workspace%3Aexample": - version: 0.0.0-use.local - resolution: "@atc/react-native-yamap-lite@link:..::locator=react-native-yamap-lite-example%40workspace%3Aexample" - languageName: node - linkType: soft - -"@atc/react-native-yamap-lite@workspace:.": - version: 0.0.0-use.local - resolution: "@atc/react-native-yamap-lite@workspace:." - dependencies: - "@commitlint/config-conventional": ^19.6.0 - "@eslint/compat": ^1.2.7 - "@eslint/eslintrc": ^3.3.0 - "@eslint/js": ^9.22.0 - "@evilmartians/lefthook": ^1.5.0 - "@react-native-community/cli": 15.0.0-alpha.2 - "@react-native/babel-preset": 0.79.2 - "@react-native/eslint-config": ^0.78.0 - "@release-it/conventional-changelog": ^9.0.2 - "@types/jest": ^29.5.5 - "@types/react": ^19.0.0 - "@types/react-test-renderer": ^19.1.0 - commitlint: ^19.6.1 - del-cli: ^5.1.0 - eslint: ^9.22.0 - eslint-config-prettier: ^10.1.1 - eslint-plugin-prettier: ^5.2.3 - jest: ^29.7.0 - prettier: ^3.0.3 - react: 19.0.0 - react-native: 0.79.2 - react-native-builder-bob: ^0.40.11 - react-test-renderer: 19.0.0 - release-it: ^17.10.0 - turbo: ^1.10.7 - typescript: ^5.8.3 - peerDependencies: - react: "*" - react-native: "*" - languageName: unknown - linkType: soft - "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.24.7, @babel/code-frame@npm:^7.26.2, @babel/code-frame@npm:^7.27.1": version: 7.27.1 resolution: "@babel/code-frame@npm:7.27.1" @@ -3142,6 +3100,48 @@ __metadata: languageName: node linkType: hard +"@exterio/react-native-yamap-lite@link:..::locator=react-native-yamap-lite-example%40workspace%3Aexample": + version: 0.0.0-use.local + resolution: "@exterio/react-native-yamap-lite@link:..::locator=react-native-yamap-lite-example%40workspace%3Aexample" + languageName: node + linkType: soft + +"@exterio/react-native-yamap-lite@workspace:.": + version: 0.0.0-use.local + resolution: "@exterio/react-native-yamap-lite@workspace:." + dependencies: + "@commitlint/config-conventional": ^19.6.0 + "@eslint/compat": ^1.2.7 + "@eslint/eslintrc": ^3.3.0 + "@eslint/js": ^9.22.0 + "@evilmartians/lefthook": ^1.5.0 + "@react-native-community/cli": 15.0.0-alpha.2 + "@react-native/babel-preset": 0.79.2 + "@react-native/eslint-config": ^0.78.0 + "@release-it/conventional-changelog": ^9.0.2 + "@types/jest": ^29.5.5 + "@types/react": ^19.0.0 + "@types/react-test-renderer": ^19.1.0 + commitlint: ^19.6.1 + del-cli: ^5.1.0 + eslint: ^9.22.0 + eslint-config-prettier: ^10.1.1 + eslint-plugin-prettier: ^5.2.3 + jest: ^29.7.0 + prettier: ^3.0.3 + react: 19.0.0 + react-native: 0.79.2 + react-native-builder-bob: ^0.40.11 + react-test-renderer: 19.0.0 + release-it: ^17.10.0 + turbo: ^1.10.7 + typescript: ^5.8.3 + peerDependencies: + react: "*" + react-native: "*" + languageName: unknown + linkType: soft + "@hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.3.0": version: 9.3.0 resolution: "@hapi/hoek@npm:9.3.0" @@ -12953,10 +12953,10 @@ __metadata: version: 0.0.0-use.local resolution: "react-native-yamap-lite-example@workspace:example" dependencies: - "@atc/react-native-yamap-lite": "link:.." "@babel/core": ^7.25.2 "@babel/preset-env": ^7.25.3 "@babel/runtime": ^7.25.0 + "@exterio/react-native-yamap-lite": "link:.." "@react-native-community/cli": 18.0.0 "@react-native-community/cli-platform-android": 18.0.0 "@react-native-community/cli-platform-ios": 18.0.0