react-native-advanced-text 0.1.11 → 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
  }
@@ -8,8 +8,7 @@ export const AdvancedText = ({
8
8
  menuOptions,
9
9
  onWordPress,
10
10
  onSelection,
11
- indicatorWordIndex,
12
- ...restProps
11
+ indicatorWordIndex
13
12
  }) => {
14
13
  return /*#__PURE__*/_jsx(AdvancedTextViewNativeComponent, {
15
14
  text: text,
@@ -17,8 +16,7 @@ export const AdvancedText = ({
17
16
  menuOptions: menuOptions,
18
17
  onWordPress: onWordPress,
19
18
  onSelection: onSelection,
20
- indicatorWordIndex: indicatorWordIndex,
21
- ...restProps
19
+ indicatorWordIndex: indicatorWordIndex
22
20
  });
23
21
  };
24
22
  //# sourceMappingURL=AdvancedText.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AdvancedTextViewNativeComponent","jsx","_jsx","AdvancedText","text","highlightedWords","menuOptions","onWordPress","onSelection","indicatorWordIndex","restProps"],"sourceRoot":"..\\..\\src","sources":["AdvancedText.tsx"],"mappings":";;AACA,OAAOA,+BAA+B,MAAM,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAkBhF,OAAO,MAAMC,YAAmC,GAAGA,CAAC;EAClDC,IAAI;EACJC,gBAAgB;EAChBC,WAAW;EACXC,WAAW;EACXC,WAAW;EACXC,kBAAkB;EAClB,GAAGC;AACL,CAAC,KAAK;EACJ,oBACER,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;IAAA,GACnCC;EAAS,CACd,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":[]}
@@ -9,10 +9,11 @@ interface NativeProps extends ViewProps {
9
9
  menuOptions?: ReadonlyArray<string>;
10
10
  onWordPress?: (event: NativeSyntheticEvent<{
11
11
  word: string;
12
+ index: string;
12
13
  }>) => void;
13
14
  onSelection?: (event: NativeSyntheticEvent<{
14
15
  selectedText: string;
15
- eventType: string;
16
+ event: string;
16
17
  }>) => void;
17
18
  indicatorWordIndex?: number;
18
19
  }
@@ -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,WAA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C;IACV,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkB9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-advanced-text",
3
- "version": "0.1.11",
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,10 +9,13 @@ interface HighlightedWord {
9
9
  interface NativeProps extends ViewProps {
10
10
  text: string;
11
11
  highlightedWords?: ReadonlyArray<HighlightedWord>;
12
+
12
13
  menuOptions?: ReadonlyArray<string>;
13
- onWordPress?: (event: NativeSyntheticEvent<{ word: string }>) => void;
14
+ onWordPress?: (
15
+ event: NativeSyntheticEvent<{ word: string; index: string }>
16
+ ) => void;
14
17
  onSelection?: (
15
- event: NativeSyntheticEvent<{ selectedText: string; eventType: string }>
18
+ event: NativeSyntheticEvent<{ selectedText: string; event: string }>
16
19
  ) => void;
17
20
  indicatorWordIndex?: number;
18
21
  }
@@ -24,7 +27,6 @@ export const AdvancedText: React.FC<NativeProps> = ({
24
27
  onWordPress,
25
28
  onSelection,
26
29
  indicatorWordIndex,
27
- ...restProps
28
30
  }) => {
29
31
  return (
30
32
  <AdvancedTextViewNativeComponent
@@ -34,7 +36,6 @@ export const AdvancedText: React.FC<NativeProps> = ({
34
36
  onWordPress={onWordPress}
35
37
  onSelection={onSelection}
36
38
  indicatorWordIndex={indicatorWordIndex}
37
- {...restProps}
38
39
  />
39
40
  );
40
41
  };