@symbiote-native/slider 2.0.2 → 2.0.4
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/package.json +13 -11
- package/react-native.config.cjs +40 -0
- package/symbiote-slider.podspec +63 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/slider",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Third-party native Slider view wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
"files": [
|
|
39
39
|
"src",
|
|
40
40
|
"build",
|
|
41
|
-
"build-ngc"
|
|
41
|
+
"build-ngc",
|
|
42
|
+
"react-native.config.cjs",
|
|
43
|
+
"symbiote-slider.podspec"
|
|
42
44
|
],
|
|
43
45
|
"publishConfig": {
|
|
44
46
|
"access": "public"
|
|
@@ -58,8 +60,8 @@
|
|
|
58
60
|
},
|
|
59
61
|
"dependencies": {
|
|
60
62
|
"@react-native-community/slider": "^5.2.0",
|
|
61
|
-
"@symbiote-native/components": "0.2.
|
|
62
|
-
"@symbiote-native/engine": "0.1.
|
|
63
|
+
"@symbiote-native/components": "0.2.3",
|
|
64
|
+
"@symbiote-native/engine": "0.1.4"
|
|
63
65
|
},
|
|
64
66
|
"peerDependencies": {
|
|
65
67
|
"@angular/core": ">=20",
|
|
@@ -67,9 +69,9 @@
|
|
|
67
69
|
"react": ">=19.0.0",
|
|
68
70
|
"react-native": ">=0.86",
|
|
69
71
|
"vue": ">=3.5.0",
|
|
70
|
-
"@symbiote-native/angular": "0.3.
|
|
71
|
-
"@symbiote-native/
|
|
72
|
-
"@symbiote-native/
|
|
72
|
+
"@symbiote-native/angular": "0.3.3",
|
|
73
|
+
"@symbiote-native/vue": "0.3.3",
|
|
74
|
+
"@symbiote-native/react": "0.2.4"
|
|
73
75
|
},
|
|
74
76
|
"peerDependenciesMeta": {
|
|
75
77
|
"@symbiote-native/angular": {
|
|
@@ -103,10 +105,10 @@
|
|
|
103
105
|
"@vue/runtime-core": "^3.5.13",
|
|
104
106
|
"react": "19.2.3",
|
|
105
107
|
"typescript": "~6.0.0",
|
|
106
|
-
"@symbiote-native/
|
|
107
|
-
"@symbiote-native/
|
|
108
|
-
"@symbiote-native/
|
|
109
|
-
"@symbiote-native/vue": "0.3.
|
|
108
|
+
"@symbiote-native/react": "0.2.4",
|
|
109
|
+
"@symbiote-native/test-utils": "0.1.5",
|
|
110
|
+
"@symbiote-native/angular": "0.3.3",
|
|
111
|
+
"@symbiote-native/vue": "0.3.3"
|
|
110
112
|
},
|
|
111
113
|
"scripts": {
|
|
112
114
|
"typecheck": "tsc --build",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const PACKAGE_NAME = '@symbiote-native/slider';
|
|
5
|
+
const NATIVE_SLIDER_PACKAGE = '@react-native-community/slider';
|
|
6
|
+
|
|
7
|
+
function findCliDependencyRoot() {
|
|
8
|
+
let current = process.cwd();
|
|
9
|
+
|
|
10
|
+
while (true) {
|
|
11
|
+
const candidate = path.join(current, 'node_modules', ...PACKAGE_NAME.split('/'));
|
|
12
|
+
if (fs.existsSync(candidate)) {
|
|
13
|
+
return candidate;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const parent = path.dirname(current);
|
|
17
|
+
if (parent === current) {
|
|
18
|
+
return __dirname;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
current = parent;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const cliDependencyRoot = findCliDependencyRoot();
|
|
26
|
+
const nativeSliderRoot = path.dirname(require.resolve(`${NATIVE_SLIDER_PACKAGE}/package.json`));
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
dependency: {
|
|
30
|
+
platforms: {
|
|
31
|
+
android: {
|
|
32
|
+
sourceDir: path.relative(cliDependencyRoot, path.join(nativeSliderRoot, 'android')),
|
|
33
|
+
libraryName: 'RNCSlider',
|
|
34
|
+
componentDescriptors: ['RNCSliderComponentDescriptor'],
|
|
35
|
+
cmakeListsPath: 'src/main/jni/CMakeLists.txt',
|
|
36
|
+
},
|
|
37
|
+
ios: {},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
require 'fileutils'
|
|
3
|
+
|
|
4
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
5
|
+
|
|
6
|
+
native_slider_package_json = `node --print "require.resolve('@react-native-community/slider/package.json', { paths: [process.argv[1]] })" "#{__dir__}"`.strip
|
|
7
|
+
native_slider_root = File.dirname(native_slider_package_json)
|
|
8
|
+
|
|
9
|
+
# CocoaPods' file glob never crosses a symlink (Sandbox::PathList#read_file_system walks the
|
|
10
|
+
# pod dir with ONE recursive Dir.glob, and Ruby's `**` never descends into a symlinked
|
|
11
|
+
# subdirectory it meets mid-walk). Under pnpm, @react-native-community/slider always sits
|
|
12
|
+
# behind a .pnpm-store symlink, so pointing source_files at it via a relative path silently
|
|
13
|
+
# produces zero matched files -> CocoaPods downgrades the pod to an empty PBXAggregateTarget
|
|
14
|
+
# -> RNCSliderComponentView never gets compiled -> NSClassFromString returns nil at runtime
|
|
15
|
+
# -> a crash when RCTThirdPartyComponentsProvider inserts that nil into an NSDictionary
|
|
16
|
+
# literal (Objective-C literals reject nil values). Fix: vendor (copy) the native iOS/common
|
|
17
|
+
# sources into a gitignored folder next to this podspec on every `pod install`, and point
|
|
18
|
+
# source_files at that copy (a purely-downward relative pattern) — same fix already applied
|
|
19
|
+
# to packages/splash-screen/symbiote-splash-screen.podspec.
|
|
20
|
+
vendored_dir = File.join(__dir__, '.rn-slider')
|
|
21
|
+
|
|
22
|
+
FileUtils.rm_rf(vendored_dir)
|
|
23
|
+
FileUtils.mkdir_p(vendored_dir)
|
|
24
|
+
FileUtils.cp_r(File.join(native_slider_root, 'ios'), File.join(vendored_dir, 'ios'))
|
|
25
|
+
FileUtils.cp_r(File.join(native_slider_root, 'common'), File.join(vendored_dir, 'common'))
|
|
26
|
+
|
|
27
|
+
Pod::Spec.new do |s|
|
|
28
|
+
s.name = 'symbiote-slider'
|
|
29
|
+
s.version = package['version']
|
|
30
|
+
s.summary = 'Symbiote wrapper for the React Native community slider native view.'
|
|
31
|
+
s.license = package['license'] || 'MIT'
|
|
32
|
+
s.authors = package['author'] || 'symbiote'
|
|
33
|
+
s.homepage = package['homepage'] || 'https://github.com/symbiote/symbiote'
|
|
34
|
+
s.platforms = { :ios => '9.0', :visionos => '1.0' }
|
|
35
|
+
s.source = { :git => 'https://github.com/symbiote/symbiote.git', :tag => "v#{s.version}" }
|
|
36
|
+
|
|
37
|
+
s.source_files = '.rn-slider/ios/**/*.{h,m,mm}'
|
|
38
|
+
|
|
39
|
+
s.subspec 'common' do |ss|
|
|
40
|
+
ss.source_files = '.rn-slider/common/cpp/**/*.{cpp,h}'
|
|
41
|
+
ss.pod_target_xcconfig = {
|
|
42
|
+
'HEADER_SEARCH_PATHS' => "\"#{File.join(vendored_dir, 'common/cpp')}\""
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if defined?(install_modules_dependencies)
|
|
47
|
+
install_modules_dependencies(s)
|
|
48
|
+
else
|
|
49
|
+
s.dependency 'React-Core'
|
|
50
|
+
s.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -DRCT_NEW_ARCH_ENABLED=1'
|
|
51
|
+
s.pod_target_xcconfig = {
|
|
52
|
+
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost"',
|
|
53
|
+
'OTHER_CPLUSPLUSFLAGS' => '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1',
|
|
54
|
+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17'
|
|
55
|
+
}
|
|
56
|
+
s.dependency 'React-RCTFabric'
|
|
57
|
+
s.dependency 'React-Codegen'
|
|
58
|
+
s.dependency 'RCT-Folly'
|
|
59
|
+
s.dependency 'RCTRequired'
|
|
60
|
+
s.dependency 'RCTTypeSafety'
|
|
61
|
+
s.dependency 'ReactCommon/turbomodule/core'
|
|
62
|
+
end
|
|
63
|
+
end
|