react-native-advanced-text 0.1.4 → 0.1.6
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// File: AdvancedTextView.kt
|
|
1
2
|
package com.advancedtext
|
|
2
3
|
|
|
3
4
|
import android.content.Context
|
|
@@ -35,15 +36,27 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
35
36
|
|
|
36
37
|
private fun init() {
|
|
37
38
|
Log.d(TAG, "AdvancedTextView initialized")
|
|
39
|
+
|
|
40
|
+
// Set default text appearance
|
|
41
|
+
setTextColor(Color.BLACK)
|
|
42
|
+
textSize = 16f
|
|
43
|
+
setPadding(16, 16, 16, 16)
|
|
44
|
+
|
|
38
45
|
movementMethod = LinkMovementMethod.getInstance()
|
|
39
46
|
setTextIsSelectable(true)
|
|
40
47
|
setOnCreateContextMenuListener(this)
|
|
48
|
+
|
|
49
|
+
// Ensure minimum height for visibility during debugging
|
|
50
|
+
minHeight = 100
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
fun setAdvancedText(text: String) {
|
|
44
|
-
Log.d(TAG, "setAdvancedText: $text")
|
|
54
|
+
Log.d(TAG, "setAdvancedText: $text (length=${text.length})")
|
|
45
55
|
this.text = text
|
|
46
56
|
updateTextWithHighlights()
|
|
57
|
+
// Force layout update
|
|
58
|
+
requestLayout()
|
|
59
|
+
invalidate()
|
|
47
60
|
}
|
|
48
61
|
|
|
49
62
|
fun setMenuOptions(menuOptions: List<String>) {
|
|
@@ -64,7 +77,7 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
64
77
|
}
|
|
65
78
|
|
|
66
79
|
private fun updateTextWithHighlights() {
|
|
67
|
-
val textValue = this.text
|
|
80
|
+
val textValue = this.text?.toString() ?: ""
|
|
68
81
|
Log.d(TAG, "updateTextWithHighlights called")
|
|
69
82
|
Log.d(TAG, "Current text: $textValue")
|
|
70
83
|
Log.d(TAG, "Highlighted words: $highlightedWords")
|
|
@@ -87,7 +100,12 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
87
100
|
val wordEnd = wordStart + word.length
|
|
88
101
|
|
|
89
102
|
highlightedWords.find { it.index == wordIndex }?.let { highlightedWord ->
|
|
90
|
-
val color =
|
|
103
|
+
val color = try {
|
|
104
|
+
Color.parseColor(highlightedWord.highlightColor)
|
|
105
|
+
} catch (e: IllegalArgumentException) {
|
|
106
|
+
Log.e(TAG, "Invalid color: ${highlightedWord.highlightColor}, using yellow")
|
|
107
|
+
Color.YELLOW
|
|
108
|
+
}
|
|
91
109
|
Log.d(TAG, "Applying highlight to word '$word' at index $wordIndex with color ${highlightedWord.highlightColor}")
|
|
92
110
|
|
|
93
111
|
spannableString.setSpan(
|
|
@@ -122,7 +140,8 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
122
140
|
}
|
|
123
141
|
}
|
|
124
142
|
|
|
125
|
-
|
|
143
|
+
setText(spannableString, BufferType.SPANNABLE)
|
|
144
|
+
Log.d(TAG, "Text updated with spans")
|
|
126
145
|
}
|
|
127
146
|
|
|
128
147
|
override fun onCreateContextMenu(menu: ContextMenu?, v: View?, menuInfo: ContextMenu.ContextMenuInfo?) {
|
|
@@ -161,14 +180,18 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
161
180
|
private fun sendSelectionEvent(selectedText: String, eventType: String) {
|
|
162
181
|
Log.d(TAG, "sendSelectionEvent -> eventType='$eventType' selectedText='$selectedText'")
|
|
163
182
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
183
|
+
try {
|
|
184
|
+
val reactContext = context as? ReactContext ?: return
|
|
185
|
+
val event = Arguments.createMap().apply {
|
|
186
|
+
putString("selectedText", selectedText)
|
|
187
|
+
putString("event", eventType)
|
|
188
|
+
}
|
|
169
189
|
|
|
170
|
-
|
|
171
|
-
|
|
190
|
+
reactContext.getJSModule(RCTEventEmitter::class.java)
|
|
191
|
+
.receiveEvent(id, "onSelection", event)
|
|
192
|
+
} catch (e: Exception) {
|
|
193
|
+
Log.e(TAG, "Error sending selection event", e)
|
|
194
|
+
}
|
|
172
195
|
}
|
|
173
196
|
|
|
174
197
|
private inner class WordClickableSpan(
|
|
@@ -203,14 +226,18 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
203
226
|
private fun sendWordPressEvent(word: String, index: Int) {
|
|
204
227
|
Log.d(TAG, "sendWordPressEvent -> word='$word', index=$index")
|
|
205
228
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
229
|
+
try {
|
|
230
|
+
val reactContext = context as? ReactContext ?: return
|
|
231
|
+
val event = Arguments.createMap().apply {
|
|
232
|
+
putString("word", word)
|
|
233
|
+
putInt("index", index)
|
|
234
|
+
}
|
|
211
235
|
|
|
212
|
-
|
|
213
|
-
|
|
236
|
+
reactContext.getJSModule(RCTEventEmitter::class.java)
|
|
237
|
+
.receiveEvent(id, "onWordPress", event)
|
|
238
|
+
} catch (e: Exception) {
|
|
239
|
+
Log.e(TAG, "Error sending word press event", e)
|
|
240
|
+
}
|
|
214
241
|
}
|
|
215
242
|
|
|
216
243
|
fun clearSelection() {
|
|
@@ -218,6 +245,16 @@ class AdvancedTextView : TextView, View.OnCreateContextMenuListener {
|
|
|
218
245
|
val spannable = this.text as? android.text.Spannable ?: return
|
|
219
246
|
Selection.removeSelection(spannable)
|
|
220
247
|
}
|
|
248
|
+
|
|
249
|
+
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
250
|
+
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
|
251
|
+
Log.d(TAG, "onMeasure: width=${measuredWidth}, height=${measuredHeight}")
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
|
|
255
|
+
super.onLayout(changed, left, top, right, bottom)
|
|
256
|
+
Log.d(TAG, "onLayout: changed=$changed, bounds=[$left,$top,$right,$bottom]")
|
|
257
|
+
}
|
|
221
258
|
}
|
|
222
259
|
|
|
223
260
|
data class HighlightedWord(
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
// File: AdvancedTextViewManager.kt
|
|
2
|
+
// This should be the ONLY content in this file
|
|
1
3
|
package com.advancedtext
|
|
2
4
|
|
|
5
|
+
import android.view.ViewGroup
|
|
3
6
|
import com.facebook.react.bridge.ReadableArray
|
|
4
7
|
import com.facebook.react.module.annotations.ReactModule
|
|
5
8
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
@@ -27,7 +30,13 @@ class AdvancedTextViewManager : SimpleViewManager<AdvancedTextView>(),
|
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
public override fun createViewInstance(context: ThemedReactContext): AdvancedTextView {
|
|
30
|
-
|
|
33
|
+
val view = AdvancedTextView(context)
|
|
34
|
+
// Set default layout params to ensure the view is visible
|
|
35
|
+
view.layoutParams = ViewGroup.LayoutParams(
|
|
36
|
+
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
37
|
+
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
38
|
+
)
|
|
39
|
+
return view
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
@ReactProp(name = "text")
|
|
@@ -72,7 +81,13 @@ class AdvancedTextViewManager : SimpleViewManager<AdvancedTextView>(),
|
|
|
72
81
|
view?.setIndicatorWordIndex(index)
|
|
73
82
|
}
|
|
74
83
|
|
|
75
|
-
|
|
84
|
+
// Add this method to register custom events
|
|
85
|
+
override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any> {
|
|
86
|
+
return mapOf(
|
|
87
|
+
"onWordPress" to mapOf("registrationName" to "onWordPress"),
|
|
88
|
+
"onSelection" to mapOf("registrationName" to "onSelection")
|
|
89
|
+
)
|
|
90
|
+
}
|
|
76
91
|
|
|
77
92
|
companion object {
|
|
78
93
|
const val NAME = "AdvancedTextView"
|
package/package.json
CHANGED
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native-advanced-text",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": " Advanced text component for React Native with custom select options.",
|
|
5
|
-
"main": "./lib/module/index.js",
|
|
6
|
-
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"source": "./src/index.tsx",
|
|
10
|
-
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
-
"default": "./lib/module/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./package.json": "./package.json"
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"src",
|
|
17
|
-
"lib",
|
|
18
|
-
"android",
|
|
19
|
-
"ios",
|
|
20
|
-
"cpp",
|
|
21
|
-
"*.podspec",
|
|
22
|
-
"react-native.config.js",
|
|
23
|
-
"!ios/build",
|
|
24
|
-
"!android/build",
|
|
25
|
-
"!android/gradle",
|
|
26
|
-
"!android/gradlew",
|
|
27
|
-
"!android/gradlew.bat",
|
|
28
|
-
"!android/local.properties",
|
|
29
|
-
"!**/__tests__",
|
|
30
|
-
"!**/__fixtures__",
|
|
31
|
-
"!**/__mocks__",
|
|
32
|
-
"!**/.*"
|
|
33
|
-
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"example": "yarn workspace react-native-advanced-text-example",
|
|
36
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
37
|
-
"prepare": "bob build",
|
|
38
|
-
"typecheck": "tsc",
|
|
39
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
-
"release": "release-it --only-version",
|
|
41
|
-
"test": "jest"
|
|
42
|
-
},
|
|
43
|
-
"keywords": [
|
|
44
|
-
"react-native",
|
|
45
|
-
"ios",
|
|
46
|
-
"android"
|
|
47
|
-
],
|
|
48
|
-
"repository": {
|
|
49
|
-
"type": "git",
|
|
50
|
-
"url": "git+https://github.com/AminAllahham/react-native-advanced-text.git"
|
|
51
|
-
},
|
|
52
|
-
"author": "Amin Al-lahham <amin.allahham9@gmail.com> (https://github.com/AminAllahham)",
|
|
53
|
-
"license": "MIT",
|
|
54
|
-
"bugs": {
|
|
55
|
-
"url": "https://github.com/AminAllahham/react-native-advanced-text/issues"
|
|
56
|
-
},
|
|
57
|
-
"homepage": "https://github.com/AminAllahham/react-native-advanced-text#readme",
|
|
58
|
-
"publishConfig": {
|
|
59
|
-
"registry": "https://registry.npmjs.org/"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@commitlint/config-conventional": "^19.8.1",
|
|
63
|
-
"@eslint/compat": "^1.3.2",
|
|
64
|
-
"@eslint/eslintrc": "^3.3.1",
|
|
65
|
-
"@eslint/js": "^9.35.0",
|
|
66
|
-
"@react-native-community/cli": "20.0.1",
|
|
67
|
-
"@react-native/babel-preset": "0.81.1",
|
|
68
|
-
"@react-native/eslint-config": "^0.81.1",
|
|
69
|
-
"@release-it/conventional-changelog": "^10.0.1",
|
|
70
|
-
"@types/jest": "^29.5.14",
|
|
71
|
-
"@types/react": "^19.1.0",
|
|
72
|
-
"commitlint": "^19.8.1",
|
|
73
|
-
"del-cli": "^6.0.0",
|
|
74
|
-
"eslint": "^9.35.0",
|
|
75
|
-
"eslint-config-prettier": "^10.1.8",
|
|
76
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
77
|
-
"jest": "^29.7.0",
|
|
78
|
-
"lefthook": "^2.0.3",
|
|
79
|
-
"prettier": "^2.8.8",
|
|
80
|
-
"react": "19.1.0",
|
|
81
|
-
"react-native": "0.81.1",
|
|
82
|
-
"react-native-builder-bob": "^0.40.16",
|
|
83
|
-
"release-it": "^19.0.4",
|
|
84
|
-
"turbo": "^2.5.6",
|
|
85
|
-
"typescript": "^5.9.2"
|
|
86
|
-
},
|
|
87
|
-
"peerDependencies": {
|
|
88
|
-
"react": "*",
|
|
89
|
-
"react-native": "*"
|
|
90
|
-
},
|
|
91
|
-
"workspaces": [
|
|
92
|
-
"example"
|
|
93
|
-
],
|
|
94
|
-
"packageManager": "yarn@4.11.0",
|
|
95
|
-
"react-native-builder-bob": {
|
|
96
|
-
"source": "src",
|
|
97
|
-
"output": "lib",
|
|
98
|
-
"targets": [
|
|
99
|
-
[
|
|
100
|
-
"module",
|
|
101
|
-
{
|
|
102
|
-
"esm": true
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
[
|
|
106
|
-
"typescript",
|
|
107
|
-
{
|
|
108
|
-
"project": "tsconfig.build.json"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
"codegenConfig": {
|
|
114
|
-
"name": "AdvancedTextViewSpec",
|
|
115
|
-
"type": "all",
|
|
116
|
-
"jsSrcsDir": "src",
|
|
117
|
-
"android": {
|
|
118
|
-
"javaPackageName": "com.advancedtext"
|
|
119
|
-
},
|
|
120
|
-
"ios": {
|
|
121
|
-
"componentProvider": {
|
|
122
|
-
"AdvancedTextView": "AdvancedTextView"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"prettier": {
|
|
127
|
-
"quoteProps": "consistent",
|
|
128
|
-
"singleQuote": true,
|
|
129
|
-
"tabWidth": 2,
|
|
130
|
-
"trailingComma": "es5",
|
|
131
|
-
"useTabs": false
|
|
132
|
-
},
|
|
133
|
-
"commitlint": {
|
|
134
|
-
"extends": [
|
|
135
|
-
"@commitlint/config-conventional"
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
"release-it": {
|
|
139
|
-
"git": {
|
|
140
|
-
"commitMessage": "chore: release ${version}",
|
|
141
|
-
"tagName": "v${version}"
|
|
142
|
-
},
|
|
143
|
-
"npm": {
|
|
144
|
-
"publish": true
|
|
145
|
-
},
|
|
146
|
-
"github": {
|
|
147
|
-
"release": true
|
|
148
|
-
},
|
|
149
|
-
"plugins": {
|
|
150
|
-
"@release-it/conventional-changelog": {
|
|
151
|
-
"preset": {
|
|
152
|
-
"name": "angular"
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
"jest": {
|
|
158
|
-
"preset": "react-native",
|
|
159
|
-
"modulePathIgnorePatterns": [
|
|
160
|
-
"<rootDir>/example/node_modules",
|
|
161
|
-
"<rootDir>/lib/"
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
"create-react-native-library": {
|
|
165
|
-
"languages": "kotlin-objc",
|
|
166
|
-
"type": "fabric-view",
|
|
167
|
-
"tools": [
|
|
168
|
-
"eslint",
|
|
169
|
-
"lefthook",
|
|
170
|
-
"release-it",
|
|
171
|
-
"jest"
|
|
172
|
-
],
|
|
173
|
-
"version": "0.55.1"
|
|
174
|
-
}
|
|
175
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-advanced-text",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": " Advanced text component for React Native with custom select options.",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace react-native-advanced-text-example",
|
|
36
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
37
|
+
"prepare": "bob build",
|
|
38
|
+
"typecheck": "tsc",
|
|
39
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
+
"release": "release-it --only-version",
|
|
41
|
+
"test": "jest"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"react-native",
|
|
45
|
+
"ios",
|
|
46
|
+
"android"
|
|
47
|
+
],
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/AminAllahham/react-native-advanced-text.git"
|
|
51
|
+
},
|
|
52
|
+
"author": "Amin Al-lahham <amin.allahham9@gmail.com> (https://github.com/AminAllahham)",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/AminAllahham/react-native-advanced-text/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/AminAllahham/react-native-advanced-text#readme",
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"registry": "https://registry.npmjs.org/"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
63
|
+
"@eslint/compat": "^1.3.2",
|
|
64
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
65
|
+
"@eslint/js": "^9.35.0",
|
|
66
|
+
"@react-native-community/cli": "20.0.1",
|
|
67
|
+
"@react-native/babel-preset": "0.81.1",
|
|
68
|
+
"@react-native/eslint-config": "^0.81.1",
|
|
69
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
70
|
+
"@types/jest": "^29.5.14",
|
|
71
|
+
"@types/react": "^19.1.0",
|
|
72
|
+
"commitlint": "^19.8.1",
|
|
73
|
+
"del-cli": "^6.0.0",
|
|
74
|
+
"eslint": "^9.35.0",
|
|
75
|
+
"eslint-config-prettier": "^10.1.8",
|
|
76
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
77
|
+
"jest": "^29.7.0",
|
|
78
|
+
"lefthook": "^2.0.3",
|
|
79
|
+
"prettier": "^2.8.8",
|
|
80
|
+
"react": "19.1.0",
|
|
81
|
+
"react-native": "0.81.1",
|
|
82
|
+
"react-native-builder-bob": "^0.40.16",
|
|
83
|
+
"release-it": "^19.0.4",
|
|
84
|
+
"turbo": "^2.5.6",
|
|
85
|
+
"typescript": "^5.9.2"
|
|
86
|
+
},
|
|
87
|
+
"peerDependencies": {
|
|
88
|
+
"react": "*",
|
|
89
|
+
"react-native": "*"
|
|
90
|
+
},
|
|
91
|
+
"workspaces": [
|
|
92
|
+
"example"
|
|
93
|
+
],
|
|
94
|
+
"packageManager": "yarn@4.11.0",
|
|
95
|
+
"react-native-builder-bob": {
|
|
96
|
+
"source": "src",
|
|
97
|
+
"output": "lib",
|
|
98
|
+
"targets": [
|
|
99
|
+
[
|
|
100
|
+
"module",
|
|
101
|
+
{
|
|
102
|
+
"esm": true
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"typescript",
|
|
107
|
+
{
|
|
108
|
+
"project": "tsconfig.build.json"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"codegenConfig": {
|
|
114
|
+
"name": "AdvancedTextViewSpec",
|
|
115
|
+
"type": "all",
|
|
116
|
+
"jsSrcsDir": "src",
|
|
117
|
+
"android": {
|
|
118
|
+
"javaPackageName": "com.advancedtext"
|
|
119
|
+
},
|
|
120
|
+
"ios": {
|
|
121
|
+
"componentProvider": {
|
|
122
|
+
"AdvancedTextView": "AdvancedTextView"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"prettier": {
|
|
127
|
+
"quoteProps": "consistent",
|
|
128
|
+
"singleQuote": true,
|
|
129
|
+
"tabWidth": 2,
|
|
130
|
+
"trailingComma": "es5",
|
|
131
|
+
"useTabs": false
|
|
132
|
+
},
|
|
133
|
+
"commitlint": {
|
|
134
|
+
"extends": [
|
|
135
|
+
"@commitlint/config-conventional"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"release-it": {
|
|
139
|
+
"git": {
|
|
140
|
+
"commitMessage": "chore: release ${version}",
|
|
141
|
+
"tagName": "v${version}"
|
|
142
|
+
},
|
|
143
|
+
"npm": {
|
|
144
|
+
"publish": true
|
|
145
|
+
},
|
|
146
|
+
"github": {
|
|
147
|
+
"release": true
|
|
148
|
+
},
|
|
149
|
+
"plugins": {
|
|
150
|
+
"@release-it/conventional-changelog": {
|
|
151
|
+
"preset": {
|
|
152
|
+
"name": "angular"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"jest": {
|
|
158
|
+
"preset": "react-native",
|
|
159
|
+
"modulePathIgnorePatterns": [
|
|
160
|
+
"<rootDir>/example/node_modules",
|
|
161
|
+
"<rootDir>/lib/"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"create-react-native-library": {
|
|
165
|
+
"languages": "kotlin-objc",
|
|
166
|
+
"type": "fabric-view",
|
|
167
|
+
"tools": [
|
|
168
|
+
"eslint",
|
|
169
|
+
"lefthook",
|
|
170
|
+
"release-it",
|
|
171
|
+
"jest"
|
|
172
|
+
],
|
|
173
|
+
"version": "0.55.1"
|
|
174
|
+
}
|
|
175
|
+
}
|