Skip to content

Conversation

@gronxb
Copy link
Collaborator

@gronxb gronxb commented Dec 18, 2025

No description provided.

gronxb and others added 6 commits December 15, 2025 17:57
…170)

* feat: replace FastImage with GraniteImage pluggable image component

  - Migrate from react-native-fast-image to custom GraniteImage implementation
  - Add native iOS code with pluggable providers (URLSession, Kingfisher, SDWebImage)
  - Add native Android code with pluggable providers (OkHttp, Glide, Coil)
  - Update Image.tsx to use GraniteImage instead of FastImage
  - Add react-native-builder-bob for library build
  - Configure autolinking via podspec and react-native.config.js
  - Include example app with E2E tests (Detox)

  Provider selection:
  - iOS: GRANITE_PROVIDER_URLSESSION|KINGFISHER|SDWEBIMAGE=true pod install
  - Android: ./gradlew assembleDebug -PGRANITE_PROVIDER=okhttp|glide|coil

* refactor: simplify @granite-js/image package structure

  - Remove lib build output, use src directly as entry point
  - Remove react-native-builder-bob dependency and config
  - Simplify files array (remove lib, exclude patterns)
  - Add author and homepage fields for podspec validation
  - Update main/types/exports to point to src/index.ts

* refactor(image/ios): simplify to single SDWebImage provider

  - Remove Kingfisher and URLSession providers, keep only SDWebImage
  - Add GRANITE_IMAGE_DEFAULT_PROVIDER flag (default: true)
  - When true: include SDWebImageProvider and SDWebImage dependency
  - When false: exclude default provider for custom implementation
  - Usage: GRANITE_IMAGE_DEFAULT_PROVIDER=false pod install

* feat: svg 패키지 분리

* [autofix.ci] apply automated fixes

* fix: types

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Jeansung Oh <[email protected]>
Co-authored-by: gronxb <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…chitecture (#171)

* feat(video): add @granite-js/video package with pluggable provider architecture

- Copy native iOS/Android code from react-native-granite-video
  - Add TypeScript source with GraniteVideo component
  - Include example app with Detox E2E tests
  - Configure autolinking via podspec and react-native.config.js
  - Update .gitignore for React Native example build artifacts

* [autofix.ci] apply automated fixes

* feat: builder-bob

* fix: node

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: gronxb <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: 6d8364a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
granite-docs Ready Ready Preview, Comment Jan 9, 2026 7:41am

@gronxb gronxb changed the title Feature/deprecated native package feat: native package via @granite-js/image, @granite-js/video Dec 18, 2025
… Provider pattern (#175)

* feat(lottie): implement native Fabric Lottie component with Pluggable Provider pattern

Replace JS-only lottie-react-native wrapper with native Fabric component:

- Add GraniteLottieView native component with Codegen support
- Implement Pluggable Provider pattern for custom Lottie implementations
- Add BuiltInLottieProvider using Airbnb lottie-android/lottie-ios SDKs
- Support conditional provider inclusion via GRANITE_LOTTIE_DEFAULT_PROVIDER env
- Add imperative methods: play, pause, resume, reset
- Support color/text filters, resize modes, and animation events

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix(lottie): fix build configuration for yarn pack compatibility

- Change output directory from lib to dist
- Import codegen types from CodegenTypes instead of react-native
- Use inline event types for codegen compatibility
- Remove typescript target from bob (use separate tsc instead)
- Update tsconfig.build.json to use declarationDir

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* feat(image,video,lottie): add GRANITE_DEFAULT_PROVIDER_ALL environment variable

Add unified environment variable to control default provider inclusion
across all Granite packages (image, video, lottie).

Priority: GRANITE_XXX_DEFAULT_PROVIDER > GRANITE_DEFAULT_PROVIDER_ALL > true (default)

Examples:
- Exclude all default providers: GRANITE_DEFAULT_PROVIDER_ALL=false
- Exclude all but include lottie: GRANITE_DEFAULT_PROVIDER_ALL=false GRANITE_LOTTIE_DEFAULT_PROVIDER=true

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: add @granite-js/naver-map package with Pluggable Provider pattern

- Add NaverMapView component with Fabric/TurboModule support
- Implement overlay components (Marker, Polyline, Polygon, Circle, Path, etc.)
- Support both iOS and Android with NMapsMap SDK
- Follow Pluggable Provider architecture for brownfield apps
- Include example app with Detox E2E test setup
- Fix iOS build issues: add NMapsMap import, correct codegenConfig

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix(naver-map): update example App with correct overlay props

- Update example to match reference implementation
- Add all overlay examples (Polyline, Polygon, Circle, Path, ArrowheadPath, GroundOverlay, InfoWindow)
- Fix Circle to use `center` prop instead of `coordinate`
- Add more marker examples with various configurations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: Readme.md 수정 (한국어)

* refactor(naver-map): rename RNNaverMap to GraniteNaverMap

- Rename all RNNaverMap* files to GraniteNaverMap*
- Update all references and imports
- Consistent naming with granite package convention

Files renamed:
- iOS: RNNaverMapView*.swift/m → GraniteNaverMap*.swift/m
- Android: RNNaverMapView*.kt → GraniteNaverMap*.kt
- Specs: RNNaverMapViewNativeComponent.ts → GraniteNaverMapViewNativeComponent.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor(naver-map): implement Pluggable Provider pattern for iOS/Android

Refactor both iOS and Android to use the Pluggable Provider pattern,
allowing NMapsMap SDK to be optionally excluded via environment variables.

iOS changes:
- Rename files with Granite prefix (NaverMapProvider -> GraniteNaverMapProvider, etc.)
- Update bridging header to GraniteNaverMap-Bridging-Header.h
- Refactor GraniteNaverMapViewImpl to delegate all map operations to provider
- Use conditional compilation with GRANITE_NAVER_MAP_DEFAULT_PROVIDER

Android changes:
- Move BuiltInGraniteNaverMapProvider to src/providers/java (conditionally included)
- Rename NaverMapProvider/Registry to GraniteNaverMapProvider/Registry
- Update GraniteNaverMapView to use provider pattern
- Remove direct NMapsMap imports from ViewManager files
- Configure sourceSets for conditional provider inclusion and newarch/oldarch

Build configuration:
- GRANITE_NAVER_MAP_DEFAULT_PROVIDER=false excludes NMapsMap SDK
- GRANITE_NAVER_MAP_DEFAULT_PROVIDER=true (default) includes NMapsMap SDK

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* chore: update yarn.lock for naver-map package

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor(naver-map): move NMapsMap-dependent files to builtinProvider directory

Reorganize iOS and Android file structure to isolate NMapsMap SDK dependencies:

iOS:
- Move BuiltInNaverMapProvider.swift to ios/builtinProvider/
- Move GraniteNaverMapMarkerData.swift to ios/builtinProvider/
- Move NMFMarker+Extension.swift to ios/builtinProvider/
- Move RCTConvert+NMFMapView.h/m to ios/builtinProvider/
- Update podspec to exclude ios/builtinProvider/**/* when provider disabled

Android:
- Rename src/providers/ to src/builtinProvider/
- Rename package from providers to builtinProvider
- Update build.gradle and GraniteNaverMapRegistry for new path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* refactor(naver-map): implement Factory pattern for Provider

Replace singleton Provider with Factory pattern to support multiple
NaverMap instances on the same screen.

Changes:
- Add GraniteNaverMapProviderFactory interface/protocol (iOS & Android)
- Update GraniteNaverMapRegistry to manage Factory instead of Provider
  - register(factory:) instead of register(provider:)
  - createProvider() instead of getProvider()
- Add BuiltInGraniteNaverMapProviderFactory for default implementation
- Update Views to call createProvider() for each instance
- Update example app with two NaverMap views to demonstrate

This fixes the issue where multiple NaverMap components would share
the same Provider instance, causing only the last view to work properly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix(naver-map): configure manual module linking for Android example app

React Native 0.83's autolinking system has issues with this workspace setup,
causing null pointer errors. This commit switches to manual module configuration:

- Disable autolinkLibrariesFromCommand() and autolinkLibrariesWithApp()
- Manually include :granite-naver-map module in settings.gradle
- Add manual implementation dependency in app/build.gradle
- Update MainApplication.kt to use direct package list instead of PackageList
- Add react-native.config.js with proper autolinking settings for future use
- Add launcher icons for the example app

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* feat(naver-map): add closure/lambda-based provider registration API

Add simpler registration API that accepts closures/lambdas instead of
requiring users to create separate Factory classes.

iOS:
```swift
GraniteNaverMapRegistry.shared.register {
    return MyNaverMapProvider()
}
```

Android:
```kotlin
GraniteNaverMapRegistry.register { context ->
    MyNaverMapProvider(context)
}
```

The existing Factory-based API is preserved for Java/Obj-C compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: types

---------

Co-authored-by: Jeansung Oh <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
@gronxb gronxb merged commit 93c7776 into rn-81 Jan 9, 2026
2 of 5 checks passed
@gronxb gronxb deleted the feature/deprecated-native-package branch January 9, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants