react-native-marked 6.0.0-rc.0 → 6.0.1

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.
@@ -27,133 +27,170 @@ const getStyles = (
27
27
 
28
28
  const fontStyle = getFontStyles(mdColors);
29
29
  return StyleSheet.create<MarkedStyles>({
30
- em: {
31
- ...fontStyle.regular,
32
- fontStyle: "italic",
33
- ...userStyles?.em,
34
- },
35
- strong: {
36
- ...fontStyle.regular,
37
- fontWeight: "bold",
38
- ...userStyles?.strong,
39
- },
40
- strikethrough: {
41
- ...fontStyle.regular,
42
- textDecorationLine: "line-through",
43
- textDecorationStyle: "solid",
44
- ...userStyles?.strikethrough,
45
- },
46
- text: {
47
- ...fontStyle.regular,
48
- ...userStyles?.text,
49
- },
50
- paragraph: {
51
- ...fontStyle.regular,
52
- paddingVertical: mdSpacing.m,
53
- ...userStyles?.paragraph,
54
- },
55
- link: {
56
- ...fontStyle.regular,
57
- fontStyle: "italic",
58
- color: mdColors.link,
59
- ...userStyles?.link,
60
- },
61
- blockquote: {
62
- borderLeftColor: mdColors.border,
63
- paddingLeft: mdSpacing.l,
64
- borderLeftWidth: mdSpacing.s,
65
- opacity: 0.8,
66
- ...userStyles?.blockquote,
67
- },
68
- h1: {
69
- fontSize: 32,
70
- lineHeight: 40,
71
- fontWeight: "bold",
72
- marginVertical: mdSpacing.m,
73
- letterSpacing: 0,
74
- paddingBottom: mdSpacing.s,
75
- borderBottomColor: mdColors.border,
76
- borderBottomWidth: 1,
77
- ...userStyles?.h1,
78
- },
79
- h2: {
80
- ...fontStyle.heading,
81
- fontSize: 28,
82
- lineHeight: 36,
83
- marginVertical: mdSpacing.m,
84
- paddingBottom: mdSpacing.s,
85
- borderBottomColor: mdColors.border,
86
- borderBottomWidth: 1,
87
- ...userStyles?.h2,
88
- },
89
- h3: {
90
- ...fontStyle.heading,
91
- fontSize: 24,
92
- lineHeight: 32,
93
- marginVertical: mdSpacing.s,
94
- ...userStyles?.h3,
95
- },
96
- h4: {
97
- ...fontStyle.heading,
98
- fontSize: 22,
99
- lineHeight: 28,
100
- marginVertical: mdSpacing.s,
101
- ...userStyles?.h4,
102
- },
103
- h5: {
104
- ...fontStyle.regular,
105
- ...fontStyle.heading,
106
- marginVertical: mdSpacing.xs,
107
- ...userStyles?.h5,
108
- },
109
- h6: {
110
- ...fontStyle.heading,
111
- fontSize: 14,
112
- lineHeight: 20,
113
- marginVertical: mdSpacing.xs,
114
- ...userStyles?.h6,
115
- },
116
- codespan: {
117
- ...fontStyle.regular,
118
- fontStyle: "italic",
119
- backgroundColor: mdColors.code,
120
- fontWeight: "300",
121
- ...userStyles?.codespan,
122
- },
123
- code: {
124
- padding: mdSpacing.l,
125
- backgroundColor: mdColors.code,
126
- minWidth: "100%",
127
- ...userStyles?.code,
128
- },
129
- hr: {
130
- borderBottomWidth: 1,
131
- borderBottomColor: mdColors.border,
132
- marginVertical: mdSpacing.s,
133
- ...userStyles?.hr,
134
- },
135
- li: {
136
- ...fontStyle.regular,
137
- flexShrink: 1,
138
- ...userStyles?.li,
139
- },
140
- image: {
141
- resizeMode: "cover",
142
- ...userStyles?.image,
143
- },
144
- table: {
145
- borderWidth: 1,
146
- borderColor: mdColors.border,
147
- ...userStyles?.table,
148
- },
149
- tableRow: {
150
- flexDirection: "row",
151
- ...userStyles?.tableRow,
152
- },
153
- tableCell: {
154
- padding: mdSpacing.s,
155
- ...userStyles?.tableCell,
156
- },
30
+ em: StyleSheet.flatten([
31
+ fontStyle.regular,
32
+ {
33
+ fontStyle: "italic",
34
+ },
35
+ userStyles?.em,
36
+ ]),
37
+ strong: StyleSheet.flatten([
38
+ fontStyle.regular,
39
+ {
40
+ fontWeight: "bold",
41
+ },
42
+ userStyles?.strong,
43
+ ]),
44
+ strikethrough: StyleSheet.flatten([
45
+ fontStyle.regular,
46
+ {
47
+ textDecorationLine: "line-through",
48
+ textDecorationStyle: "solid",
49
+ },
50
+ userStyles?.strikethrough,
51
+ ]),
52
+ text: StyleSheet.flatten([fontStyle.regular, userStyles?.text]),
53
+ paragraph: StyleSheet.flatten([
54
+ fontStyle.regular,
55
+ {
56
+ paddingVertical: mdSpacing.m,
57
+ },
58
+ userStyles?.paragraph,
59
+ ]),
60
+ link: StyleSheet.flatten([
61
+ fontStyle.regular,
62
+ {
63
+ fontStyle: "italic",
64
+ color: mdColors.link,
65
+ },
66
+ userStyles?.link,
67
+ ]),
68
+ blockquote: StyleSheet.flatten([
69
+ {
70
+ borderLeftColor: mdColors.border,
71
+ paddingLeft: mdSpacing.l,
72
+ borderLeftWidth: mdSpacing.s,
73
+ opacity: 0.8,
74
+ },
75
+ userStyles?.blockquote,
76
+ ]),
77
+ h1: StyleSheet.flatten([
78
+ {
79
+ fontSize: 32,
80
+ lineHeight: 40,
81
+ fontWeight: "bold",
82
+ marginVertical: mdSpacing.m,
83
+ letterSpacing: 0,
84
+ paddingBottom: mdSpacing.s,
85
+ borderBottomColor: mdColors.border,
86
+ borderBottomWidth: 1,
87
+ },
88
+ userStyles?.h1,
89
+ ]),
90
+ h2: StyleSheet.flatten([
91
+ fontStyle.heading,
92
+ {
93
+ fontSize: 28,
94
+ lineHeight: 36,
95
+ marginVertical: mdSpacing.m,
96
+ paddingBottom: mdSpacing.s,
97
+ borderBottomColor: mdColors.border,
98
+ borderBottomWidth: 1,
99
+ },
100
+ userStyles?.h2,
101
+ ]),
102
+ h3: StyleSheet.flatten([
103
+ fontStyle.heading,
104
+ {
105
+ fontSize: 24,
106
+ lineHeight: 32,
107
+ marginVertical: mdSpacing.s,
108
+ },
109
+ userStyles?.h3,
110
+ ]),
111
+ h4: StyleSheet.flatten([
112
+ fontStyle.heading,
113
+ {
114
+ fontSize: 22,
115
+ lineHeight: 28,
116
+ marginVertical: mdSpacing.s,
117
+ },
118
+ userStyles?.h4,
119
+ ]),
120
+ h5: StyleSheet.flatten([
121
+ fontStyle.regular,
122
+ fontStyle.heading,
123
+ {
124
+ marginVertical: mdSpacing.xs,
125
+ },
126
+ userStyles?.h5,
127
+ ]),
128
+ h6: StyleSheet.flatten([
129
+ fontStyle.heading,
130
+ {
131
+ fontSize: 14,
132
+ lineHeight: 20,
133
+ marginVertical: mdSpacing.xs,
134
+ },
135
+ userStyles?.h6,
136
+ ]),
137
+ codespan: StyleSheet.flatten([
138
+ fontStyle.regular,
139
+ {
140
+ fontStyle: "italic",
141
+ backgroundColor: mdColors.code,
142
+ fontWeight: "300",
143
+ },
144
+ userStyles?.codespan,
145
+ ]),
146
+ code: StyleSheet.flatten([
147
+ {
148
+ padding: mdSpacing.l,
149
+ backgroundColor: mdColors.code,
150
+ minWidth: "100%",
151
+ },
152
+ userStyles?.code,
153
+ ]),
154
+ hr: StyleSheet.flatten([
155
+ {
156
+ borderBottomWidth: 1,
157
+ borderBottomColor: mdColors.border,
158
+ marginVertical: mdSpacing.s,
159
+ },
160
+ userStyles?.hr,
161
+ ]),
162
+ li: StyleSheet.flatten([
163
+ fontStyle.regular,
164
+ {
165
+ flexShrink: 1,
166
+ },
167
+ userStyles?.li,
168
+ ]),
169
+ image: StyleSheet.flatten([
170
+ {
171
+ resizeMode: "cover",
172
+ },
173
+ userStyles?.image,
174
+ ]),
175
+ table: StyleSheet.flatten([
176
+ {
177
+ borderWidth: 1,
178
+ borderColor: mdColors.border,
179
+ },
180
+ userStyles?.table,
181
+ ]),
182
+ tableRow: StyleSheet.flatten([
183
+ {
184
+ flexDirection: "row",
185
+ },
186
+ userStyles?.tableRow,
187
+ ]),
188
+ tableCell: StyleSheet.flatten([
189
+ {
190
+ padding: mdSpacing.s,
191
+ },
192
+ userStyles?.tableCell,
193
+ ]),
157
194
  });
158
195
  };
159
196