@expensify/react-native-live-markdown 0.1.172 → 0.1.174
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/lib/commonjs/MarkdownTextInput.js.map +1 -1
- package/lib/commonjs/MarkdownTextInput.web.js.map +1 -1
- package/lib/module/MarkdownTextInput.js.map +1 -1
- package/lib/module/MarkdownTextInput.web.js.map +1 -1
- package/lib/parser/react-native-live-markdown-parser.js +25 -22
- package/lib/typescript/src/MarkdownTextInput.d.ts +2 -1
- package/lib/typescript/src/MarkdownTextInput.d.ts.map +1 -1
- package/lib/typescript/src/MarkdownTextInput.web.d.ts +2 -1
- package/lib/typescript/src/MarkdownTextInput.web.d.ts.map +1 -1
- package/package.json +1 -1
- package/parser/react-native-live-markdown-parser.js +25 -22
- package/src/MarkdownTextInput.tsx +3 -1
- package/src/MarkdownTextInput.web.tsx +3 -1
|
@@ -16,6 +16,8 @@ interface MarkdownTextInputProps extends TextInputProps, InlineImagesInputProps
|
|
|
16
16
|
markdownStyle?: PartialMarkdownStyle;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
type MarkdownTextInput = TextInput & React.Component<MarkdownTextInputProps>;
|
|
20
|
+
|
|
19
21
|
function processColorsInMarkdownStyle(input: MarkdownStyle): MarkdownStyle {
|
|
20
22
|
const output = JSON.parse(JSON.stringify(input));
|
|
21
23
|
|
|
@@ -37,7 +39,7 @@ function processMarkdownStyle(input: PartialMarkdownStyle | undefined): Markdown
|
|
|
37
39
|
return processColorsInMarkdownStyle(mergeMarkdownStyleWithDefault(input));
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
const MarkdownTextInput = React.forwardRef<
|
|
42
|
+
const MarkdownTextInput = React.forwardRef<MarkdownTextInput, MarkdownTextInputProps>((props, ref) => {
|
|
41
43
|
const IS_FABRIC = 'nativeFabricUIManager' in global;
|
|
42
44
|
|
|
43
45
|
const markdownStyle = React.useMemo(() => processMarkdownStyle(props.markdownStyle), [props.markdownStyle]);
|
|
@@ -40,6 +40,8 @@ interface MarkdownNativeEvent extends Event {
|
|
|
40
40
|
inputType: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
type MarkdownTextInput = TextInput & React.Component<MarkdownTextInputProps>;
|
|
44
|
+
|
|
43
45
|
type Selection = {
|
|
44
46
|
start: number;
|
|
45
47
|
end: number;
|
|
@@ -68,7 +70,7 @@ type HTMLMarkdownElement = HTMLElement & {
|
|
|
68
70
|
value: string;
|
|
69
71
|
};
|
|
70
72
|
|
|
71
|
-
const MarkdownTextInput = React.forwardRef<
|
|
73
|
+
const MarkdownTextInput = React.forwardRef<MarkdownTextInput, MarkdownTextInputProps>(
|
|
72
74
|
(
|
|
73
75
|
{
|
|
74
76
|
accessibilityLabel,
|