Commit a13b394
committed
chore(release): 1.0.0 [skip ci]
## 1.0.0 (2025-09-21)
### ✨ Features
* **ios:** add allowFontScaling, letterSpacing, DynamicTypeRamp; align Fabric measurement with native (transform, metrics); coalesce Swift updates; fix textTransform updates and dynamic type mapping ([42129d6](42129d6))
* **ios:** add ellipsizeMode support\n\n- Adds new prop ellipsizeMode: 'head' | 'middle' | 'tail' | 'clip'\n- Wires prop through Nitro generated layers (manual patches)\n- Implements mapping in NitroTextImpl using NSLineBreakMode, including multi-line\n- Mirrors truncation in paragraph style for attributed text\n- Updates JS types and config ([98b65cf](98b65cf))
* **iOS:** add lineBreakStrategyIOS support (render + measure) ([c13d89d](c13d89d))
* **IOS:** add text decoration support in NitroText ([986c873](986c873))
* **ios:** enhance ellipsizeMode support ([983a7d5](983a7d5))
* **ios:** honor ellipsizeMode for single-line; coerce multi-line to tail/clip\n\n- Add effectiveLineBreakMode helper and apply everywhere\n- Reapply lineBreakMode on numberOfLines/ellipsizeMode changes\n- Fix missing setNeedsLayout in setNumberOfLines ([d5f3fb1](d5f3fb1))
* **ios:** introduce Fabric NitroText with native iOS view, fragments, selection, and measurement ([9067d25](9067d25))
* **iOS:** support maxFontSizeMultiplier, adjustsFontSizeToFit, minimumFontScale (wiring + measure); cap scaling in renderer ([775e48d](775e48d))
* **text:** add allowFontScaling support; honor RN default fontSizeMultiplier=1.0; update NitroTextShadowNode measurement and iOS font scaling ([8980cd5](8980cd5))
* **text:** add fontFamily and selectionColor props; support generic iOS UI font families; pressed highlighting with suppressHighlighting; update ShadowNode measurement ([9f56183](9f56183))
* **text:** add letterSpacing support matching RN Text (TS props, config, bridge); apply NSKern in iOS; include in Fabric measurement; merge top-level + fragments ([d489f64](d489f64))
### 🐛 Bug Fixes
* **ios:** align Fabric text measurement with rendering when font scaling enabled by setting dynamicTypeRamp=Body and applying baseline offset for custom lineHeight; reduces extra bottom spacing ([dd6669c](dd6669c))
* **ios:** apply ellipsizeMode-derived lineBreakMode and request layout\n\n- Ensure setNumberOfLines and setEllipsizeMode call setNeedsLayout\n- Paragraph style and textContainer use effectiveLineBreakMode derived from current ellipsizeMode + numberOfLines\n- Aligns behavior with RN for multi-line clip/tail ([fe367ad](fe367ad))
* **iOS:** match RN Text scaling precisely ([5d58b48](5d58b48))
* **ios:** multi-line clip should wrap to N lines (use WordWrapping)\n\n- For numberOfLines > 1 and ellipsizeMode=clip, use .byWordWrapping\n- Prevents single-line clipping and matches RN Text behavior ([bdb4a93](bdb4a93))
### 💨 Performance Improvements
* **ios:** cache UIFonts and request layout on truncation changes\n\n- Add small font cache keyed by size/weight/italic to avoid repeated font recreation\n- Call setNeedsLayout on numberOfLines/ellipsizeMode changes to ensure efficient relayout\n- Keep helpers accessible from extensions ([5580bfb](5580bfb))
### 🔄 Code Refactors
* Extract helpers to simplify setFragments\n\n- Split into makeAttributes/makeFont/makeParagraphStyle/resolveColor/transform\n- Preserve behavior (weights, italics, colors, alignment, truncation)\n- Improves readability and maintainability ([7ca2faa](7ca2faa))
* **iOS:** clean up whitespace and improve code formatting in NitroText and NitroTextImpl classes ([13a5926](13a5926))
* **ios:** extract attribute builders to NitroTextImpl+Attributes.swift\n\n- Move makeAttributes/makeParagraphStyle/resolveColor/transform into an extension file\n- Relax access controls so extensions can read state (alignment, transform, container)\n- Keep NitroTextImpl.swift focused on core logic ([4f24327](4f24327))
* **ios:** extract fragment/default merging into NitroTextImpl+Fragment.swift\n\n- Move FragmentTopDefaults, apply(...) and fontWeight mapping to an extension file\n- Keep NitroTextImpl.swift focused on layout/render logic ([f0d637c](f0d637c))
* **ios:** move all font logic to NitroTextImpl+Font.swift\n\n- Extract makeFont(for:defaultPointSize:) into +Font extension\n- Update callers to pass default point size\n- Keeps NitroTextImpl.swift focused on non-font responsibilities ([5373ed3](5373ed3))
* **ios:** move FontKey struct inside NitroTextImpl extension ([8a40eb1](8a40eb1))
* **ios:** move fontWeightFromString to NitroTextImpl+Font.swift\n\n- Keep +Fragment focused on fragment/default merging\n- Group font mapping in a dedicated +Font extension ([e24e09d](e24e09d))
* **ios:** move fragment/defaults merge into NitroTextImpl\n\n- Add FragmentTopDefaults and apply(fragments:text:top:) in NitroTextImpl\n- Delegate merging from HybridNitroText to NitroTextImpl\n- Keeps Hybrid class thin and centralizes render logic ([d7791c4](d7791c4))
* **ios:** remove commented-out code and improve formatting in HybridNitroText and NitroTextImpl ([43c5416](43c5416))
* **iOS:** remove custom lineHeight handling from NitroText attributes ([b1e93ce](b1e93ce))
* **ios:** rename fontWeightFromString -> uiFontWeight(for:) to reflect behavior ([478d264](478d264))
* **text:** streamline property updates in HybridNitroText to use markNeedsApply for deferred processing ([fcd8acf](fcd8acf))
* **utils:** simplify style handling in getFragmentConfig ([72772bd](72772bd))
### 📚 Documentation
* **README:** keep the docs simple ([94936ae](94936ae))
* **README:** replace Parity Roadmap with concrete checklist and add Text vs NitroText table ([66f4070](66f4070))
* **README:** Update features and props documentation to reflect recent changes. ([384abe3](384abe3))
* update package description and README for NitroText component ([a605715](a605715))
### 🛠️ Other changes
* bump up nitro to 0.29.6 ([01e8f73](01e8f73))
* bump version to 0.1.2 in package.json ([702a195](702a195))
* update hermes-engine to version 0.81.4 ([4cd6c2c](4cd6c2c))
* update typescript version to ^5.8.3 in package.json and bun.lock ([725fb44](725fb44))1 parent 4d668c8 commit a13b394
2 files changed
Lines changed: 58 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
0 commit comments