Skip to content

Release 6.0.0-alpha.11

Pre-release
Pre-release
Compare
Choose a tag to compare
@jsamr jsamr released this 27 Jan 21:22
· 896 commits to master since this release

6.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

  • drop ignoreNodesFunction (97ffc8d)
  • remove containerStyle and customContainer props (dab1d25)

Features

  • add getStyleFromNetstLevel prop to HTMLListElement (5695fea)
  • expose default renderers logic for extensibility (691f9cf), closes #424
  • implement defaultTextProps prop (13d7abf)
  • implement useInternalRenderer hook 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, alterChildren and alterNode (1e0002b)
  • port ignoreDOMNode hook (8a0d14f)
  • port ignoredTags prop (9d2f5d5)
  • port emSize prop (f567532)
  • safe typeguards in extendDefaultRenderer (eb565df)
  • support htmlParserOptions prop (3e5de96)
  • support source prop, identical to react-native-webview (ed74eb9)
  • support WebView and defaultWebViewProps (fe177d7)

BREAKING CHANGES

  • ignoreNodesFunction has been renamed ignoreDOMNode.

  • the names of hooks to alter DOM content have been changed for clarity:

    • alterData becomes alterDOMData
    • alterChildren becomes alterDOMChildren
    • alterNode becomes alterDOMElement
  • 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.

  • containerStyle and customContainer props have been dropped. Use baseStyle prop instead to style the root component.

  • drop textSelectable and allowFontScaling. Use defaultTextProps.selectable and defaultTextProps.allowFontScaling instead.

  • uri and html props have been dropped. Replace uri with source={{ uri: 'http://...' }} and html with source={{ html: '<div> ...' }}. The former now allows body, headers and method fields.

  • decodeEntities prop has been dropped. Pass this option to htmlParserOptions prop instead.

  • computeImagesMaxWidth has been replaced with computeEmbeddedMaxWidth. 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 splitBoxModelStyle has more legible field names, boxModelStyle and otherStyle.

  • extendRenderer has been renamed to extendDefaultRenderer. Also note:

    • The first argument can be the name of the tag to extend;
    • The second argument is now a partial model;