react-native-advanced-text 0.1.13 → 0.1.14

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.
@@ -245,7 +245,7 @@ class AdvancedTextView : TextView {
245
245
  override fun updateDrawState(ds: TextPaint) {
246
246
  // Don't call super to avoid default link styling (blue color, underline)
247
247
  // Keep the original text appearance
248
- ds.color = currentTextColor
248
+
249
249
  ds.isUnderlineText = false
250
250
  ds.bgColor = Color.TRANSPARENT
251
251
  }
@@ -81,23 +81,6 @@ class AdvancedTextViewManager : SimpleViewManager<AdvancedTextView>(),
81
81
  view?.setIndicatorWordIndex(index)
82
82
  }
83
83
 
84
- @ReactProp(name = "color")
85
- fun setColor(view: AdvancedTextView?, color: String?) {
86
- color?.let {
87
- try {
88
- view?.setTextColor(android.graphics.Color.parseColor(it))
89
- } catch (e: IllegalArgumentException) {
90
- // fallback to default color if parsing fails
91
- view?.setTextColor(android.graphics.Color.BLACK)
92
- }
93
- }
94
- }
95
-
96
- @ReactProp(name = "fontSize")
97
- fun setFontSize(view: AdvancedTextView?, fontSize: Int) {
98
- view?.setTextSize(fontSize.toFloat())
99
- }
100
-
101
84
  // Add this method to register custom events
102
85
  override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any> {
103
86
  return mapOf(
@@ -106,7 +89,6 @@ class AdvancedTextViewManager : SimpleViewManager<AdvancedTextView>(),
106
89
  )
107
90
  }
108
91
 
109
-
110
92
  companion object {
111
93
  const val NAME = "AdvancedTextView"
112
94
  }
@@ -8,9 +8,7 @@ export const AdvancedText = ({
8
8
  menuOptions,
9
9
  onWordPress,
10
10
  onSelection,
11
- indicatorWordIndex,
12
- color,
13
- fontSize
11
+ indicatorWordIndex
14
12
  }) => {
15
13
  return /*#__PURE__*/_jsx(AdvancedTextViewNativeComponent, {
16
14
  text: text,
@@ -18,9 +16,7 @@ export const AdvancedText = ({
18
16
  menuOptions: menuOptions,
19
17
  onWordPress: onWordPress,
20
18
  onSelection: onSelection,
21
- indicatorWordIndex: indicatorWordIndex,
22
- color: color,
23
- fontSize: fontSize
19
+ indicatorWordIndex: indicatorWordIndex
24
20
  });
25
21
  };
26
22
  //# sourceMappingURL=AdvancedText.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AdvancedTextViewNativeComponent","jsx","_jsx","AdvancedText","text","highlightedWords","menuOptions","onWordPress","onSelection","indicatorWordIndex","color","fontSize"],"sourceRoot":"..\\..\\src","sources":["AdvancedText.tsx"],"mappings":";;AACA,OAAOA,+BAA+B,MAAM,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAuBhF,OAAO,MAAMC,YAAmC,GAAGA,CAAC;EAClDC,IAAI;EACJC,gBAAgB;EAChBC,WAAW;EACXC,WAAW;EACXC,WAAW;EACXC,kBAAkB;EAClBC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,oBACET,IAAA,CAACF,+BAA+B;IAC9BI,IAAI,EAAEA,IAAK;IACXC,gBAAgB,EAAEA,gBAAiB;IACnCC,WAAW,EAAEA,WAAY;IACzBC,WAAW,EAAEA,WAAY;IACzBC,WAAW,EAAEA,WAAY;IACzBC,kBAAkB,EAAEA,kBAAmB;IACvCC,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA;EAAS,CACpB,CAAC;AAEN,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AdvancedTextViewNativeComponent","jsx","_jsx","AdvancedText","text","highlightedWords","menuOptions","onWordPress","onSelection","indicatorWordIndex"],"sourceRoot":"..\\..\\src","sources":["AdvancedText.tsx"],"mappings":";;AACA,OAAOA,+BAA+B,MAAM,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAqBhF,OAAO,MAAMC,YAAmC,GAAGA,CAAC;EAClDC,IAAI;EACJC,gBAAgB;EAChBC,WAAW;EACXC,WAAW;EACXC,WAAW;EACXC;AACF,CAAC,KAAK;EACJ,oBACEP,IAAA,CAACF,+BAA+B;IAC9BI,IAAI,EAAEA,IAAK;IACXC,gBAAgB,EAAEA,gBAAiB;IACnCC,WAAW,EAAEA,WAAY;IACzBC,WAAW,EAAEA,WAAY;IACzBC,WAAW,EAAEA,WAAY;IACzBC,kBAAkB,EAAEA;EAAmB,CACxC,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -11,8 +11,6 @@ interface HighlightedWord {
11
11
 
12
12
  interface NativeProps extends ViewProps {
13
13
  text: string;
14
- color: string;
15
- fontSize: Int32;
16
14
  highlightedWords?: ReadonlyArray<HighlightedWord>;
17
15
  menuOptions?: ReadonlyArray<string>;
18
16
  onWordPress?: DirectEventHandler<{ word: string }>;
@@ -6,8 +6,6 @@ interface HighlightedWord {
6
6
  interface NativeProps extends ViewProps {
7
7
  text: string;
8
8
  highlightedWords?: ReadonlyArray<HighlightedWord>;
9
- color: string;
10
- fontSize: number;
11
9
  menuOptions?: ReadonlyArray<string>;
12
10
  onWordPress?: (event: NativeSyntheticEvent<{
13
11
  word: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AdvancedText.d.ts","sourceRoot":"","sources":["../../../src/AdvancedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,CACZ,KAAK,EAAE,oBAAoB,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,KACzD,IAAI,CAAC;IACV,WAAW,CAAC,EAAE,CACZ,KAAK,EAAE,oBAAoB,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,KACjE,IAAI,CAAC;IACV,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsB9C,CAAC"}
1
+ {"version":3,"file":"AdvancedText.d.ts","sourceRoot":"","sources":["../../../src/AdvancedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAElD,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,CACZ,KAAK,EAAE,oBAAoB,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,KACzD,IAAI,CAAC;IACV,WAAW,CAAC,EAAE,CACZ,KAAK,EAAE,oBAAoB,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,KACjE,IAAI,CAAC;IACV,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkB9C,CAAC"}
@@ -6,8 +6,6 @@ interface HighlightedWord {
6
6
  }
7
7
  interface NativeProps extends ViewProps {
8
8
  text: string;
9
- color: string;
10
- fontSize: Int32;
11
9
  highlightedWords?: ReadonlyArray<HighlightedWord>;
12
10
  menuOptions?: ReadonlyArray<string>;
13
11
  onWordPress?: DirectEventHandler<{
@@ -1 +1 @@
1
- {"version":3,"file":"AdvancedTextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/AdvancedTextViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE3F,UAAU,eAAe;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC;IAChB,gBAAgB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,kBAAkB,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,kBAAkB,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9E,kBAAkB,CAAC,EAAE,KAAK,CAAC;CAC5B;;AAED,wBAAuE"}
1
+ {"version":3,"file":"AdvancedTextViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/AdvancedTextViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE3F,UAAU,eAAe;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,kBAAkB,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,kBAAkB,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9E,kBAAkB,CAAC,EAAE,KAAK,CAAC;CAC5B;;AAED,wBAAuE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-advanced-text",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": " Advanced text component for React Native with custom select options.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -9,8 +9,6 @@ interface HighlightedWord {
9
9
  interface NativeProps extends ViewProps {
10
10
  text: string;
11
11
  highlightedWords?: ReadonlyArray<HighlightedWord>;
12
- color: string;
13
- fontSize: number;
14
12
 
15
13
  menuOptions?: ReadonlyArray<string>;
16
14
  onWordPress?: (
@@ -29,8 +27,6 @@ export const AdvancedText: React.FC<NativeProps> = ({
29
27
  onWordPress,
30
28
  onSelection,
31
29
  indicatorWordIndex,
32
- color,
33
- fontSize,
34
30
  }) => {
35
31
  return (
36
32
  <AdvancedTextViewNativeComponent
@@ -40,8 +36,6 @@ export const AdvancedText: React.FC<NativeProps> = ({
40
36
  onWordPress={onWordPress}
41
37
  onSelection={onSelection}
42
38
  indicatorWordIndex={indicatorWordIndex}
43
- color={color}
44
- fontSize={fontSize}
45
39
  />
46
40
  );
47
41
  };
@@ -11,8 +11,6 @@ interface HighlightedWord {
11
11
 
12
12
  interface NativeProps extends ViewProps {
13
13
  text: string;
14
- color: string;
15
- fontSize: Int32;
16
14
  highlightedWords?: ReadonlyArray<HighlightedWord>;
17
15
  menuOptions?: ReadonlyArray<string>;
18
16
  onWordPress?: DirectEventHandler<{ word: string }>;