Release 6.0.0-alpha.11
Pre-release6.0.0-alpha.11 (2021-01-27)
Bug Fixes
- inject textProps in TText renderers (29ea34c)
- missing proptype (onHTMLLoaded) (74a56ae)
- prettier, consistant and scalable list rendering (7c2e26a)
Code Refactoring
Features
- add getStyleFromNetstLevel prop to HTMLListElement (5695fea)
- expose default renderers logic for extensibility (691f9cf), closes #424
- implement
defaultTextPropsprop (13d7abf) - implement
useInternalRendererhook to reuse internal rendering logic (add307c) - implement computeEmbeddedMaxWidth prop as per RFC001@2.0.0 (9ee8475)
- nesting ol and ul will result in disinct bullet style types (a18016f), closes #312
- port
alterData,alterChildrenandalterNode(1e0002b) - port
ignoreDOMNodehook (8a0d14f) - port
ignoredTagsprop (9d2f5d5) - port
emSizeprop (f567532) - safe typeguards in
extendDefaultRenderer(eb565df) - support
htmlParserOptionsprop (3e5de96) - support
sourceprop, identical to react-native-webview (ed74eb9) - support WebView and defaultWebViewProps (fe177d7)
BREAKING CHANGES
-
ignoreNodesFunctionhas been renamedignoreDOMNode. -
the names of hooks to alter DOM content have been changed for clarity:
alterDatabecomesalterDOMDataalterChildrenbecomesalterDOMChildrenalterNodebecomesalterDOMElement
-
dropped ptSize prop. Point is supposed to be an absolute (pixel independant) size and unfit for display devices. It will be translated by the CSS processor to an absolute unit.
-
containerStyleandcustomContainerprops have been dropped. UsebaseStyleprop instead to style the root component. -
drop
textSelectableandallowFontScaling. UsedefaultTextProps.selectableanddefaultTextProps.allowFontScalinginstead. -
uriandhtmlprops have been dropped. Replaceuriwithsource={{ uri: 'http://...' }}andhtmlwithsource={{ html: '<div> ...' }}. The former now allowsbody,headersandmethodfields. -
decodeEntitiesprop has been dropped. Pass this option tohtmlParserOptionsprop instead. -
computeImagesMaxWidthhas been replaced withcomputeEmbeddedMaxWidth. The two props are very similar, but the latest takes an extra argument, "tagName", which is the tag for which a width constrain should be enforced. It is planned to work with the @native-html/iframe-plugin extension. -
the object returned by
splitBoxModelStylehas more legible field names,boxModelStyleandotherStyle. -
extendRendererhas been renamed toextendDefaultRenderer. Also note:- The first argument can be the name of the tag to extend;
- The second argument is now a partial model;