react-native-marcus 0.1.1 → 0.2.0

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.
Files changed (294) hide show
  1. package/README.md +220 -63
  2. package/RNMarcus.podspec +6 -0
  3. package/android/src/main/java/app/getbullet/marcus/MarcusPackage.kt +2 -1
  4. package/android/src/main/java/app/getbullet/marcus/MarcusTextDecoratorView.kt +168 -0
  5. package/android/src/main/java/app/getbullet/marcus/MarcusTextDecoratorViewManager.kt +38 -0
  6. package/android/src/main/java/app/getbullet/marcus/MarcusTextDecoratorViewManagerSpec.kt +19 -0
  7. package/android/src/main/java/app/getbullet/marcus/MarcusTextInputDecoratorView.kt +23 -1
  8. package/android/src/main/java/app/getbullet/marcus/MarkdownBackgroundPainter.kt +147 -0
  9. package/android/src/main/java/app/getbullet/marcus/MarkdownBackgroundPass.kt +19 -0
  10. package/android/src/main/java/app/getbullet/marcus/MarkdownCopy.kt +87 -0
  11. package/android/src/main/java/app/getbullet/marcus/MarkdownFormatter.kt +652 -113
  12. package/android/src/main/java/app/getbullet/marcus/MarkdownRanges.kt +47 -0
  13. package/android/src/main/java/app/getbullet/marcus/MarkdownStyle.kt +140 -61
  14. package/android/src/main/java/app/getbullet/marcus/MarkdownUtils.kt +37 -7
  15. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownAbsoluteLineHeightSpan.kt +48 -0
  16. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownBackgroundSpan.kt +102 -48
  17. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownBlockIndentSpan.kt +22 -4
  18. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownBulletSpan.kt +78 -0
  19. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownCodeBlockSpan.kt +177 -0
  20. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownFontStyleSpan.kt +32 -0
  21. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownFontWeightSpan.kt +34 -0
  22. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownGapSpan.kt +24 -11
  23. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownLetterSpacingSpan.kt +32 -0
  24. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownTextShadowSpan.kt +32 -0
  25. package/android/src/main/new_arch/CMakeLists.txt +17 -0
  26. package/android/src/main/new_arch/RNMarcusSpec.h +1 -0
  27. package/android/src/main/new_arch/react/renderer/components/RNMarcusSpec/MarcusTextDecoratorShadowNode.cpp +235 -0
  28. package/android/src/main/new_arch/react/renderer/components/RNMarcusSpec/MarcusTextDecoratorShadowNode.h +62 -0
  29. package/android/src/reactNativeVersionPatch/CustomMountingManager/81/app/getbullet/marcus/CustomFabricUIManager.java +22 -3
  30. package/android/src/reactNativeVersionPatch/CustomMountingManager/latest/app/getbullet/marcus/CustomFabricUIManager.java +22 -3
  31. package/android/src/test/java/app/getbullet/marcus/MarkdownCopyTest.kt +69 -0
  32. package/android/src/test/java/app/getbullet/marcus/MarkdownFormatterTest.kt +170 -25
  33. package/android/src/test/java/app/getbullet/marcus/RenderModel.kt +22 -5
  34. package/android/src/test/java/app/getbullet/marcus/spans/MarkdownCodeBlockSpanTest.kt +91 -0
  35. package/android/src/test/resources/render-model.txt +221 -16
  36. package/apple/MarcusSwizzle.h +25 -0
  37. package/apple/MarcusTextDecoratorComponentView.h +22 -0
  38. package/apple/MarcusTextDecoratorComponentView.mm +72 -0
  39. package/apple/MarcusTextDecoratorShadowNode.h +62 -0
  40. package/apple/MarcusTextDecoratorShadowNode.mm +192 -0
  41. package/apple/MarcusTextDecoratorViewManager.h +4 -0
  42. package/apple/MarcusTextDecoratorViewManager.mm +11 -0
  43. package/apple/MarcusTextInputDecoratorComponentView.mm +1 -1
  44. package/apple/MarcusTextInputDecoratorShadowNode.mm +1 -1
  45. package/apple/MarcusTextLayoutManager.h +40 -0
  46. package/apple/MarcusTextLayoutManager.mm +173 -0
  47. package/apple/MarkdownAttributes.h +23 -2
  48. package/apple/MarkdownAttributes.m +6 -0
  49. package/apple/MarkdownCopy.swift +63 -0
  50. package/apple/MarkdownDecorator.swift +2 -2
  51. package/apple/MarkdownFormatter+React.swift +23 -0
  52. package/apple/MarkdownFormatter.swift +869 -148
  53. package/apple/MarkdownParagraphLayoutManager.swift +455 -0
  54. package/apple/MarkdownSwiftInterop.h +0 -1
  55. package/apple/MarkdownTextBackground.swift +59 -1
  56. package/apple/MarkdownTextFieldObserver.swift +2 -2
  57. package/apple/MarkdownTextLayoutFragment.swift +159 -33
  58. package/apple/MarkdownTextLayoutManagerDelegate.swift +67 -3
  59. package/apple/MarkdownTextStorageDelegate.swift +2 -2
  60. package/apple/MarkdownTextViewObserver.swift +2 -2
  61. package/apple/MarkdownUtils.swift +38 -0
  62. package/apple/MarkdownWritingDirection.swift +132 -0
  63. package/apple/RCTMarcusStyle+Codegen.h +115 -9
  64. package/apple/RCTMarcusStyle.h +128 -31
  65. package/apple/RCTMarcusStyle.m +48 -0
  66. package/apple/RCTParagraphComponentView+Marcus.h +17 -0
  67. package/apple/RCTParagraphComponentView+Marcus.mm +38 -0
  68. package/apple/RCTTextInputComponentView+Marcus.mm +1 -25
  69. package/cpp/react/renderer/components/RNMarcusSpec/MarcusTextDecoratorState.h +37 -0
  70. package/cpp/react/renderer/components/RNMarcusSpec/MarcusTextDecoratorViewComponentDescriptor.h +17 -0
  71. package/lib/commonjs/MarcusTextDecoratorViewNativeComponent.ts +199 -0
  72. package/lib/commonjs/MarcusTextInputDecoratorViewNativeComponent.ts +145 -58
  73. package/lib/commonjs/MarkdownText.js +330 -0
  74. package/lib/commonjs/MarkdownText.js.map +1 -0
  75. package/lib/commonjs/MarkdownText.web.js +529 -0
  76. package/lib/commonjs/MarkdownText.web.js.map +1 -0
  77. package/lib/commonjs/MarkdownTextInput.js +22 -27
  78. package/lib/commonjs/MarkdownTextInput.js.map +1 -1
  79. package/lib/commonjs/MarkdownTextInput.web.js +12 -7
  80. package/lib/commonjs/MarkdownTextInput.web.js.map +1 -1
  81. package/lib/commonjs/atomUtils.js +112 -0
  82. package/lib/commonjs/atomUtils.js.map +1 -0
  83. package/lib/commonjs/childrenUtils.js +36 -0
  84. package/lib/commonjs/childrenUtils.js.map +1 -0
  85. package/lib/commonjs/index.js +8 -7
  86. package/lib/commonjs/index.js.map +1 -1
  87. package/lib/commonjs/math/environment.js +69 -0
  88. package/lib/commonjs/math/environment.js.map +1 -0
  89. package/lib/commonjs/math/index.js +61 -0
  90. package/lib/commonjs/math/index.js.map +1 -0
  91. package/lib/commonjs/math/mathjax.js +548 -0
  92. package/lib/commonjs/math/mathjax.js.map +1 -0
  93. package/lib/commonjs/metro.js +172 -0
  94. package/lib/commonjs/metro.js.map +1 -0
  95. package/lib/commonjs/parser/index.d.ts +3 -0
  96. package/lib/commonjs/parser/index.js +450 -42
  97. package/lib/commonjs/parser/index.js.map +4 -4
  98. package/lib/commonjs/stripUtils.js +743 -0
  99. package/lib/commonjs/stripUtils.js.map +1 -0
  100. package/lib/commonjs/styleUtils.js +194 -23
  101. package/lib/commonjs/styleUtils.js.map +1 -1
  102. package/lib/commonjs/web/MarkdownElements.css +67 -0
  103. package/lib/commonjs/web/MarkdownTextInput.css +9 -7
  104. package/lib/commonjs/web/utils/blockLayout.js +95 -7
  105. package/lib/commonjs/web/utils/blockLayout.js.map +1 -1
  106. package/lib/commonjs/web/utils/blockUtils.js +327 -54
  107. package/lib/commonjs/web/utils/blockUtils.js.map +1 -1
  108. package/lib/commonjs/web/utils/elementUtils.js +80 -0
  109. package/lib/commonjs/web/utils/elementUtils.js.map +1 -0
  110. package/lib/commonjs/web/utils/parserUtils.js +84 -28
  111. package/lib/commonjs/web/utils/parserUtils.js.map +1 -1
  112. package/lib/commonjs/web/utils/treeUtils.js +6 -0
  113. package/lib/commonjs/web/utils/treeUtils.js.map +1 -1
  114. package/lib/commonjs/web/utils/webStyleUtils.js +25 -5
  115. package/lib/commonjs/web/utils/webStyleUtils.js.map +1 -1
  116. package/lib/module/MarcusTextDecoratorViewNativeComponent.ts +199 -0
  117. package/lib/module/MarcusTextInputDecoratorViewNativeComponent.ts +145 -58
  118. package/lib/module/MarkdownText.js +325 -0
  119. package/lib/module/MarkdownText.js.map +1 -0
  120. package/lib/module/MarkdownText.web.js +524 -0
  121. package/lib/module/MarkdownText.web.js.map +1 -0
  122. package/lib/module/MarkdownTextInput.js +24 -29
  123. package/lib/module/MarkdownTextInput.js.map +1 -1
  124. package/lib/module/MarkdownTextInput.web.js +12 -7
  125. package/lib/module/MarkdownTextInput.web.js.map +1 -1
  126. package/lib/module/atomUtils.js +106 -0
  127. package/lib/module/atomUtils.js.map +1 -0
  128. package/lib/module/childrenUtils.js +33 -0
  129. package/lib/module/childrenUtils.js.map +1 -0
  130. package/lib/module/index.js +1 -1
  131. package/lib/module/index.js.map +1 -1
  132. package/lib/module/math/environment.js +67 -0
  133. package/lib/module/math/environment.js.map +1 -0
  134. package/lib/module/math/index.js +56 -0
  135. package/lib/module/math/index.js.map +1 -0
  136. package/lib/module/math/mathjax.js +541 -0
  137. package/lib/module/math/mathjax.js.map +1 -0
  138. package/lib/module/metro.js +169 -0
  139. package/lib/module/metro.js.map +1 -0
  140. package/lib/module/parser/index.d.ts +3 -0
  141. package/lib/module/parser/index.js +450 -42
  142. package/lib/module/parser/index.js.map +4 -4
  143. package/lib/module/stripUtils.js +739 -0
  144. package/lib/module/stripUtils.js.map +1 -0
  145. package/lib/module/styleUtils.js +196 -25
  146. package/lib/module/styleUtils.js.map +1 -1
  147. package/lib/module/web/MarkdownElements.css +67 -0
  148. package/lib/module/web/MarkdownTextInput.css +9 -7
  149. package/lib/module/web/utils/blockLayout.js +94 -8
  150. package/lib/module/web/utils/blockLayout.js.map +1 -1
  151. package/lib/module/web/utils/blockUtils.js +328 -56
  152. package/lib/module/web/utils/blockUtils.js.map +1 -1
  153. package/lib/module/web/utils/elementUtils.js +75 -0
  154. package/lib/module/web/utils/elementUtils.js.map +1 -0
  155. package/lib/module/web/utils/parserUtils.js +86 -30
  156. package/lib/module/web/utils/parserUtils.js.map +1 -1
  157. package/lib/module/web/utils/treeUtils.js +6 -0
  158. package/lib/module/web/utils/treeUtils.js.map +1 -1
  159. package/lib/module/web/utils/webStyleUtils.js +25 -5
  160. package/lib/module/web/utils/webStyleUtils.js.map +1 -1
  161. package/lib/typescript/commonjs/e2e/links.test.d.ts +2 -0
  162. package/lib/typescript/commonjs/e2e/links.test.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/src/MarcusTextDecoratorViewNativeComponent.d.ts +93 -0
  164. package/lib/typescript/commonjs/src/MarcusTextDecoratorViewNativeComponent.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/src/MarcusTextInputDecoratorViewNativeComponent.d.ts +64 -51
  166. package/lib/typescript/commonjs/src/MarcusTextInputDecoratorViewNativeComponent.d.ts.map +1 -1
  167. package/lib/typescript/commonjs/src/MarkdownText.d.ts +127 -0
  168. package/lib/typescript/commonjs/src/MarkdownText.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/src/MarkdownText.web.d.ts +126 -0
  170. package/lib/typescript/commonjs/src/MarkdownText.web.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/src/MarkdownTextInput.d.ts +23 -1
  172. package/lib/typescript/commonjs/src/MarkdownTextInput.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/src/MarkdownTextInput.web.d.ts +26 -4
  174. package/lib/typescript/commonjs/src/MarkdownTextInput.web.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/src/atomUtils.d.ts +58 -0
  176. package/lib/typescript/commonjs/src/atomUtils.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/src/childrenUtils.d.ts +12 -0
  178. package/lib/typescript/commonjs/src/childrenUtils.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/src/commonTypes.d.ts +39 -3
  180. package/lib/typescript/commonjs/src/commonTypes.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/src/index.d.ts +2 -1
  182. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/src/math/environment.d.ts +7 -0
  184. package/lib/typescript/commonjs/src/math/environment.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/src/math/index.d.ts +64 -0
  186. package/lib/typescript/commonjs/src/math/index.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/src/math/mathjax.d.ts +63 -0
  188. package/lib/typescript/commonjs/src/math/mathjax.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/src/metro.d.ts +59 -0
  190. package/lib/typescript/commonjs/src/metro.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/src/parser/index.d.ts +3 -3
  192. package/lib/typescript/commonjs/src/parser/index.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/src/parser/micromark-extension-mentions.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/src/rangeUtils.d.ts +1 -1
  195. package/lib/typescript/commonjs/src/stripUtils.d.ts +108 -0
  196. package/lib/typescript/commonjs/src/stripUtils.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/src/styleUtils.d.ts +62 -4
  198. package/lib/typescript/commonjs/src/styleUtils.d.ts.map +1 -1
  199. package/lib/typescript/commonjs/src/web/utils/blockLayout.d.ts +32 -4
  200. package/lib/typescript/commonjs/src/web/utils/blockLayout.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/src/web/utils/blockUtils.d.ts +20 -8
  202. package/lib/typescript/commonjs/src/web/utils/blockUtils.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/src/web/utils/elementUtils.d.ts +37 -0
  204. package/lib/typescript/commonjs/src/web/utils/elementUtils.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/src/web/utils/parserUtils.d.ts +5 -5
  206. package/lib/typescript/commonjs/src/web/utils/parserUtils.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/src/web/utils/treeUtils.d.ts +6 -1
  208. package/lib/typescript/commonjs/src/web/utils/treeUtils.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/src/web/utils/webStyleUtils.d.ts +2 -2
  210. package/lib/typescript/commonjs/src/web/utils/webStyleUtils.d.ts.map +1 -1
  211. package/lib/typescript/module/e2e/links.test.d.ts +2 -0
  212. package/lib/typescript/module/e2e/links.test.d.ts.map +1 -0
  213. package/lib/typescript/module/src/MarcusTextDecoratorViewNativeComponent.d.ts +93 -0
  214. package/lib/typescript/module/src/MarcusTextDecoratorViewNativeComponent.d.ts.map +1 -0
  215. package/lib/typescript/module/src/MarcusTextInputDecoratorViewNativeComponent.d.ts +64 -51
  216. package/lib/typescript/module/src/MarcusTextInputDecoratorViewNativeComponent.d.ts.map +1 -1
  217. package/lib/typescript/module/src/MarkdownText.d.ts +127 -0
  218. package/lib/typescript/module/src/MarkdownText.d.ts.map +1 -0
  219. package/lib/typescript/module/src/MarkdownText.web.d.ts +126 -0
  220. package/lib/typescript/module/src/MarkdownText.web.d.ts.map +1 -0
  221. package/lib/typescript/module/src/MarkdownTextInput.d.ts +23 -1
  222. package/lib/typescript/module/src/MarkdownTextInput.d.ts.map +1 -1
  223. package/lib/typescript/module/src/MarkdownTextInput.web.d.ts +26 -4
  224. package/lib/typescript/module/src/MarkdownTextInput.web.d.ts.map +1 -1
  225. package/lib/typescript/module/src/atomUtils.d.ts +58 -0
  226. package/lib/typescript/module/src/atomUtils.d.ts.map +1 -0
  227. package/lib/typescript/module/src/childrenUtils.d.ts +12 -0
  228. package/lib/typescript/module/src/childrenUtils.d.ts.map +1 -0
  229. package/lib/typescript/module/src/commonTypes.d.ts +39 -3
  230. package/lib/typescript/module/src/commonTypes.d.ts.map +1 -1
  231. package/lib/typescript/module/src/index.d.ts +2 -1
  232. package/lib/typescript/module/src/index.d.ts.map +1 -1
  233. package/lib/typescript/module/src/math/environment.d.ts +7 -0
  234. package/lib/typescript/module/src/math/environment.d.ts.map +1 -0
  235. package/lib/typescript/module/src/math/index.d.ts +64 -0
  236. package/lib/typescript/module/src/math/index.d.ts.map +1 -0
  237. package/lib/typescript/module/src/math/mathjax.d.ts +63 -0
  238. package/lib/typescript/module/src/math/mathjax.d.ts.map +1 -0
  239. package/lib/typescript/module/src/metro.d.ts +59 -0
  240. package/lib/typescript/module/src/metro.d.ts.map +1 -0
  241. package/lib/typescript/module/src/parser/index.d.ts +3 -3
  242. package/lib/typescript/module/src/parser/index.d.ts.map +1 -1
  243. package/lib/typescript/module/src/parser/micromark-extension-mentions.d.ts.map +1 -1
  244. package/lib/typescript/module/src/rangeUtils.d.ts +1 -1
  245. package/lib/typescript/module/src/stripUtils.d.ts +108 -0
  246. package/lib/typescript/module/src/stripUtils.d.ts.map +1 -0
  247. package/lib/typescript/module/src/styleUtils.d.ts +62 -4
  248. package/lib/typescript/module/src/styleUtils.d.ts.map +1 -1
  249. package/lib/typescript/module/src/web/utils/blockLayout.d.ts +32 -4
  250. package/lib/typescript/module/src/web/utils/blockLayout.d.ts.map +1 -1
  251. package/lib/typescript/module/src/web/utils/blockUtils.d.ts +20 -8
  252. package/lib/typescript/module/src/web/utils/blockUtils.d.ts.map +1 -1
  253. package/lib/typescript/module/src/web/utils/elementUtils.d.ts +37 -0
  254. package/lib/typescript/module/src/web/utils/elementUtils.d.ts.map +1 -0
  255. package/lib/typescript/module/src/web/utils/parserUtils.d.ts +5 -5
  256. package/lib/typescript/module/src/web/utils/parserUtils.d.ts.map +1 -1
  257. package/lib/typescript/module/src/web/utils/treeUtils.d.ts +6 -1
  258. package/lib/typescript/module/src/web/utils/treeUtils.d.ts.map +1 -1
  259. package/lib/typescript/module/src/web/utils/webStyleUtils.d.ts +2 -2
  260. package/lib/typescript/module/src/web/utils/webStyleUtils.d.ts.map +1 -1
  261. package/package.json +29 -2
  262. package/react-native.config.js +8 -1
  263. package/src/MarcusTextDecoratorViewNativeComponent.ts +199 -0
  264. package/src/MarcusTextInputDecoratorViewNativeComponent.ts +145 -58
  265. package/src/MarkdownText.tsx +472 -0
  266. package/src/MarkdownText.web.tsx +668 -0
  267. package/src/MarkdownTextInput.tsx +42 -38
  268. package/src/MarkdownTextInput.web.tsx +36 -13
  269. package/src/atomUtils.ts +112 -0
  270. package/src/childrenUtils.ts +39 -0
  271. package/src/commonTypes.ts +69 -9
  272. package/src/index.tsx +2 -1
  273. package/src/math/environment.ts +68 -0
  274. package/src/math/index.ts +78 -0
  275. package/src/math/mathjax.ts +604 -0
  276. package/src/metro.ts +238 -0
  277. package/src/parser/index.ts +175 -10
  278. package/src/parser/micromark-extension-mentions.ts +104 -11
  279. package/src/stripUtils.ts +919 -0
  280. package/src/styleUtils.ts +290 -26
  281. package/src/web/MarkdownElements.css +67 -0
  282. package/src/web/MarkdownTextInput.css +9 -7
  283. package/src/web/utils/blockLayout.ts +124 -14
  284. package/src/web/utils/blockUtils.ts +365 -59
  285. package/src/web/utils/elementUtils.ts +87 -0
  286. package/src/web/utils/parserUtils.ts +119 -31
  287. package/src/web/utils/treeUtils.ts +6 -1
  288. package/src/web/utils/webStyleUtils.ts +32 -8
  289. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownBackgroundColorSpan.kt +0 -6
  290. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownBoldSpan.kt +0 -6
  291. package/android/src/main/java/app/getbullet/marcus/spans/MarkdownItalicSpan.kt +0 -6
  292. package/apple/RCTMarcusStyle+Codegen.mm +0 -64
  293. package/apple/RCTMarcusUtils.h +0 -26
  294. package/apple/RCTMarcusUtils.mm +0 -26
@@ -1,18 +1,124 @@
1
1
  #import <RNMarcus/RCTMarcusStyle.h>
2
2
 
3
- #import <react/renderer/components/RNMarcusSpec/Props.h>
3
+ #import <React/RCTConversions.h>
4
4
 
5
5
  NS_ASSUME_NONNULL_BEGIN
6
6
 
7
- // Conversion from the codegen props struct lives in a separate category so that
8
- // `RCTMarcusStyle.h` itself stays free of C++. Only the component view and
9
- // the shadow node need this header; everything downstream can import the plain
10
- // one.
11
- @interface RCTMarcusStyle (Codegen)
7
+ // Conversion from the codegen props struct lives in a separate header so that
8
+ // `RCTMarcusStyle.h` itself stays free of C++. Only the component views and the
9
+ // shadow nodes need this one; everything downstream can import the plain header.
10
+ //
11
+ // These are templates rather than initialisers because codegen emits a separate
12
+ // struct type per prop path even when the shape is identical: `code` and `pre`
13
+ // are written as one interface in TypeScript and arrive as two unrelated C++
14
+ // types, and so do the twelve copies of the text style. The shape is held
15
+ // together on the JavaScript side instead, by the assignability assertion in
16
+ // `MarcusTextDecoratorViewNativeComponent.ts`.
12
17
 
13
- - (instancetype)initWithStruct:
14
- (const facebook::react::MarcusTextInputDecoratorViewMarkdownStyleStruct &)style;
18
+ // A colour that was never written is `SharedColor`'s undefined value rather than
19
+ // a transparent one, and the difference matters: unset means "inherit whatever
20
+ // the prose is drawn in", where transparent means "draw nothing".
21
+ static inline UIColor *_Nullable
22
+ RCTMarcusColor(const facebook::react::SharedColor &color) {
23
+ return color ? RCTUIColorFromSharedColor(color) : nil;
24
+ }
15
25
 
16
- @end
26
+ template <typename TextStyleStruct>
27
+ static inline void RCTMarcusApplyTextStyle(RCTMarcusTextStyle *result,
28
+ const TextStyleStruct &style) {
29
+ result.color = RCTMarcusColor(style.color);
30
+ result.fontFamily = RCTNSStringFromStringNilIfEmpty(style.fontFamily);
31
+ result.fontSize = style.fontSize;
32
+ result.fontStyle = RCTNSStringFromStringNilIfEmpty(style.fontStyle);
33
+ result.fontWeight = RCTNSStringFromStringNilIfEmpty(style.fontWeight);
34
+ result.letterSpacing = style.letterSpacing;
35
+ result.lineHeight = style.lineHeight;
36
+ result.textDecorationLine =
37
+ RCTNSStringFromStringNilIfEmpty(style.textDecorationLine);
38
+ result.textDecorationColor = RCTMarcusColor(style.textDecorationColor);
39
+ result.textDecorationStyle =
40
+ RCTNSStringFromStringNilIfEmpty(style.textDecorationStyle);
41
+ result.textShadowColor = RCTMarcusColor(style.textShadowColor);
42
+ result.textShadowOffset =
43
+ CGSizeMake(style.textShadowOffset.width, style.textShadowOffset.height);
44
+ result.textShadowRadius = style.textShadowRadius;
45
+ }
46
+
47
+ template <typename TextStyleStruct>
48
+ static inline RCTMarcusTextStyle *
49
+ RCTMarcusTextStyleFromStruct(const TextStyleStruct &style) {
50
+ RCTMarcusTextStyle *result = [RCTMarcusTextStyle new];
51
+ RCTMarcusApplyTextStyle(result, style);
52
+ return result;
53
+ }
54
+
55
+ // The single `padding` and `margin` a style may be written with have already
56
+ // been resolved into the two axes by `mergeMarkdownStyleWithDefault`, so there
57
+ // is nothing to fall back to here.
58
+ template <typename BoxStyleStruct>
59
+ static inline RCTMarcusBoxStyle *
60
+ RCTMarcusBoxStyleFromStruct(const BoxStyleStruct &style) {
61
+ RCTMarcusBoxStyle *result = [RCTMarcusBoxStyle new];
62
+ RCTMarcusApplyTextStyle(result, style);
63
+
64
+ result.backgroundColor = RCTMarcusColor(style.backgroundColor);
65
+ result.borderColor = RCTMarcusColor(style.borderColor);
66
+ result.borderWidth = style.borderWidth;
67
+ result.borderRadius = style.borderRadius;
68
+ result.paddingHorizontal = style.paddingHorizontal;
69
+ result.paddingVertical = style.paddingVertical;
70
+ result.marginHorizontal = style.marginHorizontal;
71
+ result.marginVertical = style.marginVertical;
72
+
73
+ return result;
74
+ }
75
+
76
+ template <typename ListStyleStruct>
77
+ static inline RCTMarcusListStyle *
78
+ RCTMarcusListStyleFromStruct(const ListStyleStruct &style) {
79
+ RCTMarcusListStyle *result = [RCTMarcusListStyle new];
80
+
81
+ result.marginStart = style.marginStart;
82
+ result.paddingStart = style.paddingStart;
83
+ result.markerScale = style.markerScale;
84
+ result.markerPadding = style.markerPadding;
85
+ result.marker = RCTMarcusTextStyleFromStruct(style.marker);
86
+
87
+ return result;
88
+ }
89
+
90
+ template <typename MarkdownStyleStruct>
91
+ static inline RCTMarcusStyle *
92
+ RCTMarcusStyleFromStruct(const MarkdownStyleStruct &style) {
93
+ RCTMarcusStyle *result = [RCTMarcusStyle new];
94
+
95
+ result.syntax = RCTMarcusTextStyleFromStruct(style.syntax);
96
+ result.link = RCTMarcusTextStyleFromStruct(style.link);
97
+ result.strong = RCTMarcusTextStyleFromStruct(style.strong);
98
+ result.emphasis = RCTMarcusTextStyleFromStruct(style.emphasis);
99
+ result.strikethrough = RCTMarcusTextStyleFromStruct(style.strikethrough);
100
+
101
+ RCTMarcusApplyTextStyle(result.heading, style.heading);
102
+ result.heading.scale = style.heading.scale;
103
+
104
+ result.emoji.fontSize = style.emoji.fontSize;
105
+ result.emoji.fontFamily = RCTNSStringFromStringNilIfEmpty(style.emoji.fontFamily);
106
+
107
+ RCTMarcusApplyTextStyle(result.blockquote, style.blockquote);
108
+ result.blockquote.borderColor = RCTMarcusColor(style.blockquote.borderColor);
109
+ result.blockquote.borderWidth = style.blockquote.borderWidth;
110
+ result.blockquote.borderRadius = style.blockquote.borderRadius;
111
+ result.blockquote.marginStart = style.blockquote.marginStart;
112
+ result.blockquote.paddingStart = style.blockquote.paddingStart;
113
+
114
+ result.orderedList = RCTMarcusListStyleFromStruct(style.orderedList);
115
+ result.unorderedList = RCTMarcusListStyleFromStruct(style.unorderedList);
116
+
117
+ result.code = RCTMarcusBoxStyleFromStruct(style.code);
118
+ result.pre = RCTMarcusBoxStyleFromStruct(style.pre);
119
+ result.mention = RCTMarcusBoxStyleFromStruct(style.mention);
120
+
121
+ return result;
122
+ }
17
123
 
18
124
  NS_ASSUME_NONNULL_END
@@ -2,39 +2,136 @@
2
2
 
3
3
  NS_ASSUME_NONNULL_BEGIN
4
4
 
5
+ /// The text attributes one styled run can carry: the subset of React Native's
6
+ /// `TextStyle` that survives as an attribute on an attributed string.
7
+ ///
8
+ /// Everything is optional and everything unset is inherited, which is what a run
9
+ /// of markdown wants -- a mention that only names a colour keeps the face, the
10
+ /// size and the weight of the prose it sits in. "Unset" is the zero value: a nil
11
+ /// colour, a nil string, a zero length. Nothing is lost by that, because a
12
+ /// zero-length `fontSize`, `letterSpacing` or `lineHeight` would mean the same
13
+ /// as leaving it out.
14
+ ///
15
+ /// The two font names are strings rather than an enum because they are React
16
+ /// Native's own spellings -- `bold`, `600`, `italic` -- and `MarkdownFonts`
17
+ /// resolves them through React Native's font manager rather than interpreting
18
+ /// them here.
19
+ @interface RCTMarcusTextStyle : NSObject
20
+
21
+ @property(nonatomic, nullable) UIColor *color;
22
+ @property(nonatomic, copy, nullable) NSString *fontFamily;
23
+ @property(nonatomic) CGFloat fontSize;
24
+ @property(nonatomic, copy, nullable) NSString *fontStyle;
25
+ @property(nonatomic, copy, nullable) NSString *fontWeight;
26
+ @property(nonatomic) CGFloat letterSpacing;
27
+ /// Set on the paragraph, so a range covering part of a line raises all of it.
28
+ @property(nonatomic) CGFloat lineHeight;
29
+ @property(nonatomic, copy, nullable) NSString *textDecorationLine;
30
+ @property(nonatomic, nullable) UIColor *textDecorationColor;
31
+ @property(nonatomic, copy, nullable) NSString *textDecorationStyle;
32
+ @property(nonatomic, nullable) UIColor *textShadowColor;
33
+ @property(nonatomic) CGSize textShadowOffset;
34
+ @property(nonatomic) CGFloat textShadowRadius;
35
+
36
+ @end
37
+
38
+ /// A run drawn as a box rather than as a background behind the glyphs: an inline
39
+ /// or fenced run of code, or a mention's pill.
40
+ ///
41
+ /// What the room holds open differs, because a block owns its lines and a run
42
+ /// shares one. A block's padding and margin are held open on the leading edge
43
+ /// and vertically, and a line long enough to wrap reaches the padding on the
44
+ /// trailing edge rather than stopping in front of it: neither platform can
45
+ /// reserve a trailing indent per paragraph. An inline run holds its padding and
46
+ /// margin open on both sides, by widening the characters it starts and ends
47
+ /// with, and grows into the line's own spacing above and below rather than
48
+ /// pushing the lines apart.
49
+ ///
50
+ /// Only the per-axis lengths are here. A style may be written with a single
51
+ /// `padding` or `margin` covering both axes; `mergeMarkdownStyleWithDefault`
52
+ /// resolves that into the two before the style is ever sent, so that a length of
53
+ /// zero here means zero rather than "unset".
54
+ @interface RCTMarcusBoxStyle : RCTMarcusTextStyle
55
+
56
+ @property(nonatomic, nullable) UIColor *backgroundColor;
57
+ @property(nonatomic, nullable) UIColor *borderColor;
58
+ @property(nonatomic) CGFloat borderWidth;
59
+ @property(nonatomic) CGFloat borderRadius;
60
+ @property(nonatomic) CGFloat paddingHorizontal;
61
+ @property(nonatomic) CGFloat paddingVertical;
62
+ @property(nonatomic) CGFloat marginHorizontal;
63
+ @property(nonatomic) CGFloat marginVertical;
64
+
65
+ @end
66
+
67
+ @interface RCTMarcusHeadingStyle : RCTMarcusTextStyle
68
+
69
+ /// Each level down multiplies the one above, so level N is
70
+ /// `fontSize * scale^(N - 1)`. Six levels, matching HTML.
71
+ @property(nonatomic) CGFloat scale;
72
+
73
+ @end
74
+
75
+ /// The bar beside a quoted block, the indent it opens, and the text inside it.
76
+ ///
77
+ /// `marginStart` and `paddingStart` rather than left and right: the gutter opens
78
+ /// on the paragraph's leading edge, which is what `NSParagraphStyle`'s head
79
+ /// indent has always meant, and so the names now say what was already drawn.
80
+ @interface RCTMarcusBlockquoteStyle : RCTMarcusTextStyle
81
+
82
+ @property(nonatomic, nullable) UIColor *borderColor;
83
+ @property(nonatomic) CGFloat borderWidth;
84
+ /// Rounds the bar's ends. A bar whose radius is half its width is a capsule.
85
+ @property(nonatomic) CGFloat borderRadius;
86
+ @property(nonatomic) CGFloat marginStart;
87
+ @property(nonatomic) CGFloat paddingStart;
88
+
89
+ @end
90
+
91
+ /// Indent, and the marker that sits in the gutter it opens.
92
+ ///
93
+ /// The marker is sized from the base font -- the size the wrapped `Text` renders
94
+ /// at -- rather than from a size of its own, so a list marks itself in
95
+ /// proportion to the prose it marks however that prose is sized. `marker` is
96
+ /// what it is drawn with, already resolved against `syntax` on the JavaScript
97
+ /// side, so nothing here has to know where an unset value came from.
98
+ @interface RCTMarcusListStyle : NSObject
99
+
100
+ @property(nonatomic) CGFloat marginStart;
101
+ @property(nonatomic) CGFloat paddingStart;
102
+ /// An ordered item's number is drawn at this fraction of the base font size; an
103
+ /// unordered item's bullet takes it as a diameter, as a fraction of the same.
104
+ @property(nonatomic) CGFloat markerScale;
105
+ /// Room held open either side of the marker, between the gutter and the text.
106
+ @property(nonatomic) CGFloat markerPadding;
107
+ @property(nonatomic, strong) RCTMarcusTextStyle *marker;
108
+
109
+ @end
110
+
111
+ @interface RCTMarcusEmojiStyle : NSObject
112
+
113
+ @property(nonatomic) CGFloat fontSize;
114
+ @property(nonatomic, copy, nullable) NSString *fontFamily;
115
+
116
+ @end
117
+
5
118
  @interface RCTMarcusStyle : NSObject
6
119
 
7
- @property(nonatomic) UIColor *syntaxColor;
8
- @property(nonatomic) UIColor *linkColor;
9
- @property(nonatomic) CGFloat headingFontSize;
10
- @property(nonatomic) CGFloat headingScale;
11
- @property(nonatomic) CGFloat emojiFontSize;
12
- @property(nonatomic) NSString *emojiFontFamily;
13
- @property(nonatomic) UIColor *blockquoteBorderColor;
14
- @property(nonatomic) CGFloat blockquoteBorderWidth;
15
- @property(nonatomic) CGFloat blockquoteMarginLeft;
16
- @property(nonatomic) CGFloat blockquotePaddingLeft;
17
- @property(nonatomic) CGFloat orderedListMarginLeft;
18
- @property(nonatomic) CGFloat orderedListPaddingLeft;
19
- @property(nonatomic) CGFloat unorderedListMarginLeft;
20
- @property(nonatomic) CGFloat unorderedListPaddingLeft;
21
- @property(nonatomic) NSString *codeFontFamily;
22
- @property(nonatomic) CGFloat codeFontSize;
23
- @property(nonatomic) UIColor *codeColor;
24
- @property(nonatomic) UIColor *codeBackgroundColor;
25
- @property(nonatomic) NSString *preFontFamily;
26
- @property(nonatomic) CGFloat preFontSize;
27
- @property(nonatomic) UIColor *preColor;
28
- @property(nonatomic) UIColor *preBackgroundColor;
29
- @property(nonatomic) UIColor *mentionHereColor;
30
- @property(nonatomic) UIColor *mentionHereBackgroundColor;
31
- @property(nonatomic) CGFloat mentionHereBorderRadius;
32
- @property(nonatomic) UIColor *mentionUserColor;
33
- @property(nonatomic) UIColor *mentionUserBackgroundColor;
34
- @property(nonatomic) CGFloat mentionUserBorderRadius;
35
- @property(nonatomic) UIColor *mentionReportColor;
36
- @property(nonatomic) UIColor *mentionReportBackgroundColor;
37
- @property(nonatomic) CGFloat mentionReportBorderRadius;
120
+ @property(nonatomic, strong) RCTMarcusTextStyle *syntax;
121
+ @property(nonatomic, strong) RCTMarcusTextStyle *link;
122
+ @property(nonatomic, strong) RCTMarcusTextStyle *strong;
123
+ @property(nonatomic, strong) RCTMarcusTextStyle *emphasis;
124
+ @property(nonatomic, strong) RCTMarcusTextStyle *strikethrough;
125
+ @property(nonatomic, strong) RCTMarcusHeadingStyle *heading;
126
+ @property(nonatomic, strong) RCTMarcusEmojiStyle *emoji;
127
+ @property(nonatomic, strong) RCTMarcusBlockquoteStyle *blockquote;
128
+ @property(nonatomic, strong) RCTMarcusListStyle *orderedList;
129
+ @property(nonatomic, strong) RCTMarcusListStyle *unorderedList;
130
+ @property(nonatomic, strong) RCTMarcusBoxStyle *code;
131
+ @property(nonatomic, strong) RCTMarcusBoxStyle *pre;
132
+ /// A name with an `@` in front of it, drawn as a pill: the same inline box an
133
+ /// inline run of code sits in, and so the same lengths.
134
+ @property(nonatomic, strong) RCTMarcusBoxStyle *mention;
38
135
 
39
136
  @end
40
137
 
@@ -1,5 +1,53 @@
1
1
  #import <RNMarcus/RCTMarcusStyle.h>
2
2
 
3
+ @implementation RCTMarcusTextStyle
4
+ @end
5
+
6
+ @implementation RCTMarcusBoxStyle
7
+ @end
8
+
9
+ @implementation RCTMarcusHeadingStyle
10
+ @end
11
+
12
+ @implementation RCTMarcusBlockquoteStyle
13
+ @end
14
+
15
+ @implementation RCTMarcusListStyle
16
+
17
+ - (instancetype)init {
18
+ if (self = [super init]) {
19
+ _marker = [RCTMarcusTextStyle new];
20
+ }
21
+ return self;
22
+ }
23
+
24
+ @end
25
+
26
+ @implementation RCTMarcusEmojiStyle
27
+ @end
28
+
3
29
  @implementation RCTMarcusStyle
4
30
 
31
+ // Every entry exists whether or not the style named it, so that a formatter can
32
+ // read one without asking first: an entry that says nothing is an entry whose
33
+ // every property is unset, which is exactly what "inherit" means here.
34
+ - (instancetype)init {
35
+ if (self = [super init]) {
36
+ _syntax = [RCTMarcusTextStyle new];
37
+ _link = [RCTMarcusTextStyle new];
38
+ _strong = [RCTMarcusTextStyle new];
39
+ _emphasis = [RCTMarcusTextStyle new];
40
+ _strikethrough = [RCTMarcusTextStyle new];
41
+ _heading = [RCTMarcusHeadingStyle new];
42
+ _emoji = [RCTMarcusEmojiStyle new];
43
+ _blockquote = [RCTMarcusBlockquoteStyle new];
44
+ _orderedList = [RCTMarcusListStyle new];
45
+ _unorderedList = [RCTMarcusListStyle new];
46
+ _code = [RCTMarcusBoxStyle new];
47
+ _pre = [RCTMarcusBoxStyle new];
48
+ _mention = [RCTMarcusBoxStyle new];
49
+ }
50
+ return self;
51
+ }
52
+
5
53
  @end
@@ -0,0 +1,17 @@
1
+ #import <React/RCTParagraphComponentView.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ // Copying a paragraph that has drawings in it.
6
+ //
7
+ // A view nested in a `Text` is one U+FFFC in the attributed string React Native
8
+ // lays out, and U+FFFC is what its own `copy:` puts on the pasteboard: an
9
+ // equation arrives in the next application as an empty box. This replaces the
10
+ // copy with one that writes each of those characters back out as the markdown
11
+ // it stands for -- but only for a paragraph inside a `MarcusTextDecoratorView`
12
+ // that reported any, so every other `Text` in the application copies exactly as
13
+ // it did before.
14
+ @interface RCTParagraphComponentView (Marcus)
15
+ @end
16
+
17
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,38 @@
1
+ #import <RNMarcus/MarcusSwizzle.h>
2
+ #import <RNMarcus/MarcusTextDecoratorComponentView.h>
3
+ #import <RNMarcus/RCTParagraphComponentView+Marcus.h>
4
+
5
+ @implementation RCTParagraphComponentView (Marcus)
6
+
7
+ - (void)marcus_copy:(id)sender {
8
+ // The decorator is this view's superview: it has a host view of its own
9
+ // precisely so that it can sit there, and it is the only thing that knows
10
+ // what the placeholders in this paragraph stand for.
11
+ UIView *parent = self.superview;
12
+
13
+ NSString *source =
14
+ [parent isKindOfClass:[MarcusTextDecoratorComponentView class]]
15
+ ? [(MarcusTextDecoratorComponentView *)parent substitutedTextOf:self.attributedText]
16
+ : nil;
17
+
18
+ if (source == nil) {
19
+ [self marcus_copy:sender];
20
+ return;
21
+ }
22
+
23
+ // Plain text alone, where React Native would also put RTF. What is on the
24
+ // pasteboard now is markdown -- the source of the paragraph, dollar signs and
25
+ // all -- and there is no rich-text rendering of that worth carrying: the
26
+ // markup that says how it looked is the very thing being copied out.
27
+ UIPasteboard.generalPasteboard.string = source;
28
+ }
29
+
30
+ + (void)load {
31
+ static dispatch_once_t onceToken;
32
+ dispatch_once(&onceToken, ^{
33
+ // Implemented by this class, so this is a plain exchange.
34
+ RCTMarcusSwizzle([self class], @selector(copy:), @selector(marcus_copy:));
35
+ });
36
+ }
37
+
38
+ @end
@@ -1,7 +1,7 @@
1
1
  #import <RNMarcus/MarkdownAttributes.h>
2
2
  #import <RNMarcus/MarcusTextInputDecoratorComponentView.h>
3
+ #import <RNMarcus/MarcusSwizzle.h>
3
4
  #import <RNMarcus/RCTTextInputComponentView+Marcus.h>
4
- #import <objc/message.h>
5
5
 
6
6
  @implementation RCTTextInputComponentView (Marcus)
7
7
 
@@ -39,30 +39,6 @@
39
39
  }
40
40
  }
41
41
 
42
- // Installs `swizzledSelector` in place of `originalSelector` on `cls`.
43
- //
44
- // method_exchangeImplementations alone is only safe when `cls` implements
45
- // `originalSelector` itself. For an inherited method -- didAddSubview:, for
46
- // instance -- class_getInstanceMethod returns the *superclass's* method, and
47
- // exchanging it rewrites UIView for every view in the app. So the
48
- // implementation is added to this class first; when that succeeds, the
49
- // "call the original" selector is pointed at the inherited implementation.
50
- static void
51
- RCTMarcusSwizzle(Class cls, SEL originalSelector, SEL swizzledSelector) {
52
- Method originalMethod = class_getInstanceMethod(cls, originalSelector);
53
- Method swizzledMethod = class_getInstanceMethod(cls, swizzledSelector);
54
- if (originalMethod == NULL || swizzledMethod == NULL) {
55
- return;
56
- }
57
-
58
- BOOL didAddMethod = class_addMethod(cls, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod));
59
- if (didAddMethod) {
60
- class_replaceMethod(cls, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
61
- } else {
62
- method_exchangeImplementations(originalMethod, swizzledMethod);
63
- }
64
- }
65
-
66
42
  + (void)load {
67
43
  static dispatch_once_t onceToken;
68
44
  dispatch_once(&onceToken, ^{
@@ -0,0 +1,37 @@
1
+ #pragma once
2
+
3
+ #include <memory>
4
+ #include <react/renderer/core/ShadowNodeFamily.h>
5
+
6
+ namespace facebook {
7
+ namespace react {
8
+
9
+ // The decorator carries no state of its own; the formatting it applies lives on
10
+ // the text layout manager it hands to the child. This exists only because a
11
+ // shadow node has to name a state type, and because Android's mounting layer
12
+ // wants one it can serialize.
13
+ class JSI_EXPORT MarcusTextDecoratorState final {
14
+ public:
15
+ using Shared = std::shared_ptr<const MarcusTextDecoratorState>;
16
+
17
+ MarcusTextDecoratorState() {};
18
+
19
+ // TODO: Simplify once RN 0.81 is the lowest supported version
20
+ #if (defined(ANDROID) && REACT_NATIVE_MINOR_VERSION < 81) || (defined(RN_SERIALIZABLE_STATE) && REACT_NATIVE_MINOR_VERSION >= 81)
21
+ MarcusTextDecoratorState(
22
+ MarcusTextDecoratorState const &previousState, folly::dynamic data
23
+ ) {};
24
+
25
+ folly::dynamic
26
+ getDynamic() const {
27
+ return {};
28
+ }
29
+ #if REACT_NATIVE_MINOR_VERSION < 81
30
+ MapBuffer
31
+ getMapBuffer() const { return MapBufferBuilder::EMPTY(); };
32
+ #endif // REACT_NATIVE_MINOR_VERSION < 81
33
+ #endif // (defined(ANDROID) && REACT_NATIVE_MINOR_VERSION < 81) || (defined(RN_SERIALIZABLE_STATE) && REACT_NATIVE_MINOR_VERSION >= 81)
34
+ };
35
+
36
+ } // namespace react
37
+ } // namespace facebook
@@ -0,0 +1,17 @@
1
+ #pragma once
2
+
3
+ #include "MarcusTextDecoratorShadowNode.h"
4
+ #include <react/debug/react_native_assert.h>
5
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
6
+
7
+ namespace facebook {
8
+ namespace react {
9
+
10
+ class MarcusTextDecoratorViewComponentDescriptor final
11
+ : public ConcreteComponentDescriptor<MarcusTextDecoratorShadowNode> {
12
+ public:
13
+ using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
14
+ };
15
+
16
+ } // namespace react
17
+ } // namespace facebook