@expensify/react-native-live-markdown 0.1.35 → 0.1.36

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.
@@ -34,6 +34,8 @@ public class MarkdownStyle {
34
34
 
35
35
  private final String mCodeFontFamily;
36
36
 
37
+ private final float mCodeFontSize;
38
+
37
39
  @ColorInt
38
40
  private final int mCodeColor;
39
41
 
@@ -42,6 +44,8 @@ public class MarkdownStyle {
42
44
 
43
45
  private final String mPreFontFamily;
44
46
 
47
+ private final float mPreFontSize;
48
+
45
49
  @ColorInt
46
50
  private final int mPreColor;
47
51
 
@@ -70,9 +74,11 @@ public class MarkdownStyle {
70
74
  mBlockquoteMarginLeft = parseFloat(map, "blockquote", "marginLeft");
71
75
  mBlockquotePaddingLeft = parseFloat(map, "blockquote", "paddingLeft");
72
76
  mCodeFontFamily = parseString(map, "code", "fontFamily");
77
+ mCodeFontSize = parseFloat(map, "code", "fontSize");
73
78
  mCodeColor = parseColor(map, "code", "color", context);
74
79
  mCodeBackgroundColor = parseColor(map, "code", "backgroundColor", context);
75
80
  mPreFontFamily = parseString(map, "pre", "fontFamily");
81
+ mPreFontSize = parseFloat(map, "pre", "fontSize");
76
82
  mPreColor = parseColor(map, "pre", "color", context);
77
83
  mPreBackgroundColor = parseColor(map, "pre", "backgroundColor", context);
78
84
  mMentionHereColor = parseColor(map, "mentionHere", "color", context);
@@ -147,6 +153,10 @@ public class MarkdownStyle {
147
153
  return mCodeFontFamily;
148
154
  }
149
155
 
156
+ public float getCodeFontSize() {
157
+ return mCodeFontSize;
158
+ }
159
+
150
160
  @ColorInt
151
161
  public int getCodeColor() {
152
162
  return mCodeColor;
@@ -161,6 +171,10 @@ public class MarkdownStyle {
161
171
  return mPreFontFamily;
162
172
  }
163
173
 
174
+ public float getPreFontSize() {
175
+ return mPreFontSize;
176
+ }
177
+
164
178
  @ColorInt
165
179
  public int getPreColor() {
166
180
  return mPreColor;
@@ -137,11 +137,13 @@ public class MarkdownUtils {
137
137
  break;
138
138
  case "code":
139
139
  setSpan(ssb, new MarkdownFontFamilySpan(mMarkdownStyle.getCodeFontFamily(), mAssetManager), start, end);
140
+ setSpan(ssb, new MarkdownFontSizeSpan(mMarkdownStyle.getCodeFontSize()), start, end);
140
141
  setSpan(ssb, new MarkdownForegroundColorSpan(mMarkdownStyle.getCodeColor()), start, end);
141
142
  setSpan(ssb, new MarkdownBackgroundColorSpan(mMarkdownStyle.getCodeBackgroundColor()), start, end);
142
143
  break;
143
144
  case "pre":
144
145
  setSpan(ssb, new MarkdownFontFamilySpan(mMarkdownStyle.getPreFontFamily(), mAssetManager), start, end);
146
+ setSpan(ssb, new MarkdownFontSizeSpan(mMarkdownStyle.getPreFontSize()), start, end);
145
147
  setSpan(ssb, new MarkdownForegroundColorSpan(mMarkdownStyle.getPreColor()), start, end);
146
148
  setSpan(ssb, new MarkdownBackgroundColorSpan(mMarkdownStyle.getPreBackgroundColor()), start, end);
147
149
  break;
@@ -15,9 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
15
15
  @property (nonatomic) CGFloat blockquoteMarginLeft;
16
16
  @property (nonatomic) CGFloat blockquotePaddingLeft;
17
17
  @property (nonatomic) NSString *codeFontFamily;
18
+ @property (nonatomic) CGFloat codeFontSize;
18
19
  @property (nonatomic) UIColor *codeColor;
19
20
  @property (nonatomic) UIColor *codeBackgroundColor;
20
21
  @property (nonatomic) NSString *preFontFamily;
22
+ @property (nonatomic) CGFloat preFontSize;
21
23
  @property (nonatomic) UIColor *preColor;
22
24
  @property (nonatomic) UIColor *preBackgroundColor;
23
25
  @property (nonatomic) UIColor *mentionHereColor;
@@ -27,10 +27,12 @@
27
27
  _blockquotePaddingLeft = style.blockquote.paddingLeft;
28
28
 
29
29
  _codeFontFamily = RCTNSStringFromString(style.code.fontFamily);
30
+ _codeFontSize = style.code.fontSize;
30
31
  _codeColor = RCTUIColorFromSharedColor(style.code.color);
31
32
  _codeBackgroundColor = RCTUIColorFromSharedColor(style.code.backgroundColor);
32
33
 
33
34
  _preFontFamily = RCTNSStringFromString(style.pre.fontFamily);
35
+ _preFontSize = style.pre.fontSize;
34
36
  _preColor = RCTUIColorFromSharedColor(style.pre.color);
35
37
  _preBackgroundColor = RCTUIColorFromSharedColor(style.pre.backgroundColor);
36
38
 
@@ -63,10 +65,12 @@
63
65
  _blockquotePaddingLeft = [RCTConvert CGFloat:json[@"blockquote"][@"paddingLeft"]];
64
66
 
65
67
  _codeFontFamily = [RCTConvert NSString:json[@"code"][@"fontFamily"]];
68
+ _codeFontSize = [RCTConvert CGFloat:json[@"code"][@"fontSize"]];
66
69
  _codeColor = [RCTConvert UIColor:json[@"code"][@"color"]];
67
70
  _codeBackgroundColor = [RCTConvert UIColor:json[@"code"][@"backgroundColor"]];
68
71
 
69
72
  _preFontFamily = [RCTConvert NSString:json[@"pre"][@"fontFamily"]];
73
+ _preFontSize = [RCTConvert CGFloat:json[@"pre"][@"fontSize"]];
70
74
  _preColor = [RCTConvert UIColor:json[@"pre"][@"color"]];
71
75
  _preBackgroundColor = [RCTConvert UIColor:json[@"pre"][@"backgroundColor"]];
72
76
 
@@ -72,9 +72,19 @@
72
72
  } else if ([type isEqualToString:@"italic"]) {
73
73
  font = [RCTFont updateFont:font withStyle:@"italic"];
74
74
  } else if ([type isEqualToString:@"code"]) {
75
- font = [RCTFont updateFont:font withFamily:_markdownStyle.codeFontFamily];
75
+ font = [RCTFont updateFont:font withFamily:_markdownStyle.codeFontFamily
76
+ size:[NSNumber numberWithFloat:_markdownStyle.codeFontSize]
77
+ weight:nil
78
+ style:nil
79
+ variant:nil
80
+ scaleMultiplier:0];
76
81
  } else if ([type isEqualToString:@"pre"]) {
77
- font = [RCTFont updateFont:font withFamily:_markdownStyle.preFontFamily];
82
+ font = [RCTFont updateFont:font withFamily:_markdownStyle.preFontFamily
83
+ size:[NSNumber numberWithFloat:_markdownStyle.preFontSize]
84
+ weight:nil
85
+ style:nil
86
+ variant:nil
87
+ scaleMultiplier:0];
78
88
  } else if ([type isEqualToString:@"h1"]) {
79
89
  font = [RCTFont updateFont:font withFamily:nil
80
90
  size:[NSNumber numberWithFloat:_markdownStyle.h1FontSize]
@@ -1 +1 @@
1
- {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../src","sources":["MarkdownTextInputDecoratorViewNativeComponent.ts"],"mappings":";;;;;;AAGA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GA6C9E,IAAAG,+BAAsB,EAAc,gCAAgC,CAAC"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../src","sources":["MarkdownTextInputDecoratorViewNativeComponent.ts"],"mappings":";;;;;;AAGA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GA+C9E,IAAAG,+BAAsB,EAAc,gCAAgC,CAAC"}
@@ -31,11 +31,13 @@ function makeDefaultMarkdownStyle() {
31
31
  },
32
32
  code: {
33
33
  fontFamily: FONT_FAMILY_MONOSPACE,
34
+ fontSize: 20,
34
35
  color: 'black',
35
36
  backgroundColor: 'lightgray'
36
37
  },
37
38
  pre: {
38
39
  fontFamily: FONT_FAMILY_MONOSPACE,
40
+ fontSize: 20,
39
41
  color: 'black',
40
42
  backgroundColor: 'lightgray'
41
43
  },
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","FONT_FAMILY_MONOSPACE","Platform","select","ios","default","makeDefaultMarkdownStyle","syntax","color","link","h1","fontSize","emoji","blockquote","borderColor","borderWidth","marginLeft","paddingLeft","code","fontFamily","backgroundColor","pre","mentionHere","mentionUser","mergeMarkdownStyleWithDefault","input","output","undefined","Object","keys","forEach","key","assign"],"sourceRoot":"../../src","sources":["styleUtils.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,MAAMC,qBAAqB,GAAGC,qBAAQ,CAACC,MAAM,CAAC;EAC5CC,GAAG,EAAE,SAAS;EACdC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,SAASC,wBAAwBA,CAAA,EAAkB;EACjD,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE;IACT,CAAC;IACDC,IAAI,EAAE;MACJD,KAAK,EAAE;IACT,CAAC;IACDE,EAAE,EAAE;MACFC,QAAQ,EAAE;IACZ,CAAC;IACDC,KAAK,EAAE;MACLD,QAAQ,EAAE;IACZ,CAAC;IACDE,UAAU,EAAE;MACVC,WAAW,EAAE,MAAM;MACnBC,WAAW,EAAE,CAAC;MACdC,UAAU,EAAE,CAAC;MACbC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAElB,qBAAqB;MACjCO,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDC,GAAG,EAAE;MACHF,UAAU,EAAElB,qBAAqB;MACjCO,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDE,WAAW,EAAE;MACXd,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDG,WAAW,EAAE;MACXf,KAAK,EAAE,MAAM;MACbY,eAAe,EAAE;IACnB;EACF,CAAC;AACH;AAEA,SAASI,6BAA6BA,CAACC,KAAuC,EAAiB;EAC7F,MAAMC,MAAM,GAAGpB,wBAAwB,CAAC,CAAC;EAEzC,IAAImB,KAAK,KAAKE,SAAS,EAAE;IACvBC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,OAAO,CAAEC,GAAG,IAAK;MAClC,IAAI,EAAEA,GAAG,IAAIL,MAAM,CAAC,EAAE;QACpB;MACF;MACAE,MAAM,CAACI,MAAM,CAACN,MAAM,CAACK,GAAG,CAAwB,EAAEN,KAAK,CAACM,GAAG,CAAwB,CAAC;IACtF,CAAC,CAAC;EACJ;EAEA,OAAOL,MAAM;AACf"}
1
+ {"version":3,"names":["_reactNative","require","FONT_FAMILY_MONOSPACE","Platform","select","ios","default","makeDefaultMarkdownStyle","syntax","color","link","h1","fontSize","emoji","blockquote","borderColor","borderWidth","marginLeft","paddingLeft","code","fontFamily","backgroundColor","pre","mentionHere","mentionUser","mergeMarkdownStyleWithDefault","input","output","undefined","Object","keys","forEach","key","assign"],"sourceRoot":"../../src","sources":["styleUtils.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,MAAMC,qBAAqB,GAAGC,qBAAQ,CAACC,MAAM,CAAC;EAC5CC,GAAG,EAAE,SAAS;EACdC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,SAASC,wBAAwBA,CAAA,EAAkB;EACjD,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE;IACT,CAAC;IACDC,IAAI,EAAE;MACJD,KAAK,EAAE;IACT,CAAC;IACDE,EAAE,EAAE;MACFC,QAAQ,EAAE;IACZ,CAAC;IACDC,KAAK,EAAE;MACLD,QAAQ,EAAE;IACZ,CAAC;IACDE,UAAU,EAAE;MACVC,WAAW,EAAE,MAAM;MACnBC,WAAW,EAAE,CAAC;MACdC,UAAU,EAAE,CAAC;MACbC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAElB,qBAAqB;MACjCU,QAAQ,EAAE,EAAE;MACZH,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDC,GAAG,EAAE;MACHF,UAAU,EAAElB,qBAAqB;MACjCU,QAAQ,EAAE,EAAE;MACZH,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDE,WAAW,EAAE;MACXd,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDG,WAAW,EAAE;MACXf,KAAK,EAAE,MAAM;MACbY,eAAe,EAAE;IACnB;EACF,CAAC;AACH;AAEA,SAASI,6BAA6BA,CAACC,KAAuC,EAAiB;EAC7F,MAAMC,MAAM,GAAGpB,wBAAwB,CAAC,CAAC;EAEzC,IAAImB,KAAK,KAAKE,SAAS,EAAE;IACvBC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,OAAO,CAAEC,GAAG,IAAK;MAClC,IAAI,EAAEA,GAAG,IAAIL,MAAM,CAAC,EAAE;QACpB;MACF;MACAE,MAAM,CAACI,MAAM,CAACN,MAAM,CAACK,GAAG,CAAwB,EAAEN,KAAK,CAACM,GAAG,CAAwB,CAAC;IACtF,CAAC,CAAC;EACJ;EAEA,OAAOL,MAAM;AACf"}
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../src","sources":["MarkdownTextInputDecoratorViewNativeComponent.ts"],"mappings":"AAGA,OAAOA,sBAAsB,MAAM,yDAAyD;AA6C5F,eAAeA,sBAAsB,CAAc,gCAAgC,CAAC"}
1
+ {"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../src","sources":["MarkdownTextInputDecoratorViewNativeComponent.ts"],"mappings":"AAGA,OAAOA,sBAAsB,MAAM,yDAAyD;AA+C5F,eAAeA,sBAAsB,CAAc,gCAAgC,CAAC"}
@@ -25,11 +25,13 @@ function makeDefaultMarkdownStyle() {
25
25
  },
26
26
  code: {
27
27
  fontFamily: FONT_FAMILY_MONOSPACE,
28
+ fontSize: 20,
28
29
  color: 'black',
29
30
  backgroundColor: 'lightgray'
30
31
  },
31
32
  pre: {
32
33
  fontFamily: FONT_FAMILY_MONOSPACE,
34
+ fontSize: 20,
33
35
  color: 'black',
34
36
  backgroundColor: 'lightgray'
35
37
  },
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","FONT_FAMILY_MONOSPACE","select","ios","default","makeDefaultMarkdownStyle","syntax","color","link","h1","fontSize","emoji","blockquote","borderColor","borderWidth","marginLeft","paddingLeft","code","fontFamily","backgroundColor","pre","mentionHere","mentionUser","mergeMarkdownStyleWithDefault","input","output","undefined","Object","keys","forEach","key","assign"],"sourceRoot":"../../src","sources":["styleUtils.ts"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,cAAc;AASrC,MAAMC,qBAAqB,GAAGD,QAAQ,CAACE,MAAM,CAAC;EAC5CC,GAAG,EAAE,SAAS;EACdC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,SAASC,wBAAwBA,CAAA,EAAkB;EACjD,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE;IACT,CAAC;IACDC,IAAI,EAAE;MACJD,KAAK,EAAE;IACT,CAAC;IACDE,EAAE,EAAE;MACFC,QAAQ,EAAE;IACZ,CAAC;IACDC,KAAK,EAAE;MACLD,QAAQ,EAAE;IACZ,CAAC;IACDE,UAAU,EAAE;MACVC,WAAW,EAAE,MAAM;MACnBC,WAAW,EAAE,CAAC;MACdC,UAAU,EAAE,CAAC;MACbC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAEjB,qBAAqB;MACjCM,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDC,GAAG,EAAE;MACHF,UAAU,EAAEjB,qBAAqB;MACjCM,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDE,WAAW,EAAE;MACXd,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDG,WAAW,EAAE;MACXf,KAAK,EAAE,MAAM;MACbY,eAAe,EAAE;IACnB;EACF,CAAC;AACH;AAEA,SAASI,6BAA6BA,CAACC,KAAuC,EAAiB;EAC7F,MAAMC,MAAM,GAAGpB,wBAAwB,CAAC,CAAC;EAEzC,IAAImB,KAAK,KAAKE,SAAS,EAAE;IACvBC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,OAAO,CAAEC,GAAG,IAAK;MAClC,IAAI,EAAEA,GAAG,IAAIL,MAAM,CAAC,EAAE;QACpB;MACF;MACAE,MAAM,CAACI,MAAM,CAACN,MAAM,CAACK,GAAG,CAAwB,EAAEN,KAAK,CAACM,GAAG,CAAwB,CAAC;IACtF,CAAC,CAAC;EACJ;EAEA,OAAOL,MAAM;AACf;AAIA,SAAQF,6BAA6B"}
1
+ {"version":3,"names":["Platform","FONT_FAMILY_MONOSPACE","select","ios","default","makeDefaultMarkdownStyle","syntax","color","link","h1","fontSize","emoji","blockquote","borderColor","borderWidth","marginLeft","paddingLeft","code","fontFamily","backgroundColor","pre","mentionHere","mentionUser","mergeMarkdownStyleWithDefault","input","output","undefined","Object","keys","forEach","key","assign"],"sourceRoot":"../../src","sources":["styleUtils.ts"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,cAAc;AASrC,MAAMC,qBAAqB,GAAGD,QAAQ,CAACE,MAAM,CAAC;EAC5CC,GAAG,EAAE,SAAS;EACdC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,SAASC,wBAAwBA,CAAA,EAAkB;EACjD,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE;IACT,CAAC;IACDC,IAAI,EAAE;MACJD,KAAK,EAAE;IACT,CAAC;IACDE,EAAE,EAAE;MACFC,QAAQ,EAAE;IACZ,CAAC;IACDC,KAAK,EAAE;MACLD,QAAQ,EAAE;IACZ,CAAC;IACDE,UAAU,EAAE;MACVC,WAAW,EAAE,MAAM;MACnBC,WAAW,EAAE,CAAC;MACdC,UAAU,EAAE,CAAC;MACbC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;MACJC,UAAU,EAAEjB,qBAAqB;MACjCS,QAAQ,EAAE,EAAE;MACZH,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDC,GAAG,EAAE;MACHF,UAAU,EAAEjB,qBAAqB;MACjCS,QAAQ,EAAE,EAAE;MACZH,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDE,WAAW,EAAE;MACXd,KAAK,EAAE,OAAO;MACdY,eAAe,EAAE;IACnB,CAAC;IACDG,WAAW,EAAE;MACXf,KAAK,EAAE,MAAM;MACbY,eAAe,EAAE;IACnB;EACF,CAAC;AACH;AAEA,SAASI,6BAA6BA,CAACC,KAAuC,EAAiB;EAC7F,MAAMC,MAAM,GAAGpB,wBAAwB,CAAC,CAAC;EAEzC,IAAImB,KAAK,KAAKE,SAAS,EAAE;IACvBC,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,OAAO,CAAEC,GAAG,IAAK;MAClC,IAAI,EAAEA,GAAG,IAAIL,MAAM,CAAC,EAAE;QACpB;MACF;MACAE,MAAM,CAACI,MAAM,CAACN,MAAM,CAACK,GAAG,CAAwB,EAAEN,KAAK,CAACM,GAAG,CAAwB,CAAC;IACtF,CAAC,CAAC;EACJ;EAEA,OAAOL,MAAM;AACf;AAIA,SAAQF,6BAA6B"}
@@ -23,11 +23,13 @@ interface MarkdownStyle {
23
23
  };
24
24
  code: {
25
25
  fontFamily: string;
26
+ fontSize: Float;
26
27
  color: ColorValue;
27
28
  backgroundColor: ColorValue;
28
29
  };
29
30
  pre: {
30
31
  fontFamily: string;
32
+ fontSize: Float;
31
33
  color: ColorValue;
32
34
  backgroundColor: ColorValue;
33
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownTextInputDecoratorViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/MarkdownTextInputDecoratorViewNativeComponent.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,2CAA2C,CAAC;AAGrE,UAAU,aAAa;IACrB,MAAM,EAAE;QACN,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK,CAAC;KACjB,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,EAAE,EAAE;QACF,QAAQ,EAAE,KAAK,CAAC;KACjB,CAAC;IACF,UAAU,EAAE;QACV,WAAW,EAAE,UAAU,CAAC;QACxB,WAAW,EAAE,KAAK,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC;QAClB,WAAW,EAAE,KAAK,CAAC;KACpB,CAAC;IACF,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;IACF,GAAG,EAAE;QACH,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;IACF,WAAW,EAAE;QACX,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;IACF,WAAW,EAAE;QACX,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;CACH;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,aAAa,EAAE,aAAa,CAAC;CAC9B;;AAED,wBAAqF;AAErF,YAAY,EAAC,aAAa,EAAC,CAAC"}
1
+ {"version":3,"file":"MarkdownTextInputDecoratorViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/MarkdownTextInputDecoratorViewNativeComponent.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,2CAA2C,CAAC;AAGrE,UAAU,aAAa;IACrB,MAAM,EAAE;QACN,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK,CAAC;KACjB,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,UAAU,CAAC;KACnB,CAAC;IACF,EAAE,EAAE;QACF,QAAQ,EAAE,KAAK,CAAC;KACjB,CAAC;IACF,UAAU,EAAE;QACV,WAAW,EAAE,UAAU,CAAC;QACxB,WAAW,EAAE,KAAK,CAAC;QACnB,UAAU,EAAE,KAAK,CAAC;QAClB,WAAW,EAAE,KAAK,CAAC;KACpB,CAAC;IACF,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC;QAChB,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;IACF,GAAG,EAAE;QACH,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,KAAK,CAAC;QAChB,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;IACF,WAAW,EAAE;QACX,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;IACF,WAAW,EAAE;QACX,KAAK,EAAE,UAAU,CAAC;QAClB,eAAe,EAAE,UAAU,CAAC;KAC7B,CAAC;CACH;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,aAAa,EAAE,aAAa,CAAC;CAC9B;;AAED,wBAAqF;AAErF,YAAY,EAAC,aAAa,EAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styleUtils.d.ts","sourceRoot":"","sources":["../../../src/styleUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,+BAA+B,MAAM,iDAAiD,CAAC;AAExG,KAAK,aAAa,GAAG,+BAA+B,CAAC,aAAa,CAAC;AAEnE,KAAK,oBAAoB,GAAG,OAAO,CAAC;KACjC,CAAC,IAAI,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CACtD,CAAC,CAAC;AAgDH,iBAAS,6BAA6B,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,GAAG,aAAa,CAa7F;AAED,YAAY,EAAC,oBAAoB,EAAC,CAAC;AAEnC,OAAO,EAAC,6BAA6B,EAAC,CAAC"}
1
+ {"version":3,"file":"styleUtils.d.ts","sourceRoot":"","sources":["../../../src/styleUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,+BAA+B,MAAM,iDAAiD,CAAC;AAExG,KAAK,aAAa,GAAG,+BAA+B,CAAC,aAAa,CAAC;AAEnE,KAAK,oBAAoB,GAAG,OAAO,CAAC;KACjC,CAAC,IAAI,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CACtD,CAAC,CAAC;AAkDH,iBAAS,6BAA6B,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,GAAG,aAAa,CAa7F;AAED,YAAY,EAAC,oBAAoB,EAAC,CAAC;AAEnC,OAAO,EAAC,6BAA6B,EAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -24,11 +24,13 @@ interface MarkdownStyle {
24
24
  };
25
25
  code: {
26
26
  fontFamily: string;
27
+ fontSize: Float;
27
28
  color: ColorValue;
28
29
  backgroundColor: ColorValue;
29
30
  };
30
31
  pre: {
31
32
  fontFamily: string;
33
+ fontSize: Float;
32
34
  color: ColorValue;
33
35
  backgroundColor: ColorValue;
34
36
  };
package/src/styleUtils.ts CHANGED
@@ -34,11 +34,13 @@ function makeDefaultMarkdownStyle(): MarkdownStyle {
34
34
  },
35
35
  code: {
36
36
  fontFamily: FONT_FAMILY_MONOSPACE,
37
+ fontSize: 20,
37
38
  color: 'black',
38
39
  backgroundColor: 'lightgray',
39
40
  },
40
41
  pre: {
41
42
  fontFamily: FONT_FAMILY_MONOSPACE,
43
+ fontSize: 20,
42
44
  color: 'black',
43
45
  backgroundColor: 'lightgray',
44
46
  },